text:
<?php

    return array(
        'information' => array(
            'Information' => 'Інформація',
            'Debugging' => 'Дебаггінг',
            'Name' => 'Назва',
            'Value' => 'Значення',
            'Security' => 'Безпека',
            'System' => 'Система',
            'on' => 'увімкнено',
            'off'=> 'вимкнено',
            'Server' => 'Сервер',
            'PHP version' => 'Версія PHP',
            'SimpleXML module' => 'SimpleXML модуль',
            'DOM module' => 'DOM модуль',
            'Installed' => 'Встановлено',
            'Not Installed' => 'Не встановлено',
            'Security check results' => 'Результати перевірки безпеки',
            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
            'Конфігураційний файл доступний для запису. Ми рекомендуємо вам видалити права запису на файл defines.php на живому сайті.',
            'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod -R a-w :path' =>
            'Директорія Monstra (":path") доступна для запису. Ми рекомендуємо вам видалити права запису на теку (":path") на живому сайті.
 Ви можете зробити це на UNIX системах так: chmod -R a-w :path',
            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
            'Головний .htaccess доступний для запису. Ми рекомендуємо вам видалити права запису на головний .htaccess файл.
Ви можете зробити це на UNIX системах так: chmod -R a-w :path',
            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
            'Головний index.php файл доступний для запису. Ми рекомендуємо вам видалити права запису на головний index.php файл.
Ви можете зробити це на UNIX системах так: chmod -R a-w :path',
            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' =>
            'Система працює в режимі Monstra::DEVELOPMENT Ми рекомендуємо вам встановити режим Monstra::PRODUCTION на живому сайті.',
            'Monstra version' => 'Monstra Версія',
            'Directory Permissions' => 'Права Доступу',
            'Directory' => 'Тека',
            'Writable' => 'Доступна для запису',
            'Unwritable' => 'Недоступна для запису',
            'Status' => 'Статус',
            'PHP Built On' => 'PHP побудовано на',
            'Web Server' => 'Веб сервер',
            'WebServer to PHP Interface' => 'Веб сервер для PHP інтерфейсу',        )
    );


text:
package es.cic.christian.hilos;

import java.util.logging.Level;
import java.util.logging.Logger;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 *
Clase hilo que lo único que hace es esperar dos Segundos y luego se cierra

 *
'@Component("Nombre Del Bean")'

 *
Indica a Spring que es candidato a ser manejado por el y a continuación le ponemos nombre

 *
'@Scope("Tipo De Instancia")'

 *
Indica a spring las veces que podría ser instanciado

 * @see Documentación Scope
 * @author cmunoz
 */
@Component("HiloSimple")
@Scope("prototype")
public class HiloSimple extends Thread {

    private static final Logger LOG = Logger.getLogger(HiloSimple.class.getName());
    private static final long TIEMPO_ESPERA_HILO = 2000L;

    /**
     * Método que se ejecuta cuando se inicia el hilo
     */
    @Override
    public void run() {

        LOG.log(Level.INFO, "Lanzando {0}", getName());

        try {

            sleep(TIEMPO_ESPERA_HILO);

        } catch (InterruptedException ie) {
            LOG.info("Se Interrumpió El ".concat(ie.getMessage()));
        }

        LOG.log(Level.INFO, "Terminó La Ejecución De: {0}", getName());
    }

}

redpajama_set_name: RedPajamaGithub


text:
package io.larkin.tatesocial;

import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.factory.GraphDatabaseFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.neo4j.config.EnableNeo4jRepositories;
import org.springframework.data.neo4j.config.Neo4jConfiguration;
//import org.springframework.data.neo4j.rest.SpringRestGraphDatabase;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.context.annotation.AdviceMode;

@Configuration
@ComponentScan
@EnableAutoConfiguration
@EnableTransactionManagement(mode = AdviceMode.ASPECTJ)
@EnableNeo4jRepositories(basePackages = "io.larkin.tatesocial.repository")
public class TateSocialApplication extends Neo4jConfiguration {

    @Bean(destroyMethod = "shutdown")
    GraphDatabaseService graphDatabaseService() {
    	return new GraphDatabaseFactory().newEmbeddedDatabase("/home/larkin/neo4j/data/import.graph");
    }

//    @Bean(destroyMethod = "shutdown")
//    SpringRestGraphDatabase graphDatabaseService() {
//    	return new SpringRestGraphDatabase("http://localhost:7474/db/data");
//    }

    public TateSocialApplication() {
    	setBasePackage("io.larkin.tatesocial");
    }

    public static void main(String[] args) {
        SpringApplication.run(TateSocialApplication.class, args);
    }
}


text:
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using MvcPluginMasterApp.DomainClasses;
using MvcPluginMasterApp.PluginsBase;
using System;
using System.Reflection;

namespace MvcPluginMasterApp.DataLayer.Context
{
    public class MvcPluginMasterAppContext : DbContext, IUnitOfWork
    {
        private readonly IList<Assembly> _configurationsAssemblies = new List<Assembly>();
        private readonly IList<Type[]> _dynamicTypes = new List<Type[]>();

        /// <summary>
        /// It looks for a connection string named Sample07Context in the web.config file.
        /// </summary>
        public MvcPluginMasterAppContext()
            : base("connectionString1")
        {
        }

        public DbSet<Category> Categories { set; get; }
        public DbSet<Product> Products { set; get; }

        public IEnumerable<TEntity> AddThisRange<TEntity>(IEnumerable<TEntity> entities) where TEntity : class
        {
            return ((DbSet<TEntity>)this.Set<TEntity>()).AddRange(entities);
        }

        public void ForceDatabaseInitialize()
        {
            Database.Initialize(force: true);
        }

        public IList<T> GetRows<T>(string sql, params object[] parameters) where T : class
        {
            return Database.SqlQuery<T>(sql, parameters).ToList();
        }

        public void MarkAsChanged<TEntity>(TEntity entity) where TEntity : class
        {
            Entry(entity).State = EntityState.Modified;
        }

        public int SaveAllChanges()
        {
            return base.SaveChanges();
        }

        public new IDbSet<TEntity> Set<TEntity>() where TEntity : class
        {
            return base.Set<TEntity>();
        }

        public void SetConfigurationsAssemblies(Assembly[] assemblies)
        {
            if (assemblies == null) return;

            foreach (var assembly in assemblies)
            {
                if (_configurationsAssemblies.Contains(assembly)) continue;
                _configurationsAssemblies.Add(assembly);
            }
        }

        public void SetDynamicEntities(Type[] dynamicTypes)
        {
            if (dynamicTypes == null) return;
            _dynamicTypes.Add(dynamicTypes);
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            addConfigurationsFromAssemblies(modelBuilder);
            addPluginsEntitiesDynamically(modelBuilder);
            base.OnModelCreating(modelBuilder);
        }

        private void addConfigurationsFromAssemblies(DbModelBuilder modelBuilder)
        {
            foreach (var assembly in _configurationsAssemblies)
            {
                modelBuilder.Configurations.AddFromAssembly(assembly);
            }
        }

        private void addPluginsEntitiesDynamically(DbModelBuilder modelBuilder)
        {
            foreach (var types in _dynamicTypes)
            {
                foreach (var type in types)
                {
                    modelBuilder.RegisterEntityType(type);
                }
            }
        }
    }
}


text:
The Alarm Clock is exactly what it's name says it is. It uses the LCD display to tell time. Uses buttons and potentiometer to set modes and to set the alarm time.

