text:
from __future__ import print_function

import sys
import json
import shutil
import os
import errno
import argparse
from collections import OrderedDict

def copy_package(location, destination, ignorer=None):
    shutil.rmtree(destination, ignore_errors=True)
    shutil.copytree(location, destination, ignore=ignorer)

def package_name(url):
    """ get the package name from a github url """

    project = url.split('/')[-1].split('.')[0]
    user = url.split('/')[-2]

    return {
        "project": project,
        "user": user
    }

def make_elm_stuff_folder(path):
    actual_path = '/'.join(path.split('/')[:-1])

    try:
        os.makedirs(actual_path)
    except OSError as e:
        if e.errno == errno.EEXIST and os.path.isdir(actual_path):
            pass
        else:
            raise

def gitignores(path):
    try:
        with open(path) as f:
            return [line.strip() for line in f]
    except:
        return []

def self_publish(package_location, destination=".", quiet=False):
    """ package_location should be the local package to install
    """

    elm_package_file = "{location}/elm-package.json".format(location=package_location)
    destination_elm_package_file = "{destination}/elm-package.json".format(destination=destination)

    exact_deps_file = "{destination}/elm-stuff/exact-dependencies.json".format(
        destination=destination,
        location=package_location
    )

    git_ignore_file = "{location}/.gitignore".format(location=package_location)

    with open(elm_package_file) as f:
        elm_package = json.load(f)

    package_details = package_name(elm_package['repository'])
    version = elm_package['version']

    place = package_details['user'] + '/' + package_details['project']

    copy_package(package_location, '{destination}/elm-stuff/packages/{place}/{version}'.format(
        place=place,
        version=version,
        destination=destination
    ), ignorer=shutil.ignore_patterns(*gitignores(git_ignore_file)))

    try:
        with open(exact_deps_file) as f:
            data = f.read()
            package_info = {}

            if data:
                package_info = json.loads(data)
    except IOError:
        package_info = {}

    make_elm_stuff_folder(exact_deps_file)

    with open(exact_deps_file, 'w') as f:
        package_info[place] = version
        json.dump(package_info, f, sort_keys=False, indent=4)

    with open(destination_elm_package_file) as f:
        destination_elm_package = json.load(f, object_pairs_hook=OrderedDict)

    with open(destination_elm_package_file, 'w') as f:
        destination_elm_package['dependencies'][place] = "{version} <= v <= {version}".format(version=version)
        json.dump(destination_elm_package, f, sort_keys=False, indent=4)

def main():

    parser = argparse.ArgumentParser(description='Publish a local package into your project')

    parser.add_argument('--quiet', '-q', action='store_true', help='don\'t print anything', default=False)

    parser.add_argument('package_location')
    parser.add_argument('destination')
    args = parser.parse_args()

    self_publish(args.package_location, args.destination, quiet=args.quiet)

if __name__ == '__main__':
    main()


text:
<?php

namespace Google\AdsApi\Dfp\v201611;

/**
 * This file was generated from WSDL. DO NOT EDIT.
 */
class UnknownBaseRate extends \Google\AdsApi\Dfp\v201611\BaseRate
{

    /**
     * @param int $rateCardId
     * @param int $id
     */
    public function __construct($rateCardId = null, $id = null)
    {
      parent::__construct($rateCardId, $id);
    }

}

redpajama_set_name: RedPajamaGithub


text:
The WebSphere Development Tools (WDT) for Eclipse can be used to control the server (start/stop/dump/etc.), it also supports incremental publishing with minimal restarts, working with a debugger to step through your applications, etc.

WDT also provides:

* content-assist for server configuration (a nice to have: server configuration is minimal, but the tools can help you find what you need and identify finger-checks, etc.)
* automatic incremental publish of applications so that you can write and test your changes locally without having to go through a build/publish cycle or restart the server (which is not that big a deal given the server restarts lickety-split, but less is more!).

Installing WDT on Eclipse is as simple as a drag-and-drop, but the process is explained [on wasdev.net] [wasdev-wdt].

[wasdev-wdt]: https://developer.ibm.com/wasdev/downloads/liberty-profile-using-eclipse/

