"You must learn from the mistakes of others. You can't possibly live long enough to make them all yourself"
Sam Levenson
Pages: 123 ... 23
Php  if( x == x ) then x = x -17 Votes
  1:  // check what order method user selected (DESC or ASC)
  2:  		switch ($order) {
  3:  			case 'DESC':
  4:  				$order = 'DESC';
  5:  				break;
  6:  			case 'ASC':
Tags: switch case paranoia View more Last activity 13 hours, 41 minutes ago  
Java  BinaryTree remove 0 Votes
  1:  public void remove(int x){
  2:  		if(w==null)
  3:  			return;
  4:  		TreeNode rm=getNode(x),rmP = getParentNode(x);
  5:  		if(rm==w&&w.isBlatt())
  6:  			w=null;
View more Last activity 17 hours ago  
  1:  public TreeNode insert(final TreeNode t) {
  2:  			return this.value.compareTo (t.value) == 0 ? (TreeNode) ((Object) (1 / 0))
  3:  					: (this.value.compareTo (t.value) < 0 ? ( (this.left == null) ? (this.left = t)
  4:  							: this.left.insert (t))
  5:  							: ( (this.right == null) ? (this.right = t)
  6:  									: this.right.insert (t)));
Tags: java binary tree View more Last activity 17 hours, 1 minute ago  
Php  AntiSqlInjection -149 Votes
  1:  function AntiSqlInjection($data) {
  2:  	if (is_array($data))
  3:  		foreach ($data as $clave=>$valor)
  4:  			$data[$clave]=str_replace("'","''",$valor);
  5:  	else
  6:  		$data=str_replace("'","''",$data);
Tags: AntiSqlInjection, sqli, php, security, sqlinjection View more Last activity 4 days, 18 hours ago  
Javascript  Amazingly useful code 2 Votes
  1:  function OnSetRequestPriceTypeSuccess(Result)
  2:  {
  3:      ///Developer:       John Doe
  4:      ///Date Created:    07/01/08
  5:      ///Description:     Handles a successful call of the SetRequestPriceType callback.
  6:  }
Tags: javascript comments signature View more Last activity 6 days, 16 hours ago  
Html  Good tag naming -3 Votes
  1:  </MA</MARQUEE></m</marquee>
View more Last activity 1 week, 1 day ago  
  1:  <?
  2:  //-----------------------------------------------------
  3:  mysql_connect("localhost","*******","*********");
  4:  mysql_select_db("generic2");
  5:  //-----------------------------------------------------
  6:  class Node {
Tags: php oop View more Last activity 1 week, 4 days ago  
Csharp  handy dandy 0 Votes
  1:  class UIVeryHandyHandleHandler
View more Last activity 1 week, 5 days ago  
  1:  int? incidentNameID;
Tags: variable declaration, data type, View more Last activity 1 week, 5 days ago  
Css  Best css ever -26 Votes
  1:      .widget-image {
  2:        position: absolute;
  3:        max-width: 550%;
  4:        max-height: 100%;
  5:        top: -9999px;
  6:        bottom: -9999px;
Tags: css View more Last activity 1 week, 6 days ago