# Table of Contents
- [1) Hardware](#1-hardware)
   - [1.1) Hardware Requirements](#11-hardware-requirements)
   - [1.2) Hardware Setup](#12-hardware-setup)
- [2) Software](#2-software)
   - [2.1) Operating System](#21-operating-system)
   - [2.2) Package Dependencies](#22-package-dependencies)
- [3) Building and running](#3-building-and-running)
- [4) Conclusion](#4-conclusion)

# 1. Hardware

## 1.1 Hardware Requirements:

1. [DragonBoard 410c](http://www.96boards.org/product/dragonboard410c/)
2. [Power Supply](https://www.amazon.com/Adapter-Regulated-Supply-Copper-String/dp/B015G8DZK2)
2. [Sensors Mezzanine](http://www.96boards.org/product/sensors-mezzanine/)
3. [Grove-LCD 16x2 RGB Backlight and a grove cable](https://www.seeedstudio.com/Grove-LCD-RGB-Backlight-p-1643.html)
4. [Grove Touch Sensor and a grove cable](https://www.seeedstudio.com/Grove-Touch-Sensor-p-747.html)
5. [Grove Button and a grove cable](https://www.seeedstudio.com/Grove-Button-p-766.html)
6. [Grove Rotary Angle Sensor and a grove cable](https://www.seeedstudio.com/Grove-Rotary-Angle-Sensor-p-770.html)
7. [Grove Buzzer](https://www.seeedstudio.com/Grove-Buzzer-p-768.html)

## 1.2 Hardware Setup:

First, connect the Sensors Mezzanine board onto the DragonBoard via the low-speed expansion connector on both boards. Use the Grove Universal 4 pin cables to connect the LCD to I2C0, the touch sensor, the button, the buzzer, and the rotary sensor to (whatever). You can find the images of the hardware setup in the images folder. That¿s it! We¿re all set to run our application.

|Module        |Port  |
|--------------|------|
|LCD Display   |I2C_0 |
|Button        |D7    |
|Rotary Sensor |A0    |
|Touch Sensor  |GPIO G|
|Buzzer        |GPIO E|

# 2. Software

## 2.1 Operating System

- [Linaro Debian based OS (latest)](https://github.com/96boards/documentation/blob/master/ConsumerEdition/DragonBoard-410c/Downloads/Debian.md)

## 2.2 Package Dependencies
Tool Packages
```
$ sudo apt-get install arduino-mk arduino git build-essential autoconf libtool swig3.0 python-dev nodejs-dev cmake pkg-config libpcre3-dev
$ sudo apt-get clean
```

MRAA Library
```
$ sudo apt-get install libmraa-dev
```

UPM Library
```
$ sudo apt-get install libupm-dev
```

# 3. Building and Running:

```
$ git clone https://github.com/96boards/ucsd-coursera.git
$ cd ucsd-coursera
$ cd course_2/Module2/Morse_Code/
$ make upload reset_stty

$ python clock.py
```

# 4. Conclusion:
When the program is executed the current time will be shown on the LCD display. Pressing the button once, shows when the current alarm is set to. Prsesing it a second time, allows the user to change the alarm time's hours. Pressing a third time, allows the user to change the minutes of the alarm. Pressing it the last and fourth time, returns the display to show the current time.


text:
ROOT = ../../../..

DIR = Providers/TestProviders/DynamicIndicationProvider

include $(ROOT)/mak/config.mak

LOCAL_DEFINES = -DPEGASUS_CONSUMER_INTERNAL -DPEGASUS_INTERNALONLY

LIBRARY = DynamicIndicationProvider

LIBRARIES = \
	 pegcommon \
	 pegprovider

SOURCES = \
   DynamicIndicationProviderMain.cpp \
   DynamicIndicationProvider.cpp

include $(ROOT)/mak/library.mak


text:
package io.seldon.client.beans;

import java.util.ArrayList;
import java.util.List;

public class UsersBean extends ListBean {
    private static final long serialVersionUID = -2406993473757621510L;

    protected List<UserBean> list = new ArrayList<UserBean>();

	public List<UserBean> getList() {
		return list;
	}

	public void setList(List<UserBean> list) {
		this.list = list;
	}

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof UsersBean)) return false;
        if (!super.equals(o)) return false;

        UsersBean usersBean = (UsersBean) o;

        return !(list != null ? !list.equals(usersBean.list) : usersBean.list != null);
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (list != null ? list.hashCode() : 0);
        return result;
    }
}


text:
(function () {
  'use strict';

  angular
    .module('<%= prompts.prefix %>.core.router.Router', [
      '<%= prompts.prefix %>.core.router.Start',
      '<%= prompts.prefix %>.core.router.Destination',
      '<%= prompts.prefix %>.core.router.Layer'
    ])
    .factory('appRouter', AppRouter)
    .run(function ($rootScope, $urlRouter, appRouter) {

      $rootScope.appRouterIsWorking = false;
      $rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) {
        appRouter.addStateChangeListener(event, toState, toParams, fromState, fromParams);
      });

      $urlRouter.listen();

    });

  function AppRouter($state, $urlRouter, $rootScope, AppRouterLayer, AppRouterStart, AppRouterDestination) {

    var Router = function Router() {
      this.stack = [];
      this.previousState = {};
    };

    Router.prototype.use = function (fn) {
      var layer;
      if (typeof fn !== 'function') {
        layer = new AppRouterLayer(arguments[1], arguments[0]);
      } else {
        layer = new AppRouterLayer(fn);
      }

      if (layer) {
        this.stack.push(layer);
      }
    };

    Router.prototype.addStateChangeListener = function (event, toState, toParams, fromState, fromParams) {
      if (this.stack.length > 0 && this.previousState.name !== toState.name) {
        event.preventDefault();
        this.previousState = toState;
        this.dispatch(
          new AppRouterStart(fromState, fromParams),
          new AppRouterDestination(toState, toParams),
          function (err) {
            $rootScope.appRouterIsWorking = false;
            if (!err) {
              $state.go(toState.name);
            }
          });
      }
    };

    Router.prototype.dispatch = function (start, destination, done) {
      var idx = 0;
      var stack = this.stack;
      if (stack.length === 0) {
        return done();
      }

      $rootScope.appRouterIsWorking = true;
      next();
      ////////////////////////////////////

      function next(err) {
        if (err) {
          return done(err);
        }
        var layer = stack[idx++];
        if (!layer) {
          return done();
        }
        try {
          if (!layer.hasRoute() || (layer.hasRoute() && layer.matchesState(destination.state.name))) {
            layer.handle(
              start,
              destination,
              next,
              done
            );
          } else {
            return next();
          }
        } catch (err) {
          next(err);
        }
      }
    };

    /////////////////////////////////
    var router = new Router();
    return router;

  }

}());


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#nullable enable

using System.Diagnostics.CodeAnalysis;

namespace Microsoft.CodeAnalysis.CSharp
{
    /// <summary>
    /// Represents a <see cref="CSharpSyntaxNode"/> visitor that visits only the single CSharpSyntaxNode
    /// passed into its Visit method and produces
    /// a value of the type specified by the <typeparamref name="TResult"/> parameter.
    /// </summary>
    /// <typeparam name="TResult">
    /// The type of the return value this visitor's Visit method.
    /// </typeparam>
    public abstract partial class CSharpSyntaxVisitor<TResult>
    {
        [return: MaybeNull]
        public virtual TResult Visit(SyntaxNode? node)
        {
            if (node != null)
            {
                return ((CSharpSyntaxNode)node).Accept(this);
            }

            // should not come here too often so we will put this at the end of the method.
            return default;
        }

        [return: MaybeNull]
        public virtual TResult DefaultVisit(SyntaxNode node)
        {
            return default;
        }
    }

    /// <summary>
    /// Represents a <see cref="CSharpSyntaxNode"/> visitor that visits only the single CSharpSyntaxNode
    /// passed into its Visit method.
    /// </summary>
    public abstract partial class CSharpSyntaxVisitor
    {
        public virtual void Visit(SyntaxNode? node)
        {
            if (node != null)
            {
                ((CSharpSyntaxNode)node).Accept(this);
            }
        }

        public virtual void DefaultVisit(SyntaxNode node)
        {
        }
    }
}


text:
package com.persinity.haka;

import java.io.Serializable;

/**
 * Represents a Job that can be handled by a {@link JobProducer}.
 *
 * @author Ivan Dachev
 */
public interface Job extends Serializable, Cloneable {
    /**
     * @return {@link JobIdentity} for the Job.
     */
    JobIdentity getId();

    /**
     * @return The {@link JobProducer} implementation class that can handle the Job.
     */
    Class<? extends JobProducer> getJobProducerClass();

    /**
     * Should be implemented to properly clone the state of the Job.
     *
     * @return Clone of the Job
     */
    Job clone();
}


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
session_start();
/**
 * Created by PhpStorm.
 * User: gujiangfei
 * Date: 16/4/11
 * Time: 20:15
 */
class Main extends CI_Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->load->model('Mainmodel');
    }

    public function index($p=1,$lanmu = 'all')
    {
        if (!isset($_SESSION['name'])) {
            echo '<script>alert("请登录系统!")</script>';
            echo '<script>window.location.href=\'' . site_url('Login/index') . '\';</script>';
            return;
        }
        if($_SESSION['duiwai'] == 'yes'){
            echo '<script>alert("您没有权限访问该模块!")</script>';
            echo '<script>window.location.href=\''.site_url('Select/index').'\';</script>';
            return;
        }
        $lanmu = urldecode($lanmu);
        $count = $this->Mainmodel->getcount($lanmu);
        $count = $count[0]['count(*)'];
        $pagesize = 20;
        $offset = ($p-1)*$pagesize;
        $value = $this->input->post('search');
//        var_dump($value);

        $data = $this->Mainmodel->selectlanmu();
        $data2 = $this->getmulu($data);

        $data3 = $this->handledata($data2);

        $tmp = json_encode($data3, JSON_UNESCAPED_UNICODE);
        $tmp = str_replace('parentname', 'href', $tmp);
        $tmp = str_replace('name', 'text', $tmp);
        $tmp = str_replace('child', 'nodes', $tmp);

        $data3['lanmu'] = $tmp;
        $data3['value'] = $value;
        if($lanmu == 'all'){
            if($value != null && $value != ''){
                $data3['content'] = $this->Mainmodel->search($value);
            }
            else{
                $data3['content'] = $this->Mainmodel->getcontent($lanmu,$offset,$pagesize);
            }
        }
        else{
            if($value != null && $value != ''){
                $data3['content'] = $this->Mainmodel->search($value);
            }
            else{
                $data3['content'] = $this->Mainmodel->getcontent($lanmu,$offset,$pagesize);
//                echo $this->db->last_query();
            }
        }

        $page = array();
        for($i=0;$i<$count;$i++){
            if($i % $pagesize == 0){
                $page[] = $i / $pagesize + 1;
            }
        }
        $data3['page'] = $page;
        $data3['lanmu2'] = $lanmu;
        $data3['p'] = $p;
        $this->load->view('mainview', $data3);
    }

    public function getmulu($data, $parentname = 'root')
    {
        $tree = array();
        foreach ($data as $row) {
            if ($row['parentname'] == $parentname) {
                $tmp = $this->getmulu($data, $row['name']);
                if ($tmp) {
                    $row['child'] = $tmp;
                }
                $tree[] = $row;
            }
        }
        return $tree;
    }

    public function handledata($data)
    {
        $arr = array();
        foreach ($data as $row) {
//            $row['parentname'] = 'Main/index'.'/'.$row['name'];
            $row['parentname'] = site_url('Main/index/1/'.$row['name']);
            if (isset($row['child'])) {
                $row['child'] = $this->handledata($row['child']);
            }
            $arr[] = $row;
        }
        return $arr;
    }

    public function deletecontent($uid){
        $uid = urldecode($uid);
        $data = $this->Mainmodel->getpath($uid);
        unlink($data[0]['filepath']);
        $this->Mainmodel->deletecontent($uid);
        echo '<script>alert("删除成功!")</script>';
        echo '<script>window.location.href=\''.site_url('Main/index').'\';</script>';
    }

    public function download($filename){
        $data = $this->Mainmodel->getpath2($filename);
        $filename0 = $data[0]['filepath'];
        $out_filename0 = $data[0]['name'];
        $this->forceDownload($filename0,$out_filename0);
    }

    function forceDownload($filename,$out_filename) {
        $ua = $_SERVER["HTTP_USER_AGENT"];
        if( ! file_exists($filename)){
            return false;
        }
        else {
            // We'll be outputting a file
            header('Accept-Ranges: bytes');
            header('Accept-Length: ' . filesize($filename));
            // It will be called
            header('Content-Transfer-Encoding: binary');
            header('Content-type: application/octet-stream');
            if (preg_match("/MSIE/", $ua)){
                header('Content-Disposition: attachment; filename=' . urlencode($out_filename));
            }
            else if(preg_match("/Firefox/", $ua)){
                header('Content-Disposition: attachment; filename=' . $out_filename);
            }
            else{
                header('Content-Disposition: attachment; filename=' . urlencode($out_filename));
            }
            header('Content-Type: application/octet-stream; name=' . $out_filename);
            // The source is in filename
            return readfile($filename);;
        }
    }

    public function search($p=1,$lanmu = 'all'){
        if (!isset($_SESSION['name'])) {
            echo '<script>alert("请登录系统!")</script>';
            echo '<script>window.location.href=\'' . site_url('Login/index') . '\';</script>';
            return;
        }
        if($_SESSION['duiwai'] == 'yes'){
            echo '<script>alert("您没有权限访问该模块!")</script>';
            echo '<script>window.location.href=\''.site_url('Select/index').'\';</script>';
            return;
        }
        $value = $this->input->post('search');
        $lanmu = urldecode($lanmu);
        $count = $this->Mainmodel->getcount($lanmu);
        $count = $count[0]['count(*)'];
        $pagesize = 20;
        $offset = ($p-1)*$pagesize;

        $data = $this->Mainmodel->selectlanmu();
        $data2 = $this->getmulu($data);

        $data3 = $this->handledata($data2);

        $tmp = json_encode($data3, JSON_UNESCAPED_UNICODE);
        $tmp = str_replace('parentname', 'href', $tmp);
        $tmp = str_replace('name', 'text', $tmp);
        $tmp = str_replace('child', 'nodes', $tmp);

        $data3['lanmu'] = $tmp;
        if($lanmu == 'all'){
            $data3['content'] = $this->Mainmodel->search($value);
        }
        else{

            $data3['content'] = $this->Mainmodel->search($value);
        }

        $page = array();
        for($i=0;$i<$count;$i++){
            if($i % $pagesize == 0){
                $page[] = $i / $pagesize + 1;
            }
        }
        $data3['page'] = $page;
        $data3['lanmu2'] = $lanmu;

        $this->load->view('mainview', $data3);
    }

    public function edit($uid){
        if (!isset($_SESSION['name'])) {
            echo '<script>alert("请登录系统!")</script>';
            echo '<script>window.location.href=\'' . site_url('Login/index') . '\';</script>';
            return;
        }
        if($_SESSION['duiwai'] == 'yes'){
            echo '<script>alert("您没有权限访问该模块!")</script>';
            echo '<script>window.location.href=\''.site_url('Select/index').'\';</script>';
            return;
        }
        $data['info'] = $this->Mainmodel->showedit($uid);
        $this->load->view('maineditview',$data);
    }

    public function update(){
        $title = $this->input->post('title');
        $content = $this->input->post('content');
        $duiwai = $this->input->post('duiwai');
        $uid = $this->input->post('uid');
        $this->Mainmodel->update($uid,$title,$content,$duiwai);
        redirect('Main/index');
    }

}

?>


text:
        Cliente

        <input [(ngModel)]="asyncSelected" [typeahead]="dataSource" (typeaheadLoading)="changeTypeaheadLoading($event)"
            (typeaheadNoResults)="changeTypeaheadNoResults($event)" (typeaheadOnSelect)="notifyClienteEmit($event)" [typeaheadOptionsLimit]="7"
            [typeaheadOptionField]="'nome'" [typeaheadMinLength]="3" placeholder="Informar o nome do cliente." class="form-control">

             Nenhum resultado encontrado


text:
#pragma once
#include <aws/chime/Chime_EXPORTS.h>
#include <aws/chime/model/ArtifactsState.h>
#include <aws/chime/model/ContentMuxType.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace Chime
{
namespace Model
{

  /**
   *
The content artifact object.

See Also:
   AWS
   * API Reference

   */
  class AWS_CHIME_API ContentArtifactsConfiguration
  {
  public:
    ContentArtifactsConfiguration();
    ContentArtifactsConfiguration(Aws::Utils::Json::JsonView jsonValue);
    ContentArtifactsConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
Indicates whether the content artifact is enabled or disabled.

     */
    inline const ArtifactsState& GetState() const{ return m_state; }

    /**
     *
Indicates whether the content artifact is enabled or disabled.

     */
    inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }

    /**
     *
Indicates whether the content artifact is enabled or disabled.

     */
    inline void SetState(const ArtifactsState& value) { m_stateHasBeenSet = true; m_state = value; }

    /**
     *
Indicates whether the content artifact is enabled or disabled.

     */
    inline void SetState(ArtifactsState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); }

    /**
     *
Indicates whether the content artifact is enabled or disabled.

     */
    inline ContentArtifactsConfiguration& WithState(const ArtifactsState& value) { SetState(value); return *this;}

    /**
     *
Indicates whether the content artifact is enabled or disabled.

     */
    inline ContentArtifactsConfiguration& WithState(ArtifactsState&& value) { SetState(std::move(value)); return *this;}

    /**
     *
The MUX type of the artifact configuration.

     */
    inline const ContentMuxType& GetMuxType() const{ return m_muxType; }

    /**
     *
The MUX type of the artifact configuration.

     */
    inline bool MuxTypeHasBeenSet() const { return m_muxTypeHasBeenSet; }

    /**
     *
The MUX type of the artifact configuration.

     */
    inline void SetMuxType(const ContentMuxType& value) { m_muxTypeHasBeenSet = true; m_muxType = value; }

    /**
     *
The MUX type of the artifact configuration.

     */
    inline void SetMuxType(ContentMuxType&& value) { m_muxTypeHasBeenSet = true; m_muxType = std::move(value); }

    /**
     *
The MUX type of the artifact configuration.

     */
    inline ContentArtifactsConfiguration& WithMuxType(const ContentMuxType& value) { SetMuxType(value); return *this;}

    /**
     *
The MUX type of the artifact configuration.

     */
    inline ContentArtifactsConfiguration& WithMuxType(ContentMuxType&& value) { SetMuxType(std::move(value)); return *this;}

  private:

    ArtifactsState m_state;
    bool m_stateHasBeenSet;

    ContentMuxType m_muxType;
    bool m_muxTypeHasBeenSet;
  };

} // namespace Model
} // namespace Chime
} // namespace Aws