### Clone Git Repo
:pushpin: [Switch to cmd line example](/docs/Using-cmd-line.md/#clone-git-repo)

If the sample git repository hasn't been cloned yet, WDT has git tools integrated into the IDE:

1.  Open the Git repositories view
    * *Window -> Show View -> Other*
    * Type "git" in the filter box, and select *Git Repositories*
2.  Copy Git repo url by finding the textbox under "HTTPS clone URL" at the top of this page, and select *Copy to clipboard*
3.  In the Git repositories view, select the hyperlink `Clone a Git repository`
4.  The git repo url should already be filled in.  Select *Next -> Next -> Finish*
5.  The "sample.async.websockets [master]" repo should appear in the view

### Building the sample in Eclipse
:pushpin: [Switch to cmd line example](/docs/Using-cmd-line.md/#building-the-sample)

This sample can be built using either [Gradle](#building-with-gradle) or [Maven](#building-with-maven).

#### Building with [Gradle](http://gradle.org/)

###### Import Gradle projects into WDT

This assumes you have the Gradle [Buildship](https://projects.eclipse.org/projects/tools.buildship) tools installed into Eclipse Mars.

1. In the Git Repository view, expand the websocket repo to see the "Working Directory" folder
2. Right-click on this folder, and select *Copy path to Clipboard*
3. Select menu *File -> Import -> Gradle -> Gradle Project*
4. In the *Project root directory* folder textbox, Paste in the repository directory.
5. Click *Next* twice
6. Three projects should be listed in the *Gradle project structure* click *Finish*
7. This will create 3 projects in Eclipse: sample.async.websocket, async-websocket-application, and async-websocket-wlpcfg
8. Go to the *Gradle Tasks* view in Eclipse and navigate to the *sample.async.websocket* project
9. Double click on the *eclipse* task to generate all the Eclipse files
10. In the *Enterprise Explorer* view in Eclipse right click on the three projects mentioned in step 7 and click refresh

:star: *Note:* If you did not use Eclipse/WDT to clone the git repository, follow from step 3, but navigate to the cloned repository directory rather than pasting its name in step 4.

###### Run Gradle build

1. Right-click on async-websocket/build.gradle
2. *Run As > Gradnle Build...*
3. In the *Gradle Tasks* section enter "build"
4. Click *Run*

#### Building with [Maven](http://maven.apache.org/)

###### Import Maven projects into WDT

1.  In the Git Repository view, expand the websocket repo to see the "Working Directory" folder
2.  Right-click on this folder, and select *Copy path to Clipboard*
3.  Select menu *File -> Import -> Maven -> Existing Maven Projects*
4.  In the Root Directory textbox, Paste in the repository directory.
5.  Select *Browse...* button and select *Finish* (confirm it finds 3 pom.xml files)
6.  This will create 3 projects in Eclipse: async-websocket, async-websocket-application, and async-websocket-wlpcfg

:star: *Note:* If you did not use Eclipse/WDT to clone the git repository, follow from step 3, but navigate to the cloned repository directory rather than pasting its name in step 4.

###### Run Maven install

1. Right-click on async-websocket/pom.xml
2. *Run As > Maven build...*
3. In the *Goals* section enter "install"
4. Click *Run*

### Running the application locally
:pushpin: [Switch to cmd line example](/docs/Using-cmd-line.md/#running-the-application-locally)

Pre-requisite: [Download WAS Liberty](docs/Downloading-WAS-Liberty.md)

For the purposes of this sample, we will create the Liberty server (step 3 in the wasdev.net instructions) a little differently to create and customize a Runtime Environment that will allow the server to directly use the configuraiton in the `async-websocket-wlp` project.

###### Create a Runtime Environment in Eclipse

1. Open the 'Runtime Explorer' view:
    * *Window -> Show View -> Other*
    * type `runtime` in the filter box to find the view (it's under the Server heading).
2. Right-click in the view, and select *New -> Runtime Environment*
3. Give the Runtime environment a name, e.g. `wlp-2015.6.0.0` if you're using the June 2015 beta.
4. Either:
    * Select an existing installation (perhaps what you downloaded earlier, if you followed those instructions), or
    * select *Install from an archive or a repository* to download a new Liberty archive.
5. Follow the prompts (and possibly choose additional features to install) until you *Finish* creating the Runtime Environment

###### Add the User directory from the maven or Gradle project, and create a server

1. Right-click on the Runtime Environment created above in the 'Runtime Explorer' view, and select *Edit*
2. Click the `Advanced Options...` link
3. If the `async-websocket-wlpcfg` directory is not listed as a User Directory, we need to add it:
    1. Click New
    2. Select the `async-websocket-wlpcfg` project
    3. Select *Finish*, *OK*, *Finish*
4. Right-click on the `async-websocket-wlpcfg` user directory listed under the target Runtime Environment in the Runtime Explorer view, and select *New Server*.
5. The resulting dialog should be pre-populated with the `websocketSample` Liberty profile server.
   The default name for this server can vary, you might also opt to rename it from the Right-click menu in the Servers view to make it easier to identify.
6. Click *Finish*

###### Running Liberty and the sample application from WDT

1.  Select the `async-websocket-application` project
2.  Right-click -> *Run As... -> Run On Server*
3.  Select the appropriate server (as created above) and select *Finish*
4.  Confirm web browser opens on "http://localhost:9082/websocket/" with 5 hyperlinks to run samples

:star: *Note:* Some versions of WDT incorrectly map the cdi-1.2 dependency to the CDI 1.0 Facet, which prevents the *Run As ...* operation in step 2 from succeeding. If this happens, Right-click on the `async-websocket-application` project, and select *Properties*, then select *Project Facets* in the left-hand pane. Change the the "Context and dependency injection (CDI)" facet to use version 1.2, at which point, step 2 (above) should work.

#### Tips

* When importing the existing maven project into Eclipse, Eclipse will (by default) "helpfully" add this project to an (extraneous) ear. To turn this off, go to Preferences -> Java EE -> Project, and uncheck "Add project to an EAR" before you import the project. If you forgot to do this, just delete the ear project; no harm.


text:
package nl.dykam.dev.rewind.config.file;

import nl.dykam.dev.rewind.config.ConfigurationRoot;
import nl.dykam.dev.rewind.config.StoragesConfiguration;

import java.io.File;

public class FileConfiguration extends ConfigurationRoot {
    public FileConfiguration(File folder) {

    }

    @Override
    public StoragesConfiguration getStorage() {
        return null;
    }

    @Override
    public void reload(boolean force) {

    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

    <!-- view background color -->
    <solid android:color="#8BC34A" />

    <corners android:radius="4dp" />

</shape>


text:
BOOL CheckMap(const char* MapPath);

#endif


text:
<?php

namespace Embera\Provider;

use Embera\Url;

/**
 * Kurozora Provider
 *
 * @link https://hurozora.app
 */
class Kurozora extends ProviderAdapter implements ProviderInterface
{
    /** inline {@inheritdoc} */
    protected $endpoint = 'https://kurozora.app/oembed?format=json';

    /** inline {@inheritdoc} */
    protected static $hosts = [
        'kurozora.app'
    ];

    /** inline {@inheritdoc} */
    protected $allowedParams = [ 'maxwidth', 'maxheight' ];

    /** inline {@inheritdoc} */
    protected $httpsSupport = true;

    /** inline {@inheritdoc} */
    protected $responsiveSupport = false;

    /** inline {@inheritdoc} */
    public function validateUrl(Url $url)
    {
        return (bool) (preg_match('~kurozora\.app/(episodes|songs)/([^/]+)~i', (string) $url));
    }

    /** inline {@inheritdoc} */
    public function normalizeUrl(Url $url)
    {
        $url->convertToHttps();
        $url->removeQueryString();
        $url->removeLastSlash();

        return $url;
    }

}


text:
<?php

namespace Cubiche\Core\Async\Promise;

/**
 * Fulfilled Promise class.
 *
 * @author Karel Osorio Ramírez <osorioramirez@gmail.com>
 */
class FulfilledPromise extends AbstractPromise
{
    /**
     * @var mixed
     */
    protected $value;

    /**
     * @param mixed $value
     */
    public function __construct($value = null)
    {
        if ($value instanceof PromiseInterface) {
            throw new \InvalidArgumentException(\sprintf('You cannot create %s with a promise.', self::class));
        }
        $this->value = $value;
    }

    /**
     * {@inheritdoc}
     */
    public function then(callable $onFulfilled = null, callable $onRejected = null, callable $onNotify = null)
    {
        if ($onFulfilled === null) {
            return $this;
        }

        try {
            return $this->resolveActual($onFulfilled);
        } catch (\Exception $e) {
            return new RejectedPromise($e);
        }
    }

    /**
     * {@inheritdoc}
     */
    public function done(callable $onFulfilled = null, callable $onRejected = null, callable $onNotify = null)
    {
        if ($onFulfilled !== null) {
            $onFulfilled($this->value);
        }
    }

    /**
     * {@inheritdoc}
     */
    public function state()
    {
        return State::FULFILLED();
    }

    /**
     * @param callable $onFulfilled
     *
     * @return mixed
     */
    private function resolveActual(callable $onFulfilled)
    {
        $value = $onFulfilled($this->value);

        return $value instanceof PromiseInterface ? $value : new self($value);
    }
}


text:
Cache
=====
.. module:: subliminal.cache

.. autodata:: CACHE_VERSION

.. autodata:: SHOW_EXPIRATION_TIME

.. autodata:: EPISODE_EXPIRATION_TIME

.. autofunction:: subliminal_key_generator

.. data:: region

    The dogpile.cache region

Refer to `dogpile.cache's documentation <http://dogpilecache.readthedocs.org>`_ to see how to configure the region


text:
class ScatterPlotChart
  attr_accessor :experiment, :x_axis, :y_axis, :x_axis_label, :y_axis_label, :chart_data

  def initialize(experiment, x_axis, y_axis)
    @experiment = experiment
    @x_axis = x_axis
    @y_axis = y_axis

    @x_axis_label = experiment.input_parameter_label_for(x_axis) || x_axis
    @y_axis_label = experiment.input_parameter_label_for(y_axis) || y_axis
  end

  def prepare_chart_data
    scatter_plot_csv = @experiment.create_scatter_plot_csv_for(@x_axis, @y_axis)

    @chart_data = Hash.new

    column_x_idx, column_y_idx = -1, -1
    CSV.parse(scatter_plot_csv) do |row|
      if column_x_idx < 0
        column_x_idx = row.index(@x_axis)
        column_y_idx = row.index(@y_axis)
      else
        if @chart_data.has_key? row[column_x_idx]
          @chart_data[row[column_x_idx]] << row[column_y_idx]
        else
          @chart_data[row[column_x_idx]] = [row[column_y_idx]]
        end
      end
    end
  end

end


text:
package test.java.lang;

import java.io.*;
import java.util.*;

public class RuntimeTest {

    private static boolean _reflectImmediate = true;
    private static List<String> _stdOutLines = new ArrayList<String>();
    private static List<String> _stdErrLines = new ArrayList<String>();
    private static StringBuffer _stdOutBuffer = new StringBuffer();
    private static StringBuffer _stdErrBuffer = new StringBuffer();
    /**
     * @param args
     */
    public static void main(String[] args) {
        final Runtime runtime = Runtime.getRuntime();
        File wdir = null;
        boolean lines = true;
        int execCount = 1;
        String execInput = null;
        // Checkstyle: stop modified control variable check
        for (int i = 0; i < args.length; i++) {
            String arg = args[i];
            if (arg.startsWith("-")) {
                arg = arg.substring(1);
            }
            if (arg.equals("ap")) {
                System.out.println("availableProcessors=" + runtime.availableProcessors());
            } else if (arg.equals("quiet")) {
                _reflectImmediate = false;
            } else if (arg.equals("chars")) {
                lines = false;
            } else if (arg.equals("wdir")) {
                wdir = new File(args[++i]);
            } else if (arg.equals("ec")) {
                execCount = Integer.parseInt(args[++i]);
            } else if (arg.equals("input")) {
                execInput = args[++i];
           } else if (arg.equals("exec")) {
                List<String> execArgsList = new ArrayList<String>();
                i++;
                while (i < args.length) {
                    final String execArg = args[i++];
                    execArgsList.add(execArg);
                }
                final String[] execArgs = new String[execArgsList.size()];
                execArgsList.toArray(execArgs);
                for (int e = 0; e < execCount; e++) {
                    Process p = null;
                    BufferedReader stdOut = null;
                    BufferedReader stdErr = null;
                    BufferedWriter stdIn = null;
                    try {
                        p = runtime.exec(execArgs, null, wdir);
                        if (execInput != null) {
                            stdIn = new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));
                            stdIn.write(execInput);
                            stdIn.newLine();
                            stdIn.flush();
                            stdIn.close();
                            stdIn = null;
                        }
                        stdOut = new BufferedReader(new InputStreamReader(p.getInputStream()));
                        readFully(stdOut, true, lines);
                        stdErr = new BufferedReader(new InputStreamReader(p.getErrorStream()));
                        readFully(stdErr, false, lines);
                        System.out.println("waitFor returned " + p.waitFor());
                        if (!_reflectImmediate) {
                            delayedOutput(true, lines);
                            delayedOutput(false, lines);
                        }
                    } catch (IOException ex) {
                        System.err.println(ex);
                    } catch (InterruptedException ex) {
                        System.err.println(ex);
                    } finally {
                        if (p != null) {
                            try {
                                stdOut.close();
                                stdErr.close();
                                if (stdIn != null) {
                                    stdIn.close();
                                }
                                p.destroy();
                            } catch (IOException ex) {

                            }
                        }
                    }
                }
            }
        }
        // Checkstyle: resume modified control variable check

    }

    private static void readFully(BufferedReader in, boolean isStdOut, boolean lines) throws IOException {
        if (_reflectImmediate) {
            System.out.println(isStdOut ? "stdout: " : "stderr: ");
        }
        if (lines) {
            readFullyLines(in, isStdOut);
        } else {
            readFullyChars(in, isStdOut);
        }
    }

    private static void readFullyLines(BufferedReader in, boolean isStdOut) throws IOException {
        while (true) {
            final String line = in.readLine();
            if (line == null) {
                break;
            }
            if (_reflectImmediate) {
                System.out.println(line);
            } else {
                if (isStdOut) {
                    _stdOutLines.add(line);
                } else {
                    _stdErrLines.add(line);
                }
            }
        }
    }

    private static void readFullyChars(BufferedReader in, boolean isStdOut) throws IOException {
        char[] buf = new char[512];
        int nRead;
        while ((nRead = in.read(buf, 0, buf.length)) > 0) {
            if (isStdOut) {
                _stdOutBuffer.append(buf, 0, nRead);
            } else {
                _stdErrBuffer.append(buf, 0, nRead);
            }
            if (_reflectImmediate) {
                for (int i = 0; i < nRead; i++) {
                    System.out.print(buf[i]);
                }
            }
        }
    }

    private static void delayedOutput(boolean isStdOut, boolean lines) {
        System.out.println(isStdOut ? "stdout: " : "stderr: ");
        if (lines) {
            delayedOutputLines(isStdOut);
        } else {
            delayedOutputChars(isStdOut);
        }
    }

    private static void delayedOutputLines(boolean isStdOut) {
        List<String> lines = isStdOut ? _stdOutLines : _stdErrLines;
        for (String line : lines) {
            System.out.println(line);
        }
    }

    private static void delayedOutputChars(boolean isStdOut) {
        StringBuffer buf = isStdOut ? _stdOutBuffer : _stdErrBuffer;
            System.out.println(buf);
    }
}


text:
#include "SensorProxy.h"
#include "SensorMessages.h"

#define SP_DEBUG true

SensorProxy::SensorProxy(uint8_t pPin) : mPin(pPin) {
}

SensorProxy::~SensorProxy() {
  delete[] mBuffer;
}

void SensorProxy::update() {
  if(mBuffering) {
    unsigned long t = micros();
    if(t - mLastBufferTime >= BUFFER_CAPTURE_TIME_OFFSET) {
      captureBufferValue();
      mLastBufferTime = t;
    }
  }
}

void SensorProxy::startBuffering() {
  #if SP_DEBUG
    Serial.println("(SP) -> startBuffering()");
  #endif
  mLastBufferTime = micros();
  captureBufferValue();
  mBuffering = true;
}

void SensorProxy::setMessageCallback(void (*pCallback)(uint8_t, uint16_t)) {
  mCallback = pCallback;
}

void SensorProxy::sendMessage(uint8_t pMessage, uint16_t pValue) {
  if(mCallback) {
    (* mCallback)(pMessage, pValue);
  }
}

void SensorProxy::captureBufferValue() {
  if(mBufferIndex == BUFFER_SIZE) {
    #if SP_DEBUG
      Serial.println("(SP) -> captureBufferValue(): Buffer is full.");
    #endif
    sendMessage(SensorMessages::BUFFER_FULL);
    mBuffering = false;
  } else {
    int pinValue = analogRead(mPin);
    // int pinValue = random(0, 1023);
    mBuffer[mBufferIndex] = pinValue;
    int smoothValue = digitalSmooth(pinValue, mBufferSmoothing);
    sendMessage(SensorMessages::SENSOR_READING,smoothValue);

    #if SP_DEBUG
      Serial.print("(SP) -> captureBufferValue(): wrote value to buffer: ");
      Serial.print(mBuffer[mBufferIndex]);
      Serial.print("filtered:: ");
      Serial.println(smoothValue);
    #endif
    mBufferIndex++;
  }
}

int SensorProxy::digitalSmooth(int rawIn, int *sensSmoothArray){
  int j, k, temp, top, bottom;
  long total;
  static int i;
  static int sorted[FILTERSAMPLES];
  boolean done;

  i = (i + 1) % FILTERSAMPLES;
  sensSmoothArray[i] = rawIn;

  for (j=0; j<FILTERSAMPLES; j++){
    sorted[j] = sensSmoothArray[j];
  }

  done = 0;
  while(done != 1){
    done = 1;
    for (j = 0; j < (FILTERSAMPLES - 1); j++){
      if (sorted[j] > sorted[j + 1]){
        temp = sorted[j + 1];
        sorted [j+1] =  sorted[j] ;
        sorted [j] = temp;
        done = 0;
      }
    }
  }

  bottom = max(((FILTERSAMPLES * 15)  / 100), 1);
  top = min((((FILTERSAMPLES * 85) / 100) + 1  ), (FILTERSAMPLES - 1));
  k = 0;
  total = 0;
  for ( j = bottom; j< top; j++){
    total += sorted[j];
    k++;
  }

  return total / k;
}


text: A Ruby on Rails web application for sharing cooking recipes. It's like a cooks' facebook.


text:
import {Component} from 'angular2/core';
import {LoggerService} from './logger.service';

@Component({
    selector: 'dependency-injection',
    template: '
Dependency Injection

Check console!
'
})
export class DependencyInjectionComponent {
    constructor(private _loggerService: LoggerService) {
        _loggerService.log('log');
        _loggerService.warn('warn');
        _loggerService.error('error');
    }
}


text:
require 'thor'
require 'thor/runner'

module Textmerge
  module CLI
    class Main < Thor

      desc 'version', 'Version of the Merge utility'
      def version
        require 'textmerge/version'
        say Textmerge::VERSION
      end

      desc 'merge', 'Merge input with your custom template'
      method_option :template, aliases: '-t', type: 'string', default: '', :required => true, desc: 'path to your template file'
      method_option :input, aliases: '-i', type: 'string', default: '', desc: 'path to your input file that feeds the template'
      method_option :output, aliases: '-o', type: 'string', default: '', desc: 'path to your output file'
      def merge
        begin
          raise ArgumentError, "Missing template" unless !options[:template].empty?
          template = ""
          requests,answers = []
          merge = Textmerge::Merge.new(options)
          template = merge.read_template
          if options[:input] && File.exists?(options[:input])
            puts "Building from input file"
            answers = merge.get_responses_from_input_file
          else
            requests = merge.get_requests(template)
            answers = merge.get_responses(requests)
          end
          output = merge.merge_responses(answers,template)
          if !options[:output].empty?
            merge.write_file(output)
          else
            puts output
          end
        rescue Exception => e
          say e.message, :red
        end
      end
    end
  end
end


text:
<?xml version="1.0" encoding="UTF-8"?>
<site>
   <feature id="it.polimi.diceH2020.D-SPACE4Cloud-plugin.features.feature" version="0.2.5.qualifier">
      <category name="DSPACE.diceH2020"/>
   </feature>

   <category-def name="DSPACE.diceH2020" label="DSPACE4Cloud"/>
</site>


text:
{% extends "landing/template.html" %} {% block content %} {% load staticfiles %} {% load static %} {% load i18n %}

{% trans "Recuperar senha"%}

        <form class="center-block g-width-500--sm g-width-550--md" method='POST' action='.'>
             {% csrf_token %}

                    {% for error in form.password.errors %}

{{ error }}

                    {% endfor %}

                      {% trans "Digite a nova senha"%}

                    {{ form.password }}

                    {% for error in form.confirm_password.errors %}

{{ error }}

                    {% endfor %}

                      {% trans "Confirme a senha"%

                    {{ form.password_confirmation }}

                <button value='Recover' type="submit" class="text-uppercase s-btn s-btn--md s-btn--white-bg g-radius--50 g-padding-x-70--xs g-margin-b-20--xs">{% trans "Salvar"%}</button>

        </form>

{% endblock %}


text:
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion

class Migration(migrations.Migration):

    dependencies = [
        ('scriptorium', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('created_at', models.DateTimeField(auto_created=True, editable=False)),
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=255)),
                ('description', models.CharField(max_length=1000)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='packageinformation',
            name='category',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='scriptorium.Category'),
            preserve_default=False,
        ),
    ]


text:
motor-shield
============

PCB including a single motor driver VNH2SP30-E from STM and some connectors to
control a motor with up to 30A.

Uses the stm.lib in the kicad-library.


text:
<!DOCTYPE HTML>

<title>LoadErrorHandler (ebean api 12.8.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2021-03-18">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

All Classes

SEARCH:
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">

JavaScript is disabled on your browser.

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Package io.ebean.plugin

Interface LoadErrorHandler

Functional Interface:

This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface
public interface LoadErrorHandler

Errorhandler to handle load errors and may be recover correct value.

Author:

Roland Praml, FOCONIS AG

Method Summary

All Methods Instance Methods Abstract Methods

Modifier and Type
Method
Description

void
handleLoadError(EntityBean bean,
               Property prop,
               String fullName,
               Exception e)

Method Detail

handleLoadError

void handleLoadError(EntityBean bean,
                     Property prop,
                     String fullName,
                     Exception e)

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

All Classes

JavaScript is disabled on your browser.

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Copyright © 2021. All rights reserved.


text:
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import injectSheet from 'react-jss';
import { actions } from 'modules/mapDialog/ducks';
import styles, { colors } from 'modules/common/styles';
import ButtonWithIcon from 'modules/common/buttons/ButtonWithIcon';
import { locationThumbnail } from 'funong-common/lib/utils/mapUtils';

const generateThumbnailDiv = (lnglat, className) => {
  const { url, thumbnail } = locationThumbnail(lnglat);
  return (

  );
};

const LocationField = ({ input: { value, onChange }, meta: { error }, openDialog, sheet: { classes } }) => (

      地址
      <ButtonWithIcon
        colored icon="edit_location"
        onClick={(e) => {
          e.preventDefault();
          openDialog({
            onSubmit: onChange,
            detailsEditable: true,
            location: value === '' ? null : value,
          });
        }}
      >{value === '' ? '点此选择' : '点此修改'}</ButtonWithIcon>

    {
      value.lnglat && generateThumbnailDiv(value.lnglat, classes.thumbnail)
    }

      {value === '' ? '' : value.address.details}

);

LocationField.propTypes = {
  input: PropTypes.object.isRequired,
  meta: PropTypes.object,
  openDialog: PropTypes.func.isRequired,
  sheet: PropTypes.object.isRequired,
};

export default connect(
  null,
  (dispatch) => bindActionCreators({ openDialog: actions.openDialog }, dispatch)
)(injectSheet({
  field: {
    display: 'flex',
    justifyContent: 'flex-start',
    alignItems: 'center',
  },
  thumbnail: {
    width: '100%',
    '& > img': {
      maxWidth: 300,
      width: '100%',
    },
  },
})(LocationField));


text:
package kafka.javaapi.consumer;

import java.util.Map;
import java.util.Set;

/**
 * This listener is used for execution of tasks defined by user when a consumer rebalance
 * occurs in {@link kafka.consumer.ZookeeperConsumerConnector}
 */
public interface ConsumerRebalanceListener {

    /**
     * This method is called after all the fetcher threads are stopped but before the
     * ownership of partitions are released. Depending on whether auto offset commit is
     * enabled or not, offsets may or may not have been committed.
     * This listener is initially added to prevent duplicate messages on consumer rebalance
     * in mirror maker, where offset auto commit is disabled to prevent data loss. It could
     * also be used in more general cases.
     */
    public void beforeReleasingPartitions(Map<String, Set<Integer>> partitionOwnership);

}


text:
import line
import circle
from line import Line
from circle import Circle
from context import mergeSubPolys
from shapely.geometry import *

from math import *

PHI = 1.618

glyphs = {}

def glyph(g):
    def wrap(cls):
        glyphs[g] = cls
        cls.char = g
        return cls
    return wrap

class Glyph(object):
    def __init__(self, x, y, capHeight=50):
        super(Glyph, self).__init__()
        self.x = x
        self.y = y
        self.w = 3
        self.pointSize = capHeight
        self.slanted = False
        self.outlined = False
        self.color = (0.0, 0.0, 0.0, 1.0)
        self.serifed = True
        self.willBeSerifed = True
        self.autoKern = True

    def capHeight(self):
        return self.pointSize

    def em(self):
        return self.capHeight() / PHI

    def width(self):
        pass

    def weight(self):
        return self.w

    def xHeight(self):
        return self.capHeight() / PHI

    def origin(self):
        return (self.x, self.y + self.capHeight())

    def p(self, ix, iy, xHeight=False):
        (x, y) = self.origin()
        height = self.capHeight()

        if xHeight:
            height = self.xHeight()
        return (x + (self.width() * ix), y - (height * iy))

    def setupDrawing(self):
        circle.capHeight = line.capHeight = self.capHeight()
        circle.drawSerifs = line.drawSerifs = self.serifed

@glyph(' ')
class spaceGlyph(Glyph):
    def __init__(self, x, y, capHeight):
        super(spaceGlyph, self).__init__(x, y, capHeight)

    def width(self):
        return self.em() / PHI / PHI

    def getPolygon(self):
        super(spaceGlyph, self).setupDrawing()

        rect = Polygon((self.p(0.0, 0.0), self.p(1.0, 0.0),
                        self.p(1.0, 1.0), self.p(0.0, 1.0)))

        return [rect]


text:
@implementation RandomCoreGraphicsNode

+ (UIColor *)randomColor
{
  CGFloat hue = ( arc4random() % 256 / 256.0 );  //  0.0 to 1.0
  CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.5;  //  0.5 to 1.0, away from white
  CGFloat brightness = ( arc4random() % 128 / 256.0 ) + 0.5;  //  0.5 to 1.0, away from black
  return [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:1];
}

+ (void)drawRect:(CGRect)bounds withParameters:(id<NSObject>)parameters isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock isRasterizing:(BOOL)isRasterizing
{
  CGFloat locations[3];
  NSMutableArray *colors = [NSMutableArray arrayWithCapacity:3];
  [colors addObject:(id)[[RandomCoreGraphicsNode randomColor] CGColor]];
  locations[0] = 0.0;
  [colors addObject:(id)[[RandomCoreGraphicsNode randomColor] CGColor]];
  locations[1] = 1.0;
  [colors addObject:(id)[[RandomCoreGraphicsNode randomColor] CGColor]];
  locations[2] = ( arc4random() % 256 / 256.0 );

  CGContextRef ctx = UIGraphicsGetCurrentContext();
  CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
  CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (CFArrayRef)colors, locations);

  CGGradientDrawingOptions drawingOptions;
  CGContextDrawLinearGradient(ctx, gradient, CGPointZero, CGPointMake(bounds.size.width, bounds.size.height), drawingOptions);

  CGGradientRelease(gradient);
  CGColorSpaceRelease(colorSpace);
}

@end


text:
<?php

	if ( ! defined( 'ABSPATH' ) ) {
		exit;
	}

	class FS_Developer extends FS_Scope_Entity {

		#region Properties

		/**
		 * @var string
		 */
		public $email;
		/**
		 * @var string
		 */
		public $first;
		/**
		 * @var string
		 */
		public $last;
		/**
		 * @var bool
		 */
		public $is_verified;

		#endregion Properties

		/**
		 * @param object|bool $user
		 */
		function __construct( $user = false ) {
			parent::__construct( $user );
		}

		function get_name() {
			return trim( ucfirst( trim( is_string( $this->first ) ? $this->first : '' ) ) . ' ' . ucfirst( trim( is_string( $this->last ) ? $this->last : '' ) ) );
		}

		function is_verified() {
			return ( isset( $this->is_verified ) && true === $this->is_verified );
		}

		static function get_type() {
			return 'developer';
		}
	}


text:
<!doctype html>
<title>Restoring window.name on cross-origin history traversal</title>


text:
#include <aws/s3/model/InventoryEncryption.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>

#include <utility>

using namespace Aws::Utils::Xml;
using namespace Aws::Utils;

namespace Aws
{
namespace S3
{
namespace Model
{

InventoryEncryption::InventoryEncryption() :
    m_sSES3HasBeenSet(false),
    m_sSEKMSHasBeenSet(false)
{
}

InventoryEncryption::InventoryEncryption(const XmlNode& xmlNode) :
    m_sSES3HasBeenSet(false),
    m_sSEKMSHasBeenSet(false)
{
  *this = xmlNode;
}

InventoryEncryption& InventoryEncryption::operator =(const XmlNode& xmlNode)
{
  XmlNode resultNode = xmlNode;

  if(!resultNode.IsNull())
  {
    XmlNode sSES3Node = resultNode.FirstChild("SSE-S3");
    if(!sSES3Node.IsNull())
    {
      m_sSES3 = sSES3Node;
      m_sSES3HasBeenSet = true;
    }
    XmlNode sSEKMSNode = resultNode.FirstChild("SSE-KMS");
    if(!sSEKMSNode.IsNull())
    {
      m_sSEKMS = sSEKMSNode;
      m_sSEKMSHasBeenSet = true;
    }
  }

  return *this;
}

void InventoryEncryption::AddToNode(XmlNode& parentNode) const
{
  Aws::StringStream ss;
  if(m_sSES3HasBeenSet)
  {
   XmlNode sSES3Node = parentNode.CreateChildElement("SSE-S3");
   m_sSES3.AddToNode(sSES3Node);
  }

  if(m_sSEKMSHasBeenSet)
  {
   XmlNode sSEKMSNode = parentNode.CreateChildElement("SSE-KMS");
   m_sSEKMS.AddToNode(sSEKMSNode);
  }

}

} // namespace Model
} // namespace S3
} // namespace Aws


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="qualifier_platform_version">v28</string>
</resources>


text:
Content preview allows you to display the result that will be rendered on the frontend in a separate window, while you are editing a content item in the admin.

A `Preview` button is available in the action buttons when you create or edit a content item.

## CREDITS

### JavaScript Cookie

<https://github.com/js-cookie/js-cookie>

Copyright 2006, 2015 Klaus Hartl & Fagner Brack
Released under the MIT license


text:
<resources>
    <string name="app_name">预见未来</string>
</resources>


text:
package ch.ethz.inf.vs.californium.coapbench;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.net.SocketTimeoutException;
import java.net.URI;
import java.net.UnknownHostException;

import ch.ethz.inf.vs.californium.coap.CoAP;
import ch.ethz.inf.vs.californium.producer.VeryEcoMessageProducer;

/**
 * A virtual client sends request to the server as fast as it can handle them.
 */
public class VirtualClient implements Runnable {

	public static final int TIMEOUT = 10000;

	private DatagramSocket socket;
	private DatagramPacket pSend;
	private DatagramPacket pRecv;
	private VeryEcoMessageProducer producer;

	private boolean runnable;
	private int counter;
	private int lost;

	private InetAddress destAddress;
	private int destPort;
	private byte[] mid;
	private long timestamp;

	private IntArray latencies;

	private boolean checkMID = true;
	private boolean checkCode = true;

	public VirtualClient(URI uri) throws Exception {
		this(uri, null);
	}

	public VirtualClient(URI uri, InetSocketAddress addr) throws Exception {
		this.mid = new byte[2];
		this.latencies = new IntArray();
		this.producer = new VeryEcoMessageProducer();
		this.pSend = new DatagramPacket(new byte[0], 0);
		this.pRecv = new DatagramPacket(new byte[100], 100);
		this.runnable = true;
		setURI(uri);
		bind(addr);
	}

	public void bind(InetSocketAddress addr) throws Exception {
		if (addr == null)
			this.socket = new DatagramSocket();
		else
			this.socket = new DatagramSocket(addr);
		this.socket.setSoTimeout(TIMEOUT);
	}

	public void setURI(URI uri)  throws UnknownHostException {
		destAddress = InetAddress.getByName(uri.getHost());
		destPort = uri.getPort();
		producer.setURI(uri);
	}

	public void run() {
		try {
			while (runnable) {
				sendRequest();
				receiveResponse();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public void sendRequest() throws IOException {
		byte[] bytes = producer.next();
		saveMID(bytes);
		pSend.setData(bytes);
		pSend.setAddress(destAddress);
		pSend.setPort(destPort);
		timestamp = System.nanoTime();
		socket.send(pSend);
	}

	public void receiveResponse() throws IOException {
		try {
			boolean mid_correct;
			long latency;
			do {
				socket.receive(pRecv);
				latency = System.nanoTime() - timestamp;
				byte[] resp = pRecv.getData();
				mid_correct = checkMID(resp);
				checkCode(resp);
			} while (!mid_correct);
			latencies.add((int) (latency / 1000000));
			counter++;
		} catch (SocketTimeoutException e) {
//			System.out.println("Timeout occured");
			lost++;
		}
	}

	public void stop() {
		runnable = false;
	}

	public void reset() {
		runnable = true;
		counter = 0;
		lost = 0;
	}

	public int getCount() {
		return counter;
	}

	public int getTimeouted() {
		return lost;
	}

	public IntArray getLatencies() {
		return latencies;
	}

	private void saveMID(byte[] bytes) {
		mid[0] = bytes[2];
		mid[1] = bytes[3];
	}

	private boolean checkMID(byte[] bytes) {
		if (checkMID &&
				(bytes[2] != mid[0] || bytes[3]!=mid[1]) ) {
			System.err.println("Received message with wrong MID");
			return false;
		}
		return true;
	}

	private void checkCode(byte[] bytes) {
		byte c = bytes[1];
		if (checkCode && c != CoAP.ResponseCode.CONTENT.value) {
			System.err.println("Did not receive Content as response code but "+c);
		}
	}
}


text:
<?php

namespace Respect\Validation\Rules;

use stdClass;

/**
 * @group  rule
 * @covers Respect\Validation\Rules\Identical
 * @covers Respect\Validation\Exceptions\IdenticalException
 */
class IdenticalTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @dataProvider providerForIdentical
     */
    public function testInputIdenticalToExpectedValueShouldPass($compareTo, $input)
    {
        $rule = new Identical($compareTo);

        $this->assertTrue($rule->validate($input));
    }

    /**
     * @dataProvider providerForNotIdentical
     */
    public function testInputNotIdenticalToExpectedValueShouldPass($compareTo, $input)
    {
        $rule = new Identical($compareTo);

        $this->assertFalse($rule->validate($input));
    }

    /**
     * @expectedException Respect\Validation\Exceptions\IdenticalException
     * @expectedExceptionMessage "42" must be identical as 42
     */
    public function testShouldThrowTheProperExceptionWhenFailure()
    {
        $rule = new Identical(42);
        $rule->check('42');
    }

    public function providerForIdentical()
    {
        $object = new stdClass();

        return [
            ['foo', 'foo'],
            [[], []],
            [$object, $object],
            [10, 10],
        ];
    }

    public function providerForNotIdentical()
    {
        return [
            [42, '42'],
            ['foo', 'bar'],
            [[1], []],
            [new stdClass(), new stdClass()],
        ];
    }
}


text:
using System;
using PlanetarySystem.AstronomicalObjects.Stars;

namespace PlanetarySystem.AstronomicalObjects.NonStarObjects.SmallBodies
{
    [Serializable]
    public class Comet : SmallBody
    {

        public double TailLength { get; set; }
        public double OrbitSize { get; set; }
        public Comet(string NameArg, AstronomicalObject Center, double Distance)
        {
            Name = NameArg;
            CentralBody = (Star)Center;
            DistanceToTheStar = Distance;
            Radius = 0.2;
            TailLength = 0.01;
            Mass = 0.001;
            Temperature = -20;
            OrbitalPeriod = DistanceToTheStar * 3;
            OrbitSize = DistanceToTheStar;
        }
        public Comet()
        {
        }
    }
}


text:
#ifndef __PERF_THREAD_MAP_H
#define __PERF_THREAD_MAP_H

#include <sys/types.h>
#include <stdio.h>
#include <linux/atomic.h>

struct thread_map_data {
	pid_t    pid;
	char	*comm;
};

struct thread_map {
	atomic_t refcnt;
	int nr;
	struct thread_map_data map[];
};

struct thread_map_event;

struct thread_map *thread_map__new_dummy(void);
struct thread_map *thread_map__new_by_pid(pid_t pid);
struct thread_map *thread_map__new_by_tid(pid_t tid);
struct thread_map *thread_map__new_by_uid(uid_t uid);
struct thread_map *thread_map__new(pid_t pid, pid_t tid, uid_t uid);
struct thread_map *thread_map__new_event(struct thread_map_event *event);

struct thread_map *thread_map__get(struct thread_map *map);
void thread_map__put(struct thread_map *map);

struct thread_map *thread_map__new_str(const char *pid,
		const char *tid, uid_t uid);

size_t thread_map__fprintf(struct thread_map *threads, FILE *fp);

static inline int thread_map__nr(struct thread_map *threads)
{
	return threads ? threads->nr : 1;
}

static inline pid_t thread_map__pid(struct thread_map *map, int thread)
{
	return map->map[thread].pid;
}

static inline void
thread_map__set_pid(struct thread_map *map, int thread, pid_t pid)
{
	map->map[thread].pid = pid;
}

static inline char *thread_map__comm(struct thread_map *map, int thread)
{
	return map->map[thread].comm;
}

void thread_map__read_comms(struct thread_map *threads);
#endif	/* __PERF_THREAD_MAP_H */


text:
namespace Requiro
{
    partial class Mainform
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.Windows.Forms.ListViewGroup listViewGroup1 = new System.Windows.Forms.ListViewGroup("Directories", System.Windows.Forms.HorizontalAlignment.Left);
            System.Windows.Forms.ListViewGroup listViewGroup2 = new System.Windows.Forms.ListViewGroup("Files", System.Windows.Forms.HorizontalAlignment.Left);
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Mainform));
            this.m_DirectoryBox = new System.Windows.Forms.GroupBox();
            this.m_PathBox = new System.Windows.Forms.ComboBox();
            this.m_AnalyzeButton = new System.Windows.Forms.Button();
            this.m_BrowseButton = new System.Windows.Forms.Button();
            this.m_FileList = new System.Windows.Forms.ListView();
            this.path = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.totalSize = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.m_imageList = new System.Windows.Forms.ImageList(this.components);
            this.m_SizeCount = new System.Windows.Forms.Label();
            this.label5 = new System.Windows.Forms.Label();
            this.m_SubfoldersCount = new System.Windows.Forms.Label();
            this.m_VersionLabel = new System.Windows.Forms.Label();
            this.m_PieChart = new System.Windows.Forms.PictureBox();
            this.bgWorker = new System.ComponentModel.BackgroundWorker();
            this.linkLabel1 = new System.Windows.Forms.LinkLabel();
            this.m_FolderBrowser = new System.Windows.Forms.FolderBrowserDialog();
            this.m_StatusLabel = new System.Windows.Forms.Label();
            this.panel2 = new System.Windows.Forms.Panel();
            this.m_DriveSize = new System.Windows.Forms.Label();
            this.m_AvailableSpace = new System.Windows.Forms.Label();
            this.label8 = new System.Windows.Forms.Label();
            this.label7 = new System.Windows.Forms.Label();
            this.m_UsedSpace = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.m_DriveInfoLabel = new System.Windows.Forms.Label();
            this.m_UsagePercent = new System.Windows.Forms.Label();
            this.label6 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.m_PathLabel = new System.Windows.Forms.Label();
            this.label1 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.label9 = new System.Windows.Forms.Label();
            this.m_toolBarImages = new System.Windows.Forms.ImageList(this.components);
            this.m_RefreshButton = new System.Windows.Forms.Button();
            this.m_DeleteSelectedItemButton = new System.Windows.Forms.Button();
            this.m_DirectoryBox.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.m_PieChart)).BeginInit();
            this.panel2.SuspendLayout();
            this.SuspendLayout();
            //
            // m_DirectoryBox
            //
            this.m_DirectoryBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.m_DirectoryBox.Controls.Add(this.m_PathBox);
            this.m_DirectoryBox.Controls.Add(this.m_AnalyzeButton);
            this.m_DirectoryBox.Controls.Add(this.m_BrowseButton);
            this.m_DirectoryBox.Location = new System.Drawing.Point(8, 12);
            this.m_DirectoryBox.Name = "m_DirectoryBox";
            this.m_DirectoryBox.Size = new System.Drawing.Size(1054, 53);
            this.m_DirectoryBox.TabIndex = 0;
            this.m_DirectoryBox.TabStop = false;
            this.m_DirectoryBox.Text = "Full path to target directory";
            //
            // m_PathBox
            //
            this.m_PathBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.m_PathBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
            this.m_PathBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystemDirectories;
            this.m_PathBox.FormattingEnabled = true;
            this.m_PathBox.Location = new System.Drawing.Point(6, 20);
            this.m_PathBox.Name = "m_PathBox";
            this.m_PathBox.Size = new System.Drawing.Size(869, 21);
            this.m_PathBox.TabIndex = 3;
            //
            // m_AnalyzeButton
            //
            this.m_AnalyzeButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.m_AnalyzeButton.Location = new System.Drawing.Point(919, 18);
            this.m_AnalyzeButton.Name = "m_AnalyzeButton";
            this.m_AnalyzeButton.Size = new System.Drawing.Size(129, 23);
            this.m_AnalyzeButton.TabIndex = 2;
            this.m_AnalyzeButton.Text = "Start analysis";
            this.m_AnalyzeButton.UseVisualStyleBackColor = true;
            this.m_AnalyzeButton.Click += new System.EventHandler(this.m_AnalyzeButton_Click);
            //
            // m_BrowseButton
            //
            this.m_BrowseButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.m_BrowseButton.Location = new System.Drawing.Point(881, 18);
            this.m_BrowseButton.Name = "m_BrowseButton";
            this.m_BrowseButton.Size = new System.Drawing.Size(33, 23);
            this.m_BrowseButton.TabIndex = 1;
            this.m_BrowseButton.Text = "...";
            this.m_BrowseButton.UseVisualStyleBackColor = true;
            this.m_BrowseButton.Click += new System.EventHandler(this.m_BrowseButton_Click);
            //
            // m_FileList
            //
            this.m_FileList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.m_FileList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
            this.path,
            this.totalSize});
            this.m_FileList.Cursor = System.Windows.Forms.Cursors.Hand;
            this.m_FileList.FullRowSelect = true;
            listViewGroup1.Header = "Directories";
            listViewGroup1.Name = "Directories";
            listViewGroup2.Header = "Files";
            listViewGroup2.Name = "Files";
            this.m_FileList.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] {
            listViewGroup1,
            listViewGroup2});
            this.m_FileList.Location = new System.Drawing.Point(8, 85);
            this.m_FileList.Name = "m_FileList";
            this.m_FileList.Size = new System.Drawing.Size(552, 374);
            this.m_FileList.SmallImageList = this.m_imageList;
            this.m_FileList.TabIndex = 6;
            this.m_FileList.UseCompatibleStateImageBehavior = false;
            this.m_FileList.View = System.Windows.Forms.View.Details;
            this.m_FileList.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.m_FileList_ColumnClick);
            this.m_FileList.DoubleClick += new System.EventHandler(this.m_FileList_DoubleClick);
            //
            // path
            //
            this.path.Text = "Subfolder";
            this.path.Width = 400;
            //
            // totalSize
            //
            this.totalSize.Text = "Size";
            this.totalSize.Width = 100;
            //
            // m_imageList
            //
            this.m_imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("m_imageList.ImageStream")));
            this.m_imageList.TransparentColor = System.Drawing.Color.Transparent;
            this.m_imageList.Images.SetKeyName(0, "folder.png");
            this.m_imageList.Images.SetKeyName(1, "arrow_undo.png");
            //
            // m_SizeCount
            //
            this.m_SizeCount.AutoSize = true;
            this.m_SizeCount.Location = new System.Drawing.Point(106, 35);
            this.m_SizeCount.Name = "m_SizeCount";
            this.m_SizeCount.Size = new System.Drawing.Size(39, 13);
            this.m_SizeCount.TabIndex = 5;
            this.m_SizeCount.Text = "0.0 GB";
            //
            // label5
            //
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(3, 35);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(56, 13);
            this.label5.TabIndex = 3;
            this.label5.Text = "Total size:";
            //
            // m_SubfoldersCount
            //
            this.m_SubfoldersCount.AutoSize = true;
            this.m_SubfoldersCount.Location = new System.Drawing.Point(106, 22);
            this.m_SubfoldersCount.Name = "m_SubfoldersCount";
            this.m_SubfoldersCount.Size = new System.Drawing.Size(13, 13);
            this.m_SubfoldersCount.TabIndex = 2;
            this.m_SubfoldersCount.Text = "0";
            this.m_SubfoldersCount.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            //
            // m_VersionLabel
            //
            this.m_VersionLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.m_VersionLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.m_VersionLabel.Location = new System.Drawing.Point(773, 464);
            this.m_VersionLabel.Name = "m_VersionLabel";
            this.m_VersionLabel.Size = new System.Drawing.Size(186, 13);
            this.m_VersionLabel.TabIndex = 10;
            this.m_VersionLabel.Text = "Requiro";
            this.m_VersionLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            //
            // m_PieChart
            //
            this.m_PieChart.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.m_PieChart.Location = new System.Drawing.Point(566, 85);
            this.m_PieChart.Name = "m_PieChart";
            this.m_PieChart.Size = new System.Drawing.Size(496, 298);
            this.m_PieChart.TabIndex = 11;
            this.m_PieChart.TabStop = false;
            this.m_PieChart.LoadCompleted += new System.ComponentModel.AsyncCompletedEventHandler(this.m_PieChart_LoadCompleted);
            this.m_PieChart.SizeChanged += new System.EventHandler(this.m_PieChart_SizeChanged);
            this.m_PieChart.Paint += new System.Windows.Forms.PaintEventHandler(this.m_PieChart_Paint);
            //
            // bgWorker
            //
            this.bgWorker.WorkerSupportsCancellation = true;
            this.bgWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bgWorker_DoWork);
            this.bgWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.bgWorker_RunWorkerCompleted);
            //
            // linkLabel1
            //
            this.linkLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.linkLabel1.AutoSize = true;
            this.linkLabel1.Location = new System.Drawing.Point(860, 477);
            this.linkLabel1.Name = "linkLabel1";
            this.linkLabel1.Size = new System.Drawing.Size(202, 13);
            this.linkLabel1.TabIndex = 12;
            this.linkLabel1.TabStop = true;
            this.linkLabel1.Text = "http://sourceforge.net/projects/requiro/";
            this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
            //
            // m_FolderBrowser
            //
            this.m_FolderBrowser.Description = "Select the directory the contents of which you want to analyze.";
            this.m_FolderBrowser.RootFolder = System.Environment.SpecialFolder.MyComputer;
            this.m_FolderBrowser.ShowNewFolderButton = false;
            //
            // m_StatusLabel
            //
            this.m_StatusLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.m_StatusLabel.AutoSize = true;
            this.m_StatusLabel.Location = new System.Drawing.Point(5, 471);
            this.m_StatusLabel.Name = "m_StatusLabel";
            this.m_StatusLabel.Size = new System.Drawing.Size(107, 13);
            this.m_StatusLabel.TabIndex = 14;
            this.m_StatusLabel.Text = "Analysis not started.";
            //
            // panel2
            //
            this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.panel2.BackColor = System.Drawing.SystemColors.ControlLight;
            this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.panel2.Controls.Add(this.m_DriveSize);
            this.panel2.Controls.Add(this.m_AvailableSpace);
            this.panel2.Controls.Add(this.label8);
            this.panel2.Controls.Add(this.label7);
            this.panel2.Controls.Add(this.m_UsedSpace);
            this.panel2.Controls.Add(this.label2);
            this.panel2.Controls.Add(this.m_DriveInfoLabel);
            this.panel2.Controls.Add(this.m_UsagePercent);
            this.panel2.Controls.Add(this.m_SizeCount);
            this.panel2.Controls.Add(this.label6);
            this.panel2.Controls.Add(this.label5);
            this.panel2.Controls.Add(this.m_SubfoldersCount);
            this.panel2.Controls.Add(this.label3);
            this.panel2.Controls.Add(this.m_PathLabel);
            this.panel2.Location = new System.Drawing.Point(566, 389);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(496, 70);
            this.panel2.TabIndex = 9;
            //
            // m_DriveSize
            //
            this.m_DriveSize.Location = new System.Drawing.Point(422, 22);
            this.m_DriveSize.Name = "m_DriveSize";
            this.m_DriveSize.Size = new System.Drawing.Size(67, 13);
            this.m_DriveSize.TabIndex = 13;
            this.m_DriveSize.Text = "0.0 GB";
            this.m_DriveSize.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            //
            // m_AvailableSpace
            //
            this.m_AvailableSpace.Location = new System.Drawing.Point(371, 35);
            this.m_AvailableSpace.Name = "m_AvailableSpace";
            this.m_AvailableSpace.Size = new System.Drawing.Size(118, 13);
            this.m_AvailableSpace.TabIndex = 12;
            this.m_AvailableSpace.Text = "0.0 GB";
            this.m_AvailableSpace.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            //
            // label8
            //
            this.label8.AutoSize = true;
            this.label8.Location = new System.Drawing.Point(319, 48);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(66, 13);
            this.label8.TabIndex = 11;
            this.label8.Text = "Used space:";
            //
            // label7
            //
            this.label7.AutoSize = true;
            this.label7.Location = new System.Drawing.Point(319, 22);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(57, 13);
            this.label7.TabIndex = 10;
            this.label7.Text = "Drive size:";
            //
            // m_UsedSpace
            //
            this.m_UsedSpace.Location = new System.Drawing.Point(383, 48);
            this.m_UsedSpace.Name = "m_UsedSpace";
            this.m_UsedSpace.Size = new System.Drawing.Size(106, 13);
            this.m_UsedSpace.TabIndex = 9;
            this.m_UsedSpace.Text = "0.0 GB";
            this.m_UsedSpace.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            //
            // label2
            //
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(319, 35);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(54, 13);
            this.label2.TabIndex = 8;
            this.label2.Text = "Available:";
            //
            // m_DriveInfoLabel
            //
            this.m_DriveInfoLabel.AutoSize = true;
            this.m_DriveInfoLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.m_DriveInfoLabel.Location = new System.Drawing.Point(319, 9);
            this.m_DriveInfoLabel.Name = "m_DriveInfoLabel";
            this.m_DriveInfoLabel.Size = new System.Drawing.Size(170, 13);
            this.m_DriveInfoLabel.TabIndex = 7;
            this.m_DriveInfoLabel.Text = "Info for: <no drive selected>";
            //
            // m_UsagePercent
            //
            this.m_UsagePercent.AutoSize = true;
            this.m_UsagePercent.Location = new System.Drawing.Point(106, 48);
            this.m_UsagePercent.Name = "m_UsagePercent";
            this.m_UsagePercent.Size = new System.Drawing.Size(34, 13);
            this.m_UsagePercent.TabIndex = 6;
            this.m_UsagePercent.Text = "0.0%";
            //
            // label6
            //
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(3, 48);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(77, 13);
            this.label6.TabIndex = 4;
            this.label6.Text = "Volume usage:";
            //
            // label3
            //
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(3, 22);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(79, 13);
            this.label3.TabIndex = 1;
            this.label3.Text = "Subdirectories:";
            //
            // m_PathLabel
            //
            this.m_PathLabel.AutoSize = true;
            this.m_PathLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.m_PathLabel.Location = new System.Drawing.Point(3, 9);
            this.m_PathLabel.Name = "m_PathLabel";
            this.m_PathLabel.Size = new System.Drawing.Size(193, 13);
            this.m_PathLabel.TabIndex = 0;
            this.m_PathLabel.Text = "Info for: <no directory selected>";
            //
            // label1
            //
            this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(955, 464);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(107, 13);
            this.label1.TabIndex = 16;
            this.label1.Text = "by Antoine Kalmbach";
            //
            // label4
            //
            this.label4.AutoSize = true;
            this.label4.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label4.Location = new System.Drawing.Point(5, 68);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(93, 14);
            this.label4.TabIndex = 18;
            this.label4.Text = "Search results";
            //
            // label9
            //
            this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.label9.AutoSize = true;
            this.label9.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label9.Location = new System.Drawing.Point(563, 68);
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(64, 14);
            this.label9.TabIndex = 21;
            this.label9.Text = "Statistics";
            //
            // m_toolBarImages
            //
            this.m_toolBarImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("m_toolBarImages.ImageStream")));
            this.m_toolBarImages.TransparentColor = System.Drawing.Color.Transparent;
            this.m_toolBarImages.Images.SetKeyName(0, "arrow_refresh.png");
            this.m_toolBarImages.Images.SetKeyName(1, "delete.png");
            //
            // m_RefreshButton
            //
            this.m_RefreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.m_RefreshButton.ImageIndex = 0;
            this.m_RefreshButton.ImageList = this.m_toolBarImages;
            this.m_RefreshButton.Location = new System.Drawing.Point(470, 465);
            this.m_RefreshButton.Name = "m_RefreshButton";
            this.m_RefreshButton.Size = new System.Drawing.Size(90, 25);
            this.m_RefreshButton.TabIndex = 22;
            this.m_RefreshButton.Text = "Refresh";
            this.m_RefreshButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.m_RefreshButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
            this.m_RefreshButton.UseVisualStyleBackColor = true;
            this.m_RefreshButton.Click += new System.EventHandler(this.m_RefreshButton_Click);
            //
            // m_DeleteSelectedItemButton
            //
            this.m_DeleteSelectedItemButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.m_DeleteSelectedItemButton.ImageIndex = 1;
            this.m_DeleteSelectedItemButton.ImageList = this.m_toolBarImages;
            this.m_DeleteSelectedItemButton.Location = new System.Drawing.Point(389, 465);
            this.m_DeleteSelectedItemButton.Name = "m_DeleteSelectedItemButton";
            this.m_DeleteSelectedItemButton.Size = new System.Drawing.Size(75, 25);
            this.m_DeleteSelectedItemButton.TabIndex = 23;
            this.m_DeleteSelectedItemButton.Text = "Delete";
            this.m_DeleteSelectedItemButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.m_DeleteSelectedItemButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
            this.m_DeleteSelectedItemButton.UseVisualStyleBackColor = true;
            this.m_DeleteSelectedItemButton.Click += new System.EventHandler(this.m_DeleteSelectedItemButton_Click);
            //
            // Mainform
            //
            this.AcceptButton = this.m_AnalyzeButton;
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(1071, 499);
            this.Controls.Add(this.m_PieChart);
            this.Controls.Add(this.m_DeleteSelectedItemButton);
            this.Controls.Add(this.m_RefreshButton);
            this.Controls.Add(this.label9);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.m_StatusLabel);
            this.Controls.Add(this.linkLabel1);
            this.Controls.Add(this.m_VersionLabel);
            this.Controls.Add(this.panel2);
            this.Controls.Add(this.m_FileList);
            this.Controls.Add(this.m_DirectoryBox);
            this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "Mainform";
            this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Requiro";
            this.Load += new System.EventHandler(this.Mainform_Load);
            this.m_DirectoryBox.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.m_PieChart)).EndInit();
            this.panel2.ResumeLayout(false);
            this.panel2.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.GroupBox m_DirectoryBox;
        private System.Windows.Forms.Button m_BrowseButton;
        private System.Windows.Forms.Button m_AnalyzeButton;
        private System.Windows.Forms.ListView m_FileList;
        private System.Windows.Forms.ColumnHeader path;
        private System.Windows.Forms.ColumnHeader totalSize;
        private System.Windows.Forms.Label m_SizeCount;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.Label m_SubfoldersCount;
        private System.Windows.Forms.Label m_VersionLabel;
        private System.Windows.Forms.PictureBox m_PieChart;
        private System.ComponentModel.BackgroundWorker bgWorker;
        private System.Windows.Forms.LinkLabel linkLabel1;
        private System.Windows.Forms.FolderBrowserDialog m_FolderBrowser;
        private System.Windows.Forms.Label m_StatusLabel;
        private System.Windows.Forms.ImageList m_imageList;
        private System.Windows.Forms.Panel panel2;
        private System.Windows.Forms.Label m_UsagePercent;
        private System.Windows.Forms.Label label6;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.Label m_PathLabel;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label m_DriveSize;
        private System.Windows.Forms.Label m_AvailableSpace;
        private System.Windows.Forms.Label label8;
        private System.Windows.Forms.Label label7;
        private System.Windows.Forms.Label m_UsedSpace;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Label m_DriveInfoLabel;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.Label label9;
        private System.Windows.Forms.ComboBox m_PathBox;
        private System.Windows.Forms.ImageList m_toolBarImages;
        private System.Windows.Forms.Button m_RefreshButton;
        private System.Windows.Forms.Button m_DeleteSelectedItemButton;
    }
}


