DarkAngelBGE
-
Posts
7.686 -
Joined
-
Last visited
Posts posted by DarkAngelBGE
-
-
Hrm the SUnbird project seems very cool..didn't know about it yet. Just downloaded it and checked it out..seems pretty cool!
Keep them coming guys!
-
I recently got the idea that my way of organizing my appointments is not very effective. I simply write everything down on sheets of paper which I tend to forget. Need fresh ideas now.
So how do you organize your appointments, TODO-lists, etc.? Do you use mobiles, handhelds,...?
-
Yeah asked him, but he does not know it either.
-
Thanks guys.
Maybe something like that, Desmond, also exists for AutoIT? (http://www.autoitscript.com/)
-
Hi gang,
I am looking for some code that allows me to write to a certain irc channel out of a visual basic program (or any other language). Anybody able to help?
Thanks in advance.
-
Hrm this is really weird. What browser are you on John? Maybe the server is playing nuts from time to time. Really, this should not be happening.
-
I am through the campaign already...it is a good campaign, but a bit too much base building IMO. There should have been more scenarios with time constraints or a one-man-show..like you get a hero and have to go through an enemy fort without being seen.
The skirmish modus is okay either...however, the AI is not very good.
-
Thanks Mabuse for the list, we jumped quite ahead with regards to Ai situtation assessment. I will post some details later for you.
-
I would like to propose that the list of fonts we are able to post with in the WFG forums be increased with fonts relating to 0ad and TLA. For example, some fonts pertaining to the various civilizations in 0ad be included (Greek, Old Persian, Celtic/Germanic Runes, an informal Latin script or two, ect.), and for TLA there could be a few Tengwar fonts, and some Angerthas and Cirith fonts.
John, that will be some kind of problem, because in order for the fonts to be displayed properly we will need to have them installed on all forumers' computers, or else they won't see them. Of course, we would have an alternative "fall back" font if a particular font is missing, but at least not all forumers will have the same community experience anymore.
Personally I would like to keep it that way. If an Arda font is needed, and that is not too often the case, images would do the job awesomely, non?
-
I once was very addicted to Diablo2..playing it all the time losing sight of school, WFG and everything else. Not good at all.
But I hadt he best sorceress on the Europe realm.
-
Jason, you cheater.
I am currently (legitely) on level 13.
-
Lol Philipp. Too bad..you were almost right.
-
Not bad Philip, not bad. It's something like that...but what exactly.. ?
-
-
Was bored today and wrote myself a Product Key Generator. Have a look at here:
http://tim-koschuetzki.com/files/KeyGenerator/
Whoever tells me after which pattern the CD Keys work will get 1 million dollar from me.
Good luck, you will need it.
-
Heyas, welcome aboard. What is your real name and your hobbies? Cheers!
-
Welcome aboard, Job.
-
Yep, I would also recommend phpbb.com to you there.
-
Nevermind, fixed the problem.
-
Hey guys, I cannot get one of my unit tests to pass.
Vertreter := (German) Spokesman.
Mitglied := (German) Member.
The application is to make members into spokesmen and providing a CRUD (Create, Read, Update, delete) interface to do it.
<?php
require_once('simpletest/unit_tester.php');
require_once('simpletest/reporter.php');
require_once('../Mitglied.php');
require_once('../Vertreter.php');
require_once('../lib/Database.php');
class TestOfMitglied extends UnitTestCase {
function testMitgliedId() {
$m=new Mitglied(1);
$this->assertEqual($m->id(),1);
$v=Mitglied::findByID(1);
$this->assertEqual($m->wb(), $v->wb());
}
function testMitgliedIsVertreter() {
$m=new Mitglied(1);
$this->assertFalse($m->isVertreter());
$m->setVertreter(false);
$m->save();
$this->assertFalse($m->isVertreter());
$m->setVertreter(true);
$m->save();
$this->assertTrue($m->isVertreter()); // *
}
}
$test = new TestOfMitglied;
$test->run(new HtmlReporter());
?>The assertion at the line with the // * comment is always false.
Here is my code. Thanks a lot for taking a look.
<?php
// Tim Koschützki Webdesign
// Date Started: October 30th 2005
require_once('lib/Database.php');
class Mitglied {
const NEW_MITGLIED=-1;
const UNSET_VERTRETER=-1;
protected $id=Mitglied::NEW_MITGLIED;
protected $titel;
protected $name;
protected $vorname;
protected $str;
protected $plz;
protected $ort;
protected $wb;
protected $hasVotedOK=0;
protected $isVertreter=Mitglied::UNSET_VERTRETER;
protected $isWantedVertreter=Mitglied::UNSET_VERTRETER;
protected $conn;
const INSERT_SQL = "insert into mitglieder
(id,wb,titel,vorname,name,str,plz,ort,hasVotedOK)
values (?, ?, ?, ?, ?, ?, ?, ?, ?)";
const UPDATE_SQL = "update mitglieder SET
wb=?,titel=?,vorname=?,name=?,str=?,plz=?,ort=?,hasVotedOK=?
where id=?";
const DELETE_SQL = "delete from mitglieder where id=?";
const FIND_BY_ID_SQL = 'select * from mitglieder where id=?';
const FIND_BY_WB_SQL = 'select * from mitglieder where wb=?';
const FIND_VERTRETER_BY_ID_SQL = 'select id from vertreter where mitgl_id=?';
const INSERT_VERTRETER_SQL = "insert into vertreter (mitgl_id) values (?)";
const DELETE_VERTRETER_SQL = "delete from vertreter WHERE mitgl_id=?";
public function __construct($id=false) {
$this->conn = Database::conn();
if($id) {
$rs=$this->conn->execute(
self::FIND_BY_ID_SQL, array((int)$id));
if($rs) {
$row=$rs->fetchRow();
foreach($row as $field => $value) {
$this->$field=$value;
}
} else {
trigger_error('DB Error: '.$this->conn->errorMsg());
}
}
}
public static function findByID($id) {
$rs = Database::conn()->execute(
self::FIND_BY_ID_SQL, array((int)$id));
$ret=array();
if($rs) {
$row=$rs->fetchRow();
return new Mitglied($row['id']);
}
return null;
}
public static function findByWB($wb) {
$rs = Database::conn()->execute(
self::FIND_BY_WB_SQL, array((int)$wb));
$ret=array();
if($rs) {
foreach($rs->getArray() as $row) {
$ret[] = new Mitglied($row['id']);
}
}
return $ret;
}
public function save() {
if($this->id() == Mitglied::NEW_MITGLIED) {
$this->insert();
} else {
$this->update();
}
}
private function insert() {
$rs = $this->conn->execute(
self::INSERT_SQL, array($this->id(),$this->wb(),$this->titel(),$this->vorname(),
$this->name(),$this->str(),$this->plz(),$this->ort(),$this->hasVotedOK()));
if($rs) {
$this->id = (int)$this->conn->Insert_ID();
$this->updateVertreterStatus();
} else {
trigger_error('DB Error: '.$this->conn->errorMsg());
}
}
private function update() {
$rs = $this->conn->execute(
self::UPDATE_SQL, array($this->id,$this->wb,$this->titel,$this->vorname,
$this->name,$this->str,$this->plz,$this->ort,$this->hasVotedOK));
$this->updateVertreterStatus();
if(!$rs) {
trigger_error('DB Error: '.$this->conn->errorMsg());
}
}
private function updateVertreterStatus() {
if(!$this->isVertreter() && $this->isWantedVertreter()) {
echo 'here';
$rs = $this->conn->execute(
self::INSERT_VERTRETER_SQL, array($this->id()));
if(!$rs) {
trigger_error('DB Error: '.$this->conn->errorMsg());
}
$this->isVertreter=true;
}
if($this->isVertreter() && !$this->isWantedVertreter()) {
echo 'here2';
$rs = $this->conn->execute(
self::DELETE_VERTRETER_SQL, array($this->id()));
if(!$rs) {
trigger_error('DB Error: '.$this->conn->errorMsg());
}
$this->isVertreter=false;
}
}
public function isVertreter() {
if($this->isVertreter == Mitglied::UNSET_VERTRETER) {
$rs = $this->conn->execute(
self::FIND_VERTRETER_BY_ID_SQL, array($this->id()));
if($rs) {
$this->isVertreter = ($rs->fetchRow()) ? true : false;
} else {
trigger_error('DB Error: '.$this->conn->errorMsg());
}
}
return $this->isVertreter;
}
public function isWantedVertreter() {
if($this->isWantedVertreter == Mitglied::UNSET_VERTRETER) {
return $this->isVertreter();
} else {
return $this->isWantedVertreter;
}
}
public function id() {
return $this->id;
}
public function wb() {
return $this->wb;
}
public function titel() {
return $this->titel;
}
public function hasVotedOK() {
return $this->hasVotedOK;
}
public function vorname() {
return $this->vorname;
}
public function name() {
return $this->name;
}
public function str() {
return $this->str;
}
public function plz() {
return $this->plz;
}
public function ort() {
return $this->ort;
}
public function setId($id) {
$this->id=$id;
}
public function setWb($wb) {
$this->wb=$wb;
}
public function setVorname($s) {
$this->vorname=$s;
}
public function setName($s) {
$this->name=$s;
}
public function setStr($s) {
$this->str=$s;
}
public function setPlz($s) {
$this->plz=$s;
}
public function setOrt($s) {
$this->ort=$s;
}
public function setVertreter($boolean) {
$this->isWantedVertreter=$boolean;
}
}
?>I think there is problem with my treatment of the boolean variables. When Mitglied::setVertreter(true) is executed Mitglied::isWantedVertreter() should return true. Since the table 'vertreter' is empty Mitglied::isVertreter() returns false, which means that the first if statement in Mitglied::updatevertreterStatus is executed, but it never is (used echoed commentst here).
Anybody got any idea? Thanks a lot in advance!
-
Henning you need to logout and then re-login. Your cookies have to be cleared.
-
You be fast John. 8)
Close to 7500.
-
I like Texas Chainsaw Massacre, but what tops everything is The Ring and especially The Ring 2.
-
IMO there is not much to improve. I would maybe put a border on some of the boxes and redo the header design with more color diversity (mostly white and maybe some red as has been proposed). Other than that it looks cool.
How do you organise your appointments and things you need to do?
in Introductions & Off-Topic Discussion
Posted
can you be more specific, Morgan?