text:
<!DOCTYPE html>
<meta charset="utf-8" />

<title>PharoJS Counter</title>
<link rel="stylesheet" type="text/css" href="css/index.css">

0

	<button id="resetButton" class="resetButton">Reset</button>
	<button id="incrementButton" class="incrementButton">Increment</button>


text:
require 'routing/shared_examples'

describe 'routes for CatalogController' do
  let(:controller_name) { 'catalog' }

  it_behaves_like 'A controller that has download_data routes'
  it_behaves_like 'A controller that has explorer routes'

  %w(
    download_data
    explorer
    ot_edit
    show
  ).each do |path|
    describe "##{path}" do
      it "routes with GET" do
        expect(get("/#{controller_name}/#{path}")).to route_to("#{controller_name}##{path}")
      end
    end
  end

  %w(
    ab_group_reorder
    accordion_select
    ae_tree_select
    ae_tree_select_discard
    ae_tree_select_toggle
    atomic_form_field_changed
    atomic_st_edit
    automate_button_field_changed
    button_create
    button_update
    explorer
    group_create
    group_reorder_field_changed
    group_update
    ot_tags_edit
    prov_field_changed
    reload
    resolve
    resource_delete
    servicetemplate_edit
    sort_ds_grid
    sort_host_grid
    sort_iso_img_grid
    sort_pxe_img_grid
    sort_vc_grid
    sort_vm_grid
    st_catalog_edit
    st_edit
    st_form_field_changed
    st_tags_edit
    st_upload_image
    tree_autoload
    tree_select
    x_button
    x_history
    x_show
  ).each do |path|
    describe "##{path}" do
      it "routes with POST" do
        expect(post("/#{controller_name}/#{path}")).to route_to("#{controller_name}##{path}")
      end
    end
  end
end


text:
package org.infinispan.profiling;

import org.infinispan.profiling.testinternals.Generator;
import org.infinispan.profiling.testinternals.TaskRunner;
import org.infinispan.test.TestingUtil;
import org.testng.annotations.Test;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.atomic.AtomicLong;

/**
 * Test to use with a profiler to profile replication.  To be used in conjunction with ProfileSlaveTest.
 *

 * Typical usage pattern:
 *

 * 1.  Start a single test method in ProfileSlaveTest.  This will block until you kill it. 2.  Start the corresponding
 * test in this class, with the same name, in a different JVM, and attached to a profiler. 3.  Profile away!
 *

 *
 * @author Manik Surtani (manik@jboss.org)
 */
@Test(groups = "profiling", enabled = false, testName = "profiling.ProfileTest")
public class ProfileTest extends AbstractProfileTest {
   /*
      Test configuration flags
    */
   protected static long NUM_OPERATIONS = 1000000; // DURATION is replaced with a fixed number of operations instead.
   protected static final int NUM_THREADS = 25;
   protected static final int MAX_RANDOM_SLEEP_MILLIS = 1;
   protected static final int MAX_OVERALL_KEYS = 2000;
   protected static final int WARMUP_LOOPS = 20000;
   protected static final boolean USE_SLEEP = false; // throttle generation a bit
   protected static final boolean SKIP_WARMUP = true;

   private List<Object> keys = new ArrayList<Object>(MAX_OVERALL_KEYS);
   protected static boolean USE_TRANSACTIONS = false;

   public static void main(String[] args) throws Exception {
      ProfileTest pst = new ProfileTest();
      pst.startedInCmdLine = true;

      String mode = args[0];
      if (args.length > 1) USE_TRANSACTIONS = Boolean.parseBoolean(args[1]);

      try {
         if (args.length > 1) pst.clusterNameOverride = args[1];
         pst.testWith(mode);
      } finally {
         pst.destroyAfterMethod();
         pst.destroyAfterClass();
      }
   }

   protected void testWith(String cacheName) throws Exception {
      log.warnf("Starting profile test, cache name = %s", cacheName);
      initTest();
      cache = cacheManager.getCache(cacheName);
      runCompleteTest(cacheName);
   }

   @Test(enabled = false)
   public void testLocalMode() throws Exception {
      runCompleteTest(LOCAL_CACHE_NAME);
   }

   @Test(enabled = false)
   public void testReplMode() throws Exception {
      runCompleteTest(REPL_SYNC_CACHE_NAME);
   }

   private void runCompleteTest(String cacheName) throws Exception {
      cache = cacheManager.getCache(cacheName);
      init();
      startup();
      if (!cacheName.equals(LOCAL_CACHE_NAME)) {
         System.out.println("Waiting for members to join.");
         TestingUtil.blockUntilViewReceived(cache, 2, 120000, true);
         System.out.println("Cluster ready, cache mode is " + cache.getConfiguration().getCacheMode());
      }
      warmup();
      doTest();
   }

   /**
    * Thr following test phases can be profiled individually using triggers in JProfiler.
    */

   protected void init() {
      long startTime = System.currentTimeMillis();
      log.warn("Starting init() phase");
      keys.clear();
      for (int i = 0; i < MAX_OVERALL_KEYS; i++) {
         Object key;
         do {
            key = Generator.createRandomKey();
         }
         while (keys.contains(key));

         if (i % 10 == 0) {
            log.trace("Generated " + i + " keys");
         }
         keys.add(key);
      }
      System.gc();
      long duration = System.currentTimeMillis() - startTime;
      log.warn("Finished init() phase.  " + printDuration(duration));
   }

   protected void startup() {
      long startTime = System.currentTimeMillis();
      log.warn("Starting cache");
      cache.start();
      long duration = System.currentTimeMillis() - startTime;
      log.warn("Started cache.  " + printDuration(duration));
   }

   private void warmup() throws InterruptedException {
      if (SKIP_WARMUP) {
         log.info("Skipping warmup; sleeping 3 secs");
         TestingUtil.sleepThread(3000);
         return;
      }
      long startTime = System.currentTimeMillis();
      TaskRunner exec = new TaskRunner(NUM_THREADS, true);
      log.warn("Starting warmup");
      for (final Object key : keys) {
         exec.execute(new Runnable() {
            public void run() {
               // this will create the necessary entries.
               cache.put(key, Collections.emptyMap());
            }
         });
      }

      // loop through WARMUP_LOOPS gets and puts for JVM optimisation
      for (int i = 0; i < WARMUP_LOOPS; i++) {
         exec.execute(new Runnable() {
            public void run() {
               Object key = Generator.getRandomElement(keys);
               cache.get(key);
               cache.put(key, "Value");
               cache.remove(key);
            }
         });
      }

      exec.stop();

      long duration = System.currentTimeMillis() - startTime;
      log.warn("Finished warmup.  " + printDuration(duration));
      cache.stop();

      startup();
   }

   private void doTest() throws Exception {
      TaskRunner exec = new TaskRunner(NUM_THREADS);
      log.warn("Starting test");
      int i;
      long print = NUM_OPERATIONS / 10;

      AtomicLong durationPuts = new AtomicLong();
      AtomicLong durationGets = new AtomicLong();
      AtomicLong durationRemoves = new AtomicLong();

      long stElapsed = System.nanoTime();
      for (i = 0; i < NUM_OPERATIONS; i++) {
         MyRunnable r = null;
         switch (i % 3) {
            case 0:
               r = new Putter(i, durationPuts);
               break;
            case 1:
               r = new Getter(i, durationGets);
               break;
            case 2:
               r = new Remover(i, durationRemoves);
               break;
         }
         if (i % print == 0)
            log.warn("processing iteration " + i);
         exec.execute(r);
//         if (USE_SLEEP) TestingUtil.sleepRandom(MAX_RANDOM_SLEEP_MILLIS);
         if (USE_SLEEP) TestingUtil.sleepThread(MAX_RANDOM_SLEEP_MILLIS);
      }
      log.warn("Finished generating runnables; awaiting executor completion");
      // wait for executors to complete!
      exec.stop();

      // wait up to 1 sec for each call?
      long elapsedTimeNanos = System.nanoTime() - stElapsed;

      log.warn("Finished test.  " + printDuration((long) toMillis(elapsedTimeNanos)));
      log.warn("Throughput: " + ((double) NUM_OPERATIONS * 1000 / toMillis(elapsedTimeNanos)) + " operations per second (roughly equal numbers of PUT, GET and REMOVE)");
      log.warn("Average GET time: " + printAvg(durationGets.get()));
      log.warn("Average PUT time: " + printAvg(durationPuts.get()));
      log.warn("Average REMOVE time: " + printAvg(durationRemoves.get()));
   }