text:
<?php
/**
 * Frosted MySQL Library Exception Classes
 * - - - - - - - - - -
 * Add special exception names to Frosted MySQL Library.
 * - - - - - - - - - -
 * Licensed under MIT license
 * - - - - - - - - - -
 * @Creator  Daniel 'Eisbehr' Kern
 * @Require  PHP5
 * @Version  3.0
 * @Date     01.08.2013
 * @Update   01.08.2013
 * - - - - - - - - - -
 */
class mysqlClass_Connection_Exception extends Exception {}
class mysqlClass_Database_Exception extends Exception {}
class mysqlClass_Query_Exception extends Exception {}
class mysqlClass_Permission_Exception extends Exception {}
class mysqlClass_Create_Exception extends Exception {}
class mysqlClass_Unknown_Function_Exception extends Exception {}


text:
package com.aspose.cells.examples.rows_cloumns;

import com.aspose.cells.Cells;
import com.aspose.cells.Workbook;
import com.aspose.cells.Worksheet;
import com.aspose.cells.examples.Utils;

public class SummaryRowRight {
	public static void main(String[] args) throws Exception {
		// The path to the documents directory.
		String dataDir = Utils.getSharedDataDir(SummaryRowRight.class) + "rows_cloumns/";

		// Instantiating a Workbook object
		Workbook workbook = new Workbook(dataDir + "BookStyles.xls");

		// Accessing the first worksheet in the Excel file
		Worksheet worksheet = workbook.getWorksheets().get(0);
		Cells cells = worksheet.getCells();

		// Grouping first six rows (from 0 to 5) and making them hidden by passing true
		cells.ungroupRows(0, 5);

		// Grouping first three columns (from 0 to 2) and making them hidden by passing true
		cells.ungroupColumns(0, 2);

		// Saving the modified Excel file in default (that is Excel 2003) format
		workbook.save(dataDir + "SummaryRowRight_out.xls");

		// Print message
		System.out.println("Rows and Columns ungrouped successfully.");
	}
}


