"You must learn from the mistakes of others. You can't possibly live long enough to make them all yourself"
Sam Levenson
Pages: 123 ... 24
  1:  .Count(y => y.Result1 > y.Result2 && y.Result1 == 0 && y.Result2 == 3)
Tags: math c# logic View more Last activity 6 hours, 50 minutes ago  
Csharp  Factory Exception 1 Votes
  1:  catch(Exception ex)
  2:  {
  3:    if(ex is ApplicationException)
  4:    {
  5:      LbMsg.Text = ex.Message;
  6:    }
Tags: exception c# designpattern factory method try/catch View more Last activity 7 hours, 11 minutes ago  
  1:  var doned = 0;
  2:  function flexsliderDone(doned) {
  3:      if ($('#publicNotIndex').length > 0 && doned !== 2) {
  4:          $('#publicNotIndex #flexslider').hide();
  5:          $('#publicNotIndex #flexslider').addClass('hided-visible');
  6:          doned = 2;
Tags: jquery slider View more Last activity 1 day, 11 hours ago  
Csharp  Most pointless code ever -3 Votes
  1:  if ( 1 == 1 ) {
  2:      if ( 2 == 2 ) {
  3:          if ( 3 == 3 ) {
  4:              if ( 4 == 4 ) {
  5:                  if ( 5 == 5 ) {
  6:                      if ( 6 == 6 ) {
Tags: C# View more Last activity 3 days, 20 hours ago  
Cpp  Null terminate each field -2 Votes
  1:      /* Null terminate each field */
  2:      for (ii = 0; ii < numflds; ii++) {
  3:          flds[ii][strlen(flds[ii])] = '\0';
  4:      }
View more Last activity 4 days, 13 hours ago  
Javascript  Amazingly useful code 8 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 4 days, 14 hours ago  
Python  Nested setdefault() -1 Votes
  1:  def group_columns_for_merging(columns_by_mapping):
  2:      all_columns = list(
  3:          sorted(
  4:              set(itertools.chain.from_iterable(columns_by_mapping.values()))))
  5:      mappings_by_column = {}
  6:      for mapping_id in columns_by_mapping:
View more Last activity 1 week, 2 days ago  
Python  Multiline nested hell -1 Votes
  1:  def make_stacked_sql(defined_columns, columns, sqls, full_column_to_column,
  2:                       base_table_prefix, domain):
  3:      from_sql = "%s pm" % (sql_name("%s_%s" % (base_table_prefix, domain)),)
  4:      join_index = 0
  5:      joins_by_table = {}
  6:      conditions_by_table = {}
View more Last activity 1 week, 3 days ago  
Html  well what's the point? -6 Votes
  1:  <html>
  2:  <head>
  3:  <style>
  4:  p{color:#fff;}
  5:  body{background:#000;}
  6:  </style>
Tags: html css View more Last activity 2 weeks, 2 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 2 weeks, 2 days ago