   private String printAvg(long totalNanos) {
      double nOps = (double) (NUM_OPERATIONS / 3);
      double avg = ((double) totalNanos) / nOps;
      double avgMicros = avg / 1000;
      return avgMicros + " µs";
   }

   private double toMillis(long nanos) {
      return ((double) nanos / (double) 1000000);
   }

   enum Mode {
      PUT, GET, REMOVE
   }

   private abstract class MyRunnable implements Runnable {
      int id;
      Mode mode;
      AtomicLong duration;

      public void run() {
         try {
            Object key = Generator.getRandomElement(keys);
            long d = 0, st = 0;
            switch (mode) {
               case PUT:
                  Object value = Generator.getRandomString();
                  st = System.nanoTime();
                  if (USE_TRANSACTIONS) TestingUtil.getTransactionManager(cache).begin();
                  cache.put(key, value);
                  if (USE_TRANSACTIONS) TestingUtil.getTransactionManager(cache).commit();
                  d = System.nanoTime() - st;
                  break;
               case GET:
                  st = System.nanoTime();
                  if (USE_TRANSACTIONS) TestingUtil.getTransactionManager(cache).begin();
                  cache.get(key);
                  if (USE_TRANSACTIONS) TestingUtil.getTransactionManager(cache).commit();
                  d = System.nanoTime() - st;
                  break;
               case REMOVE:
                  st = System.nanoTime();
                  if (USE_TRANSACTIONS) TestingUtil.getTransactionManager(cache).begin();
                  cache.remove(key);
                  if (USE_TRANSACTIONS) TestingUtil.getTransactionManager(cache).commit();
                  d = System.nanoTime() - st;
                  break;
            }
            duration.getAndAdd(d);
         } catch (Exception e) {
            log.error("Caught ", e);
         }
      }
   }

   private class Putter extends MyRunnable {
      private Putter(int id, AtomicLong duration) {
         this.id = id;
         this.duration = duration;
         mode = Mode.PUT;
      }
   }

   private class Getter extends MyRunnable {
      private Getter(int id, AtomicLong duration) {
         this.id = id;
         this.duration = duration;
         mode = Mode.GET;
      }
   }

   private class Remover extends MyRunnable {
      private Remover(int id, AtomicLong duration) {
         this.id = id;
         this.duration = duration;
         mode = Mode.REMOVE;
      }
   }

   protected String printDuration(long duration) {
      if (duration > 2000) {
         double dSecs = ((double) duration / (double) 1000);
         return "Duration: " + dSecs + " seconds";
      } else {
         return "Duration: " + duration + " millis";
      }
   }
}


text:
(function(buster, define) {

var assert, fail, sentinel;

assert = buster.assert;
fail = buster.assertions.fail;

sentinel = {};

function noop() {}

define('when/unfold/list-test', function (require) {

	var list;

	list = require('when/unfold/list');

	buster.testCase('when/unfold/list', {

		'should produce an empty list when proceed returns truthy immediately': function(done) {
			var spy;

			spy = this.stub().returns(true);

			list(noop, spy, sentinel).then(
				function(value) {
					assert.equals(value, []);
				}
			).ensure(done);
		},

		'should produce a list of N elements': function(done) {
			var len = 3;

			function condition(i) {
				return i == len;
			}

			function generate(x) {
				return [x, x+1];
			}

			list(generate, condition, 0).then(
				function(result) {
					assert.equals(result.length, len);
					assert.equals(result, [0, 1, 2]);
				}
			).ensure(done);
		}

	});

});

}(
	this.buster || require('buster'),
	typeof define === 'function' && define.amd ? define : function (id, factory) {
		var packageName = id.split(/[\/\-\.]/)[0], pathToRoot = id.replace(/[^\/]+/g, '..');
		pathToRoot = pathToRoot.length > 2 ? pathToRoot.substr(3) : pathToRoot;
		factory(function (moduleId) {
			return require(moduleId.indexOf(packageName) === 0 ? pathToRoot + moduleId.substr(packageName.length) : moduleId);
		});
	}
	// Boilerplate for AMD and Node
));


text:
"""
Author: Sofiane
Date: Jan 21, 2020

Sample code on how to plot the output map of Kharita Star (online).
NOTE: THIS DOESN'T WORK WITH KHARITA OFFLINE.
"""

from matplotlib import collections as mc, pyplot as plt

edges = []
with open('data/data_uic_edges.txt') as f:
    lines = f.readlines()
    i = 0
    while i  <  len(lines) - 3:
        edges.append([lines[i].strip().split(','),
            lines[i+1].strip().split(',')])
        i += 3

lc = mc.LineCollection(edges)
fig, ax = plt.subplots()
ax.add_collection(lc)
ax.autoscale()
ax.margins(0.1)
plt.savefig('figs/uic_map_new.png', format='PNG')
plt.show()


text:
angular.module('starter.directives', [])

.directive('fishCodes', function() {
	return {
		restrict:'EA',
		templateUrl:'../templates/codes.html'
	};
})
.directive('checkList', function() {
  return {
    scope: {
      list: '=checkList',
      value: '@'
    },
    link: function(scope, elem, attrs) {
      var handler = function(setup) {
        var checked = elem.prop('checked');
        var index = scope.list.indexOf(scope.value);

        if (checked && index == -1) {
          if (setup) elem.prop('checked', false);
          else scope.list.push(scope.value);
        } else if (!checked && index != -1) {
          if (setup) elem.prop('checked', true);
          else scope.list.splice(index, 1);
        }
      };

      var setupHandler = handler.bind(null, true);
      var changeHandler = handler.bind(null, false);

      elem.bind('change', function() {
        scope.$apply(changeHandler);
      });
      scope.$watch('list', setupHandler, true);
    }
  };
});


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Epicr. syst. mycol. (Upsaliae) 338 (1838)

#### Original name
Lactarius circellatus var. circellatus

### Remarks
null


text:
/*
@header
    The zdir class gives access to the file system index. It will load
    a directory tree (a directory plus all child directories) into a
    zdir structure and then let you navigate that structure. It exists
    mainly to wrap non-portable OS functions to do this.
@discuss
@end
*/

#include "../include/czmq.h"

//  Structure of our class

struct _zdir_t {
    char *path;             //  Directory name + separator
    zlist_t *files;         //  List of files in directory
    zlist_t *subdirs;       //  List of subdirectories
    time_t modified;        //  Most recent file including subdirs
    off_t cursize;          //  Total file size including subdirs
    size_t count;           //  Total file count including subdirs
    bool trimmed;           //  Load only top level directory
};

#if (defined (WIN32))
static void
s_win32_populate_entry (zdir_t *self, WIN32_FIND_DATAA *entry)
{
    if (entry->cFileName [0] == '.')
        ; //  Skip hidden files
    else
    //  If we have a subdirectory, go load that
    if (entry->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
        if (!self->trimmed) {
            zdir_t *subdir = zdir_new (entry->cFileName, self->path);
            zlist_append (self->subdirs, subdir);
        }
    }
    else {
        //  Add file entry to directory list
        zfile_t *file = zfile_new (self->path, entry->cFileName);
        assert (file);
        zlist_append (self->files, file);
    }
}

#else
static void
s_posix_populate_entry (zdir_t *self, struct dirent *entry)
{
    //  Skip . and ..
    if (streq (entry->d_name, ".")
    ||  streq (entry->d_name, ".."))
        return;

    char fullpath [1024 + 1];
    snprintf (fullpath, 1024, "%s/%s", self->path, entry->d_name);
    struct stat stat_buf;
    if (stat (fullpath, &stat_buf))
        return;

    if (entry->d_name [0] == '.')
        ; //  Skip hidden files
    else
    //  If we have a subdirectory, go load that
    if (S_ISDIR (stat_buf.st_mode)) {
        if (!self->trimmed) {
            zdir_t *subdir = zdir_new (entry->d_name, self->path);
            assert (subdir);
            zlist_append (self->subdirs, subdir);
        }
    }
    else {
        //  Add file entry to directory list
        zfile_t *file = zfile_new (self->path, entry->d_name);
        assert (file);
        zlist_append (self->files, file);
    }
}
#endif

//  --------------------------------------------------------------------------
//  Create a new directory item that loads in the full tree of the specified
//  path, optionally located under some parent path. If parent is "-", then
//  loads only the top-level directory, and does not use parent as a path.

zdir_t *
zdir_new (const char *path, const char *parent)
{
    zdir_t *self = (zdir_t *) zmalloc (sizeof (zdir_t));
    if (!self)
        return NULL;

    if (parent) {
        if (streq (parent, "-")) {
            self->trimmed = true;
            self->path = strdup (path);
            if (!self->path) {
                zdir_destroy (&self);
                return NULL;
            }
        }
        else {
            self->path = (char *) zmalloc (strlen (path) + strlen (parent) + 2);
            if (self->path)
                sprintf (self->path, "%s/%s", parent, path);
            else {
                zdir_destroy (&self);
                return NULL;
            }
        }
    }
    else {
        self->path = strdup (path);
        if (!self->path) {
            zdir_destroy (&self);
            return NULL;
        }
    }
    if (self->path)
        self->files = zlist_new ();
    if (self->files)
        self->subdirs = zlist_new ();
    if (!self->subdirs) {
        zdir_destroy (&self);
        return NULL;
    }

#if (defined (WIN32))
    //  On Windows, replace backslashes by normal slashes
    char *path_clean_ptr = self->path;
    while (*path_clean_ptr) {
        if (*path_clean_ptr == '\\')
            *path_clean_ptr = '/';
        path_clean_ptr++;
    }
    //  Remove any trailing slash
    if (self->path [strlen (self->path) - 1] == '/')
        self->path [strlen (self->path) - 1] = 0;

    //  Win32 wants a wildcard at the end of the path
    char *wildcard = (char *) zmalloc (strlen (self->path) + 3);
    if (!wildcard) {
        zdir_destroy (&self);
        return NULL;
    }
    sprintf (wildcard, "%s/*", self->path);
    WIN32_FIND_DATAA entry;
    HANDLE handle = FindFirstFileA (wildcard, &entry);
    free (wildcard);

    if (handle != INVALID_HANDLE_VALUE) {
        //  We have read an entry, so return those values
        s_win32_populate_entry (self, &entry);
        while (FindNextFileA (handle, &entry))
            s_win32_populate_entry (self, &entry);
        FindClose (handle);
    }
#else
    //  Remove any trailing slash
    if (self->path [strlen (self->path) - 1] == '/')
        self->path [strlen (self->path) - 1] = 0;

    DIR *handle = opendir (self->path);
    if (handle) {
        //  Calculate system-specific size of dirent block
        int dirent_size = offsetof (struct dirent, d_name)
                          + pathconf (self->path, _PC_NAME_MAX) + 1;
        struct dirent *entry = (struct dirent *) zmalloc (dirent_size);
        if (!entry) {
            zdir_destroy (&self);
            return NULL;
        }
        struct dirent *result;

        int rc = readdir_r (handle, entry, &result);
        while (rc == 0 && result != NULL) {
            s_posix_populate_entry (self, entry);
            rc = readdir_r (handle, entry, &result);
        }
        free (entry);
        closedir (handle);
    }
#endif
    else {
        zdir_destroy (&self);
        return NULL;
    }
    //  Update directory signatures
    zdir_t *subdir = (zdir_t *) zlist_first (self->subdirs);
    while (subdir) {
        if (self->modified < subdir->modified)
            self->modified = subdir->modified;
        self->cursize += subdir->cursize;
        self->count += subdir->count;
        subdir = (zdir_t *) zlist_next (self->subdirs);
    }
    zfile_t *file = (zfile_t *) zlist_first (self->files);
    while (file) {
        if (self->modified < zfile_modified (file))
            self->modified = zfile_modified (file);
        self->cursize += zfile_cursize (file);
        self->count += 1;
        file = (zfile_t *) zlist_next (self->files);
    }
    return self;
}