text:
<?php
/**
 * @package Guzzle PHP <http://www.guzzlephp.org>
 * @license See the LICENSE file that was distributed with this source code.
 */

namespace Guzzle\Aws\S3\Command;

use Guzzle\Aws\S3\S3Client;
use Guzzle\Service\Command\AbstractCommand;

/**
 * Abstract Amazon S3 command which interacts with buckets.
 *
 * @author Michael Dowling <michael@guzzlephp.org>
 */
abstract class AbstractS3BucketCommand extends AbstractCommand
{
    /**
     * Set the bucket name where the object is stored
     *
     * @param string $bucket Mame of the bucket that the object is stored in
     *
     * @return GetObject
     */
    public function setBucket($bucket)
    {
        return $this->set('bucket', $bucket);
    }
}


text:
/*
 * (C) 2012 Steve O'Brien.  BSD licensed.
 * see http://www.opensource.org/licenses/BSD-2-Clause
 * and see LICENSE in the root of this project.
 */

package cc.obrien.lbd.manager;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import cc.obrien.lbd.Device;
import cc.obrien.lbd.LBD;

/**
 *
 * @author sobrien
 */
public class Request implements Serializable
{
	/** for serialization */
	private static final long serialVersionUID = 7863162327056931061L;

	/**
	 * @author sobrien
	 */
	public static enum Type
	{
		/** server check (no-op) */
		PING,

