• 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;
    }
  • The first Java function entirely written by me

    tsbgroup        
    0 Likes0 Commentsjava

    private void fill() throws Exception {
    
        //формируем xml объект
        URLReader xml = new URLReader(this.getChanelUrl());
    
        //формируем из xml объект для парсинга
        Document doc = parseXML(xml.getUrlConnection().getInputStream());
    
        // /получаем список узлов документа в виде массива
        NodeList podcastTitles = doc.getElementsByTagName("title");
    
        //инициализируем имя подкаст-ленты
        this.setName(podcastTitles.item(0).getTextContent());
    
        //получаем все подкасты из xml
        NodeList podcastItems = doc.getElementsByTagName("item");
        
        //производим само заполнение массива подкастов
        for(int i=0; i < podcastItems.getLength(); i++)
        {
            this.podcastList.add(new Podcast(podcastItems.item(i)));
        }
    
      }
  • keyboardr        
    0 Likes0 Commentsxml

    <style name="TextAppearance.Grandparents">
      <item name="allCaps">true</item>
    </style>
  • yaml translations

    MattKetmo        
    0 Likes0 Commentsyaml

    menu:
        home: "Home"
        about: "About"
        contact: "Contact"
    
    footer:
        trademark: "© me %date%"
    
    page.index:
        jumbotron:
            title: "This is Openl10n"
            paragraph: "Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus."
            button: "Learn more"
    
    marketing:
        item1:
            title: "Subheading 1"
            text: "Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum."
        item2:
            title: "Subheading 2"
            text: "Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum."
        item3:
            title: "Subheading 3"
            text: "Maecenas sed diam eget risus varius blandit sit amet non magna."
        item4:
            title: "Subheading 4"
            text: "Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum."