text:
<?php

// Test fonction mail();
   // *** A configurer
   $to    = "mehdi.guiraud@gmail.com";
   $from  = "me@mehdiguiraud.info";
   // *** Laisser tel quel
   $JOUR  = date("Y-m-d");
   $HEURE = date("H:i");
   $SITE = $_SERVER['HTTP_REFERER']. " IP: ".$_SERVER['REMOTE_ADDR']." Avec ". $_SERVER['HTTP_USER_AGENT'].
   $Subject = " [EGO-ANALYTICS] - arrivé le $JOUR $HEURE à ".$GLOBALS["_SERVER"]["GEOIP_COUNTRY_CODE"]. ",".$GLOBALS["_SERVER"]["GEOIP_CITY"]. " par ". $_SERVER['REMOTE_ADDR'];
   $mail_Data = "";
   $mail_Data .= " \n";
   $mail_Data .= " \n";
   $mail_Data .= "<title> Subject </title> \n";
   $mail_Data .= " \n";
   $mail_Data .= " \n";
   $mail_Data .= "Mail HTML simple  : Source de la visite :   Geo : ".$_SERVER['REMOTE_ADDR']."
 \n";
   $mail_Data .= "Plus d\'info   :   TCP-utils : ".$_SERVER['REMOTE_ADDR']."
 \n";
   $mail_Data .= "
 \n";
   $mail_Data .= "Sujet  $Subject
 \n";
   $mail_Data .= "request URI: ". $_SERVER['REQUEST_URI']."
 \n";
   $mail_Data .= "Site : ". $SITE."
 \n";
   $mail_Data .= "Global : \n";
   $mail_Data .= " \n";
   $mail_Data .= " \n";
   $headers  = "MIME-Version: 1.0 \n";
   $headers .= "Content-type: text/html; charset=iso-8859-1 \n";
   $headers .= "From: $from  \n";
   $headers .= "Disposition-Notification-To: $from  \n";
   // Message de Priorité haute
   // -------------------------
  $headers .= "X-Priority: 1  \n";
  $headers .= "X-MSMail-Priority: High \n";
  $CR_Mail = TRUE;
  $CR_Mail = @mail ($to, $Subject, $mail_Data, $headers);

   if ($CR_Mail === FALSE)
      {
      //echo " ### CR_Mail=$CR_Mail - Erreur envoi mail
 \n";
      }
   else
      {
      //echo " *** CR_Mail=$CR_Mail - Mail envoyé
 \n";
      }

?>

<!doctype html>

    <meta charset="UTF-8">
    <meta http-equiv="cache-control" content="max-age=0" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
    <meta http-equiv="pragma" content="no-cache" />
    <meta name="twitter:card" content="summary">
	<meta name="twitter:site" content="@mguiraud">
	<link rel="shorturl" href="http://j.mp/CvMehdiGuiraud" />

    <title>Cv de Mehdi Guiraud</title>
    <meta property="og:title" content="Mehdi Guiraud journaliste multimédia" />
         <meta property="og:image" content="http://www.mehdiguiraud.info/img/avatar.png" />
         <meta property="og:description" content="Mehdi GUIRAUD, 39 ans. A l'issue d'une quinzaine d'année dans l'informatique, j'ai décidé de devenir journaliste.
            Je photographie, interviewe, filme et raconte des histoires à l'aide des données entre autre. #societe #transparence #DigitalHumanities, #bigdata, #datascience, " />
         <meta property="og:url" content="http://www.mehdiguiraud.info">
    <meta name="author" content="Mehdi GUIRAUD">
    <meta name="description" content="journaliste de données,datajournaliste,data, big data, datamining,data science, photographie, vidéo.">
    <link rel="publisher" href="https://plus.google.com/+MehdiGUIRAUD" />

    <link rel="stylesheet" href="lib/curtain.css">
    <link rel="stylesheet" href="base.css?v=1.1">

Mehdi GUIRAUD

Journaliste plurimédia & datajournaliste

Suivre @mguiraud

Qui suis-je ?

Mehdi GUIRAUD, 39 ans.

Journaliste et datajournaliste spécialisé dans la politique, la société et les humanités numériques, Mehdi a été d'abord informaticien pendant plus de quinze ans chez un équipementier automobile puis dans un laboratoire de recherche. Depuis, il écrit pour la Gazette des communes, la Gazette sociale, Hexagones.fr et Stratégies. Il travaille sur tous les supports (presse, web et vidéo) et assiste également les journalistes dans les travaux nécessitant une forte compétence informatique.

Participation :

Enquête Ouverte : Enquêtes avec financement participatif

Coopétic-médias : Agence (ayant vocation à devenir une agence de presse) et coopérative d'activité

Formateur :

              Choisir et déterminer une stratégie Open data

Maitriser ses données privées sur Internet

Installer, utiiser et mettre à jour la WhistleBOX

Formation sur mesure autour de la litteratie numérique, le scrapping, la sécurité pour les journalistes

Productions écrites :

Application Interactive : dans le cadre du module infographie de ma formation de journaliste multimédia à l'EMI-CFD, j'ai participé à la réalisation d'une application interactive sur le festival de Cannes : http://blugture.net/Cannes2013

Infographie interactive (Gazette des communes) :

<a href="http://www.lagazettedescommunes.com/164128/moralisation-de-la-vie-publique-un-eternel-recommencement/" title="Le 24 avril, le gouvernement présentera son projet de loi de moralisation de la vie publique. Il vise à répondre au séisme politique provoqué par l'affaire Cahuzac. Mais il sera le énième texte à tenter de moraliser durablement la vie publique. La Gazette a reconstitué l'histoire (moderne) des textes de lois qui ont encadré les financements de la vie politique et la lutte contre les conflits d'intérêts.">[frise interactive]Moralisation de la vie politique, un éternel recommencement- La Gazette des communes

[Audio interactif]Cinéma: les collectivités soutiennent un tiers des productions françaises- La Gazette des communes

<a href="http://www.lagazettedescommunes.com/165532/cartographie-investissements-etrangers-createurs-demplois-des-regions-en-pointe/" title="Dans son rapport annuel 2012 publié le 7 mars 2013, l'Agence française de l'investissement international (AFII) souligne un investissement étranger stable sur le territoire malgré une croissance mondiale atténuée par la crise. Une cartographie régionale révèle quelles régions sont les plus attractives pour les entreprises étrangères. Ce qui ne correspond pas forcément à la carte de France des emplois créés ou maintenus du fait des investissements étrangers sur la même période.">[Cartes] Les régions les plus attractives pour les entreprises étrangères- La Gazette des communes

Infographie statique :

 Lutte contre l'homophobie- La Gazette des communes

Articles :

Yann Leroux :« "Les ados aiment Naruto parce qu'ils se retrouvent en lui » - L'express

<a href="http://www.lagazettedescommunes.com/168172/oaklandopenbudget-ou-quand-les-citoyens-se-saisissent-de-lopen-data/" title="Voici un exemple où la mise à disposition des données publiques permet à une communauté de se saisir du vivre ensemble. Au départ, des citoyens d'Oakland (Etat-Unis, Californie), demandeurs et engagés, sollicitent leur municipalité pour accéder aux données budgétaires.Sans méfiance ni défiance à l'égard des dépenses de la mairie, ils sont convaincus que pour comprendre la gestion de leur ville, il faut pouvoir explorer son fonctionnement.">OaklandOpenBudget ou quand les citoyens se saisissent de l'Open Data- La Gazette des communes

Moralisation de la vie publique : une transparence inachevée - La Gazette des communes

Réseaux Sociaux : Mobile first - Supplément Stratégies

Journalisme de données

Les péchés de la réserve parlementaire - Hexagones.fr

Les méandres de la générosité parlementaire - Hexagones.fr

Comment me contacter ?

par mail ou me faire un signe sur mon
            twitter. Je met parfois à jour un blog.

               Télécharger au format PDF

Audiovisuel

Vous trouverez ici quelques exemples de mes productions :

Vidéos, Photos, Infographies et article de presse.

Quelques photos d'événements, de concerts, de spectacles, d'expositions

Quelques vidéos et Diaporamas

Intéressé ?

            mon cv (long), car avant d'être journaliste j'ai été ingénieur systèmes et réseaux, formateur médias sociaux, Président de parti politique, moniteur de voile ( catamaran), comédien, blogueur, etc...

	    Mon cv de journaliste multimédia, parce que c'est ma passion.

	    Suivre @mguiraud

	    Mon compte LinkedIn : Mehdi Guiraud

	    Mon email : Mehdi.Guiraud {@} Gmail.com

 Fingerprint :

        5F3E 5043 1041 FAF7 04D6 9E7D 90D1 7986 812E A402

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />


text:
import m from 'mithril';
import I18n from 'i18n-js';
import h from '../h';
//Add translations to payment state.
const I18nScope = _.partial(h.i18nScope, 'projects.payment');

const paymentStatus = {
    controller(args) {
        let payment = args.item,
            card = null,
            displayPaymentMethod, paymentMethodClass, stateClass;

        card = () => {
            if (payment.gateway_data) {
                switch (payment.gateway.toLowerCase()) {
                    case 'moip':
                        return {
                            first_digits: payment.gateway_data.cartao_bin,
                            last_digits: payment.gateway_data.cartao_final,
                            brand: payment.gateway_data.cartao_bandeira
                        };
                    case 'pagarme':
                        return {
                            first_digits: payment.gateway_data.card_first_digits,
                            last_digits: payment.gateway_data.card_last_digits,
                            brand: payment.gateway_data.card_brand
                        };
                }
            }
        };

        displayPaymentMethod = () => {
            switch (payment.payment_method.toLowerCase()) {
                case 'boletobancario':
                    return m('span#boleto-detail', '');
                case 'cartaodecredito':
                    var cardData = card();
                    if (cardData) {
                        return m('#creditcard-detail.fontsize-smallest.fontcolor-secondary.lineheight-tight', [
                            cardData.first_digits + '******' + cardData.last_digits,
                            m('en'),
                            cardData.brand + ' ' + payment.installments + 'x'
                        ]);
                    }
                    return '';
            }
        };

        paymentMethodClass = () => {
            switch (payment.payment_method.toLowerCase()) {
                case 'boletobancario':
                    return '.fa-barcode';
                case 'cartaodecredito':
                    return '.fa-credit-card';
                default:
                    return '.fa-question';
            }
        };

        stateClass = () => {
            switch (payment.state) {
                case 'paid':
                    return '.text-success';
                case 'refunded':
                    return '.text-refunded';
                case 'pending':
                case 'pending_refund':
                    return '.text-waiting';
                default:
                    return '.text-error';
            }
        };

        return {
            displayPaymentMethod: displayPaymentMethod,
            paymentMethodClass: paymentMethodClass,
            stateClass: stateClass
        };
    },
    view(ctrl, args) {
        const payment = args.item;

        return m('.w-row.payment-status', [
            m('.fontsize-smallest.lineheight-looser.fontweight-semibold', [
                m('span.fa.fa-circle' + ctrl.stateClass()), ' ' + I18n.t(payment.state, I18nScope())
            ]),
            m('.fontsize-smallest.fontweight-semibold', [
                m('span.fa' + ctrl.paymentMethodClass()), ' ', m('a.link-hidden[href="#"]', payment.payment_method)
            ]),
            m('.fontsize-smallest.fontcolor-secondary.lineheight-tight', [
                ctrl.displayPaymentMethod()
            ])
        ]);
    }
};

export default paymentStatus;

redpajama_set_name: RedPajamaGithub


text:
var path = require('path');

module.exports = {
  system: {
    pushInterval: 3000
  },
  postgreSQL: {
    connectionUrl: 'postgres://root:password@localhost/bitmark_blockchain'  // The base url of the Bitmar Blockchain DB
  },
  server: {
    listenPort: 3000,                                 // The port on which the server is to listen (means that the app is at http://localhost:3000 for instance)
    distFolder: 'client/dist',                               // The folder that contains the application files (note that the files are in a different repository) - relative to this file
    staticUrl: '/static',                             // The base url from which we serve static files (such as js, css and images)
  }
};


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Microcharts
{
    /// <summary>
    /// Base class for chart managing Series
    /// </summary>
    public abstract class SeriesChart : Chart
    {
        /// <summary>
        /// internal series
        /// </summary>
        protected IEnumerable<ChartSerie> series;

        /// <summary>
        /// Gets or sets the Series
        /// </summary>
        /// <value>IEnumerable of <seealso cref="T:Microcharts.ChartSerie"/></value>
        public IEnumerable<ChartSerie> Series
        {
            get => series;
            set => UpdateSeries(value);
        }

        /// <summary>
        /// Method to update <see cref="T:Microcharts.SeriesChart.series"/> property.
        /// </summary>
        /// <param name="value">IEnumerable of <seealso cref="T:Microcharts.ChartSerie"/> to set.</param>
        protected virtual void UpdateSeries(IEnumerable<ChartSerie> value)
        {
            Set(ref series, value);
            UpdateEntries(series.SelectMany(s => s.Entries).ToList());
        }

        /// <summary>
        /// Gets or Sets Entries
        /// </summary>
        /// <remarks>When entries is set, a default series of this entries is generated</remarks>
        /// <value>IEnumerable of <seealso cref="T:Microcharts.ChartEntry"/></value>
        public IEnumerable<ChartEntry> Entries
        {
            get => entries;
            set => GenerateDefaultSerie(value);
        }

        /// <summary>
        /// Indicate if the content of Series was auto-generated (from Entries)
        /// </summary>
        /// <value>Boolean indicate if Series was auto-generated</value>
        protected bool IsSeriesAutoGenerated { get; private set; }

        /// <summary>
        /// Method called when Entries is set, for generate Series from Entries.
        /// </summary>
        /// <param name="value"></param>
        protected virtual void GenerateDefaultSerie(IEnumerable<ChartEntry> value)
        {
            UpdateSeries(new ChartSerie[]
            {
                new ChartSerie()
                {
                    Entries = value.ToList(),
                    Name = "Default - AutoGenerated",
                    Color = null
                }
            });
            IsSeriesAutoGenerated = true;
        }
    }
}


text:
module.exports = {
  entry: './app/scripts/main.js',
  output: {
    filename: 'app/scripts/bundle.js'
  },
  module: {
    loaders: [
      { test: /\.js$/, loader: 'es6-loader!jsx-loader' } // loaders can take parameters as a querystring
    ]
  }
};


text:
package org.neo4j.graphdb.factory;

import java.io.File;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.config.Setting;

import static org.neo4j.helpers.Functions.map;
import static org.neo4j.helpers.Functions.withDefaults;
import static org.neo4j.helpers.collection.MapUtil.stringMap;

/**
 * Builder for {@link GraphDatabaseService}s that allows for setting and loading
 * configuration.
 */
public class GraphDatabaseBuilder
{
    public interface DatabaseCreator
    {
        GraphDatabaseService newDatabase( Map<String, String> config );
    }

    protected DatabaseCreator creator;
    protected Map<String, String> config = new HashMap<>();

    public GraphDatabaseBuilder( DatabaseCreator creator )
    {
        this.creator = creator;
    }

    /**
     * Set a database setting to a particular value.
     *
     * @param setting Database setting to set
     * @param value New value of the setting
     * @return the builder
     */
    public GraphDatabaseBuilder setConfig( Setting<?> setting, String value )
    {
        if ( value == null )
        {
            config.remove( setting.name() );
        }
        else
        {
            // Test if we can get this setting with an updated config
            Map<String, String> testValue = stringMap( setting.name(), value );
            setting.apply( withDefaults( map( config ), map( testValue ) ) );

            // No exception thrown, add it to existing config
            config.put( setting.name(), value );
        }
        return this;
    }

    /**
     * Set an unvalidated configuration option.
     * @deprecated Use setConfig with explicit {@link Setting} instead.
     *
     * @param name Name of the setting
     * @param value New value of the setting
     * @return the builder
     */
    @Deprecated
    public GraphDatabaseBuilder setConfig( String name, String value )
    {
        if ( value == null )
        {
            config.remove( name );
        }
        else
        {
            config.put( name, value );
        }
        return this;
    }

    /**
     * Set a map of configuration settings into the builder. Overwrites any existing values.
     *
     * @param config Map of configuration settings
     * @return the builder
     * @deprecated Use setConfig with explicit {@link Setting} instead
     */
    @Deprecated
    @SuppressWarnings("deprecation")
    public GraphDatabaseBuilder setConfig( Map<String, String> config )
    {
        for ( Map.Entry<String, String> stringStringEntry : config.entrySet() )
        {
            setConfig( stringStringEntry.getKey(), stringStringEntry.getValue() );
        }
        return this;
    }

    /**
     * Load a Properties file from a given file, and add the settings to
     * the builder.
     *
     * @param fileName Filename of properties file to use
     * @return the builder
     * @throws IllegalArgumentException if the builder was unable to load from the given filename
     */

    public GraphDatabaseBuilder loadPropertiesFromFile( String fileName )
            throws IllegalArgumentException
    {
        try
        {
            return loadPropertiesFromURL( new File( fileName ).toURI().toURL() );
        }
        catch ( MalformedURLException e )
        {
            throw new IllegalArgumentException( "Illegal filename:" + fileName );
        }
    }

    /**
     * Load Properties file from a given URL, and add the settings to
     * the builder.
     *
     * @param url URL of properties file to use
     * @return the builder
     */
    public GraphDatabaseBuilder loadPropertiesFromURL( URL url )
            throws IllegalArgumentException
    {
        Properties props = new Properties();
        try
        {
            try ( InputStream stream = url.openStream() )
            {
                props.load( stream );
            }
        }
        catch ( Exception e )
        {
            throw new IllegalArgumentException( "Unable to load " + url, e );
        }
        Set<Map.Entry<Object, Object>> entries = props.entrySet();
        for ( Map.Entry<Object, Object> entry : entries )
        {
            String key = (String) entry.getKey();
            String value = (String) entry.getValue();
            setConfig( key, value );
        }

        return this;
    }

    /**
     * Create a new database with the configuration registered
     * through the builder.
     *
     * @return an instance of GraphDatabaseService
     */
    public GraphDatabaseService newGraphDatabase()
    {
        return creator.newDatabase( config );
    }

    /**
     * Used by tests via GraphDatabaseBuilderTestTools.
     */
    Map<String, String> getRawConfig()
    {
        return config;
    }

    public static class Delegator extends GraphDatabaseBuilder
    {
        private final GraphDatabaseBuilder actual;

        public Delegator( GraphDatabaseBuilder actual )
        {
            super( null );
            this.actual = actual;
        }

        @Override
        public GraphDatabaseBuilder setConfig( Setting<?> setting, String value )
        {
            actual.setConfig( setting, value );
            return this;
        }

        @Override
        @SuppressWarnings("deprecation")
        public GraphDatabaseBuilder setConfig( String name, String value )
        {
            actual.setConfig( name, value );
            return this;
        }

        @Override
        public GraphDatabaseBuilder setConfig( Map<String, String> config )
        {
            actual.setConfig( config );
            return this;
        }

        @Override
        public GraphDatabaseBuilder loadPropertiesFromFile( String fileName ) throws IllegalArgumentException
        {
            actual.loadPropertiesFromFile( fileName );
            return this;
        }

        @Override
        public GraphDatabaseBuilder loadPropertiesFromURL( URL url ) throws IllegalArgumentException
        {
            actual.loadPropertiesFromURL( url );
            return this;
        }

        @Override
        public GraphDatabaseService newGraphDatabase()
        {
            return actual.newGraphDatabase();
        }
    }
}


text:
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this data, including any software or models in source or binary
# form, as well as any drawings, specifications, and documentation
# (collectively "the Data"), to deal in the Data without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Data, and to
# permit persons to whom the Data is furnished to do so, subject to the
# following conditions:

# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Data.

# THE DATA IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS, SPONSORS, DEVELOPERS, CONTRIBUTORS, OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE DATA OR THE USE OR OTHER DEALINGS IN THE DATA.

# =======================
# This version of the META tools is a fork of an original version produced
# by Vanderbilt University's Institute for Software Integrated Systems (ISIS).
# Their license statement:

# Copyright (C) 2011-2014 Vanderbilt University

# Developed with the sponsorship of the Defense Advanced Research Projects
# Agency (DARPA) and delivered to the U.S. Government with Unlimited Rights
# as defined in DFARS 252.227-7013.

# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this data, including any software or models in source or binary
# form, as well as any drawings, specifications, and documentation
# (collectively "the Data"), to deal in the Data without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Data, and to
# permit persons to whom the Data is furnished to do so, subject to the
# following conditions:

# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Data.

# THE DATA IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS, SPONSORS, DEVELOPERS, CONTRIBUTORS, OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE DATA OR THE USE OR OTHER DEALINGS IN THE DATA.

from setuptools import setup, find_packages

import py_modelica as this_package

name = this_package.__name__
version = this_package.__version__
author = this_package.__author__
email = this_package.__email__
url = this_package.__url__

setup(name=name,
      version=version,
      author=author,
      author_email=email,
      url=url,
      packages=find_packages(),
      package_dir={name: name},
      #zip_safe=False,
      )


text:
package main

import (
	"io/ioutil"
	"log"
	"path/filepath"
	"time"

	"github.com/btcsuite/btcd/rpcclient"
	"github.com/btcsuite/btcd/wire"
	"github.com/btcsuite/btcutil"
)

func main() {
	// Only override the handlers for notifications you care about.
	// Also note most of these handlers will only be called if you register
	// for notifications.  See the documentation of the rpcclient
	// NotificationHandlers type for more details about each handler.
	ntfnHandlers := rpcclient.NotificationHandlers{
		OnFilteredBlockConnected: func(height int32, header *wire.BlockHeader, txns []*btcutil.Tx) {
			log.Printf("Block connected: %v (%d) %v",
				header.BlockHash(), height, header.Timestamp)
		},
		OnFilteredBlockDisconnected: func(height int32, header *wire.BlockHeader) {
			log.Printf("Block disconnected: %v (%d) %v",
				header.BlockHash(), height, header.Timestamp)
		},
	}

	// Connect to local btcd RPC server using websockets.
	btcdHomeDir := btcutil.AppDataDir("btcd", false)
	certs, err := ioutil.ReadFile(filepath.Join(btcdHomeDir, "rpc.cert"))
	if err != nil {
		log.Fatal(err)
	}
	connCfg := &rpcclient.ConnConfig{
		Host:         "localhost:8334",
		Endpoint:     "ws",
		User:         "yourrpcuser",
		Pass:         "yourrpcpass",
		Certificates: certs,
	}
	client, err := rpcclient.New(connCfg, &ntfnHandlers)
	if err != nil {
		log.Fatal(err)
	}

	// Register for block connect and disconnect notifications.
	if err := client.NotifyBlocks(); err != nil {
		log.Fatal(err)
	}
	log.Println("NotifyBlocks: Registration Complete")

	// Get the current block count.
	blockCount, err := client.GetBlockCount()
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Block count: %d", blockCount)

	// For this example gracefully shutdown the client after 10 seconds.
	// Ordinarily when to shutdown the client is highly application
	// specific.
	log.Println("Client shutdown in 10 seconds...")
	time.AfterFunc(time.Second*10, func() {
		log.Println("Client shutting down...")
		client.Shutdown()
		log.Println("Client shutdown complete.")
	})

	// Wait until the client either shuts down gracefully (or the user
	// terminates the process with Ctrl+C).
	client.WaitForShutdown()
}


text:
package com.agimatec.validation.jsr303.resolver;

import javax.validation.Path;
import javax.validation.TraversableResolver;
import java.lang.annotation.ElementType;
import java.util.HashMap;
import java.util.Map;

/**
 * Cache results of a delegated traversable resovler to optimize calls
 * It works only for a single validate* call and should not be used if
 * the TraversableResolver is accessed concurrently
 *

 * Date: 25.11.2009

 * Time: 13:56:18

 *
 * @author Roman Stumm (based on the code of Emmanuel Bernard)
 */
public class CachingTraversableResolver implements TraversableResolver, CachingRelevant {
    private TraversableResolver delegate;
    private Map<CacheEntry, CacheEntry> cache = new HashMap<CacheEntry, CacheEntry>();

    /** @return true when a CachingTraversableResolver is to be used during validation */
    public static boolean needsCaching(TraversableResolver resolver) {
        // caching, if we do not know exactly
        return !(resolver instanceof CachingRelevant) ||
              ((CachingRelevant) resolver).needsCaching();
    }

    public CachingTraversableResolver(TraversableResolver delegate) {
        this.delegate = delegate;
    }

    public static TraversableResolver cacheFor(TraversableResolver traversableResolver) {
        if (needsCaching(traversableResolver)) {
            return new CachingTraversableResolver(traversableResolver);
        } else {
            return traversableResolver;
        }
    }

    public boolean isReachable(Object traversableObject, Path.Node traversableProperty,
                               Class<?> rootBeanType, Path pathToTraversableObject,
                               ElementType elementType) {
        CacheEntry currentLH = new CacheEntry(traversableObject, traversableProperty,
              rootBeanType, pathToTraversableObject, elementType);
        CacheEntry cachedLH = cache.get(currentLH);
        if (cachedLH == null) {
            currentLH.reachable = delegate.isReachable(traversableObject, traversableProperty,
                  rootBeanType, pathToTraversableObject, elementType);
            cache.put(currentLH, currentLH);
            cachedLH = currentLH;
        } else if (cachedLH.reachable == null) {
            cachedLH.reachable = delegate.isReachable(traversableObject, traversableProperty,
                  rootBeanType, pathToTraversableObject, elementType);
        }
        return cachedLH.reachable;
    }

    public boolean isCascadable(Object traversableObject, Path.Node traversableProperty,
                                Class<?> rootBeanType, Path pathToTraversableObject,
                                ElementType elementType) {
        CacheEntry currentLH = new CacheEntry(traversableObject, traversableProperty,
              rootBeanType, pathToTraversableObject, elementType);
        CacheEntry cachedLH = cache.get(currentLH);
        if (cachedLH == null) {
            currentLH.cascadable = delegate.isCascadable(traversableObject,
                  traversableProperty, rootBeanType, pathToTraversableObject, elementType);
            cache.put(currentLH, currentLH);
            cachedLH = currentLH;
        } else if (cachedLH.cascadable == null) {
            cachedLH.cascadable = delegate.isCascadable(traversableObject, traversableProperty,
                  rootBeanType, pathToTraversableObject, elementType);
        }
        return cachedLH.cascadable;
    }

    public boolean needsCaching() {
        return false;  // I am the cache. Do not need cache for cache
    }

    private static class CacheEntry {
        private final Object object;
        private final Path.Node node;
        private final Class<?> type;
        private final Path path;
        private final ElementType elementType;
        private final int hashCode;

        private Boolean reachable;
        private Boolean cascadable;

        private CacheEntry(Object traversableObject, Path.Node traversableProperty,
                           Class<?> rootBeanType, Path pathToTraversableObject,
                           ElementType elementType) {
            this.object = traversableObject;
            this.node = traversableProperty;
            this.type = rootBeanType;
            this.path = pathToTraversableObject;
            this.elementType = elementType;
            this.hashCode = buildHashCode();
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }

            CacheEntry that = (CacheEntry) o;

            return elementType == that.elementType && path.equals(that.path) &&
                  type.equals(that.type) &&
                  !(object != null ? !object.equals(that.object) : that.object != null) &&
                  node.equals(that.node);

        }

        @Override
        public int hashCode() {
            return hashCode;
        }

        private int buildHashCode() {
            int result = object != null ? object.hashCode() : 0;
            result = 31 * result + node.hashCode();
            result = 31 * result + type.hashCode();
            result = 31 * result + path.hashCode();
            result = 31 * result + elementType.hashCode();
            return result;
        }
    }
}


text:
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Threading;
using System.Net;
using System.Net.Sockets;
using UnityEngine;

namespace NeuronDataReaderManaged
{
	public enum SocketStatus
	{
		CS_Running,
		CS_Starting,
		CS_OffWork,
	}

	public struct DataVersion
	{
		public byte BuildNumb;							// Build number
		public byte Revision;							// Revision number
		public byte Minor;								// Subversion number
		public byte Major;								// Major version number
	}

    /// <summary>
    /// Header format of BVH data
    /// </summary>
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct BvhDataHeader
    {
        public ushort Token1;               // Package start token: 0xDDFF
        public DataVersion DataVersion;     // Version of community data format: 1.1.0.0
        public ushort DataCount;            // Values count
        public byte bWithDisp;              // With/out displacement
        public byte bWithReference;         // With/out reference bone data at first
        public uint AvatarIndex;            // Avatar index
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
        public string AvatarName;           // Avatar name
        public uint FrameIndex;             // Frame data index
        public uint Reserved;               // Reserved, only enable this package has 64bytes length
        public uint Reserved1;              // Reserved, only enable this package has 64bytes length
        public uint Reserved2;              // Reserved, only enable this package has 64bytes length
        public ushort Token2;               // Package end token: 0xEEFF
    };

    public enum CmdId
	{
		Cmd_BoneSize,                  // Id used to request bone size from server
		Cmd_AvatarName,                // Id used to request avatar name from server
		Cmd_FaceDirection,             // Id used to request face direction from server
		Cmd_DataFrequency,             // Id used to request data sampling frequency from server
		Cmd_BvhInheritance,		       // Id used to request bvh inheritance from server
		Cmd_AvatarCount,	           // Id used to request avatar count from server
		Cmd_CombinationMode,           //
		Cmd_RegisterEvent,             //
		Cmd_SetAvatarName,             //
	};

	// Sensor binding combination mode
	public enum SensorCombinationModes
	{
		SC_ArmOnly,              // Left arm or right arm only
		SC_UpperBody,            // Upper body, include one arm or both arm, must have chest node
		SC_FullBody,             // Full body mode
	};

	/// <summary>
	/// Header format of Command returned from server
	/// </summary>
	[StructLayout( LayoutKind.Sequential, Pack = 1 )]
	public struct CommandPack
	{
		public UInt16 Token1;                   // Command start token: 0xAAFF
		public UInt32 DataVersion;              // Version of community data format. e.g.: 1.0.0.2
		public UInt32 DataLength;               // Package length of command data, by byte.
		public UInt32 DataCount;                // Count in data array, related to the specific command.
		public CmdId CommandId;                 // Identity of command.
		[MarshalAs( UnmanagedType.ByValArray, SizeConst = 40 )]
		public byte[] CmdParaments;             // Command paraments
		public UInt32 Reserved1;                // Reserved, only enable this package has 32bytes length. Maybe used in the future.
		public UInt16 Token2;                   // Package end token: 0xBBFF
	};

	/// <summary>
	/// Fetched bone size from server
	/// </summary>
	[StructLayout( LayoutKind.Sequential, Pack = 1 )]
	public struct CmdResponseBoneSize
	{
		[MarshalAs( UnmanagedType.ByValTStr, SizeConst = 60 )]
		public string BoneName;        // Bone name
		public float BoneLength;       // Bone length
	};

	abstract class Session
	{
		Thread receivingThread = null;
		bool exitFlag = false;
		int recvBufferSize = 2048;
		int reserveBufferSize = 4096;
		int headerSize = 64;
		int reserveSize = 0;
		byte[] recvBuffer = null;
		byte[] reserveBuffer = null;
		IntPtr pinnedHeader = IntPtr.Zero;
		IntPtr pinnedData = IntPtr.Zero;
		int dataSize = 0;

		internal static IntPtr GetHashValue( string address, int port )
		{
			IPEndPoint ep = new IPEndPoint( IPAddress.Parse( address ), port );
			return (IntPtr)ep.GetHashCode();
		}

		public Session( int recvBufferSize )
		{
			this.recvBufferSize = recvBufferSize;
			recvBuffer = new byte[recvBufferSize];
		}

		public abstract bool Connect( string address, int port );
		public abstract bool Connect( int port );
		public abstract void Disconnect();
		public abstract void Receive( byte[] buffer, int size, out int receivedSize, int recvWaitTime = 0 );
		public abstract IntPtr GetHashValue();

		public void Start()
		{
			receivingThread = new Thread( new ThreadStart( DoReceive ) );
			receivingThread.IsBackground = true;
			receivingThread.Start();
		}

		public void Stop()
		{
			ReleaseHeader();
			ReleaseData();

			exitFlag = true;
			while( receivingThread.IsAlive ) ;
		}

		public void DoReceive()
		{
			while( !exitFlag )
			{
				int recvSize = 0;
				Receive( recvBuffer, recvBufferSize, out recvSize, 0 );

				if( reserveBuffer == null )
				{
					reserveBuffer = new byte[reserveBufferSize];
				}

				Buffer.BlockCopy( recvBuffer, 0, reserveBuffer, reserveSize, recvSize );
				reserveSize += recvSize;

				if( reserveSize >= headerSize )
				{
					BvhDataHeader header = AcquireHeader( reserveBuffer );
					if( ValidateHeader( header ) )
					{
						// check complete packet
						int packetSize = headerSize + (int)header.DataCount * sizeof( float );
						//Debug.LogFormat( "reserveSize {0} >= {1} packetSize", reserveSize, packetSize );
						if( reserveSize >= packetSize  )
						{
							//Debug.LogWarningFormat( "received packet received size = {0}", reserveSize );
							if( NeuronDataReader.frameDataReceivedCallback != null )
							{
								AcquireData( reserveBuffer, header );
								NeuronDataReader.frameDataReceivedCallback( IntPtr.Zero, GetHashValue(), pinnedHeader, pinnedData );
							}

							// clean reserveBuffer
							Buffer.BlockCopy( reserveBuffer, packetSize, reserveBuffer, 0, reserveSize - packetSize );
							reserveSize -= packetSize;
						}
					}
					else
					{
						Debug.LogErrorFormat( "Invalid packet HeadToken = {0} TailToken = {1} received size = {2}", header.Token1.ToString( "X4" ), header.Token2.ToString( "X4" ), recvSize );
					}
				}
			}
		}