		/** terminate all running devices; see {@link LBD#runningDevices} */
		SHUTDOWN,

		/** get each running device's {@link Device#toString()} */
		DEVICE_INFO_STRINGS,

		/** add a layer to a running device; currently only writable expandable files supported */
		LIVE_ADD_LAYER,

		;
	}

	/** request type */
	public final Type type;

	/** serial (to identify the request) */
	public final long serial;

	/** args in this request, if any */
	public final List<Object> args;

	/**
	 * @param type
	 * @param serial
	 * @param args
	 */
	public Request(Type type, long serial, List<Object> args)
	{
		this.type = type;
		this.serial = serial;
		this.args = Collections.unmodifiableList(args);
	}

	/**
	 * @param type
	 * @param serial
	 * @param args
	 */
	public Request(Type type, long serial, Object... args)
	{
		this(type, serial, Arrays.asList(args));
	}

	@Override
	public String toString()
	{
		return String.format("[request type=%s serial=%016x args=%s]", type, serial, args);
	}
}


text:
require "fileutils"
require "optparse"
require "action_dispatch"
require "rails"
require_relative "../../dev_caching"

module Rails
  class Server < ::Rack::Server
    class Options
      def parse!(args)
        Rails::Command::ServerCommand.new([], args).server_options
      end
    end

    def initialize(options = nil)
      @default_options = options || {}
      super(@default_options)
      set_environment
    end

    # TODO: this is no longer required but we keep it for the moment to support older config.ru files.
    def app
      @app ||= begin
        app = super
        app.respond_to?(:to_app) ? app.to_app : app
      end
    end

    def opt_parser
      Options.new
    end

    def set_environment
      ENV["RAILS_ENV"] ||= options[:environment]
    end

    def start
      print_boot_information
      trap(:INT) { exit }
      create_tmp_directories
      setup_dev_caching
      log_to_stdout if options[:log_stdout]

      super
    ensure
      # The '-h' option calls exit before @options is set.
      # If we call 'options' with it unset, we get double help banners.
      puts "Exiting" unless @options && options[:daemonize]
    end

    def middleware
      Hash.new([])
    end

    def default_options
      super.merge(@default_options)
    end

    private
      def setup_dev_caching
        if options[:environment] == "development"
          Rails::DevCaching.enable_by_argument(options[:caching])
        end
      end

      def print_boot_information
        url = "#{options[:SSLEnable] ? 'https' : 'http'}://#{options[:Host]}:#{options[:Port]}"
        puts "=> Booting #{ActiveSupport::Inflector.demodulize(server)}"
        puts "=> Rails #{Rails.version} application starting in #{Rails.env} on #{url}"
        puts "=> Run `rails server -h` for more startup options"
      end

      def create_tmp_directories
        %w(cache pids sockets).each do |dir_to_make|
          FileUtils.mkdir_p(File.join(Rails.root, "tmp", dir_to_make))
        end
      end

      def log_to_stdout
        wrapped_app # touch the app so the logger is set up

        console = ActiveSupport::Logger.new(STDOUT)
        console.formatter = Rails.logger.formatter
        console.level = Rails.logger.level

        unless ActiveSupport::Logger.logger_outputs_to?(Rails.logger, STDOUT)
          Rails.logger.extend(ActiveSupport::Logger.broadcast(console))
        end
      end

      def restart_command
        "bin/rails server #{ARGV.join(' ')}"
      end
  end

  module Command
    class ServerCommand < Base # :nodoc:
      DEFAULT_PORT = 3000
      DEFAULT_PID_PATH = "tmp/pids/server.pid".freeze

      class_option :port, aliases: "-p", type: :numeric,
        desc: "Runs Rails on the specified port - defaults to 3000.", banner: :port
      class_option :binding, aliases: "-b", type: :string,
        desc: "Binds Rails to the specified IP - defaults to 'localhost' in development and '0.0.0.0' in other environments'.",
        banner: :IP
      class_option :config, aliases: "-c", type: :string, default: "config.ru",
        desc: "Uses a custom rackup configuration.", banner: :file
      class_option :daemon, aliases: "-d", type: :boolean, default: false,
        desc: "Runs server as a Daemon."
      class_option :environment, aliases: "-e", type: :string,
        desc: "Specifies the environment to run this server under (development/test/production).", banner: :name
      class_option :pid, aliases: "-P", type: :string, default: DEFAULT_PID_PATH,
        desc: "Specifies the PID file."
      class_option "dev-caching", aliases: "-C", type: :boolean, default: nil,
        desc: "Specifies whether to perform caching in development."

      def initialize(args = [], local_options = {}, config = {})
        @original_options = local_options
        super
        @server = self.args.shift
        @log_stdout = options[:daemon].blank? && (options[:environment] || Rails.env) == "development"
      end

      def perform
        set_application_directory!
        Rails::Server.new(server_options).tap do |server|
          # Require application after server sets environment to propagate
          # the --environment option.
          require APP_PATH
          Dir.chdir(Rails.application.root)
          server.start
        end
      end

      no_commands do
        def server_options
          {
            user_supplied_options: user_supplied_options,
            server:                @server,
            log_stdout:            @log_stdout,
            Port:                  port,
            Host:                  host,
            DoNotReverseLookup:    true,
            config:                options[:config],
            environment:           environment,
            daemonize:             options[:daemon],
            pid:                   pid,
            caching:               options["dev-caching"],
            restart_cmd:           restart_command
          }
        end
      end

      private
        def user_supplied_options
          @user_supplied_options ||= begin
            # Convert incoming options array to a hash of flags
            #   ["-p3001", "-C", "--binding", "127.0.0.1"] # => {"-p"=>true, "-C"=>true, "--binding"=>true}
            user_flag = {}
            @original_options.each do |command|
              if command.to_s.start_with?("--")
                option = command.split("=")[0]
                user_flag[option] = true
              elsif command =~ /\A(-.)/
                user_flag[Regexp.last_match[0]] = true
              end
            end

            # Collect all options that the user has explicitly defined so we can
            # differentiate them from defaults
            user_supplied_options = []
            self.class.class_options.select do |key, option|
              if option.aliases.any? { |name| user_flag[name] } || user_flag["--#{option.name}"]
                name = option.name.to_sym
                case name
                when :port
                  name = :Port
                when :binding
                  name = :Host
                when :"dev-caching"
                  name = :caching
                when :daemonize
                  name = :daemon
                end
                user_supplied_options << name
              end
            end
            user_supplied_options << :Host if ENV["HOST"]
            user_supplied_options << :Port if ENV["PORT"]
            user_supplied_options.uniq
          end
        end

        def port
          options[:port] || ENV.fetch("PORT", DEFAULT_PORT).to_i
        end

        def host
          if options[:binding]
            options[:binding]
          else
            default_host = environment == "development" ? "localhost" : "0.0.0.0"
            ENV.fetch("HOST", default_host)
          end
        end

        def environment
          options[:environment] || Rails::Command.environment
        end

        def restart_command
          "bin/rails server #{@server} #{@original_options.join(" ")}"
        end

        def pid
          File.expand_path(options[:pid])
        end

        def self.banner(*)
          "rails server [puma, thin etc] [options]"
        end
    end
  end