//  --------------------------------------------------------------------------
//  Destroy a directory item

void
zdir_destroy (zdir_t **self_p)
{
    assert (self_p);
    if (*self_p) {
        zdir_t *self = *self_p;
        if (self->subdirs)
            while (zlist_size (self->subdirs)) {
                zdir_t *subdir = (zdir_t *) zlist_pop (self->subdirs);
                zdir_destroy (&subdir);
            }
        if (self->files)
            while (zlist_size (self->files)) {
                zfile_t *file = (zfile_t *) zlist_pop (self->files);
                zfile_destroy (&file);
            }
        zlist_destroy (&self->subdirs);
        zlist_destroy (&self->files);
        free (self->path);
        free (self);
        *self_p = NULL;
    }
}

//  --------------------------------------------------------------------------
//  Return directory path

const char *
zdir_path (zdir_t *self)
{
    return self->path;
}

//  --------------------------------------------------------------------------
//  Return last modification time for directory.

time_t
zdir_modified (zdir_t *self)
{
    assert (self);
    return self->modified;
}

//  --------------------------------------------------------------------------
//  Return total hierarchy size, in bytes of data contained in all files
//  in the directory tree.

off_t
zdir_cursize (zdir_t *self)
{
    assert (self);
    return self->cursize;
}

//  --------------------------------------------------------------------------
//  Return directory count

size_t
zdir_count (zdir_t *self)
{
    assert (self);
    return self->count;
}

//  --------------------------------------------------------------------------
//  Returns a sorted array of zfile objects; returns a single block of memory,
//  that you destroy by calling zdir_flatten_free(). Each entry in the array
//  is a pointer to a zfile_t item already allocated in the zdir tree. The
//  array ends with a null pointer. Do not destroy the original zdir tree
//  until you are done with this array.

static int  s_dir_flatten (zdir_t *self, zfile_t **files, int index);
static bool s_dir_compare (void *item1, void *item2);
static bool s_file_compare (void *item1, void *item2);

zfile_t **
zdir_flatten (zdir_t *self)
{
    int flat_size;
    if (self)
        flat_size = self->count + 1;
    else
        flat_size = 1;      //  Just null terminator

    zfile_t **files = (zfile_t **) zmalloc (sizeof (zfile_t *) * flat_size);
    uint index = 0;
    if (self)
        index = s_dir_flatten (self, files, index);
    return files;
}

//  Flatten one directory, calls itself recursively

static int
s_dir_flatten (zdir_t *self, zfile_t **files, int index)
{
    //  First flatten the normal files
    zlist_sort (self->files, s_file_compare);
    zfile_t *file = (zfile_t *) zlist_first (self->files);
    while (file) {
        files [index++] = file;
        file = (zfile_t *) zlist_next (self->files);
    }
    //  Now flatten subdirectories, recursively
    zlist_sort (self->subdirs, s_dir_compare);
    zdir_t *subdir = (zdir_t *) zlist_first (self->subdirs);
    while (subdir) {
        index = s_dir_flatten (subdir, files, index);
        subdir = (zdir_t *) zlist_next (self->subdirs);
    }
    return index;
}

//  Compare two subdirs, true if they need swapping

static bool
s_dir_compare (void *item1, void *item2)
{
    if (strcmp (zdir_path ((zdir_t *) item1),
                zdir_path ((zdir_t *) item2)) > 0)
        return true;
    else
        return false;
}

//  Compare two files, true if they need swapping. We sort by ascending name.

static bool
s_file_compare (void *item1, void *item2)
{
    if (!item2)
        return false;
    if (!item1)
        return true;

    if (strcmp (zfile_filename ((zfile_t *) item1, NULL),
                zfile_filename ((zfile_t *) item2, NULL)) > 0)
        return true;
    else
        return false;
}

//  --------------------------------------------------------------------------
//  Free a provided string, and nullify the parent pointer. Safe to call on
//  a null pointer.

void
zdir_flatten_free (zfile_t ***files_p)
{
    assert (files_p);
    free (*files_p);
    *files_p = NULL;
}

//  --------------------------------------------------------------------------
//  Returns a sorted list of zfile objects; Each entry in the list is a pointer
//  to a zfile_t item already allocated in the zdir tree. Do not destroy the
//  original zdir tree until you are done with this list.

zlist_t *
zdir_list (zdir_t *self)
{
    zfile_t **files = zdir_flatten (self);
    zlist_t *list = zlist_new ();
    size_t index;

    if (files)
    {
        for (index = 0 ; files[index] ; index++)
        {
            zlist_append (list, files[index]);
        }
    }

    zdir_flatten_free (&files);
    return list;
}

//  --------------------------------------------------------------------------
//  Remove directory, optionally including all files that it contains, at
//  all levels. If force is false, will only remove the directory if empty.
//  If force is true, will remove all files and all subdirectories.

void
zdir_remove (zdir_t *self, bool force)
{
    //  If forced, remove all subdirectories and files
    if (force) {
        zfile_t *file = (zfile_t *) zlist_pop (self->files);
        while (file) {
            zfile_remove (file);
            zfile_destroy (&file);
            file = (zfile_t *) zlist_pop (self->files);
        }
        zdir_t *subdir = (zdir_t *) zlist_pop (self->subdirs);
        while (subdir) {
            zdir_remove (subdir, force);
            zdir_destroy (&subdir);
            subdir = (zdir_t *) zlist_pop (self->subdirs);
        }
        self->cursize = 0;
        self->count = 0;
    }
    //  Remove if empty
    if (zlist_size (self->files) == 0
    &&  zlist_size (self->subdirs) == 0)
        zsys_dir_delete (self->path);
}

//  --------------------------------------------------------------------------
//  Calculate differences between two versions of a directory tree.
//  Returns a list of zdir_patch_t patches. Either older or newer may
//  be null, indicating the directory is empty/absent. If alias is set,
//  generates virtual filename (minus path, plus alias).

zlist_t *
zdir_diff (zdir_t *older, zdir_t *newer, const char *alias)
{
    zlist_t *patches = zlist_new ();
    if (!patches)
        return NULL;

    zfile_t **old_files = zdir_flatten (older);
    zfile_t **new_files = zdir_flatten (newer);

    int old_index = 0;
    int new_index = 0;

    //  Note that both lists are sorted, so detecting differences
    //  is rather trivial
    while (old_files [old_index] || new_files [new_index]) {
        zfile_t *old_file = old_files [old_index];
        zfile_t *new_file = new_files [new_index];

        int cmp;
        if (!old_file)
            cmp = 1;        //  Old file was deleted at end of list
        else
        if (!new_file)
            cmp = -1;       //  New file was added at end of list
        else
            cmp = strcmp (zfile_filename (old_file, NULL), zfile_filename (new_file, NULL));

        if (cmp > 0) {
            //  New file was created
            if (zfile_is_stable (new_file)) {
                int rc = zlist_append (patches, zdir_patch_new (newer->path, new_file, patch_create, alias));
                if (rc != 0) {
                    zlist_destroy (&patches);
                    break;
                }
            }
            old_index--;
        }
        else
        if (cmp < 0) {
            //  Old file was deleted
            if (zfile_is_stable (old_file)) {
                int rc = zlist_append (patches, zdir_patch_new (older->path, old_file, patch_delete, alias));
                if (rc != 0) {
                    zlist_destroy (&patches);
                    break;
                }
            }
            new_index--;
        }
        else
        if (cmp == 0 && zfile_is_stable (new_file)) {
            if (zfile_is_stable (old_file)) {
                //  Old file was modified or replaced
                //  Since we don't check file contents, treat as created
                //  Could better do SHA check on file here
                if (zfile_modified (new_file) != zfile_modified (old_file)
                ||  zfile_cursize (new_file) != zfile_cursize (old_file)) {
                    int rc = zlist_append (patches, zdir_patch_new (newer->path, new_file, patch_create, alias));
                    if (rc != 0) {
                        zlist_destroy (&patches);
                        break;
                    }
                }
            }
            else {
                //  File was created over some period of time
                int rc = zlist_append (patches, zdir_patch_new (newer->path, new_file, patch_create, alias));
                if (rc != 0) {
                    zlist_destroy (&patches);
                    break;
                }
            }
        }
        old_index++;
        new_index++;
    }
    free (old_files);
    free (new_files);

    return patches;
}

//  --------------------------------------------------------------------------
//  Return full contents of directory as a patch list. If alias is set,
//  generates virtual filename (minus path, plus alias).

zlist_t *
zdir_resync (zdir_t *self, const char *alias)
{
    zlist_t *patches = zlist_new ();
    if (!patches)
        return NULL;

    zfile_t **files = zdir_flatten (self);
    uint index;
    for (index = 0;; index++) {
        zfile_t *file = files [index];
        if (!file)
            break;
        if (zlist_append (patches, zdir_patch_new (
            self->path, file, patch_create, alias))) {
            zlist_destroy (&patches);
            break;
        }
    }
    free (files);
    return patches;
}

//  --------------------------------------------------------------------------
//  Load directory cache; returns a hash table containing the SHA-1 digests
//  of every file in the tree. The cache is saved between runs in .cache.
//  The caller must destroy the hash table when done with it.

zhash_t *
zdir_cache (zdir_t *self)
{
    assert (self);

    //  Load any previous cache from disk
    zhash_t *cache = zhash_new ();
    if (!cache)
        return NULL;
    zhash_autofree (cache);
    char *cache_file = (char *) zmalloc (strlen (self->path) + strlen ("/.cache") + 1);
    if (!cache_file) {
        zhash_destroy (&cache);
        return NULL;
    }
    sprintf (cache_file, "%s/.cache", self->path);
    zhash_load (cache, cache_file);

    //  Recalculate digest for any new files
    zfile_t **files = zdir_flatten (self);
    uint index;
    for (index = 0;; index++) {
        zfile_t *file = files [index];
        if (!file)
            break;
        const char *filename = zfile_filename (file, self->path);
        if (zhash_lookup (cache, zfile_filename (file, self->path)) == NULL) {
            int rc = zhash_insert (cache, filename, (void *) zfile_digest (file));
            if (rc != 0) {
                zhash_destroy (&cache);
                break;
            }
        }
    }
    free (files);

    //  Save cache to disk for future reference
    if (cache)
        zhash_save (cache, cache_file);
    free (cache_file);
    return cache;
}