		BvhDataHeader AcquireHeader( byte[] buffer )
		{
			if( pinnedHeader == IntPtr.Zero )
			{
				pinnedHeader = Marshal.AllocHGlobal( headerSize );
			}

			Marshal.Copy( buffer, 0, pinnedHeader, headerSize );
			return (BvhDataHeader)Marshal.PtrToStructure( pinnedHeader, typeof( BvhDataHeader ) );
		}

		void ReleaseHeader()
		{
			if( pinnedHeader != IntPtr.Zero )
			{
				Marshal.FreeHGlobal( pinnedHeader );
				pinnedHeader = IntPtr.Zero;
			}
		}

		void AcquireData( byte[] buffer, BvhDataHeader header )
		{
			int requiredSize = (int)header.DataCount * sizeof( float );
			if( pinnedHeader == IntPtr.Zero || dataSize < requiredSize )
			{
				ReleaseData();
				pinnedData = Marshal.AllocHGlobal( requiredSize );
				dataSize = requiredSize;
			}

			Marshal.Copy( buffer, 64, pinnedData, requiredSize );
		}

		void ReleaseData()
		{
			if( pinnedData != IntPtr.Zero )
			{
				Marshal.FreeHGlobal( pinnedData );
				pinnedData = IntPtr.Zero;
			}
		}

		void SwapEndian( byte[] buffer, int offset, int size )
		{
			byte temp = 0;
			int end = size / 2 * 2;
			for( int i = offset; i < end; i += 2 )
			{
				temp = buffer[i+1];
				buffer[i+1] = buffer[i];
				buffer[i] = temp;
			}
		}

		bool ValidateHeader( BvhDataHeader header )
		{
			return header.Token1 == 0xDDFF && header.Token2 == 0xEEFF;
		}
	}

	class TCPSession : Session
	{
		Socket socket = new Socket( AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp );
		IntPtr hashValue = IntPtr.Zero;

		ManualResetEvent connectEvent = new ManualResetEvent( false );

		void connectedCallBack( IAsyncResult asyncResult )
		{
			connectEvent.Set();
			Socket s = (Socket)asyncResult.AsyncState;
			s.EndConnect( asyncResult );
		}

		public TCPSession( int recvBufferSize )
			: base( recvBufferSize )
		{
		}

		public override bool Connect( string address, int port )
		{
			connectEvent.Reset();
			socket.BeginConnect( address, port, new AsyncCallback( connectedCallBack ), socket );

			connectEvent.WaitOne( 500 );

			if( socket.Connected )
			{
				hashValue = GetHashValue( address, port );
				Start();
				return true;
			}

			return false;
		}

		public override bool Connect( int port )
		{
			return false;
		}

		public override void Disconnect()
		{
			socket.Shutdown( SocketShutdown.Both );
			socket.Disconnect( false );
			Stop();
		}

		public override void Receive( byte[] buffer, int size, out int receivedSize, int recvWaitTime = 0 )
		{
			//if( socket.Poll( recvWaitTime, SelectMode.SelectRead ) )
			{
				receivedSize = socket.Receive( buffer, size, SocketFlags.None );
			}
			//else
			//{
			//	receivedSize = 0;
			//}
		}

		public override IntPtr GetHashValue()
		{
			return hashValue;
		}
	}

	class UDPSession : Session
	{
		IntPtr hashValue = IntPtr.Zero;
		Socket socket = new Socket( AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp );
		IPEndPoint sourceAddress = new IPEndPoint( IPAddress.Any, 0 );

		public UDPSession( int recvBufferSize )
			: base( recvBufferSize )
		{
		}

		public override bool Connect( string address, int port )
		{
			sourceAddress = new IPEndPoint( IPAddress.Parse( address ), port );
			socket.Bind( new IPEndPoint( IPAddress.Any, port ) );
			hashValue = GetHashValue( "0.0.0.0", port );
			Start();
			return true;
		}

		public override bool Connect( int port )
		{
			socket.Bind( new IPEndPoint( IPAddress.Any, port ) );
			hashValue = GetHashValue( "0.0.0.0", port );
			Start();
			return true;
		}

		public override void Disconnect()
		{
			socket.Close();
			Stop();
		}

		public override void Receive( byte[] buffer, int size, out int receivedSize, int recvWaitTime = 0 )
		{
			//if( socket.Poll( recvWaitTime, SelectMode.SelectRead ) )
			{
				EndPoint remote = new IPEndPoint( IPAddress.Any, 0 );
				try
				{
					receivedSize = socket.ReceiveFrom( buffer, size, SocketFlags.None, ref remote );
					if( sourceAddress.Address != IPAddress.Any && sourceAddress.Address != ( (IPEndPoint)remote ).Address )
					{
						receivedSize = 0;
					}
				}
				catch( Exception e )
				{
					receivedSize = 0;
					Debug.LogException( e );
				}
			}
			//else
			//{
			//	receivedSize = 0;
			//}
		}

		public override IntPtr GetHashValue()
		{
			return hashValue;
		}
	}

	public delegate void FrameDataReceived( IntPtr customObject, IntPtr sockRef, IntPtr bvhDataHeader, IntPtr data );

	public delegate void SocketStatusChanged( IntPtr customObject, IntPtr sockRef, SocketStatus status, [MarshalAs( UnmanagedType.LPStr )]string msg );

	public delegate void CommandDataReceived( IntPtr customedObj, IntPtr sockRef, IntPtr cmdHeader, IntPtr cmdData );

	public class NeuronDataReader
	{
		static int MaxPacketSize = 64 + 60 * 6 * sizeof( float );

		static Dictionary<IntPtr, Session>		sessions = new Dictionary<IntPtr, Session>();
		public static FrameDataReceived			frameDataReceivedCallback;
		public static SocketStatusChanged		socketStatusChangedCallback;

		public static void BRRegisterFrameDataCallback( IntPtr customedObj, FrameDataReceived handle )
		{
			frameDataReceivedCallback = handle;
		}

		public static void BRRegisterSocketStatusCallback( IntPtr customedObj, SocketStatusChanged handle )
		{
			socketStatusChangedCallback = handle;
		}

		public static IntPtr BRConnectTo( string serverIP, int nPort )
		{
			Session newSession= new TCPSession( MaxPacketSize );
			if( newSession.Connect( serverIP, nPort ) )
			{
				IntPtr key = Session.GetHashValue( serverIP, nPort );
				sessions.Add( key, newSession );
				return key;
			}

			return IntPtr.Zero;
		}

		public static IntPtr BRStartUDPServiceAt( int nPort )
		{
			Session newSession = new UDPSession( MaxPacketSize );
			if( newSession.Connect( nPort ) )
			{
				sessions.Add( Session.GetHashValue( "0.0.0.0", nPort ), newSession );
				return newSession.GetHashValue();
			}

			return IntPtr.Zero;
		}

		public static void BRCloseSocket( IntPtr sockRef )
		{
			Session session = null;
			if( sessions.TryGetValue( sockRef, out session ) )
			{
				session.Disconnect();
			}

			sessions.Remove( sockRef );
		}

		// dummy functions
		public static void BRRegisterCommandDataCallback( IntPtr customObj, CommandDataReceived commandCallback )
		{
		}

		public static bool BRCommandFetchAvatarDataFromServer( IntPtr sockRef, int avatarIndex, CmdId cmdId )
		{
			return false;
		}

		public static bool BRCommandFetchDataFromServer( IntPtr sockRef, CmdId cmdId )
		{
			return false;
		}
	}
}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.directmediatips</groupId>
  <artifactId>dmt-twitter</artifactId>
  <version>0.1.1</version>
  <packaging>jar</packaging>

  <name>${project.groupId}:${project.artifactId}</name>
  <description>Set of classes to automate your Twitter account.</description>
  <url>http://directmediatips.com</url>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <licenses>
    <license>
      <name>The Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.twitter4j</groupId>
      <artifactId>twitter4j-core</artifactId>
      <version>[4.0,)</version>
    </dependency>
    <dependency>
      <groupId>com.directmediatips</groupId>
      <artifactId>dmt-google</artifactId>
      <version>0.1.0</version>
    </dependency>
    <dependency>
      <groupId>com.directmediatips</groupId>
      <artifactId>dmt-data</artifactId>
      <version>0.1.0</version>
    </dependency>
    <dependency>
      <groupId>com.directmediatips</groupId>
      <artifactId>dmt-klout</artifactId>
      <version>0.1.1</version>
    </dependency>
  </dependencies>

    <organization>
  	<name>Wil-Low BVBA</name>
  	<url>http://wil-low.com</url>
  </organization>

  <developers>
    <developer>
      <name>Bruno Lowagie</name>
      <email>bruno@lowagie.com</email>
      <organization>Wil-Low BVBA</organization>
      <organizationUrl>http://www.lowagie.com</organizationUrl>
    </developer>
  </developers>

  <scm>
  	<connection>scm:git:https://github.com/directmediatips/dmt-twitter.git</connection>
  	<url>https://github.com/directmediatips/dmt-twitter</url>
  </scm>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9.1</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>


text:
<?php
$module = $this->data["module"][0];
$page = $this->data["page"];
$config = unserialize($module["module_config"]);
?>

<form action="<?= ADMIN_URL . "module/update" ?>" method="POST">
    <input class="hidden" name="module_id" value="<?= $module["module_id"] ?>">
     <input class="hidden" name="module_type" value="<?= $module["module_type"] ?>">

        Tên module

            <input value="<?= $module["module_name"] ?>" required class="form-control" name="module_name"  type="text" placeholder="">

        Miêu tả

            <input value="<?= $module["module_description"] ?>" required class="form-control" name="module_description"  type="text" placeholder="">

        Vị trí:

            <select name="module_location">
                <?php
                foreach ($module_location = get_module_location() as $k => $v) {
                    ?>
                    <option <?= $module["module_location"]==$k?"selected":"" ?> value="<?= $k ?>"><?= $v ?></option>
                <?php } ?>
            </select>

        Thứ tự

            <input value="<?= $module["module_index"] ?>" required class="form-control" name="module_index"  type="text" placeholder="">

        Số lượng hiển thị

            <input min="1" value="<?= isset($config["module_product_limit"] )?$config["module_product_limit"]:"" ?>" required class="form-control" name="module_product_limit"  type="number" placeholder="">

        Loại sản phẩm:

            <select name="module_product_type">
                <?php
                foreach ( get_product_type() as $k => $v) {
                    ?>
                    <option  <?= (isset($config["module_product_type"])&&$config["module_product_type"]==$k)?"selected":"" ?> value="<?= $k ?>"><?= $v ?></option>
                <?php } ?>
            </select>

        Trang:

                <?php foreach (get_page() as $key => $value) { ?>

                        <input   <?= in_array($key, $page) == true ? "checked" : "" ?>  name="module_page[]" class="<?= $key != -1 ? "check_page" : "check_all" ?>" data-edit="1" type="checkbox" id="edit_module<?= $key ?>" value="<?= $key ?>">
                        <label for="edit_module<?= $key ?>"><?= $value ?>

                <?php } ?>

 <button class="btn btn-success" type="submit">Cập nhật</button>