end


text:
package com.qc4w.ilocker.config;

public class ConfigConstant {

	public static final String CONFIG_FILE_NAME = "common_config";

	public static final String CONFIG_MIUI_SETTINGS_TIP = "miui_settings_tip";

	public static final String CONFIG_LOCKER_MODE_TYPE = "locker_mode_type";
	public static final String CONFIG_LOCKER_SCREEN_TYPE = "locker_screen_type";

	public static final String CONFIG_SLIDE_UNLOCK_TEXT = "slide_unlock_text";
	public static final String CONFIG_LOVERS_UNLOCK_TEXT = "lovers_unlock_text";
	public static final String CONFIG_NAME_UNLOCK_TEXT = "name_unlock_text";

	public static final String CONFIG_SLIDE_UNLOCK_TEXT_COLOR = "slide_unlock_text_color";
	public static final String CONFIG_LOVERS_UNLOCK_TEXT_COLOR = "lovers_unlock_text_color";
	public static final String CONFIG_NAME_UNLOCK_TEXT_COLOR = "name_unlock_text_color";

	public static final String CONFIG_LOVERS_IMAGES_TEXT = "lovers_images_text";
	public static final String CONFIG_NAME_IMAGE_TEXT = "name_image_text";

	public static final String CONFIG_LOVERS_IMAGES_TEXT_COLOR = "lovers_images_text_color";
	public static final String CONFIG_NAME_IMAGE_TEXT_COLOR = "name_image_text_color";