//  --------------------------------------------------------------------------
//  Print contents of directory to open stream

void
zdir_fprint (zdir_t *self, FILE *stream, int indent)
{
    assert (self);

    zfile_t **files = zdir_flatten (self);
    uint index;
    for (index = 0;; index++) {
        zfile_t *file = files [index];
        if (!file)
            break;
        fprintf (stream, "%s\n", zfile_filename (file, NULL));
    }
    zdir_flatten_free (&files);
}

//  --------------------------------------------------------------------------
//  Print contents of directory to stdout

void
zdir_print (zdir_t *self, int indent)
{
    zdir_fprint (self, stdout, indent);
}

//  --------------------------------------------------------------------------
//  Self test of this class

void
zdir_test (bool verbose)
{
    printf (" * zdir: ");

    //  @selftest
    zdir_t *older = zdir_new (".", NULL);
    assert (older);
    if (verbose) {
        printf ("\n");
        zdir_dump (older, 0);
    }
    zdir_t *newer = zdir_new ("..", NULL);
    assert (newer);
    zlist_t *patches = zdir_diff (older, newer, "/");
    assert (patches);
    while (zlist_size (patches)) {
        zdir_patch_t *patch = (zdir_patch_t *) zlist_pop (patches);
        zdir_patch_destroy (&patch);
    }
    zlist_destroy (&patches);
    zdir_destroy (&older);
    zdir_destroy (&newer);

    zdir_t *nosuch = zdir_new ("does-not-exist", NULL);
    assert (nosuch == NULL);
    //  @end

    printf ("OK\n");
}


text:
import React from 'react';
import transitions from '../styles/transitions';
import {createChildFragment} from '../utils/childUtils';
import ColorManipulator from '../utils/colorManipulator';
import EnhancedButton from '../internal/EnhancedButton';
import FlatButtonLabel from './FlatButtonLabel';

function validateLabel(props, propName, componentName) {
  if (!props.children && !props.label && !props.icon) {
    return new Error(`Required prop label or children or icon was not specified in ${componentName}.`);
  }
}

class FlatButton extends React.Component {
  static muiName = 'FlatButton';

  static propTypes = {
    /**
     * Color of button when mouse is not hovering over it.
     */
    backgroundColor: React.PropTypes.string,

    /**
     * This is what will be displayed inside the button.
     * If a label is specified, the text within the label prop will
     * be displayed. Otherwise, the component will expect children
     * which will then be displayed. (In our example,
     * we are nesting an `<input type="file" />` and a `span`
     * that acts as our label to be displayed.) This only
     * applies to flat and raised buttons.
     */
    children: React.PropTypes.node,

    /**
     * Disables the button if set to true.
     */
    disabled: React.PropTypes.bool,

    /**
     * Color of button when mouse hovers over.
     */
    hoverColor: React.PropTypes.string,

    /**
     * URL to link to when button clicked if `linkButton` is set to true.
     */
    href: React.PropTypes.string,

    /**
     * Use this property to display an icon.
     */
    icon: React.PropTypes.node,

    /**
     * Label for the button.
     */
    label: validateLabel,

    /**
     * Place label before or after the passed children.
     */
    labelPosition: React.PropTypes.oneOf([
      'before',
      'after',
    ]),

    /**
     * Override the inline-styles of the button's label element.
     */
    labelStyle: React.PropTypes.object,

    /**
     * Enables use of `href` property to provide a URL to link to if set to true.
     */
    linkButton: React.PropTypes.bool,

    /**
     * Callback function fired when the element is focused or blurred by the keyboard.
     *
     * @param {object} event `focus` or `blur` event targeting the element.
     * @param {boolean} isKeyboardFocused Indicates whether the element is focused.
     */
    onKeyboardFocus: React.PropTypes.func,

    /**
     * Callback function fired when the mouse enters the element.
     *
     * @param {object} event `mouseenter` event targeting the element.
     */
    onMouseEnter: React.PropTypes.func,

    /**
     * Callback function fired when the mouse leaves the element.
     *
     * @param {object} event `mouseleave` event targeting the element.
     */
    onMouseLeave: React.PropTypes.func,

    /**
     * Callback function fired when the element is touched.
     *
     * @param {object} event `touchstart` event targeting the element.
     */
    onTouchStart: React.PropTypes.func,

    /**
     * If true, colors button according to
     * primaryTextColor from the Theme.
     */
    primary: React.PropTypes.bool,

    /**
     * Color for the ripple after button is clicked.
     */
    rippleColor: React.PropTypes.string,

    /**
     * If true, colors button according to secondaryTextColor from the theme.
     * The primary prop has precendent if set to true.
     */
    secondary: React.PropTypes.bool,

    /**
     * Override the inline-styles of the root element.
     */
    style: React.PropTypes.object,
  };

  static defaultProps = {
    disabled: false,
    labelStyle: {},
    labelPosition: 'after',
    onKeyboardFocus: () => {},
    onMouseEnter: () => {},
    onMouseLeave: () => {},
    onTouchStart: () => {},
    primary: false,
    secondary: false,
  };

  static contextTypes = {
    muiTheme: React.PropTypes.object.isRequired,
  };

  state = {
    hovered: false,
    isKeyboardFocused: false,
    touch: false,
  };

  handleKeyboardFocus = (event, isKeyboardFocused) => {
    this.setState({isKeyboardFocused: isKeyboardFocused});
    this.props.onKeyboardFocus(event, isKeyboardFocused);
  };

  handleMouseEnter = (event) => {
    // Cancel hover styles for touch devices
    if (!this.state.touch) this.setState({hovered: true});
    this.props.onMouseEnter(event);
  };

  handleMouseLeave = (event) => {
    this.setState({hovered: false});
    this.props.onMouseLeave(event);
  };

  handleTouchStart = (event) => {
    this.setState({touch: true});
    this.props.onTouchStart(event);
  };

  render() {
    const {
      children,
      disabled,
      hoverColor,
      backgroundColor,
      icon,
      label,
      labelStyle,
      labelPosition,
      linkButton,
      primary,
      rippleColor,
      secondary,
      style,
      ...other,
    } = this.props;

    const {
      button: {
        height: buttonHeight,
        minWidth: buttonMinWidth,
        textTransform: buttonTextTransform,
      },
      flatButton: {
        buttonFilterColor,
        color: buttonColor,
        disabledTextColor,
        fontSize,
        fontWeight,
        primaryTextColor,
        secondaryTextColor,
        textColor,
        textTransform = buttonTextTransform || 'uppercase',
      },
    } = this.context.muiTheme;
    const defaultTextColor = disabled ? disabledTextColor :
      primary ? primaryTextColor :
      secondary ? secondaryTextColor :
      textColor;

    const defaultHoverColor = ColorManipulator.fade(buttonFilterColor, 0.2);
    const defaultRippleColor = buttonFilterColor;
    const buttonHoverColor = hoverColor || defaultHoverColor;
    const buttonRippleColor = rippleColor || defaultRippleColor;
    const buttonBackgroundColor = backgroundColor || buttonColor;
    const hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled;

    const mergedRootStyles = Object.assign({}, {
      color: defaultTextColor,
      transition: transitions.easeOut(),
      fontSize: fontSize,
      letterSpacing: 0,
      textTransform: textTransform,
      fontWeight: fontWeight,
      borderRadius: 2,
      userSelect: 'none',
      position: 'relative',
      overflow: 'hidden',
      backgroundColor: hovered ? buttonHoverColor : buttonBackgroundColor,
      lineHeight: `${buttonHeight}px`,
      minWidth: buttonMinWidth,
      padding: 0,
      margin: 0,
      // That's the default value for a button but not a link
      textAlign: 'center',
    }, style);

    let iconCloned;
    const labelStyleIcon = {};

    if (icon) {
      iconCloned = React.cloneElement(icon, {
        color: mergedRootStyles.color,
        style: {
          lineHeight: `${buttonHeight}px`,
          verticalAlign: 'middle',
          marginLeft: label && labelPosition !== 'before' ? 12 : 0,
          marginRight: label && labelPosition === 'before' ? 12 : 0,
        },
      });

      if (labelPosition === 'before') {
        labelStyleIcon.paddingRight = 8;
      } else {
        labelStyleIcon.paddingLeft = 8;
      }
    }

    const labelElement = label ? (
      <FlatButtonLabel label={label} style={Object.assign({}, labelStyleIcon, labelStyle)} />
    ) : undefined;

    // Place label before or after children.
    const childrenFragment = labelPosition === 'before' ?
    {
      labelElement,
      iconCloned,
      children,
    } :
    {
      children,
      iconCloned,
      labelElement,
    };

    const enhancedButtonChildren = createChildFragment(childrenFragment);

    return (
      <EnhancedButton
        {...other}
        disabled={disabled}
        focusRippleColor={buttonRippleColor}
        focusRippleOpacity={0.3}
        linkButton={linkButton}
        onKeyboardFocus={this.handleKeyboardFocus}
        onMouseLeave={this.handleMouseLeave}
        onMouseEnter={this.handleMouseEnter}
        onTouchStart={this.handleTouchStart}
        style={mergedRootStyles}
        touchRippleColor={buttonRippleColor}
        touchRippleOpacity={0.3}
      >
        {enhancedButtonChildren}
      </EnhancedButton>
    );
  }
}

export default FlatButton;


text:
package com.iballad.controller;

public class UserController {

	public String login(String username, String passwd) {
		return null;
	}

}


text:
<?php

require BASE_PATH . 'core' . DIRSEP . 'clases' . DIRSEP . 'BdDrivers' . DIRSEP . 'BdDriver.php';;

class MysqlDriver implements BdDriver
{

    private $conexion;
    private $resultados = array(); // Almacena un array de las consultas SELECT
    private $ultimaConsulta = ""; // La ultima consulta

    // Constantes de tipo de resultados
    const ASSOC = 'ASSOC';
    const NUM = 'NUM';
    const BOTH = 'BOTH';
    const ROW = 'ROW';
    const OBJECT = 'OBJECT';

    public function __construct($bdHost, $bdDatabase, $bdUser, $bdPassword, $bdPersistent = FALSE, $charset = "utf8")
    {
        try {
            if (!empty($bdHost) && !empty($bdDatabase) && !empty($bdUser)) {
                if ($bdPersistent == TRUE) {
                    $this->conexion = mysql_pconnect($bdHost, $bdUser, $bdPassword);
                } else {
                    $this->conexion = mysql_connect($bdHost, $bdUser, $bdPassword);
                }

                if (!$this->conexion) {
                    throw new Exception("La Base de datos no se pudo conectar. Error Mysql: " . mysql_error());
                }

                if (!mysql_select_db($bdDatabase, $this->conexion)) {
                    throw new Exception("La Base de datos '{$bdDatabase}'. Error Mysql: " . mysql_error());
                }

                mysql_set_charset($charset, $this->conexion);

            } else {
                throw new Exception("Debes introducir un usuario, password, host y base de datos para conectarse.");
            }
        } catch (Exception $e) {
            trigger_error($e, E_USER_ERROR);
        }
    }

