
W sumie takie cosie krążą po sieci, ale chce mieć też tutaj.
Wersja pdf i odt.
Nazwa oddaje istnienie, nie istotę rzeczy.
"Gdzie myśli nie chowa się w słowa
A jawny jej daje się kształt" ;)
In general, we decided to use high-end components for our hosting architecture: Dell PowerEdge 2950 Servers with SCSI RAID, Windows Server 2003, and SQL Server 2005. Yep, that’s an expensive way to do it. Since FogBugz runs fine on LAMP (Linux / Apache / MySQL / PHP), we could have gottena bunch of cheap boxes, used all free software, and saved some money in exchange for some level of headaches. Indeed, most hosted services really should be built on LAMP. In our case, though, the cost of those Microsoft licenses and those extremely reliable Dell servers can be spread out over quitea few paying customers, so for us the cost difference per customer is really inconsequential. And we’ve been running IIS and Microsoft SQL Server here for six years without data loss, so that’s what we know and trust. But to be honest, if we ever get to the point where we’re racking up 10 new servers ata time, we’ll almost certainly switch to LAMP. I’m still gonna buy Dell servers and SCSI hard drives, because frankly, the small extra cost over cheapo white boxes is well worth it in reliability.
Joel on Software
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data or that do part of the work during compile time that is otherwise done at run time. In many cases, this allows programmers to get more done in the same amount of time as they would take to write all the code manually.
-wikipedia
Element root = new Element ("[nazwa klasy]");a dla każdej składowej klasy pisze się:
Element [nazwa składowej] = new Element ("[nazwa składowej]");W sumie upierdliwe jak się ma 9 składowych. Wyglądało to tak:
[nazwa_składowej].appendChild(String.valueOf(this.[nazwa_składowej]));
root.appendChild([nazwa_składowej]);
package jb.sk;
import java.io.Serializable;
import java.text.ParseException;
import nu.xom.Element;
public class Comment implements Serializable, Comparable{ private static final long serialVersionUID = -5532948060127766412L;}
String author;
String authorEmail;
long authorIP;
String authorUrl;
long date;
boolean deleted;
String message;
CommentId no = null;
boolean visible;
public Element getXML(){}
Element comment = new Element("comment");
Element author = new Element("author");
author.appendChild(getAuthor());
comment.appendChild(author);
Element authorEmail = new Element("authorEmail");
authorEmail.appendChild(getAuthorEmail());
comment.appendChild(authorEmail);
Element authorIP = new Element("authorIP");
authorIP.appendChild(String.valueOf(getAuthorIP()));
comment.appendChild(authorIP);
Element authorUrl = new Element("authorUrl");
authorUrl.appendChild(getAuthorUrl());
comment.appendChild(authorUrl);
Element date = new Element("date");
date.appendChild(String.valueOf(getDate()));
comment.appendChild(date);
Element deleted = new Element("this.deleted");
date.appendChild(String.valueOf(isDeleted()));
comment.appendChild(deleted);
Element message = new Element("message");
message.appendChild(getMessage());
comment.appendChild(message);
Element no = new Element("no");
no.appendChild(this.no.toString());
comment.appendChild(no);
Element visible = new Element("visible");
visible.appendChild(String.valueOf(isVisible()));
comment.appendChild(visible);
return comment;
/*...*/
@XMLAble
abstract Comment_base{@XMLAbleElement}
String author;
/*..*/
Comment(Element e){set(e);}
abstract Element getXML();
abstract set(Element elem);
/*..*/
virtual inline double getValue(double x)=0;