	public static final String CONFIG_NAME_IMAGE_CONTOUR = "name_image_contour";

	public static final String CONFIG_PATTERN_COLOR = "pattern_color";

	public static final String CONFIG_WALLPAPER_INITED = "config_wallpaper_inited";

	public static final String CONFIG_SERVICE_ENABLE = "service_enable";

	public static final String CONFIG_SHOW_NOTIFICATION_ICON = "show_notification_icon";

	public static final String CONFIG_SCREEN_WIDTH = "screen_width";
	public static final String CONFIG_SCREEN_HEIGHT = "screen_height";

	public static final String CONFIG_PATTERN_PASSWORD = "pattern_password";
	public static final String CONFIG_DIGITAL_PASSWORD = "digital_password";

	public static final String CONFIG_DIGITAL_COLOR = "digital_color";
	public static final String CONFIG_DIGITAL_CONTOUR = "digital_contour";

	public static final String CONFIG_DPICTURE_CONTOUR = "dpicture_contour";
	public static final String CONFIG_DPICTURE_COLOR = "dpicture_color";

	public static final String CONFIG_PPICTURE_CONTOUR = "ppicture_contour";
	public static final String CONFIG_PPICTURE_COLOR = "ppicture_color";

	public static final String CONFIG_RING_CONTOUR = "ring_contour";
	public static final String CONFIG_RING_COLOR = "ring_color";