    // Limpiamos los resultados guardados
    public function borrarResultados()
    {
        $this->resultados = array();
    }

    private function getUltimoResultado()
    {
        if (!$this->conexion) {
            return FALSE;
        }
        return $this->resultados[$this->ultimaConsulta];
    }

    public function getEstadoConexion()
    {
        if (!$this->conexion) {
            return FALSE;
        }
        return TRUE;
    }

    public function ejecutar($sql, $datos = array())
    {

        if (!$this->conexion) {
            return FALSE;
        }

        $sql = $this->prepararConsulta($sql, $datos);

        //file_put_contents(BASE_PATH.'tmp/sql.txt',$sql,"+a");

        $partes = explode(" ", trim($sql));
        $tipo = strtoupper($partes[0]);
        $hash = md5($sql);

        /*
        $resultado = mysql_query($sql,$this->conexion);
        Cargador::cargar("Debug")->sql($sql);
        if ("SELECT" == $tipo || 'SHOW'== $tipo || 'DESCRIBE'== $tipo || 'EXPLAIN'== $tipo){
            $this->ultimaConsulta = $hash;
            $this->resultados[$hash] = $resultado;
        }else if("INSERT"==$type){
            return $this->ultimoInsertId();
        }
        return TRUE;
        */
        //Cargador::cargar("Debug")->sql($sql);

        if ("SELECT" == $tipo || 'SHOW' == $tipo || 'DESCRIBE' == $tipo || 'EXPLAIN' == $tipo) {
            // Se guarda el hash de la ultima consulta select, aunque falle
            if (isset($this->resultados[$hash])) {
                $this->ultimaConsulta = $hash;
                if (is_resource($this->resultados[$hash])) {
                    return TRUE;
                }
            }
            $this->ultimaConsulta = $hash;
        } else if ("UPDATE" == $tipo || "DELETE" == $tipo) {
            $this->resultados = array();
        }

        $resultado = mysql_query($sql, $this->conexion);

        if (!$resultado) {
            trigger_error("Consulta Invalida: " . mysql_error() . "\n SQL: " . $sql . "\n",
                E_USER_ERROR);
            return FALSE; //Traza: \n".Debug::backtrace(TRUE)
        }

        if ("SELECT" == $tipo || 'SHOW' == $tipo || 'DESCRIBE' == $tipo || 'EXPLAIN' == $tipo) {
            $this->resultados[$hash] = $resultado;
        } else if ("INSERT" == $tipo) {
            return $this->ultimoInsertId();
        }

        return TRUE;
    }

    public function numeroFilas()
    {

        if (!$this->conexion) {
            return FALSE;
        }

        $ultimoResultado = $this->resultados[$this->ultimaConsulta];

        $total = mysql_num_rows($ultimoResultado);
        if (!$total) {
            $total = 0;
        }
        return $total;
    }

    public function filasAfectadas()
    {

        if (!$this->conexion) {
            return FALSE;
        }

        return @mysql_affected_rows($this->conexion);
    }

    public function ultimoInsertId()
    {

        if (!$this->conexion) {
            return FALSE;
        }

        return @mysql_insert_id($this->conexion);
    }

    public function transaccionBegin()
    {
        $this->ejecutar('SET AUTOCOMMIT=0');
        $this->ejecutar('START TRANSACTION'); // can also be BEGIN or BEGIN WORK
        return TRUE;
    }

    public function transaccionCommit()
    {
        $this->ejecutar('COMMIT');
        $this->ejecutar('SET AUTOCOMMIT=1');
        return TRUE;
    }

    public function transaccionRollback()
    {
        $this->ejecutar('ROLLBACK');
        $this->ejecutar('SET AUTOCOMMIT=1');
        return TRUE;
    }

    public function getFila($tipoResultado = 'ASSOC')
    {

        if (!$this->conexion) {
            return FALSE;
        }

        $ultimaConsulta = $this->resultados[$this->ultimaConsulta];
        if (self::ASSOC == $tipoResultado) {
            $row = mysql_fetch_assoc($ultimaConsulta);
        } elseif (self::ROW == $tipoResultado) {
            $row = mysql_fetch_row($ultimaConsulta);
        } elseif (self::OBJECT == $tipoResultado) {
            $row = mysql_fetch_object($ultimaConsulta);
        } else {
            if (self::NUM || self::BOTH) {
                $row = mysql_fetch_array($ultimaConsulta, 'MYSQL_' . $tipoResultado);
            }
            $row = mysql_fetch_array($ultimaConsulta, 'MYSQL_BOTH');
        }
        return $row;
    }

    public function getFilaDesde($inicio = 0, $tipoResultado = 'ASSOC')
    {

        if (!$this->conexion) {
            return FALSE;
        }

        $ultimaConsulta = $this->resultados[$this->ultimaConsulta];
        if (($inicio >= 0) && ($this->numeroFilas() > 0)) {
            mysql_data_seek($ultimaConsulta, $inicio);
        } else {
            $this->rebobinar();
        }
        return $this->getFila($tipoResultado);
    }

    public function rebobinar()
    {

        if (!$this->conexion) {
            return FALSE;
        }

        $ultimaConsulta = $this->resultados[$this->ultimaConsulta];
        if ($this->numeroFilas() > 0) {
            return mysql_data_seek($ultimaConsulta, 0);
        } else {
            return FALSE;
        }
    }

    public function getFilas($inicio, $total, $tipoResultado = 'ASSOC')
    {

        if (!$this->conexion) {
            return FALSE;
        }

        $ultimaConsulta = $this->resultados[$this->ultimaConsulta];
        $totalFilas = $this->numeroFilas();

        if (($inicio >= 0) && ($totalFilas > 0)) {
            mysql_data_seek($ultimaConsulta, $inicio);
        } else {
            return array();
        }

        if ($totalFilas < $total) {
            $total = $totalFilas;
        }

        $filas = array();
        for ($i = $inicio; $i <= ($inicio + $total); $i++) {
            $filas[] = $this->getFila($tipoResultado);
        }
        return $filas;
    }

    function __destruct()
    {

        if (!$this->conexion) {
            return FALSE;
        }

        foreach ($this->resultados as $resultado) {
            if (is_resource($resultado)) {
                mysql_free_result($resultado);
            } else {
                unset($resultado);
            }
        }
        mysql_close($this->conexion);
    }

    function getColumnas($tabla)
    {

        $this->ejecutar("SHOW COLUMNS FROM {$tabla}");
        $columnas = array();
        while ($row = $this->getFila()) {
            $columnas[] = $fila['Field'];
        }
        return $columnas;
    }

    private function prepararConsulta($sql, $datos)
    {

        if (!$this->conexion) {
            return FALSE;
        }

        if (Cargador::cargar('Configuracion')->DEBUG === TRUE)
            Debug::sql($sql);

        $sql = explode(" ", trim($sql));

        $st = array();
        for ($index = 0; $index < count($sql); $index++) {
            $valor = trim($sql[$index]);
            if (!empty($valor)) {
                $st[] = $sql[$index];
            }
        }
        $sql = $st;

        //echo "<pre>";
        //print_r($sql);
        //echo "<pre>";

        $total = count($sql);
        $totalDatos = count($datos);

        if ($totalDatos > 0) {
            $posicionInicio = FALSE;
            $posicionFin = FALSE;
            $sqlTmp = "";
            $contDatos = 0;
            for ($i = 0; $i < $total; $i++) {
                $posicionInicio = strpos($sql[$i], '\'%');
                if ($posicionInicio !== FALSE) {
                    $posicionFin = strpos($sql[$i], '\'', ($posicionInicio + 2));
                    if ($posicionFin !== FALSE) {
                        if ($contDatos < $totalDatos) {

                            //No estan controlados los datos que son distintos de %s
                            // Para d, no hace falta poner '', pero hay que pornerlas para que lo reconozca el metodo
                            // y luego este se encarga de quitarlas al hacer la consulta sql final
                            if (strpos($sql[$i], 'd', ($posicionInicio + 1)) !== FALSE) {
                                $sql[$i] = substr($sql[$i], 0, $posicionInicio) . '%d' . substr($sql[$i], ($posicionFin + 1));
                            }

                            $sqlTmp .= sprintf($sql[$i], mysql_real_escape_string($datos[$contDatos], $this->conexion)) . ' ';
                            $contDatos++;
                        }
                    }
                } else {
                    $sqlTmp .= $sql[$i] . ' ';
                }
            }
            $sql = trim($sqlTmp);
        } else {
            $sql = trim(implode(' ', $sql));
        }

        if (Cargador::cargar('Configuracion')->DEBUG === TRUE)
            Debug::sql($sql);

        return $sql;
    }

}

?>


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

  <link rel="stylesheet" type="text/css" href="../bin/css/nanoscroller.css">
  <link rel="stylesheet" type="text/css" href="lib/jasmine-1.3.1/jasmine.css">
  <style type="text/css">
    .nano { width: 200px; height: 200px; }
  </style>
  <script type="text/javascript" src="lib/jquery.min.js"></script>
  <script type="text/javascript" src="lib/jasmine-1.3.1/jasmine.js"></script>
  <script type="text/javascript" src="lib/jasmine-1.3.1/jasmine-html.js"></script>
  <script type="text/javascript" src="lib/jasmine-jquery.js"></script>
  <script type="text/javascript" src="../bin/javascripts/jquery.nanoscroller.min.js"></script>
  <script type="text/javascript" src="spec/nano-spec.js"></script>

  <script type="text/javascript">
    (function() {
      var jasmineEnv = jasmine.getEnv();
      jasmineEnv.updateInterval = 1000;

      var htmlReporter = new jasmine.HtmlReporter();

      jasmineEnv.addReporter(htmlReporter);

      jasmineEnv.specFilter = function(spec) {
        return htmlReporter.specFilter(spec);
      };

      var currentWindowOnload = window.onload;

      window.onload = function() {
        if (currentWindowOnload) {
          currentWindowOnload();
        }
        execJasmine();
      };

      function execJasmine() {
        jasmineEnv.execute();
      }

    })();
  </script>

</head>

<body>
</body>
</html>


text:
package org.batfish.common.topology.broadcast;

import static com.google.common.base.Preconditions.checkArgument;

import com.google.common.annotations.VisibleForTesting;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nonnull;

/**
 * Represents the switch running inside a device and modeling its broadcast domain.
 *
 *
Has edges to {@link L3Interface L3 interfaces} with vlan configuration, like {@code irb.1} or
 * {@code Vlan7}.
 *
 *
Has edges to {@link PhysicalInterface physical interfaces} with switchport configuration,
 * specifically in trunk or access modes.
 */
public final class DeviceBroadcastDomain extends Node<Integer> {
  public DeviceBroadcastDomain(String hostname) {
    _hostname = hostname;
    _l3Interfaces = new HashMap<>();
    _l2VNIs = new HashMap<>();
    _physicalInterfaces = new HashMap<>();
  }

  public void attachL2VNI(L2VNI vni, Edge<Integer, L2VNI.Unit> edge) {
    Edge<Integer, L2VNI.Unit> previous = _l2VNIs.putIfAbsent(vni, edge);
    checkArgument(previous == null, "Cannot connect the same vni %s twice", vni.getNode());
  }