</form>


text:
[![Build Status][BS img]][Build Status]
[![Dependency Status][DS img]][Dependency Status]
[![Code Climate][CC img]][Code Climate]

[Build Status]: https://travis-ci.org/qindio/blabber
[travis pull requests]: https://travis-ci.org/qindio/blabber/pull_requests
[Dependency Status]: https://gemnasium.com/qindio/blabber
[Code Climate]: https://codeclimate.com/github/qindio/blabber

[BS img]: https://travis-ci.org/qindio/blabber.png
[DS img]: https://gemnasium.com/qindio/blabber.png
[CC img]: https://codeclimate.com/github/qindio/blabber.png

[travis]: https://travis-ci.org/qindio/blabber
[gemnasium]: https://gemnasium.com/qindio/blabber
[codeclimate]: https://codeclimate.com/github/qindio/blabber

Blabber is a backend service and front-end plugin to provide comments tied to a
URL. Development status is incipient. Check the blog posts for more
information:

* [Close to the metal, Part 1: Buidling an HTTP API with members and collections](http://lorenzoplanas.com/blog/20140324-close-to-the-metal-part-1-building-an-http-api-with-members-and-collections/)


text:
package e4x.browser.columns;

import java.util.Comparator;

import e4x.browser.model.Element;
import e4x.browser.model.ParentElement;

public class AdvancedFileTypeComparator implements Comparator<Element> {

	private int getValue(Element file){
		if(file instanceof ParentElement){
			return 0;
		} else if(file.isDirectory()){
			return 1;
		} else {
			return 2;
		}
	}

	@Override
	public int compare(Element o1, Element o2) {
		return getValue(o1) - getValue(o2);
	}

}


text:
namespace copresence {

// Public methods.

AudioDirective::AudioDirective() {
}

AudioDirective::AudioDirective(const std::string& op_id, base::Time end_time)
    : op_id(op_id), end_time(end_time) {
}

AudioDirectiveList::AudioDirectiveList() {
}

AudioDirectiveList::~AudioDirectiveList() {
}

void AudioDirectiveList::AddDirective(const std::string& op_id,
                                      base::TimeDelta ttl) {
  base::Time end_time = base::Time::Now() + ttl;

  // In case this op is already in the list, update it instead of adding
  // it again.
  std::vector<AudioDirective>::iterator it = FindDirectiveByOpId(op_id);
  if (it != active_directives_.end()) {
    it->end_time = end_time;
    std::make_heap(active_directives_.begin(),
                   active_directives_.end(),
                   LatestFirstComparator());
    return;
  }

  active_directives_.push_back(AudioDirective(op_id, end_time));
  std::push_heap(active_directives_.begin(),
                 active_directives_.end(),
                 LatestFirstComparator());
}

void AudioDirectiveList::RemoveDirective(const std::string& op_id) {
  std::vector<AudioDirective>::iterator it = FindDirectiveByOpId(op_id);
  if (it != active_directives_.end())
    active_directives_.erase(it);

  std::make_heap(active_directives_.begin(),
                 active_directives_.end(),
                 LatestFirstComparator());
}

scoped_ptr<AudioDirective> AudioDirectiveList::GetActiveDirective() {
  // The top is always the instruction that is ending the latest. If that time
  // has passed, means all our previous instructions have expired too, hence
  // clear the list.
  if (!active_directives_.empty() &&
      active_directives_.front().end_time < base::Time::Now()) {
    active_directives_.clear();
  }

  if (active_directives_.empty())
    return make_scoped_ptr<AudioDirective>(NULL);

  return make_scoped_ptr(new AudioDirective(active_directives_.front()));
}

std::vector<AudioDirective>::iterator AudioDirectiveList::FindDirectiveByOpId(
    const std::string& op_id) {
  for (std::vector<AudioDirective>::iterator it = active_directives_.begin();
       it != active_directives_.end();
       ++it) {
    if (it->op_id == op_id)
      return it;
  }
  return active_directives_.end();
}

}  // namespace copresence


text:
package oracle

import fr.igpolytech.bernads.runtyme.BernadsApp

object Main {

  val DEFAULT_RESULT_FILE_NAME = "bernads.result.csv"

  def main(args: Array[String]): Unit = {
    if (args.length <= 1) {
      throw new IllegalArgumentException("The model takes at least three parameters: the path to the unlabeled json data file, the path to the selector and the path to the model.")
    }

    val dataPath = args(0)
    val selectorPath = args(1)
    val modelPath = args(2)
    val resultPath = if (args.length == 4)
      args(3)
    else
      DEFAULT_RESULT_FILE_NAME

    BernadsApp(new BernadsOracle(dataPath, selectorPath, modelPath, resultPath))
  }

}


text:
> Expand variables in reflinks.

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install --save expand-reflinks
```

Expands this:

```
[abc]: [bar]/abc/[foo]
[fez]: [qux]/fez
[qux]: [baz]/qux
[baz]: [bar]/baz
[bar]: [foo]/bar [foo]: 123
```

To this:

```
[abc]: 123/bar/abc/123
[fez]: 123/bar/baz/qux/fez
[qux]: 123/bar/baz/qux
[baz]: 123/bar/baz
[bar]: 123/bar\n
[foo]: 123
```

## Usage

```js
var expand = require('expand-reflinks');
console.log(expand('[bar]: [foo]/bar\n[foo]: 123'));
```

Results in:

```
[bar]: 123/bar
[foo]: 123
```

## About

### Related projects

* [gulp-format-md](https://www.npmjs.com/package/gulp-format-md): Gulp plugin for beautifying markdown using pretty-remarkable. | [homepage](https://github.com/jonschlinkert/gulp-format-md "Gulp plugin for beautifying markdown using pretty-remarkable.")
* [gulp-reflinks](https://www.npmjs.com/package/gulp-reflinks): Gulp plugin for `reflinks`. Lints a markdown string to find missing reflinks for npm package… [more](https://github.com/jonschlinkert/gulp-reflinks) | [homepage](https://github.com/jonschlinkert/gulp-reflinks "Gulp plugin for `reflinks`. Lints a markdown string to find missing reflinks for npm package names, resolves the homepage or repository url from npm, and appends a valid reflink to the document.")
* [reflinks](https://www.npmjs.com/package/reflinks): Generate (relative) reference links for a glob of markdown files, allowing you to more easily… [more](https://github.com/jonschlinkert/reflinks) | [homepage](https://github.com/jonschlinkert/reflinks "Generate (relative) reference links for a glob of markdown files, allowing you to more easily create references from one file to another.")

### Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).

Please read the [contributing guide](.github/contributing.md) for avice on opening issues, pull requests, and coding standards.

### Building docs

_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_

To generate the readme and API documentation with [verb](https://github.com/verbose/verb):

```sh
$ npm install -g verb verb-generate-readme && verb
```

### Running tests

Install dev dependencies:

```sh
$ npm install -d && npm test
```

### Author

**Jon Schlinkert**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

### License

Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](https://github.com/jonschlinkert/expand-reflinks/blob/master/LICENSE).

***

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 21, 2016._


text:
module VagrantPlugins
  module TimeZone
    module Cap
      # Debian capabilities for changing time zone
      class Debian
        # Set the time zone
        def self.change_timezone(machine, timezone)
          machine.communicate.tap do |comm|
            comm.sudo("echo '#{timezone}' > /etc/timezone")
            comm.sudo('dpkg-reconfigure --frontend noninteractive tzdata')
          end
        end
      end
    end
  end
end


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Class org.drip.math.grid.Span</title>
<meta name="date" content="2013-08-14">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
org.drip.math.grid.Span

Packages that use Span

Package
Description

org.drip.math.grid

Uses of Span in org.drip.math.grid

Methods in org.drip.math.grid that return Span

Modifier and Type
Method and Description

static Span
Span.CreateCalibratedSpanInterpolator(double[] adblX,
                                double[] adblY,
                                java.lang.String strCalibrationMode,
                                SegmentControlParams segControlParams,
                                int iSetupMode)

Creates a calibrated Span instance over the specified X and Y input array points, using the specified
        basis splines.

static Span
Span.CreateCalibratedSpanInterpolator(double[] adblX,
                                double dblY,
                                java.lang.String strCalibrationMode,
                                SegmentControlParams segControlParams,
                                int iSetupMode)

Creates a Calibrated Span instance from an array of X points and a flat Y point

Span
Span.insertKnot(double dblX,
          double dblY)

Insert a Knot

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
import proto  # type: ignore

from google.ads.googleads.v12.resources.types import (
    experiment as gagr_experiment,
)
from google.protobuf import field_mask_pb2  # type: ignore
from google.rpc import status_pb2  # type: ignore

__protobuf__ = proto.module(
    package="google.ads.googleads.v12.services",
    marshal="google.ads.googleads.v12",
    manifest={
        "MutateExperimentsRequest",
        "ExperimentOperation",
        "MutateExperimentsResponse",
        "MutateExperimentResult",
        "EndExperimentRequest",
        "ListExperimentAsyncErrorsRequest",
        "ListExperimentAsyncErrorsResponse",
        "GraduateExperimentRequest",
        "CampaignBudgetMapping",
        "ScheduleExperimentRequest",
        "ScheduleExperimentMetadata",
        "PromoteExperimentRequest",
        "PromoteExperimentMetadata",
    },
)

class MutateExperimentsRequest(proto.Message):
    r"""Request message for
    [ExperimentService.MutateExperiments][google.ads.googleads.v12.services.ExperimentService.MutateExperiments].

    Attributes:
        customer_id (str):
            Required. The ID of the customer whose
            experiments are being modified.
        operations (Sequence[google.ads.googleads.v12.services.types.ExperimentOperation]):
            Required. The list of operations to perform
            on individual experiments.
        partial_failure (bool):
            If true, successful operations will be
            carried out and invalid operations will return
            errors. If false, all operations will be carried
            out in one transaction if and only if they are
            all valid. Default is false.
        validate_only (bool):
            If true, the request is validated but not
            executed. Only errors are returned, not results.
    """

    customer_id = proto.Field(proto.STRING, number=1,)
    operations = proto.RepeatedField(
        proto.MESSAGE, number=2, message="ExperimentOperation",
    )
    partial_failure = proto.Field(proto.BOOL, number=3,)
    validate_only = proto.Field(proto.BOOL, number=4,)

class ExperimentOperation(proto.Message):
    r"""A single operation on an experiment.

    This message has `oneof`_ fields (mutually exclusive fields).
    For each oneof, at most one member field can be set at the same time.
    Setting any member of the oneof automatically clears all other
    members.

    .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

    Attributes:
        update_mask (google.protobuf.field_mask_pb2.FieldMask):
            FieldMask that determines which resource
            fields are modified in an update.
        create (google.ads.googleads.v12.resources.types.Experiment):
            Create operation

            This field is a member of `oneof`_ ``operation``.
        update (google.ads.googleads.v12.resources.types.Experiment):
            Update operation: The experiment is expected
            to have a valid resource name.

            This field is a member of `oneof`_ ``operation``.
        remove (str):
            Remove operation: The experiment is expected to have a valid
            resource name, in this format:

            ``customers/{customer_id}/experiments/{campaign_experiment_id}``

            This field is a member of `oneof`_ ``operation``.
    """

    update_mask = proto.Field(
        proto.MESSAGE, number=4, message=field_mask_pb2.FieldMask,
    )
    create = proto.Field(
        proto.MESSAGE,
        number=1,
        oneof="operation",
        message=gagr_experiment.Experiment,
    )
    update = proto.Field(
        proto.MESSAGE,
        number=2,
        oneof="operation",
        message=gagr_experiment.Experiment,
    )
    remove = proto.Field(proto.STRING, number=3, oneof="operation",)

class MutateExperimentsResponse(proto.Message):
    r"""Response message for experiment mutate.

    Attributes:
        partial_failure_error (google.rpc.status_pb2.Status):
            Errors that pertain to operation failures in the partial
            failure mode. Returned only when partial_failure = true and
            all errors occur inside the operations. If any errors occur
            outside the operations (for example, auth errors), we return
            an RPC level error.
        results (Sequence[google.ads.googleads.v12.services.types.MutateExperimentResult]):
            All results for the mutate.
    """

    partial_failure_error = proto.Field(
        proto.MESSAGE, number=1, message=status_pb2.Status,
    )
    results = proto.RepeatedField(
        proto.MESSAGE, number=2, message="MutateExperimentResult",
    )

class MutateExperimentResult(proto.Message):
    r"""The result for the campaign experiment mutate.

    Attributes:
        resource_name (str):
            Returned for successful operations.
    """

    resource_name = proto.Field(proto.STRING, number=1,)

class EndExperimentRequest(proto.Message):
    r"""Request message for
    [ExperimentService.EndExperiment][google.ads.googleads.v12.services.ExperimentService.EndExperiment].

    Attributes:
        experiment (str):
            Required. The resource name of the campaign
            experiment to end.
        validate_only (bool):
            If true, the request is validated but not
            executed. Only errors are returned, not results.
    """

    experiment = proto.Field(proto.STRING, number=1,)
    validate_only = proto.Field(proto.BOOL, number=2,)

class ListExperimentAsyncErrorsRequest(proto.Message):
    r"""Request message for
    [ExperimentService.ListExperimentAsyncErrors][google.ads.googleads.v12.services.ExperimentService.ListExperimentAsyncErrors].

    Attributes:
        resource_name (str):
            Required. The name of the experiment from
            which to retrieve the async errors.
        page_token (str):
            Token of the page to retrieve. If not specified, the first
            page of results will be returned. Use the value obtained
            from ``next_page_token`` in the previous response in order
            to request the next page of results.
        page_size (int):
            Number of elements to retrieve in a single
            page. When a page request is too large, the
            server may decide to further limit the number of
            returned resources. The maximum page size is
            1000.
    """

    resource_name = proto.Field(proto.STRING, number=1,)
    page_token = proto.Field(proto.STRING, number=2,)
    page_size = proto.Field(proto.INT32, number=3,)

class ListExperimentAsyncErrorsResponse(proto.Message):
    r"""Response message for
    [ExperimentService.ListExperimentAsyncErrors][google.ads.googleads.v12.services.ExperimentService.ListExperimentAsyncErrors].

    Attributes:
        errors (Sequence[google.rpc.status_pb2.Status]):
            details of the errors when performing the
            asynchronous operation.
        next_page_token (str):
            Pagination token used to retrieve the next page of results.
            Pass the content of this string as the ``page_token``
            attribute of the next request. ``next_page_token`` is not
            returned for the last page.
    """

    @property
    def raw_page(self):
        return self

    errors = proto.RepeatedField(
        proto.MESSAGE, number=1, message=status_pb2.Status,
    )
    next_page_token = proto.Field(proto.STRING, number=2,)

class GraduateExperimentRequest(proto.Message):
    r"""Request message for
    [ExperimentService.GraduateExperiment][google.ads.googleads.v12.services.ExperimentService.GraduateExperiment].

    Attributes:
        experiment (str):
            Required. The experiment to be graduated.
        campaign_budget_mappings (Sequence[google.ads.googleads.v12.services.types.CampaignBudgetMapping]):
            Required. List of campaign budget mappings
            for graduation. Each campaign that appears here
            will graduate, and will be assigned a new budget
            that is paired with it in the mapping. The
            maximum size is one.
        validate_only (bool):
            If true, the request is validated but not
            executed. Only errors are returned, not results.
    """

    experiment = proto.Field(proto.STRING, number=1,)
    campaign_budget_mappings = proto.RepeatedField(
        proto.MESSAGE, number=2, message="CampaignBudgetMapping",
    )
    validate_only = proto.Field(proto.BOOL, number=3,)

class CampaignBudgetMapping(proto.Message):
    r"""The mapping of experiment campaign and budget to be
    graduated.

    Attributes:
        experiment_campaign (str):
            Required. The experiment campaign to
            graduate.
        campaign_budget (str):
            Required. The budget that should be attached
            to the graduating experiment campaign.
    """

    experiment_campaign = proto.Field(proto.STRING, number=1,)
    campaign_budget = proto.Field(proto.STRING, number=2,)

class ScheduleExperimentRequest(proto.Message):
    r"""Request message for
    [ExperimentService.ScheduleExperiment][google.ads.googleads.v12.services.ExperimentService.ScheduleExperiment].

    Attributes:
        resource_name (str):
            Required. The scheduled experiment.
        validate_only (bool):
            If true, the request is validated but not
            executed. Only errors are returned, not results.
    """

    resource_name = proto.Field(proto.STRING, number=1,)
    validate_only = proto.Field(proto.BOOL, number=2,)

class ScheduleExperimentMetadata(proto.Message):
    r"""The metadata of the scheduled experiment.

    Attributes:
        experiment (str):
            Required. The scheduled experiment.
    """

    experiment = proto.Field(proto.STRING, number=1,)

class PromoteExperimentRequest(proto.Message):
    r"""Request message for
    [ExperimentService.PromoteExperiment][google.ads.googleads.v12.services.ExperimentService.PromoteExperiment].

    Attributes:
        resource_name (str):
            Required. The resource name of the experiment
            to promote.
        validate_only (bool):
            If true, the request is validated but not
            executed. Only errors are returned, not results.
    """

    resource_name = proto.Field(proto.STRING, number=1,)
    validate_only = proto.Field(proto.BOOL, number=2,)

class PromoteExperimentMetadata(proto.Message):
    r"""The metadata of the promoted experiment.

    Attributes:
        experiment (str):
            Required. The promoted experiment.
    """

    experiment = proto.Field(proto.STRING, number=1,)

__all__ = tuple(sorted(__protobuf__.manifest))


text:
#Para empezar se carga las librerias necesarias de Keras y de Numpy
from keras.models import Model
from keras.models import Sequential
from keras.layers import merge
from keras.layers import normalization
from keras.layers import Flatten
from keras.layers import AveragePooling2D
from keras.layers import Convolution2D
from keras.layers import Input
from keras.layers import Activation
from keras.layers import Dense
from keras.layers import MaxPooling2D
from keras.layers import Dropout
from keras.callbacks import ModelCheckpoint,Callback,ReduceLROnPlateau
import numpy as np

#Ya que el código es casi el mismo para los 8 entrenamientos (solo varia el modelo
# y/o la base de datos) se usa un nombre código
codename='mapahsv_combinado'
data_dir='Data/mapahsv/'

#Esto declara el uso de un registro del learning rate, el cual es útil para ver
#cuantas veces se estanca el entrenamiento y si el entrenamiento avanza o no.
registro_lr=[]
class showlr(Callback):
    def on_train_begin(self, logs={}):
        registro_lr = np.load(codename +'.npy',[])
    def on_epoch_end(self, batch, logs={}):
        lr = self.model.optimizer.lr.get_value()
        registro_lr.append(lr)
        np.save(codename + '.npy',registro_lr)
        print(lr)

# Se carga la data necesaria para el entrenamiento (en este caso, la base de
#datos de los mapas HSV obtenidos de las imagenes de cacao sano y enfermos)
#del sistema y se les da una forma aceptable para Keras

#Los datos para el entreamiento
train1 = np.load(data_dir+'train/negativo/db.npy').tolist()
train=train1.copy()
train2 = np.load(data_dir+'train/positivo/db.npy').tolist()
for i in range(len(train2)):
    train.append(train2[i])
train=np.array(train)
train=train.reshape(train.shape[0],1, 45, 64)
train_labels=np.array([0]*len(train1)+[1]*len(train2))
train_labels=train_labels.reshape(train_labels.shape[0],1)

#los datos para la validacion
val1 = np.load(data_dir+'validation/negativo/db.npy').tolist()
val=val1.copy()
val2 = np.load(data_dir+'validation/positivo/db.npy').tolist()
for i in range(len(val2)):
    val.append(val2[i])
val=np.array(val)
val=val.reshape(val.shape[0],1,45, 64)
val_labels=np.array([0]*len(val1)+[1]*len(val2))
val_labels=val_labels.reshape(val_labels.shape[0],1)
img_height,img_width = train.shape[2],train.shape[3]

#Esta variable indica el numero de elementos a buscar, sin embargo al colocar
# 1 se vuelve una clasificacion binaria. donde 1 es un elemento de una clase y
# 0 del otro. En este caso, positivo (infectado) tiene valor 1
nb_classes = 1

#A continuacion, se muestra el código del módelo a entrenar el cual usa un
#bloque Resnet y un módulo Inception
#####################################################################

#Se inicia el modulo con "Sequential"
model = Sequential()
#Se prepara la entrada para una imagen de 1 solo canal de 45x 64 pixeles
#el cual es el mapa de color HSV
Input_0=Input(shape=(1,45,64))

#Se inicia usando una serie de 64 filtros de 7x7 los cuales convolucionan
#con la imagen para que puedan obtener caracteristicas de los mapas de color de
#la imagen de cacao
tronco_conv1=Convolution2D(64, 7, 7,
                           subsample=(2, 2),
                           border_mode='same')(Input_0)
#Se reduce con un Subsampling de 2x2 para reducir el tamaño de la imagen
#convolucionada
tronco_pool1=MaxPooling2D(pool_size=(2, 2),
                            strides=[2,2],
                            border_mode='valid',
                            dim_ordering='default')(tronco_conv1)

#Ahora se iniciara el bloque Resnet
rama1_res_BN1=normalization.BatchNormalization(mode=0,
                                               axis=-1)(tronco_pool1)

rama1_res_activation1=Activation('relu')(rama1_res_BN1)

rama1_dp1=Dropout(0.5)(rama1_res_activation1)

rama1_res_conv1=Convolution2D(64, 3, 3,
                           subsample=(1, 1),
                           border_mode='same')(rama1_dp1)

rama1_res_BN2=normalization.BatchNormalization(mode=0,
                                               axis=-1)(rama1_res_conv1)

rama1_res_activation2=Activation('relu')(rama1_res_BN2)

rama1_dp2=Dropout(0.5)(rama1_res_activation2)

rama1_res_conv2=Convolution2D(64, 3, 3,
                           subsample=(1, 1),
                           border_mode='same')(rama1_dp2)
#Se termina el bloque de resnet sumando el inicio del bloque con el
#final del bloque
reconexion_res_tronco=merge([rama1_res_conv2,tronco_pool1], mode="sum")

#Se inicia el  modulo inception, se divide en 4 ramas las cuales se  concatenan
#al final
incept_rama1_conv1=Convolution2D(32, 1, 1,
                           subsample=(1, 1),
                           border_mode='same')(reconexion_res_tronco)

incept_rama2_conv1=Convolution2D(32, 1, 1,
                           subsample=(1, 1),
                           border_mode='same')(reconexion_res_tronco)

incept_rama2_conv2=Convolution2D(32, 3, 3,
                           subsample=(1, 1),
                           border_mode='same')(incept_rama2_conv1)

incept_rama3_conv1=Convolution2D(32, 1, 1,
                           subsample=(1, 1),
                           border_mode='same')(reconexion_res_tronco)

incept_rama3_conv2=Convolution2D(32, 5, 5,
                           subsample=(1, 1),
                           border_mode='same')(incept_rama3_conv1)

incept_rama4_pool1=MaxPooling2D(pool_size=(2, 2),
                            strides=[1,1],
                            border_mode='same',
                            dim_ordering='default')(reconexion_res_tronco)

incept_rama4_conv1=Convolution2D(32, 1, 1,
                           subsample=(1, 1),
                           border_mode='same')(incept_rama4_pool1)
#Aqui se concantenan las 4 ramas y se termina el modulo inception
incept_merge=merge([incept_rama1_conv1,
                    incept_rama2_conv2,
                    incept_rama3_conv2,
                    incept_rama4_conv1],mode="concat",concat_axis=1)
#Se hace un subsampling promediando de matrices de 2x2 en matrices de 2x2
tronco_pool2=AveragePooling2D(pool_size=(2, 2),
                 strides=[2,2],
                 border_mode='valid',
                 dim_ordering='default')(incept_merge)
#*Todos los dropouts apagan neuronas momentaneamente para
#que el sistema aprenda de maneras diferentes y no de una sola manera,
#sino podria tender a memorizar los elementos de entreamiento envés de
#aprender a diferenciarlos
tronco_dp1=Dropout(0.5)(tronco_pool2)

tronco_flat=Flatten()(tronco_dp1)
#Se reduce todo a un solo valor que indique si es o no un cacao infectado
tronco_fc1=Dense(nb_classes,activation="sigmoid")(tronco_flat)

model=Model(input=Input_0,output=tronco_fc1)
#Se compila en el sistema Keras usando Theano o Tensorflow, ademas se define el
#elemento a minimizar para la optimización y las metricas a mostrar(precisión,
#loss,etc)
model.compile(loss='binary_crossentropy',
              optimizer='rmsprop',
              metrics=['accuracy'])

#######################################################################

#Ahora agregamos al entrenamiento caracteristicas útiles en el caso de
#accidentes y para realizar el registro del entrenamiento

#Esta es la direccion donde se guarda un modelo despues de entrenar cada ciclo
#y la funcion que la guarda
direccion='modelos/'+codename+'/weights.{epoch:04d}-{acc:.4f}-{loss:.4f}-{val_acc:.4f}-{val_loss:.4f}.hdf5'
checkpoint = ModelCheckpoint(direccion,
                             monitor='val_acc',
                             verbose=1,
                             save_best_only=False,
                             save_weights_only=False,
                             mode='max')

#Esta caracteristica reduce el learning rate cada vez que se el loss no disminuye
reduce_lr = ReduceLROnPlateau(monitor='val_loss', factor=0.9,patience=1, verbose=1,  cooldown=0, min_lr=0)
#Esta caracteristica llama a la función explicada anteriormente que almacena el valor del
#learning rate
histlr=showlr()

#Esta caracteristica llma a las anteriores para agregarlos al entrenamiento
callbacks_list = [checkpoint,reduce_lr,histlr]

#Ahora se entrena el sistema. batch_size define el tamaño de  la porción de
#que va a memoria ram para el entrenamiento. Asi va de porción en porción hasta
#acabar un ciclo. nb_epoch, define el numero de ciclos de entrenamiento
#callbacks llama a las características adicionales
#verbose sirve para mostrar el proceso del entrenamiento en  el prompt de la linea
#de comandos.
#val y train es la data que se usa para la validacion y el entrenamiento
#respectivamente.
model.fit(train, train_labels,
          batch_size=8,
          nb_epoch=1000,
          callbacks=callbacks_list,shuffle=True,
          verbose=1, validation_data=(val, val_labels))


text:
'use strict';

const _ = require('lodash');
const {handleImageDiff} = require('lib/browser/commands/assert-view/capture-processors/assert-refs');
const ImageDiffError = require('lib/browser/commands/assert-view/errors/image-diff-error');

describe('browser/commands/assert-view/capture-processors/assert-refs', () => {
    const sandbox = sinon.createSandbox();

    beforeEach(() => {
        sandbox.stub(ImageDiffError, 'create');
    });

    afterEach(() => sandbox.restore());

    describe('handleImageDiff', () => {
        const mkConfig_ = (opts = {}) => {
            return _.defaultsDeep(opts, {
                buildDiffOpts: {},
                system: {diffColor: 'default-color'}
            });
        };

        const handleImageDiff_ = (opts = {}) => {
            const {currImg, refImg, state, diffOpts} = _.defaultsDeep(opts, {
                currImg: {path: '/default-curr/path'},
                refImg: {path: '/default-ref/path'},
                state: 'default-state',
                diffOpts: {
                    tolerance: opts.tolerance,
                    antialiasingTolerance: opts.antialiasingTolerance,
                    canHaveCaret: opts.canHaveCaret,
                    diffAreas: opts.diffAreas,
                    config: mkConfig_(opts.config)
                }
            });

            return handleImageDiff(currImg, refImg, state, diffOpts);
        };

        describe('should create instace of "ImageDiffError" with', () => {
            it('diff options from "buildDiffOpts"', async () => {
                const config = {
                    buildDiffOpts: {foo: 'bar', baz: 'qux'}
                };

                await handleImageDiff_({config})
                    .catch(() => {
                        assert.calledOnceWith(
                            ImageDiffError.create,
                            sinon.match.any, sinon.match.any, sinon.match.any,
                            sinon.match({foo: 'bar', baz: 'qux'})
                        );
                    });
            });

            ['tolerance', 'antialiasingTolerance'].forEach((option) => {
                it(`"${option}" option`, async () => {
                    await handleImageDiff_({[option]: 1})
                        .catch(() => {
                            assert.calledOnceWith(
                                ImageDiffError.create,
                                sinon.match.any, sinon.match.any, sinon.match.any,
                                sinon.match({[option]: 1})
                            );
                        });
                });

                it(`overridden "${option}" option from "buildDiffOpts"`, async () => {
                    const config = {
                        buildDiffOpts: {[option]: 1}
                    };

                    await handleImageDiff_({[option]: 2, config})
                        .catch(() => {
                            assert.calledOnceWith(
                                ImageDiffError.create,
                                sinon.match.any, sinon.match.any, sinon.match.any,
                                sinon.match({[option]: 1})
                            );
                        });
                });
            });

            describe('not ignore caret if', () => {
                it('none of the editable elements are in focus', async () => {
                    const config = {
                        buildDiffOpts: {ignoreCaret: true}
                    };

                    await handleImageDiff_({config, canHaveCaret: false})
                        .catch(() => {
                            assert.calledOnceWith(
                                ImageDiffError.create,
                                sinon.match.any, sinon.match.any, sinon.match.any,
                                sinon.match({ignoreCaret: false})
                            );
                        });
                });

                it('in config is explicitly set not to ignore it', async () => {
                    const config = {
                        buildDiffOpts: {ignoreCaret: false}
                    };

                    await handleImageDiff_({config, canHaveCaret: true})
                        .catch(() => {
                            assert.calledOnceWith(
                                ImageDiffError.create,
                                sinon.match.any, sinon.match.any, sinon.match.any,
                                sinon.match({ignoreCaret: false})
                            );
                        });
                });
            });

            it('ignore caret if one of the editable elements are in focus', async () => {
                const config = {
                    buildDiffOpts: {ignoreCaret: true}
                };

                await handleImageDiff_({config, canHaveCaret: true})
                    .catch(() => {
                        assert.calledOnceWith(
                            ImageDiffError.create,
                            sinon.match.any, sinon.match.any, sinon.match.any,
                            sinon.match({ignoreCaret: true})
                        );
                    });
            });
        });
    });
});


text:
#region License(Apache Version 2.0)

#endregion
#region ChangeLog
/******************************************
 * 2017-10-7 OutMan Create
 *
 * ***************************************/
#endregion
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Printing;
using DevExpress.Utils;
using DevExpress.XtraPrinting;
using DevExpress.XtraReports.UI;

namespace WitsWay.Utilities.Win.Controls
{

    /// <summary>
    /// 基本导出报表
    /// </summary>
    public partial class BasicExportReport : XtraReport
    {
        /// <summary>
        ///
        /// </summary>
        public BasicExportReport()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 初始化导出报表
        /// </summary>
        /// <param name="model"></param>
        public void InitReport<T>(BasicExportModel<T> model) where T:class
        {
            if (model == null) return;
            GenerateReport(model);
        }

        private void GenerateReport<T>(BasicExportModel<T> model) where T : class
        {
            ReportBasicSetting(model);
            xrLabelTitle.Text = model.TextTitle;
            xrLabelHead.Text = model.TextHead;
            xrLabelFoot.Text = model.TextFoot;
            BottomMargin.Visible = !string.IsNullOrEmpty(model.TextFoot);
            TopMargin.Visible = !string.IsNullOrEmpty(model.TextHead);
            xrLabelTitle.Visible = !string.IsNullOrEmpty(model.TextTitle);
            var xrTable = GenerateTable();
            Detail.Controls.Add(xrTable);
            ((ISupportInitialize)(xrTable)).BeginInit();
            ((ISupportInitialize)(this)).BeginInit();

            if (model.DataHead != null && model.DataHead.Count > 0)
            {
                var colIndex = 1;
                var rowIndex = 1;
                var xrRowHead = GenerateTableRow("xrTableRowHead");
                var headEor = model.DataHead.GetEnumerator();
                while (headEor.MoveNext())
                {
                    xrRowHead.Cells.Add(GenerateTableCellHead(colIndex, headEor.Current.Value));
                    colIndex++;
                }
                xrTable.Rows.Add(xrRowHead);
                if (model.Data != null && model.Data.Count > 0)
                {
                    foreach (var data in model.Data)
                    {
                        var xrRowBody = GenerateTableRow("xrTableRowBody" + rowIndex++);
                       // PropertyInfo[] propertys = typeof(T).GetProperties(BindingFlags.Instance | BindingFlags.SetProperty | BindingFlags.Public);
                        var bodyEor = model.DataHead.GetEnumerator();
                        colIndex = 1;
                        while (bodyEor.MoveNext())
                        {
                            var property = typeof(T).GetProperty(bodyEor.Current.Key);
                            var valueO = property.GetValue(data, null);
                            var valueS=string.Empty;
                            if (valueO != null)
                            {
                                if (valueO is DateTime || valueO is DateTime?)
                                {
                                    valueS = ((DateTime)valueO).ToString("yyyy-MM-dd");
                                }
                                else
                                {
                                    valueS = valueO.ToString();
                                }
                            }
                           xrRowBody.Cells.Add(GenerateTableCellBody("xrCellBody" + colIndex++, valueS));
                        }
                        xrTable.Rows.Add(xrRowBody);
                    }
                }

            }
            ((ISupportInitialize)(xrTable)).EndInit();
            ((ISupportInitialize)(this)).EndInit();
        }

        private static XRTable GenerateTable()
        {
            var xrTable = new XRTable();
            xrTable.Borders = ((BorderSide.Left | BorderSide.Top)
                               | BorderSide.Right)
                              | BorderSide.Bottom;
            xrTable.LocationFloat = new PointFloat(1.000063F, 34.00002F);
            xrTable.Name = "xrTable";
            xrTable.SizeF = new SizeF(785.9999F, 25F);
            xrTable.StylePriority.UseBorders = false;
            xrTable.StylePriority.UseTextAlignment = false;
            xrTable.TextAlignment = TextAlignment.MiddleCenter;
            return xrTable;
        }

        private static XRTableCell GenerateTableCellBody(string name,string text)
        {
            var xrCellBody = new XRTableCell();
            xrCellBody.Name = name;
            xrCellBody.Text = text;
            xrCellBody.Weight = 1;
            return xrCellBody;
        }

        private static XRTableCell GenerateTableCellHead(int curIndex, string cellText)
        {
            var xrCellHead = new XRTableCell();
            xrCellHead.BackColor = Color.FromArgb(255, 128, 0);
            xrCellHead.ForeColor = Color.White;
            xrCellHead.Name = "xrCellHead" + curIndex;
            xrCellHead.StylePriority.UseBackColor = false;
            xrCellHead.StylePriority.UseForeColor = false;
            xrCellHead.Text = cellText;
            xrCellHead.Weight = 1;
            return xrCellHead;
        }

        private static XRTableRow GenerateTableRow(string rowName)
        {
            var xrRow = new XRTableRow();
            xrRow.Name = rowName;
            xrRow.Weight = 1;
            return xrRow;
        }

        private void ReportBasicSetting<T>(BasicExportModel<T> model) where T : class
        {
            DisplayName = $"导出{model.TextTitle}";
            Margins = new Margins(20, 20, 30, 30);
            PageHeight = 1169;
            PageWidth = 827;
            PaperKind = System.Drawing.Printing.PaperKind.A4;
        }

    }
}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<cinder>
    <template name="poScene: Basic" parent="org.libcinder.apptemplates.basicopengl">
		<requires install="relative">com.potiondesign.poscene</requires>
        <source replaceContents="true" replaceName="true">src/_TBOX_PREFIX_App.cpp</source>
        <header replaceContents="true" replaceName="true">src/_TBOX_PREFIX_.h</header>
        <source replaceContents="true" replaceName="true">src/_TBOX_PREFIX_.cpp</source>
    </template>
</cinder>


text:
#include "codec_encode.h"
#include "codec_decode.h"
#include "coerce.h"
#include "registry_internal.h"

static fudge_bool s_registryInitialised = FUDGE_FALSE;
static FudgeTypeDesc s_registry [ FUDGE_REGISTRY_SIZE ];

void FudgeRegistry_registerTypeInternal ( fudge_type_id type,
                                          fudge_i32 fixedwidth,
                                          FudgeTypePayload payload,
                                          FudgeTypeDecoder decoder,
                                          FudgeTypeEncoder encoder,
                                          FudgeTypeCoercer coercer )
{
    FudgeTypeDesc * desc = &( s_registry [ type ] );
    desc->type = type;
    desc->fixedwidth = fixedwidth;
    desc->payload = payload;
    desc->decoder = decoder;
    desc->encoder = encoder;
    desc->coercer = coercer;
}

FudgeStatus FudgeRegistry_init ( )
{
    int index;

    if ( s_registryInitialised )
        return FUDGE_OK;

    /* Make sure that the registry starts out clear */
    for ( index = 0; index < FUDGE_REGISTRY_SIZE; ++index )
        FudgeRegistry_registerTypeInternal ( ( fudge_byte ) index, -1, FUDGE_TYPE_PAYLOAD_BYTES, 0, 0, 0 );

    /* Register built in types */
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_INDICATOR,        0, FUDGE_TYPE_PAYLOAD_LOCAL,  FudgeCodec_decodeFieldIndicator,  FudgeCodec_encodeFieldIndicator, FudgeType_coerceDefault );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_BOOLEAN,          1, FUDGE_TYPE_PAYLOAD_LOCAL,  FudgeCodec_decodeFieldBool,       FudgeCodec_encodeFieldBool,      FudgeType_coerceBoolean );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_BYTE,             1, FUDGE_TYPE_PAYLOAD_LOCAL,  FudgeCodec_decodeFieldByte,       FudgeCodec_encodeFieldByte,      FudgeType_coerceByte );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_SHORT,            2, FUDGE_TYPE_PAYLOAD_LOCAL,  FudgeCodec_decodeFieldI16,        FudgeCodec_encodeFieldI16,       FudgeType_coerceShort );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_INT,              4, FUDGE_TYPE_PAYLOAD_LOCAL,  FudgeCodec_decodeFieldI32,        FudgeCodec_encodeFieldI32,       FudgeType_coerceInt );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_LONG,             8, FUDGE_TYPE_PAYLOAD_LOCAL,  FudgeCodec_decodeFieldI64,        FudgeCodec_encodeFieldI64,       FudgeType_coerceLong );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_FLOAT,            4, FUDGE_TYPE_PAYLOAD_LOCAL,  FudgeCodec_decodeFieldF32,        FudgeCodec_encodeFieldF32,       FudgeType_coerceFloat );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_DOUBLE,           8, FUDGE_TYPE_PAYLOAD_LOCAL,  FudgeCodec_decodeFieldF64,        FudgeCodec_encodeFieldF64,       FudgeType_coerceDouble );

    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_BYTE_ARRAY_4,     4, FUDGE_TYPE_PAYLOAD_BYTES,  FudgeCodec_decodeFieldByteArray,  FudgeCodec_encodeFieldByteArray, FudgeType_coerceDefault );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_BYTE_ARRAY_8,     8, FUDGE_TYPE_PAYLOAD_BYTES,  FudgeCodec_decodeFieldByteArray,  FudgeCodec_encodeFieldByteArray, FudgeType_coerceDefault );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_BYTE_ARRAY_16,   16, FUDGE_TYPE_PAYLOAD_BYTES,  FudgeCodec_decodeFieldByteArray,  FudgeCodec_encodeFieldByteArray, FudgeType_coerceDefault );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_BYTE_ARRAY_20,   20, FUDGE_TYPE_PAYLOAD_BYTES,  FudgeCodec_decodeFieldByteArray,  FudgeCodec_encodeFieldByteArray, FudgeType_coerceDefault );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_BYTE_ARRAY_32,   32, FUDGE_TYPE_PAYLOAD_BYTES,  FudgeCodec_decodeFieldByteArray,  FudgeCodec_encodeFieldByteArray, FudgeType_coerceDefault );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_BYTE_ARRAY_64,   64, FUDGE_TYPE_PAYLOAD_BYTES,  FudgeCodec_decodeFieldByteArray,  FudgeCodec_encodeFieldByteArray, FudgeType_coerceDefault );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_BYTE_ARRAY_128, 128, FUDGE_TYPE_PAYLOAD_BYTES,  FudgeCodec_decodeFieldByteArray,  FudgeCodec_encodeFieldByteArray, FudgeType_coerceDefault );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_BYTE_ARRAY_256, 256, FUDGE_TYPE_PAYLOAD_BYTES,  FudgeCodec_decodeFieldByteArray,  FudgeCodec_encodeFieldByteArray, FudgeType_coerceDefault );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_BYTE_ARRAY_512, 512, FUDGE_TYPE_PAYLOAD_BYTES,  FudgeCodec_decodeFieldByteArray,  FudgeCodec_encodeFieldByteArray, FudgeType_coerceDefault );

    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_STRING,          -1, FUDGE_TYPE_PAYLOAD_STRING, FudgeCodec_decodeFieldString,     FudgeCodec_encodeFieldString,    FudgeType_coerceDefault );

    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_BYTE_ARRAY,      -1, FUDGE_TYPE_PAYLOAD_BYTES,  FudgeCodec_decodeFieldByteArray,  FudgeCodec_encodeFieldByteArray, FudgeType_coerceDefault );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_SHORT_ARRAY,     -1, FUDGE_TYPE_PAYLOAD_BYTES,  FudgeCodec_decodeFieldI16Array,   FudgeCodec_encodeFieldI16Array,  FudgeType_coerceDefault );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_INT_ARRAY,       -1, FUDGE_TYPE_PAYLOAD_BYTES,  FudgeCodec_decodeFieldI32Array,   FudgeCodec_encodeFieldI32Array,  FudgeType_coerceDefault );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_LONG_ARRAY,      -1, FUDGE_TYPE_PAYLOAD_BYTES,  FudgeCodec_decodeFieldI64Array,   FudgeCodec_encodeFieldI64Array,  FudgeType_coerceDefault );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_FLOAT_ARRAY,     -1, FUDGE_TYPE_PAYLOAD_BYTES,  FudgeCodec_decodeFieldF32Array,   FudgeCodec_encodeFieldF32Array,  FudgeType_coerceDefault );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_DOUBLE_ARRAY,    -1, FUDGE_TYPE_PAYLOAD_BYTES,  FudgeCodec_decodeFieldF64Array,   FudgeCodec_encodeFieldF64Array,  FudgeType_coerceDefault );

    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_FUDGE_MSG,       -1, FUDGE_TYPE_PAYLOAD_SUBMSG, FudgeCodec_decodeFieldFudgeMsg,   FudgeCodec_encodeFieldFudgeMsg,  FudgeType_coerceDefault );

    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_DATE,            4,  FUDGE_TYPE_PAYLOAD_LOCAL,  FudgeCodec_decodeFieldDate,       FudgeCodec_encodeFieldDate,      FudgeType_coerceDefault );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_TIME,            8,  FUDGE_TYPE_PAYLOAD_LOCAL,  FudgeCodec_decodeFieldTime,       FudgeCodec_encodeFieldTime,      FudgeType_coerceDefault );
    FudgeRegistry_registerTypeInternal ( FUDGE_TYPE_DATETIME,       12,  FUDGE_TYPE_PAYLOAD_LOCAL,  FudgeCodec_decodeFieldDateTime,   FudgeCodec_encodeFieldDateTime,  FudgeType_coerceDefault );

    s_registryInitialised = FUDGE_TRUE;
    return FUDGE_OK;
}

const FudgeTypeDesc * FudgeRegistry_getTypeDesc ( fudge_type_id type )
{
    return &( s_registry [ type ] );
}

FudgeStatus FudgeRegistry_registerType ( fudge_type_id type,
                                         FudgeTypePayload payload,
                                         FudgeTypeDecoder decoder,
                                         FudgeTypeEncoder encoder,
                                         FudgeTypeCoercer coercer )
{
    if ( ! ( decoder && encoder && coercer ) )
        return FUDGE_NULL_POINTER;

    switch ( payload )
    {
        case FUDGE_TYPE_PAYLOAD_BYTES:
        case FUDGE_TYPE_PAYLOAD_SUBMSG:
            FudgeRegistry_registerTypeInternal ( type, -1, payload, decoder, encoder, coercer );
            return FUDGE_OK;

        default:
            return FUDGE_INVALID_USER_TYPE;
    }
}