	public static final String CONFIG_LPICTURE_CONTOUR = "lpicture_contour";
	public static final String CONFIG_LPICTURE_COLOR = "lpicture_color";

	public static final String CONFIG_CPATTERN_CONTOUR_NORMAL = "cpattern_contour_normal";
	public static final String CONFIG_CPATTERN_CONTOUR_TOUCHED = "cpattern_contour_touched";

	public static final String CONFIG_WIDGET_TIME = "widget_time";
	public static final String CONFIG_WIDGET_TIME_COLOR = "widget_time_color";

	public static final String CONFIG_WIDGET_SENTENCE = "widget_sentence";
	public static final String CONFIG_WIDGET_SENTENCE_COLOR = "widget_sentence_color";

	public static final String CONFIG_WIDGET_COUNTDOWN = "widget_countdown";
	public static final String CONFIG_WIDGET_COUNTDOWN_COLOR = "widget_countdown_color";

	public static final String CONFIG_WIDGET_TIMING = "widget_timing";
	public static final String CONFIG_WIDGET_TIMING_COLOR = "widget_timing_color";

	public static final String CONFIG_WIDGET_NOTIFICATION = "widget_notification";

	public static final String CONFIG_WIDGET_CAMERA = "widget_camera";
	public static final String CONFIG_WIDGET_CAMERA_COLOR = "widget_camera_color";

	public static final String CONFIG_WIDGET_SENTENCE_CONTENT = "widget_sentence_content";

	public static final String CONFIG_WIDGET_COUNTDOWN_CONTENT = "widget_countdown_content";
	public static final String CONFIG_WIDGET_COUNTDOWN_TIMESTAMP = "widget_countdown_timestamp";

	public static final String CONFIG_WIDGET_TIMING_CONTENT = "widget_timing_content";
	public static final String CONFIG_WIDGET_TIMING_TIMESTAMP = "widget_timing_timestamp";
}