  public void deliverToL3(L3Interface iface, Edge<Integer, L3Interface.Unit> edge) {
    Edge<Integer, L3Interface.Unit> previous = _l3Interfaces.putIfAbsent(iface, edge);
    checkArgument(previous == null, "Cannot connect the same interface %s twice", iface.getIface());
  }

  public void transmitOutPhysical(PhysicalInterface iface, Edge<Integer, EthernetTag> edge) {
    Edge<Integer, EthernetTag> previous = _physicalInterfaces.putIfAbsent(iface, edge);
    checkArgument(previous == null, "Cannot connect the same interface %s twice", iface.getIface());
  }

  public @Nonnull String getHostname() {
    return _hostname;
  }

  // Internal implementation details.
  public void broadcast(int vlan, Set<L3Interface> domain, Set<NodeAndData<?, ?>> visited) {
    if (!visited.add(new NodeAndData<>(this, vlan))) {
      return;
    }

    _physicalInterfaces.forEach(
        (iface, edge) ->
            edge.traverse(vlan).ifPresent(tag -> iface.transmit(tag, domain, visited)));
    _l2VNIs.forEach(
        (vni, edge) -> edge.traverse(vlan).ifPresent(unit -> vni.exit(unit, domain, visited)));
    _l3Interfaces.forEach(
        (iface, edge) -> edge.traverse(vlan).ifPresent(v -> iface.reached(domain, visited)));
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    } else if (!(o instanceof DeviceBroadcastDomain)) {
      return false;
    }
    DeviceBroadcastDomain that = (DeviceBroadcastDomain) o;
    return _hostname.equals(that._hostname);
  }

  @Override
  public int hashCode() {
    return 31 * DeviceBroadcastDomain.class.hashCode() + _hostname.hashCode();
  }

  @VisibleForTesting
  Map<L3Interface, Edge<Integer, L3Interface.Unit>> getL3InterfacesForTest() {
    return _l3Interfaces;
  }

  @VisibleForTesting
  Map<PhysicalInterface, Edge<Integer, EthernetTag>> getPhysicalInterfacesForTest() {
    return _physicalInterfaces;
  }

  private final @Nonnull String _hostname;
  private final @Nonnull Map<L2VNI, Edge<Integer, L2VNI.Unit>> _l2VNIs;
  private final @Nonnull Map<L3Interface, Edge<Integer, L3Interface.Unit>> _l3Interfaces;
  private final @Nonnull Map<PhysicalInterface, Edge<Integer, EthernetTag>> _physicalInterfaces;
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Flora, Jena 64: 228 (1881)

#### Original name
Patellaria sprucei Müll. Arg.

### Remarks
null


text:
/**
 * KeywordSet.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
 */

package com.google.api.ads.adwords.axis.v201502.express;

/**
 * A keyword set based {@link Criterion}.
 *             This is disabled for
 * AdX when it is contained within Operators: ADD, SET.
 */
public class KeywordSet  extends com.google.api.ads.adwords.axis.v201502.cm.Criterion  implements java.io.Serializable {
    private java.lang.String keywordSetId;

    private java.lang.String name;

    private java.lang.Boolean deprecated;

    public KeywordSet() {
    }

    public KeywordSet(
           java.lang.Long id,
           com.google.api.ads.adwords.axis.v201502.cm.CriterionType type,
           java.lang.String criterionType,
           java.lang.String keywordSetId,
           java.lang.String name,
           java.lang.Boolean deprecated) {
        super(
            id,
            type,
            criterionType);
        this.keywordSetId = keywordSetId;
        this.name = name;
        this.deprecated = deprecated;
    }

    /**
     * Gets the keywordSetId value for this KeywordSet.
     *
     * @return keywordSetId
     */
    public java.lang.String getKeywordSetId() {
        return keywordSetId;
    }

    /**
     * Sets the keywordSetId value for this KeywordSet.
     *
     * @param keywordSetId
     */
    public void setKeywordSetId(java.lang.String keywordSetId) {
        this.keywordSetId = keywordSetId;
    }

    /**
     * Gets the name value for this KeywordSet.
     *
     * @return name
     */
    public java.lang.String getName() {
        return name;
    }

    /**
     * Sets the name value for this KeywordSet.
     *
     * @param name
     */
    public void setName(java.lang.String name) {
        this.name = name;
    }

    /**
     * Gets the deprecated value for this KeywordSet.
     *
     * @return deprecated
     */
    public java.lang.Boolean getDeprecated() {
        return deprecated;
    }

    /**
     * Sets the deprecated value for this KeywordSet.
     *
     * @param deprecated
     */
    public void setDeprecated(java.lang.Boolean deprecated) {
        this.deprecated = deprecated;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof KeywordSet)) return false;
        KeywordSet other = (KeywordSet) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = super.equals(obj) &&
            ((this.keywordSetId==null && other.getKeywordSetId()==null) ||
             (this.keywordSetId!=null &&
              this.keywordSetId.equals(other.getKeywordSetId()))) &&
            ((this.name==null && other.getName()==null) ||
             (this.name!=null &&
              this.name.equals(other.getName()))) &&
            ((this.deprecated==null && other.getDeprecated()==null) ||
             (this.deprecated!=null &&
              this.deprecated.equals(other.getDeprecated())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = super.hashCode();
        if (getKeywordSetId() != null) {
            _hashCode += getKeywordSetId().hashCode();
        }
        if (getName() != null) {
            _hashCode += getName().hashCode();
        }
        if (getDeprecated() != null) {
            _hashCode += getDeprecated().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(KeywordSet.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/express/v201502", "KeywordSet"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("keywordSetId");
        elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/express/v201502", "keywordSetId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("name");
        elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/express/v201502", "name"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("deprecated");
        elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/express/v201502", "deprecated"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}


text:
This subfolder contains my files
(my code snippets and my synopses about the main book's topics) for the book
**"Modern cpp programming cookbook"** (*2-nd edition*) by *Marius Bancila*.

([src code](https://github.com/PacktPublishing/Modern-CPP-Programming-Cookbook-Second-Edition))


text:
salt.modules.bamboohr
=====================

.. automodule:: salt.modules.bamboohr
    :members:


text:
  \section[Fast Healthcare Interoperability Resources (HL7 FHIR\textsuperscript{\texttrademark})]
  {HL7 FHIR\textsuperscript{\texttrademark}}
    \label{sec:fhir}

  \initial{F}\textit{ast Healthcare Interoperability Resources (HL7/FHIR )}\
  is a is a next generation standards framework created by HL7.\
  It defines a set of ``resources'' for health. These resources represent granular clinical\
  concepts that can be exchanged in order to quickly and effectively solve problems in healthcare\
  and related process. The resources cover the basic elements of healthcare - patients, admissions,\
  diagnostic reports, medications, and problem lists, with their typical participants, and also support\
  a range of richer and more complex clinical models. The simple direct definitions of the resources are\
  based on thorough requirements gathering, formal analysis and extensive cross-mapping to other relevant standards. \citep{_fhir_intro_2013}\\

  \noindent Resources are:\

  \begin{itemize}
    \itemsep0ex
    \item Atomic - they are the smallest defined unit of operation and a transaction\
    scope of their own.\
    \item Connected - resources refer to other resources to allow for clean modular\
    reuse of information.\
    \item Independent - the content of a resource can be processed without having to\
    retrieve referenced resources.\
    \item Simple - each resource definition is easy to understand, and to implement\
    without needing specialized tooling or infrastructure (though that can be used if desired).\
    \item RESTful - resources are able to be used in a RESTful exchange context.\
    \item Flexible - resources can also be used in non-RESTful contexts, such as messaging\
    or SOA architectures and can be moved in and out of RESTful paradigms as convenient.\
    \item Extensible - resources can be extended to allow for local requirements without\
    impacting on interoperability.\
    \item Webcentric - where possible and appropriate, open internet standards are used\
    for data representation.\
    \item Free for use - the FHIR specification itself is open - anyone can implement\
    FHIR or derive related specifications without any IP restrictions.\
  \end{itemize}

  \noindent In addition to the basic resources, FHIR defines a lightweight implementation framework that\
  supports the use of these resources in RESTful environments, classic message exchanges, human-centric\
  clinical documents and enterprise SOA architectures. Each of these approaches provides its own benefits\
  - FHIR provides the underpinning enablement that makes the choosing one of these painless and enables enterprises\
  to choose their own paradigm without forsaking interoperability with other approaches.\\

  \noindent Though the resources are simple and easy to understand, they are backed by a thorough, global requirements gathering\
  and formal modeling process that ensures that the content of the resources is stable and reliable. The resource\
  contents are mapped to solid underlying ontologies and models using computable languages (including RDF) so\
  that the definitions and contents of the resources can be leveraged by computational analysis and conversion processes.\\

  \noindent FHIR also provides an underlying conformance framework and tooling that allows different implementation contexts\
  and enterprises to describe their context and use of resources in formal computable ways and to empower computed\
  interoperability that leverages both the conformance and definitional frameworks.\\

  \noindent The combination of the resources and the 3 supporting layers (implementation frameworks,\
  definitional thoroughness, and conformance tooling), along with the completely free license of FHIR\
  itself frees healthcare data so that it can easily flow to where it needs to be (across hospital production systems,\
  mobile clinical systems, cloud based data stores, national health repositories, research databases, etc.)\
  without having to pass through format and semantic inter-conversion hurdles along the way. \citep{_fhir_framework_2013}\


text:
Changing python version via alias

https://davidwalsh.name/change-python-version


text:
from artists.giacometti.cline import CScanSplit
try:
    import readline
except ImportError:
    print 'Readline not available; no command history'

prompt = '> '
sep = ' \t'

class REPL():

    def __init__(self, welcome=None):
        if welcome:
            print welcome
        self.repl()

    def repl(self):
        finished = False
        while not finished:
            try:
                line = raw_input(prompt)
            except EOFError:
                finished = True
            s = CScanSplit(line, sep, quotes='"\'`')
            print 'Words:', s.words
            print 'Info:', s.info
            print s.AsQuoted()

REPL('This is a test version 0.0.1.')


text:
/*
 * The code of this project is a port of (or wrapper around) the Guava-libraries.
 *    See http://code.google.com/p/guava-libraries/
 *
 * @author Markus Schneider
 */
package org.feijoas.mango.common.collect.immutable

import scala.annotation.meta.beanGetter
import scala.annotation.meta.beanSetter
import scala.annotation.meta.field
import scala.annotation.meta.getter
import scala.annotation.meta.setter
import scala.math.Ordering.Int

import org.feijoas.mango.common.annotations.Beta
import org.feijoas.mango.common.collect.Range
import org.feijoas.mango.common.collect.RangeSetBehaviors
import org.scalatest.FreeSpec
import org.scalatest.Matchers.be
import org.scalatest.Matchers.convertToAnyShouldWrapper

/** Tests for [[RangeSetFactoryTest]]
 *
 *  @author Markus Schneider
 *  @since 0.8
 */
class RangeSetFactoryTest extends FreeSpec with RangeSetBehaviors {

  "A (immutable) RangeSetFactory" - {
    "it should not create a copy if RangeSet(same type of immutable range set) is called" in {
      val fst = RangeSet(Range.open(3, 4))
      val snd = RangeSet(fst)
      fst should be theSameInstanceAs (snd)
    }
  }
}