"You must learn from the mistakes of others. You can't possibly live long enough to make them all yourself"
Sam Levenson
Pages: 123 ... 14
Cpp  I don't trust "if" -117 Votes
  1:  if (result <= 10) {
  2:     handling();
  3:  }
  4:  else if (result > 10) {
  5:    otherHandling();
  6:  }
View more Last activity 1 week, 4 days ago  
  1:  for( var i=0, ii=allColors.length; i<ii; i++ ) {
  2:  	//stuff happens
  3:  }
View more Last activity 2 weeks, 1 day ago  
  1:  ;; This adds attribute 448 (field "zu") to all articles which are in article sub group 27 (aug)
  2:  ;; and are associated with grape 576 (t2).
  3:  ;; This is real workflow. aug and t2 are comma seperated lists in VARCHAR
  4:  ;; fields and have the form ,<id1>,<id2>,<idn>, and they have to be maintained in this form.
  5:  
  6:  UPDATE articlecoredata
Tags: sql non-atomic mismanagement View more Last activity 3 weeks, 2 days ago  
  1:  if ($duration > 1) echo $price/$duration
  2:  else echo $price;
Tags: division-by-zero paranoia View more Last activity 1 month ago  
  1:  foreach (IWebElement option in allOptions)
  2:  {
  3:  	Console.WriteLine("Value is: " + option.Text);
  4:  	if ("Yahoo Mail".Equals(option.Text))
  5:  	{
  6:  		option.Click();
Tags: C#, continue, for View more Last activity 1 month ago  
  1:  <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2:  
  3:  function initializeDataTable($selector, $ajaxEndPoint, $columns, $primaryKey, $actionButtons, $actionColumn, $extraCreationJS = null, $dom ='\'<"top"iflp<"clear">>rt<"bottom"p<"clear">>\'')
  4:  {
  5:  ?>
  6:      <script type="text/javascript">
Tags: php, written by CS grads View more Last activity 1 month ago  
  1:  int length= 0;
  2:  for(int idx = 0; idx < a.length; i++){
  3:      length++;
  4:  }
  5:  System.out.println("length is : " + length);
Tags: array length View more Last activity 1 month, 1 week ago  
Php  So dangerous -8 Votes
  1:  if ($pass == 'lacaniano') { // So dangerous =S
  2:  	if (is_numeric($num))
  3:  		$sql = "SELECT * FROM clientes WHERE (cliente_id = $num)";
  4:  	else
  5:  		$sql = "SELECT * FROM clientes WHERE (cliente_mail = '$num')";
  6:  } else {
Tags: php So dangerous View more Last activity 1 month, 1 week ago  
  1:  <? 
  2:  ob_start(); 
  3:  include("../config.php");
  4:  $result = mysqli_query($conn," DELETE FROM `crm_vehicles` WHERE id = '" . $_GET["id"] . "'");
  5:  header('Refresh: 0; url=index.php?deleted=si'); 
  6:  ob_end_flush(); 
Tags: php,sql View more Last activity 1 month, 1 week ago  
  1:  var next = Math.max.apply(Math, $(this).parent().parent().parent().parent().find(".features").last().find('input').map(function () {
  2:      var t = this.name.match(/\d+/g);
  3:      return t[1];
  4:  }).get()) + 1;
  5:  
  6:  if (!isFinite(next))
Tags: javascript jquery View more Last activity 1 month, 1 week ago