text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>BlockJam 2016 - Coming Soon</title>

    <link href='http://fonts.googleapis.com/css?family=Lato&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="css/font-awesome.min.css">
    <link rel="shortcut icon" href="img/favicon.ico">

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="css/style.css">

    <video autoplay loop muted poster="screenshot.jpg" id="background">
        <source src="img/mc.mp4" type="video/mp4">
    </video>

Coming Soon

Made with  by the BJ team

redpajama_set_name: RedPajamaGithub


text:
The Report
============

Retrieving reports
-------------------

Retrieving a report from the database should always happen via repository, which always implements ``Sylius\Bundle\ResourceBundle\Model\RepositoryInterface``.
If you are using Doctrine, you're already familiar with this concept, as it extends the native Doctrine ``ObjectRepository`` interface.

Your report repository is always accessible via the ``sylius.repository.report`` service.

.. code-block:: php

    <?php

    public function myAction(Request $request)
    {
        $repository = $this->container->get('sylius.repository.report');
    }

Retrieving reports is simple as calling proper methods on the repository.

.. code-block:: php

    <?php

    public function myAction(Request $request)
    {
        $repository = $this->container->get('sylius.repository.report');

        $report = $repository->find(4); // Get report with id 4, returns null if not found.
        $report = $repository->findOneBy(array('name' => 'My Super Report')); // Get one report by defined criteria.

        $reports = $repository->findAll(); // Load all the reports!
        $reports = $repository->findBy(array('renderer' => 'table')); // Find reports matching some custom criteria.
    }

Creating new report object
---------------------------

To create new report instance, you can simply call ``createNew()`` method on the repository.

.. code-block:: php

    <?php

    public function myAction(Request $request)
    {
        $repository = $this->container->get('sylius.repository.report');
        $report = $repository->createNew();
    }

.. note::

    Creating a report via this factory method makes the code more testable, and allows you to change the report class easily.

Saving & removing report
-------------------------

To save or remove a report, you can use any ``ObjectManager`` which manages Report. You can always access it via alias ``sylius.manager.report``.
But it's also perfectly fine if you use ``doctrine.orm.entity_manager`` or other appropriate manager service.

.. code-block:: php

    <?php

    public function myAction(Request $request)
    {
        $repository = $this->container->get('sylius.repository.report');
        $manager = $this->container->get('sylius.manager.report'); // Alias for appropriate doctrine manager service.

        $report = $repository->createNew();

        $report
            ->setName('Foo')
            ->setDescription('Nice report')
        ;

        $manager->persist($report);
        $manager->flush(); // Save changes in database.
    }

To remove a report, you also use the manager.

.. code-block:: php

    <?php

    public function myAction(Request $request)
    {
        $repository = $this->container->get('sylius.repository.report');
        $manager = $this->container->get('sylius.manager.report');

        $report = $repository->find(1);

        $manager->remove($report);
        $manager->flush(); // Save changes in database.
    }


text:
package com.ning.http.client.ws.netty;

import com.ning.http.client.AsyncHttpClient;
import com.ning.http.client.AsyncHttpClientConfig;
import com.ning.http.client.async.ProviderUtil;
import com.ning.http.client.ws.ByteMessageTest;

public class NettyByteMessageTest extends ByteMessageTest {
    @Override
    public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) {
        return ProviderUtil.nettyProvider(config);
    }
}


text:
Copy of famous [typeahead-addresspicker](https://github.com/sgruhier/typeahead-addresspicker)
but using free and Open-Source place search service https://photon.komoot.io/.

Provides `PhotonAddressEngine`, an implementation of suggestions engine [Bloodhound](https://github.com/twitter/typeahead.js/blob/master/doc/bloodhound.md) (from corejs-typeahead).

Plugin provides convinient hooks if you wanna make other processing of suggested places, rather than only show them in the drop-down list of typeahead. For example, you can choose to pin markers on [Leaflet](http://leafletjs.com/) map in suggested places while typing.

<img src="https://raw.github.com/komoot/typeahead-address-photon/master/doc/screenshot.png"/>

### Note
[corejs-typeahead](https://github.com/corejavascript/typeahead.js) is maintained fork of original [twitter typeahead](http://twitter.github.io/typeahead.js/). It's strongly recommended to switch on corejs-typeahead if you still use the old one.

## Demo
Check out the [demo](http://komoot.github.io/typeahead-address-photon/).

## How to use
Include `jQuery`, `corejs-typeahead` & `typeahead-address-photon` on your page :
```html
<script src="node_modules/jquery/dist/jquery.js"></script>
<script src="node_modules/corejs-typeahead/dist/typeahead.bundle.js"></script>
<script src="node_modules/typeahead-address-photon/dist/bundle.js"></script>
```
Add text input for address :
```xml
<input id="inpAddress" type="text" placeholder="Enter address here..."></input>
```

Instanciate `PhotonAddressEngine` and `Typeahead` :
```javascript
var engine = new PhotonAddressEngine();

$('#inpAddress').typeahead(null, {
  source: engine.ttAdapter(),
  displayKey: 'description'
});
```

### Options
`PhotonAddressEngine` constructor accepts object with options. The following options can be provided :
- `url` - URL of the Photon API to use. *Default: 'https://photon.komoot.io'*
- `limit` - limit number of results. *Default: 5*
- `formatResult` - function to control the way geojson features are displayed in the results box
- `formatType` - function to control the way features types (amenity, school, etc.) are displayed in the default formatResult function
- `lat`, `lon` - latitude and longitude to make search with priority to a geo position
- `lang` - preferred language

### Events
Instance of `PhotonAddressEngine` can trigger two kind of events that allows you make your own processing of fetched OSM features.
- `addresspicker:selected` - triggered when user selects one of suggestions, has OSM feature corresponding to selected place as parameter
- `addresspicker:predictions` - triggered when suggestions are fetched for provided request, has all fetched OSM features as parameter

You can subscribe for those events as following :
```javascript
$(engine).bind('addresspicker:selected', function (event, selectedPlace) {
  // Process selected place here ...
});

$(engine).bind('addresspicker:predictions', function (event, suggestions) {
  // Process all suggestions here ...
});
```

### Reverse geocoding
Reverse geocoding allows to fetch places by geographic coordinates rather than by text query. This feature can be usefull when working with Leaflet map. For example, user drags marker and address input is automatically updated with new place. To do reverse geocoding use method `PhotonAddressEngine.reverseGeocode([lat, lon])` that accepts array with coordinates and triggers event `addresspicker:selected` with first suggested result. Use it as following :

```javascript
$(engine).bind('addresspicker:selected', function (event, selectedPlace) {
  // Process selected place here ...
});
...
engine.reverseGeocode([ pos.lat, pos.lng ]);
```


text:
require 'rubygems'
require 'bundler/setup'

require 'minitest/autorun'
$:.unshift 'lib'

require 'rails_session_key_rotator'
require 'rack/test'
require 'pry'

class MiniTest::Spec
  class << self
    alias context describe
  end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/layout_root"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:padding="10dp" >

    <TextView
        android:id="@+id/tvName"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/group_name" />

    <EditText
        android:id="@+id/etName"
        android:layout_width="match_parent"
        android:inputType="text"
        android:layout_height="wrap_content"
		android:hint="@string/group_name_hint" >
        <requestFocus />

    </EditText>

</LinearLayout>


text:
package net

import (
	"testing"
	"time"
)

// someTimeout is used just to test that net.Conn implementations
// don't explode when their SetFooDeadline methods are called.
// It isn't actually used for testing timeouts.
const someTimeout = 10 * time.Second

func TestConnAndListener(t *testing.T) {
	for i, network := range []string{"tcp", "unix", "unixpacket"} {
		if !testableNetwork(network) {
			t.Logf("skipping %s test", network)
			continue
		}

		ls, err := newLocalServer(network)
		if err != nil {
			t.Fatal(err)
		}
		defer ls.teardown()
		ch := make(chan error, 1)
		handler := func(ls *localServer, ln Listener) { transponder(ln, ch) }
		if err := ls.buildup(handler); err != nil {
			t.Fatal(err)
		}
		if ls.Listener.Addr().Network() != network {
			t.Fatalf("got %s; want %s", ls.Listener.Addr().Network(), network)
		}

		c, err := Dial(ls.Listener.Addr().Network(), ls.Listener.Addr().String())
		if err != nil {
			t.Fatal(err)
		}
		defer c.Close()
		if c.LocalAddr().Network() != network || c.LocalAddr().Network() != network {
			t.Fatalf("got %s->%s; want %s->%s", c.LocalAddr().Network(), c.RemoteAddr().Network(), network, network)
		}
		c.SetDeadline(time.Now().Add(someTimeout))
		c.SetReadDeadline(time.Now().Add(someTimeout))
		c.SetWriteDeadline(time.Now().Add(someTimeout))

		if _, err := c.Write([]byte("CONN AND LISTENER TEST")); err != nil {
			t.Fatal(err)
		}
		rb := make([]byte, 128)
		if _, err := c.Read(rb); err != nil {
			t.Fatal(err)
		}

		for err := range ch {
			t.Errorf("#%d: %v", i, err)
		}
	}
}


text:
#region Copyright

#endregion
using Kodestruct.Aluminum.AA.AA2015.DesignRequirements.LocalBuckling;
using Kodestruct.Aluminum.AA.Entities;
using Kodestruct.Aluminum.AA.Entities.Enums;
using Kodestruct.Aluminum.AA.Entities.Exceptions;
using Kodestruct.Aluminum.AA.Entities.Interfaces;
using Kodestruct.Aluminum.AA.Entities.Section;
using Kodestruct.Common.Section.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Kodestruct.Aluminum.AA.AA2015.Flexure
{
    public partial class AluminumFlexuralMember : IAluminumBeamFlexure
    {
        //Direct Strength Method F.3-2

        public AluminumLimitStateValue GetLocalBucklingStrength(double b, double t, LateralSupportType LateralSupportType,
        FlexuralCompressionFiberPosition CompressionLocation, WeldCase WeldCase,
        SubElementType SubElementType = SubElementType.Flat)
        {
            double S_xc = GetSectionModulusCompressionSxc(CompressionLocation);
            double M_np = this.GetPlasticMoment();
            FlexuralLocalBucklingElement LocalElement = new FlexuralLocalBucklingElement(this.Section.Material, b, t, LateralSupportType,
                M_np, S_xc, WeldCase, SubElementType);

            double F_b = LocalElement.GetCriticalStress();
            double M_n= S_xc * F_b;
            AluminumLimitStateValue Y = GetFlexuralYieldingStrength(CompressionLocation);

            bool applicable;
            double val;

            if (M_n > Y.Value)
            {
                applicable = false;
                val = -1.0;
            }
            else
            {
                applicable = true;
                val = 0.9*M_n;
            }

            return new AluminumLimitStateValue(val, applicable);
        }

        public AluminumLimitStateValue GetLocalBucklingFlexuralCriticalStress(double b, double t, LateralSupportType LateralSupportType,
        FlexuralCompressionFiberPosition CompressionLocation, WeldCase WeldCase,
        SubElementType SubElementType = SubElementType.Flat)
        {
            double S_xc = GetSectionModulusCompressionSxc(CompressionLocation);
            double M_np = this.GetPlasticMoment();
            FlexuralLocalBucklingElement LocalElement = new FlexuralLocalBucklingElement(this.Section.Material, b, t, LateralSupportType,
                M_np, S_xc, WeldCase, SubElementType);

            double F_b = LocalElement.GetCriticalStress();
            double F_y = 0;
            if (WeldCase == Entities.WeldCase.NotAffected)
            {
                F_y = this.Section.Material.F_ty;

            }
            else
            {
                F_y = this.Section.Material.F_tyw;
            }

            if (F_b>F_y)
            {
                F_b = F_y;
            }

            return new AluminumLimitStateValue(F_b, true);
        }
    }
}


text:
module Dianxin
  class Base

    def initialize(apid, key, product_id)
      @apid = apid
      @key = key
      @product_id = product_id
    end

    def sms(number, message)
      timestamp                           = Time.now.strftime('%Y%m%d%H%M%S')

      params                              = {}
      params['params']                    = {}
      params['params']['TimeStamp']       = timestamp
      params['params']['APID']            = @apid
      params['params']['Key']             = encrypt(timestamp+@apid, @key);
      params['params']['Num']             = number.to_s
      params['params']['Msg']             = message
      params['params']['IsReport']        = '0'
      params['params']['StatusReportUrl'] = 'http://114.80.110.16'
      params['params']['ProductID']       = @product_id
      params['params']['IsUse']           = '0'
      params['serviceId']                 = '00001020101130';
      params['params']['Parm1']           = "12"
      params['params']['Parm2']           = @product_id
      params['params']['Parm3']           = "56"

      response = RestClient.post "http://125.64.11.43:8080/udt-see/StartServiceServlet", encode_json(params), :content_type => :json, :accept => :json
      decoded_response = decode_json(response.to_s)
      puts decoded_response.inspect
    end

  private

    def encrypt(message, key)
      key = Base64.decode64(key)
      cipher = OpenSSL::Cipher::Cipher.new("des-ede3")
      cipher.encrypt
      cipher.key = key
      ciphertext = cipher.update(message) + cipher.final
      Base64.encode64(ciphertext).gsub(/\n/, '')
    end

    def encode_json(params)
      Yajl::Encoder.encode(params)
    end

    def decode_json(response)
      parser = Yajl::Parser.new
      hash = parser.parse(response)
      hash
    end
  end
end


text:
<foo>
<selection><bar>A < B<caret></bar></selection>
</foo>


text:
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include "searchhistory.h"
#include <vespa/searchlib/fef/termfieldmatchdata.h>
#include <vespa/searchlib/queryeval/fake_search.h>
#include <vespa/searchlib/queryeval/searchiterator.h>
#include <string>

namespace search::queryeval::test {

/**
 * Proxy and wrapper for FakeSearch to track search history and
 * keep match data.
 **/
class TrackedSearch : public SearchIterator
{
private:
    std::string                          _name;
    SearchHistory                       &_history;
    fef::TermFieldMatchData              _matchData;
    SearchIterator::UP                   _search;
    std::unique_ptr<MinMaxPostingInfo>   _minMaxPostingInfo;

    static fef::TermFieldMatchDataArray makeArray(fef::TermFieldMatchData &match) {
        fef::TermFieldMatchDataArray array;
        array.add(&match);
        return array;
    }

protected:
    void doSeek(uint32_t docid) override {
        _history.seek(_name, docid);
        _search->seek(docid);
        setDocId(_search->getDocId());
        _history.step(_name, getDocId());
    }
    void doUnpack(uint32_t docid) override {
        _history.unpack(_name, docid);
        _search->unpack(docid);
    }

public:
    // wraps a FakeSearch and owns its match data
    TrackedSearch(const std::string &name, SearchHistory &hist,
                  const FakeResult &result, const MinMaxPostingInfo &minMaxPostingInfo)
        : _name(name), _history(hist), _matchData(),
          _search(new FakeSearch("<tag>", "<field>", "<term>", result, makeArray(_matchData))),
          _minMaxPostingInfo(new MinMaxPostingInfo(minMaxPostingInfo))
    { setDocId(_search->getDocId()); }
    // wraps a FakeSearch with external match data
    TrackedSearch(const std::string &name, SearchHistory &hist,
                  const FakeResult &result, fef::TermFieldMatchData &tfmd,
                  const MinMaxPostingInfo &minMaxPostingInfo)
        : _name(name), _history(hist), _matchData(),
          _search(new FakeSearch("<tag>", "<field>", "<term>", result, makeArray(tfmd))),
          _minMaxPostingInfo(new MinMaxPostingInfo(minMaxPostingInfo))
    { setDocId(_search->getDocId()); }

    // wraps a generic search (typically wand)
    TrackedSearch(const std::string &name, SearchHistory &hist, SearchIterator::UP search)
        : _name(name), _history(hist), _matchData(), _search(std::move(search)), _minMaxPostingInfo()
    { setDocId(_search->getDocId()); }

    // wraps a generic search (typically wand)
    TrackedSearch(const std::string &name, SearchHistory &hist, SearchIterator *search)
        : _name(name), _history(hist), _matchData(), _search(search), _minMaxPostingInfo()
    { setDocId(_search->getDocId()); }

    const PostingInfo *getPostingInfo() const override {
        return _minMaxPostingInfo.get();
    }
};

}


text:
<?php (defined('BASEPATH')) OR exit('No direct script access allowed');

class General_settings extends Admin_Controller
{

    function __construct()
    {
        parent::__construct();
    }

    function index()
    {
        // Init
        $data = array();
        $data['breadcrumb'] = set_crumbs(array(current_url() => 'General Settings'));
        $this->load->model('settings/settings_model');
        $this->load->model('users/groups_model');
        $this->load->model('content/entries_model');

        // Get Themes
        $data['themes'] = $this->template->get_themes();
        $data['layouts'] = $this->template->get_theme_layouts();

        // Get Groups
        $Groups = new Groups_model();
        $data['Groups'] = $Groups->where('type !=', 'super_admin')->order_by('name')->get();

        // Get All Entries
        $Entries = new Entries_model();
        $data['Entries'] = $Entries->order_by('title')->get();

        // Build object with current settings
        $Settings_table = $this->settings_model->get();

        $data['Settings'] = new stdClass();

        foreach ($Settings_table as $Setting) {
            $data['Settings']->{$Setting->slug} = new stdClass();
            $data['Settings']->{$Setting->slug}->value = $Setting->value;
            $data['Settings']->{$Setting->slug}->module = $Setting->module;
        }

        // Form Validation Rules
        $this->form_validation->set_rules('site_name', 'Site Name', 'trim|required');
        $this->form_validation->set_rules('notification_email', 'Notification Email', 'trim|required|valid_email');
        $this->form_validation->set_rules('content[site_homepage]', 'Site Homepage', 'trim|required');
        $this->form_validation->set_rules('content[custom_404]', 'Custom 404', 'trim|required');
        $this->form_validation->set_rules('enable_admin_toolbar', 'Admin Toolbar', 'trim|required');
        $this->form_validation->set_rules('suspend', 'Suspend Site', 'trim|required');

        $this->form_validation->set_rules('users[default_group]', 'Default User Group', 'trim|required');
        $this->form_validation->set_rules('users[enable_registration]', 'User Registration', 'trim|required');
        $this->form_validation->set_rules('users[email_activation]', 'Require Email Activation', 'trim|required');

        // Form Processing
        if ($this->form_validation->run() == TRUE) {
            foreach ($_POST as $slug => $value) {
                if (is_array($value)) {
                    // Value is an array so save it as a module setting
                    foreach ($value as $module_slug => $module_value) {
                        $Settings_m = new Settings_model();
                        $Settings_m->where('slug', $module_slug)->where('module', $slug)->update('value', $module_value);
                    }
                } else {
                    $Settings_m = new Settings_model();
                    $Settings_m->where('slug', $slug)->where('module IS NULL')->update('value', $value);
                }
                unset($Settings_m);
            }

            $this->load->library('cache');
            $this->cache->delete_all('settings');

            $this->session->set_flashdata('message', '
Settings Saved.
');
            redirect(uri_string());
        }

        $this->template->view('admin/general_settings', $data);
    }

    function theme_ajax()
    {
        if (!is_ajax()) {
            return show_404();
        }

        $data['status'] = 'OK';

        if ($theme = $this->input->post('theme')) {
            $layouts = $this->template->get_theme_layouts($theme);

            if (empty($layouts)) {
                $data['status'] = 'ERROR';
                $data['message'] = 'No layouts found';
            }
        } else {
            $data['status'] = 'ERROR';
            $data['message'] = 'No theme was specified';
        }

        $data['layouts'] = $layouts;

        echo json_encode($data);
    }
}


text:
<?php

class AdminRangePriceControllerCore extends AdminController
{
	public function __construct()
	{
	 	$this->table = 'range_price';
	 	$this->className = 'RangePrice';
	 	$this->lang = false;

		$this->addRowAction('edit');
		$this->addRowAction('delete');
	 	$this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));

	 	$this->fields_list = array(
			'id_range_price' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
			'carrier_name' => array('title' => $this->l('Carrier'), 'align' => 'left', 'width' => 'auto', 'filter_key' => 'ca!name'),
			'delimiter1' => array('title' => $this->l('From'), 'width' => 86, 'type' => 'price', 'align' => 'right'),
			'delimiter2' => array('title' => $this->l('To'), 'width' => 86, 'type' => 'price', 'align' => 'right'));

		$this->_join = 'LEFT JOIN '._DB_PREFIX_.'carrier ca ON (ca.`id_carrier` = a.`id_carrier`)';
		$this->_select = 'ca.`name` AS carrier_name';
		$this->_where = 'AND ca.`deleted` = 0';

		parent::__construct();
	}

	public function renderForm()
	{
		$currency = $this->context->currency;
		$carriers = Carrier::getCarriers((int)Configuration::get('PS_LANG_DEFAULT'), true, false, false, null, Carrier::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE);

		foreach ($carriers as $key => $carrier)
			if ($carrier['is_free'])
				unset($carriers[$key]);

		$this->fields_form = array(
			'legend' => array(
				'title' => $this->l('Price ranges'),
				'image' => '../img/t/AdminRangePrice.gif'
			),
			'input' => array(
				array(
					'type' => 'select',
					'label' => $this->l('Carrier:'),
					'name' => 'id_carrier',
					'required' => false,
					'desc' => $this->l('You can apply this range to a different carrier by selecting its name.'),
					'options' => array(
						'query' => $carriers,
						'id' => 'id_carrier',
						'name' => 'name'
					),
					'empty_message' => '
'.$this->l('There is no carrier available for this price range.').'
'
				),
				array(
					'type' => 'text',
					'label' => $this->l('From:'),
					'name' => 'delimiter1',
					'size' => 5,
					'required' => true,
					'suffix' => $currency->getSign('right').' '.$this->l('(Tax Incl.)'),
					'desc' => $this->l('Start range (included)'),
					'string_format' => '%.2f'
				),
				array(
					'type' => 'text',
					'label' => $this->l('To:'),
					'name' => 'delimiter2',
					'size' => 5,
					'required' => true,
					'suffix' => $currency->getSign('right').' '.$this->l('(Tax Incl.)'),
					'desc' => $this->l('End range (excluded)'),
					'string_format' => '%.2f'
				),
			),
			'submit' => array(
				'title' => $this->l('   Save   '),
				'class' => 'button'
			)
		);

		return parent::renderForm();
	}

	public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
	{
		parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
		if ($this->_list && is_array($this->_list))
			foreach ($this->_list as $key => $list)
				if ($list['carrier_name'] == '0')
					$this->_list[$key]['carrier_name'] = Configuration::get('PS_SHOP_NAME');
	}

	public function postProcess()
	{
		$id = (int)Tools::getValue('id_'.$this->table);
		if (Tools::getValue('submitAdd'.$this->table))
		{
			if (Tools::getValue('delimiter1') >= Tools::getValue('delimiter2'))
				$this->errors[] = Tools::displayError('Invalid range');
			else if (!$id && RangePrice::rangeExist((int)Tools::getValue('id_carrier'), (float)Tools::getValue('delimiter1'), (float)Tools::getValue('delimiter2')))
				$this->errors[] = Tools::displayError('The range already exists');
			else if (RangePrice::isOverlapping((int)Tools::getValue('id_carrier'), (float)Tools::getValue('delimiter1'), (float)Tools::getValue('delimiter2'), ($id ? (int)$id : null)))
				$this->errors[] = Tools::displayError('Error: Ranges are overlapping');
			else if (!count($this->errors))
				parent::postProcess();
		}
		else
			parent::postProcess();
 	}
}


text:
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">

  <title>GChartWrapper.GChart</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />

         Home

         Trees

         Indices

         Help

        Package GChartWrapper ::
        Class GChart

[hide private]

[frames] | no frames]

type GChart

source code

object --+
         |
      dict --+
             |
            GChart

Known Subclasses:

Bubble

, GChart'._AbstractGChart

, Note

, Pin

, QRCode

, Text

Main chart class

Chart type must be valid for cht parameter Dataset can be any python
  iterable and be multi dimensional Kwargs will be put into chart API
  params if valid

        Instance Methods
        [hide private]

new empty dictionary

          __init__(self,
        ctype=None,
        dataset=[],
        **kwargs)

      x.__init__(...) initializes x; see x.__class__.__doc__ for signature

            source code

          __repr__(self)

      repr(x)

            source code

          __str__(self)

            source code

          _parts(self)

            source code

          bar(self,
        *args)

      For bar charts, specify bar thickness and spacing with the args args
      are <bar width>,<space between bars>,<space between
      groups> bar width can be relative or absolute, see the official
      doc APIPARAM: chbh

            source code

          check_size(self,
        x,
        y)

      Make sure the chart size fits the standards

            source code

          check_type(self,
        type)

      Check to see if the type is either in TYPES or fits type name

            source code

          checksum(self)

      Returns the unique SHA1 hexdigest of the chart URL param parts

            source code

          color(self,
        *args)

      Add a color for each dataset args are of the form <color
      1>,...<color n> APIPARAM: chco

            source code

          dataset(self,
        data,
        series='')

      Update the chart's dataset, can be two dimensional or contain string
      data

            source code

          encoding(self,
        arg)

      Specifies the encoding to be used for the Encoder Must be one of
      'simple','text', or 'extended'

            source code

          fill(self,
        *args)

      Apply a solid fill to your chart args are of the form <fill
      type>,<fill style>,...

            source code

          getdata(self)

      Returns the decoded dataset from chd param

            source code

          getname(self)

      Gets the name of the chart, if it exists

            source code

          grid(self,
        *args)

      Apply a grid to your chart args are of the form:

            source code

          image(self)

      Returns a PngImageFile instance of the chart

            source code

          img(self,
        **kwargs)

      Returns an XHTML <img/> tag of the chart

            source code

          label(self,
        *args)

      Add a simple label to your chart call each time for each dataset
      APIPARAM: chl

            source code

          legend(self,
        *args)

      Add a legend to your chart call each time for each dataset APIPARAM:
      chdl

            source code

          legend_pos(self,
        pos)

      Define a position for your legend to occupy APIPARAM: chdlp

            source code

          level_data(self,
        *args)

      Just used in QRCode for the moment args are
      error_correction,margin_size APIPARAM: chld

            source code

          line(self,
        *args)

      Called one at a time for each dataset args are of the form:

            source code

          map(self,
        geo,
        country_codes)

      Creates a map of the defined geography with the given country/state
      codes Geography choices are africa, asia, europe, middle_east,
      south_america, and world ISO country codes can be found at
      http://code.google.com/apis/chart/isocodes.html US state codes can be
      found at http://code.google.com/apis/chart/statecodes.html APIPARAMS:
      chtm & chld

            source code

          margin(self,
        left,
        right,
        top,
        bottom,
        lwidth=0,
        lheight=0)

      Set margins for chart area args are of the form:

            source code

          marker(self,
        *args)

      Defines markers one at a time for your graph args are of the form:

            source code

          orientation(self,
        angle)

      Set the chart dataset orientation angle is <angle in radians>
      APIPARAM: chp

            source code

          output_encoding(self,
        encoding)

      Output encoding to use for QRCode encoding Must be one of
      'Shift_JIS','UTF-8', or 'ISO-8859-1' APIPARAM: choe

            source code

          position(self,
        angle)

      Set the chart dataset orientation angle is <angle in radians>
      APIPARAM: chp

            source code

          render(self)

      Renders the chart context and axes into the dict data

            source code

          save(self,
        fname=None)

      Download the chart from the URL into a filename as a PNG

            source code

          scale(self,
        *args)

      Scales the data down to the given size args must be of the form:

            source code

          show(self,
        *args,
        **kwargs)

      Shows the chart URL in a webbrowser

            source code

          size(self,
        *args)

      Set the size of the chart, args are width,height and can be tuple
      APIPARAM: chs

            source code

          title(self,
        title,
        *args)

      Add a title to your chart args are optional style params of the form
      <color>,<font size> APIPARAMS: chtt,chts

            source code

          type(self,
        type)

      Set the chart type, either Google API type or regular name APIPARAM:
      cht

            source code

          urlopen(self)

      Grabs readable PNG file pointer

            source code

          write(self,
        fp)

      Writes out PNG image data in chunks to file pointer fp

            source code

Inherited from dict:
      __cmp__,
      __contains__,
      __delitem__,
      __eq__,
      __ge__,
      __getattribute__,
      __getitem__,
      __gt__,
      __hash__,
      __iter__,
      __le__,
      __len__,
      __lt__,
      __ne__,
      __new__,
      __setitem__,
      clear,
      copy,
      fromkeys,
      get,
      has_key,
      items,
      iteritems,
      iterkeys,
      itervalues,
      keys,
      pop,
      popitem,
      setdefault,
      update,
      values

        Class Methods
        [hide private]

          fromurl(cls,
        qs)

      Reverse a chart URL or dict into a GChart instance

            source code

        Properties
        [hide private]

        url

      Returns the rendered URL of the chart

        Method Details
        [hide private]

__init__(self,
        ctype=None,
        dataset=[],
        **kwargs)

(Constructor)

  	source code

x.__init__(...) initializes x; see x.__class__.__doc__ for
  signature

Returns:

new empty dictionary

Overrides:
        dict.__init__

(inherited documentation)

__repr__(self)

(Representation operator)

  	source code

repr(x)

Overrides:
        dict.__repr__

(inherited documentation)

__str__(self)

(Informal representation operator)

  	source code

Overrides:
        object.__str__

(inherited documentation)

check_type(self,
        type)

  	source code

Check to see if the type is either in TYPES or fits type name

Returns proper type

checksum(self)

  	source code

Returns the unique SHA1 hexdigest of the chart URL param parts

good for unittesting...

fill(self,
        *args)

  	source code

Apply a solid fill to your chart args are of the form <fill
  type>,<fill style>,... fill type must be one of c,bg,a fill
  style must be one of s,lg,ls the rest of the args refer to the particular
  style APIPARAM: chf

fromurl(cls,
        qs)

Class Method

  	source code

Reverse a chart URL or dict into a GChart instance

>>> G = GChart.fromurl('http://chart.apis.google.com/chart?...')
>>> G
<GChartWrapper.GChart instance at...>
>>> G.image().save('chart.jpg','JPEG')

grid(self,
        *args)

  	source code

Apply a grid to your chart args are of the form:

   <x axis step size>,
   <y axis step size>,
   <length of line segment>,
   <length of blank segment>
   <x offset>,
   <y offset>

APIPARAM: chg

image(self)

  	source code

Returns a PngImageFile instance of the chart

You must have PIL installed for this to work

img(self,
        **kwargs)

  	source code

Returns an XHTML <img/> tag of the chart

kwargs can be other img tag attributes, which are strictly enforced
  uses strict escaping on the url, necessary for proper XHTML

line(self,
        *args)

  	source code

Called one at a time for each dataset args are of the form:

   <data set n line thickness>,
   <length of line segment>,
   <length of blank segment>

APIPARAM: chls

margin(self,
        left,
        right,
        top,
        bottom,
        lwidth=0,
        lheight=0)

  	source code

Set margins for chart area args are of the form:

   <left margin>,
   <right margin>,
   <top margin>,
   <bottom margin>|
   <legend width>,
   <legend height>

APIPARAM: chma

marker(self,
        *args)

  	source code

Defines markers one at a time for your graph args are of the form:

   <marker type>,
   <color>,
   <data set index>,
   <data point>,
   <size>,
   <priority>

see the official developers doc for the complete spec APIPARAM:
  chm

save(self,
        fname=None)

  	source code

Download the chart from the URL into a filename as a PNG

The filename defaults to the chart title (chtt) if any

scale(self,
        *args)

  	source code

Scales the data down to the given size args must be of the form:

   <data set 1 minimum value>,
   <data set 1 maximum value>,
   <data set n minimum value>,
   <data set n maximum value>

will only work with text encoding! APIPARAM: chds

show(self,
        *args,
        **kwargs)

  	source code

Shows the chart URL in a webbrowser

Other arguments passed to webbrowser.open

write(self,
        fp)

  	source code

Writes out PNG image data in chunks to file pointer fp

fp must support w or wb

        Property Details
        [hide private]

url

Returns the rendered URL of the chart

         Home

         Trees

         Indices

         Help

    Generated by Epydoc 3.0.1
    on Wed Sep 30 14:59:36 2009

      http://epydoc.sourceforge.net


text:
package org.ibase4j.core.util;

import net.coobird.thumbnailator.Thumbnails;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

/**
 * 图片处理辅助类
 *
 * @author ShenHuaJie
 * @since 2012-03-21
 */
public final class ImageUtil {
    private ImageUtil() {
    }

    /**
     * * 转换图片大小,不变形
     *
     * @param img    图片文件
     * @param width  图片宽
     * @param height 图片高
     */
    public static final void changeImge(File img, int width, int height) {
        try {
            Thumbnails.of(img).size(width, height).keepAspectRatio(false).toFile(img);
        } catch (IOException e) {
            e.printStackTrace();
            throw new IllegalStateException("图片转换出错!", e);
        }
    }

    /**
     * 根据比例缩放图片
     *
     * @param orgImgFile 源图片路径
     * @param scale      比例
     * @param targetFile 缩放后的图片存放路径
     * @throws IOException
     */
    public static final void scale(BufferedImage orgImg, double scale, String targetFile) throws IOException {
        Thumbnails.of(orgImg).scale(scale).toFile(targetFile);
    }

    public static final void scale(String orgImgFile, double scale, String targetFile) throws IOException {
        Thumbnails.of(orgImgFile).scale(scale).toFile(targetFile);
    }

    /**
     * 图片格式转换
     *
     * @param orgImgFile
     * @param width
     * @param height
     * @param suffixName
     * @param targetFile
     * @throws IOException
     */
    public static final void format(String orgImgFile, int width, int height, String suffixName, String targetFile)
            throws IOException {
        Thumbnails.of(orgImgFile).size(width, height).outputFormat(suffixName).toFile(targetFile);
    }

    /**
     * 根据宽度同比缩放
     *
     * @param orgImg      源图片
     * @param orgWidth    原始宽度
     * @param targetWidth 缩放后的宽度
     * @param targetFile  缩放后的图片存放路径
     * @throws IOException
     */
    public static final double scaleWidth(BufferedImage orgImg, int targetWidth, String targetFile) throws IOException {
        int orgWidth = orgImg.getWidth();
        // 计算宽度的缩放比例
        double scale = targetWidth * 1.00 / orgWidth;
        // 裁剪
        scale(orgImg, scale, targetFile);

        return scale;
    }

    public static final void scaleWidth(String orgImgFile, int targetWidth, String targetFile) throws IOException {
        BufferedImage bufferedImage = ImageIO.read(new File(orgImgFile));
        scaleWidth(bufferedImage, targetWidth, targetFile);
    }

    /**
     * 根据高度同比缩放
     *
     * @param orgImgFile   //源图片
     * @param orgHeight    //原始高度
     * @param targetHeight //缩放后的高度
     * @param targetFile   //缩放后的图片存放地址
     * @throws IOException
     */
    public static final double scaleHeight(BufferedImage orgImg, int targetHeight, String targetFile) throws IOException {
        int orgHeight = orgImg.getHeight();
        double scale = targetHeight * 1.00 / orgHeight;
        scale(orgImg, scale, targetFile);
        return scale;
    }

    public static final void scaleHeight(String orgImgFile, int targetHeight, String targetFile) throws IOException {
        BufferedImage bufferedImage = ImageIO.read(new File(orgImgFile));
        // int height = bufferedImage.getHeight();
        scaleHeight(bufferedImage, targetHeight, targetFile);
    }

    // 原始比例缩放
    public static final void scaleWidth(File file, Integer width) throws IOException {
        String fileName = file.getName();
        String filePath = file.getAbsolutePath();
        String postFix = fileName.substring(fileName.lastIndexOf(".")).toLowerCase();
        // 缩放
        BufferedImage bufferedImg = ImageIO.read(file);
        String targetFile = filePath + "_s" + postFix;
        scaleWidth(bufferedImg, width, targetFile);
        String targetFile2 = filePath + "@" + width;
        new File(targetFile).renameTo(new File(targetFile2));
    }
}


text:
var storageKey = '_historyofclosedtabs_';
var urlsCache = {urls:{},length:0};
var urlsOfLastClosedWindow = [];

chrome.tabs.query({},function(tabs){
    for(var i = 0;i < tabs.length;i++){
        if(!tabs[i].pinned){
            urlsCache.urls[tabs[i].id] = tabs[i].url;
            urlsCache.length++;
        }
    }
});

chrome.storage.local.get(storageKey,function(items){
    if(items[storageKey]!=undefined&&items[storageKey].length>0){
        chrome.browserAction.setBadgeBackgroundColor({color: [208, 0, 24, 255]});
        chrome.browserAction.setBadgeText({text: items[storageKey].length.toString()});
    }
});

chrome.browserAction.onClicked.addListener(function(){
    chrome.storage.local.get(storageKey,function(items){
        if(items[storageKey]!=undefined){
            for(var i = items[storageKey].length-1;i>=0;i--){
                chrome.tabs.create({url:items[storageKey][i]});
            }
            chrome.storage.local.remove(storageKey);
            chrome.browserAction.setBadgeText({text: ""});
        }
    });
});

chrome.tabs.onRemoved.addListener(function(tid,info){
    if(info.isWindowClosing===true){
        if(urlsCache.urls[tid]!=undefined){
            urlsOfLastClosedWindow.push(urlsCache.urls[tid]);
            chrome.browserAction.setBadgeBackgroundColor({color: [208, 0, 24, 255]});
            chrome.browserAction.setBadgeText({text: urlsOfLastClosedWindow.length.toString()});
        }
    }
});

chrome.tabs.onCreated.addListener(function(tab){
    if(!tab.pinned){
        urlsCache.urls[tab.id] = tab.url;
        urlsCache.length +=1;
    }
});

chrome.tabs.onUpdated.addListener(function(tabId,changeInfo,newtab){
    if(!newtab.pinned){
        urlsCache.urls[tabId] = newtab.url;
    }else{
       if(urlsCache.urls[tabId]!=undefined){
            delete urlsCache.urls[tabId];
       }
    }
});

chrome.windows.onRemoved.addListener(function(){
    if(urlsOfLastClosedWindow.length > 0){
        var storageData = {};
        storageData[storageKey] = urlsOfLastClosedWindow;
        chrome.storage.local.set(storageData,function(s){
            urlsOfLastClosedWindow = [];
            //console.log(storageData);
        });
    }
});


text:
Byte Industries' open-source plugin core
##About
TBA
##Download
TBA
##Support
TBA


text:
module Shopart
  class Engine < ::Rails::Engine
    isolate_namespace Shopart
    config.generators do |g|
      g.test_framework :rspec
      g.fixture_replacement :factory_girl, dir: 'spec/factories'
      g.assets false
      g.helper false
    end
  end
end


text:
package me.adaptive.ide.codewok.module;

import com.intellij.ide.util.frameworkSupport.FrameworkRole;
import com.intellij.ide.util.projectWizard.EmptyModuleBuilder;
import com.intellij.openapi.module.ModuleType;
import com.intellij.openapi.module.ModuleTypeManager;
import me.adaptive.ide.branding.CodeWokIcons;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;

import javax.swing.*;

/**
 * Created by panthro on 14/04/15.
 */
public class CodeWokModuleType extends ModuleType<EmptyModuleBuilder> {

  @NonNls public static final String CODEWOK_MODULE = "CODEWOK_MODULE";

  protected CodeWokModuleType(){
    super(CODEWOK_MODULE);
  }

  public static ModuleType getInstance() {
    return ModuleTypeManager.getInstance().findByID(CODEWOK_MODULE);
  }

  @NotNull
  @Override
  public EmptyModuleBuilder createModuleBuilder() {
    return new EmptyModuleBuilder() {
      @Override
      public ModuleType getModuleType() {
        return getInstance();
      }
    };
  }

  @NotNull
  @Override
  public String getName() {
    return "CodeWok Module";
  }

  @NotNull
  @Override
  public String getDescription() {
    return "Adaptive CodeWok Modules are used to develop Adaptive applications using the CodeWok IDE";
  }

  @Override
  public Icon getBigIcon() {
    return CodeWokIcons.CodeWok_32; //TODO add icon
  }

  @Override
  public Icon getNodeIcon(@Deprecated boolean isOpened) {
    return CodeWokIcons.CodeWok_16;//TODO add icon
  }

  @NotNull
  @Override
  public FrameworkRole getDefaultAcceptableRole() {
    return super.getDefaultAcceptableRole();
  }
}


text:
module AgMonitor
  class ProcessList
    require 'sys/proctable'
    include Sys

    def process_list
      ProcTable.ps{ |s|
        ProcTable.fields.each{ |field|
          puts "#{field}: " + s.send(field).to_s
        }
        puts '=' * 30
      }
    end
  end
end


text:
import * as core from 'core-js';
import {RequestMessage} from './request-message';
import {HttpResponseMessage} from './http-response-message';
import {join, buildQueryString} from 'aurelia-path';

function applyXhrTransformers(xhrTransformers, client, processor, message, xhr) {
  var i, ii;
  for (i = 0, ii = xhrTransformers.length; i < ii; ++i) {
      xhrTransformers[i](client, processor, message, xhr);
  }
}

interface XHRConstructor {
	//new():XHR;
}

interface XHR {
  status : number;
  statusText : string;
  response : any;
  responseText : string;
  onload : Function;
  ontimeout : Function;
  onerror : Function;
  onabort : Function;
  abort() : void;
  //open(method : string, url : string, isAsync : boolean) : void;
  send(content? : any) : void;
}

interface XHRTransformer {
  (client : HttpClient, processor : RequestMessageProcessor, message : RequestMessage, xhr : XHR) : void;
}

export class RequestMessageProcessor {
  constructor(xhrType : XHRConstructor, xhrTransformers : XHRTransformer[]){
    this.XHRType = xhrType;
    this.xhrTransformers = xhrTransformers;
    this.isAborted = false;
  }

  abort() : void{
    // The logic here is if the xhr object is not set then there is nothing to abort so the intent was carried out
    // Also test if the XHR is UNSENT - if not, it will be aborted in the process() phase
    if(this.xhr && this.xhr.readyState !== XMLHttpRequest.UNSENT){
      this.xhr.abort();
    }
    this.isAborted = true;
  }

  process(client, message : RequestMessage) : Promise<any> {
    var promise = new Promise((resolve, reject) => {
      var xhr = this.xhr = new this.XHRType();

      xhr.onload = (e) => {
        var response = new HttpResponseMessage(message, xhr, message.responseType, message.reviver);
        if (response.isSuccess) {
          resolve(response);
        } else {
          reject(response);
        }
      };

      xhr.ontimeout = (e) => {
        reject(new HttpResponseMessage(message, {
          response: e,
          status: xhr.status,
          statusText: xhr.statusText
        }, 'timeout'));
      };

      xhr.onerror = (e) => {
        reject(new HttpResponseMessage(message, {
          response: e,
          status: xhr.status,
          statusText: xhr.statusText
        }, 'error'));
      };

      xhr.onabort = (e) => {
        reject(new HttpResponseMessage(message, {
          response: e,
          status: xhr.status,
          statusText: xhr.statusText
        }, 'abort'));
      };
    });

    return Promise.resolve(message)
      .then((message) => {
        var processRequest = () => {
          if (this.isAborted) {
            // Some interceptors can delay sending of XHR, so when abort is called
            // before XHR is actually sent we abort() instead send()
            this.xhr.abort();
          } else {
            this.xhr.open(message.method, message.buildFullUrl(), true);
            applyXhrTransformers(this.xhrTransformers, client, this, message, this.xhr);
            this.xhr.send(message.content);
          }

          return promise;
        };

        // [ onFullfilled, onReject ] pairs
        var chain = [[processRequest, undefined]];
        // Apply interceptors chain from the message.interceptors
        var interceptors = message.interceptors || [];
        interceptors.forEach(function (interceptor) {
          if (interceptor.request || interceptor.requestError) {
            chain.unshift([
              interceptor.request ? interceptor.request.bind(interceptor) : undefined,
              interceptor.requestError ? interceptor.requestError.bind(interceptor) : undefined
            ]);
          }

          if (interceptor.response || interceptor.responseError) {
            chain.push([
              interceptor.response ? interceptor.response.bind(interceptor) : undefined,
              interceptor.responseError ? interceptor.responseError.bind(interceptor) : undefined
            ]);
          }
        });

        var interceptorsPromise = Promise.resolve(message);

        while (chain.length) {
          interceptorsPromise = interceptorsPromise.then(...chain.shift());
        }

        return interceptorsPromise;
      });
  }
}


text:
if [ "$YAX_LOG_DIR" = "" ]; then
  YAX_LOG_DIR="$YAX_HOME/logs"
fi
if [ "$YAX_LOGFILE" = "" ]; then
  YAX_LOGFILE='yax.log'
fi

CLASPATH=.
CLASPATH=${CLASSPATH}:lib/de.opsdesign.yax.core.jar
CLASPATH=${CLASSPATH}:lib/xml-resolver-1.2.jar
CLASPATH=${CLASSPATH}:custom
CLASPATH=${CLASSPATH}:configuration
CLASPATH=${CLASSPATH}:./
CLASPATH=${CLASSPATH}:lib/apache-log4j-1.2.16/log4j-1.2.16.jar

fopDir=lib/fop-1.0

CLASPATH=${CLASSPATH}:${fopDir}/lib/avalon-framework-4.2.0.jar
CLASPATH=${CLASSPATH}:${fopDir}/lib/batik-all-1.7.jar
CLASPATH=${CLASSPATH}:${fopDir}/lib/commons-io-1.3.1.jar
CLASPATH=${CLASSPATH}:${fopDir}/lib/commons-logging-1.0.4.jar
CLASPATH=${CLASSPATH}:${fopDir}/lib/serializer-2.7.0.jar
CLASPATH=${CLASSPATH}:${fopDir}/lib/xalan-2.7.0.jar
CLASPATH=${CLASSPATH}:${fopDir}/lib/xercesImpl-2.7.1.jar
CLASPATH=${CLASSPATH}:${fopDir}/lib/xml-apis-1.3.04.jar
CLASPATH=${CLASSPATH}:${fopDir}/lib/xmlgraphics-commons-1.4.jar
CLASPATH=${CLASSPATH}:${fopDir}/lib/xml-apis-ext-1.3.04.jar
CLASPATH=${CLASSPATH}:${fopDir}/build/fop.jar

script=examples/example8.xproc

params=
params=${params}:-Dexamples.data.dir=examples/fop/xml
params=${params}:-Dexamples.script.dir=examples/fop/xslt
params=${params}:-Dtest.dir=test
params=${params}:-DxmlInput=projectteam.xml
params=${params}:-Dxml2foScript=projectteam2fo.xsl
params=${params}:-DpdfOutput=example8.pdf

java -classpath ${CLASSPATH} de.opsdesign.yax.Yax ${script} ${params}


text:
using System;

namespace _06_object
{
    class Ojjektum
    {
        public int Ertek;

        public Ojjektum(int value)
        {
            Ertek = value;
        }

        public override string ToString()
        {
            return "Én egy ojjektum vagyok. Értékem: " + Ertek.ToString();
        }

        public override bool Equals(object obj)
        {
            if (obj is Ojjektum) return obj.GetHashCode() == this.GetHashCode(); //return (obj as Ojjektum).Ertek == this.Ertek;
            return false;
        }

        public override int GetHashCode()
        {
            return Ertek.GetHashCode();
        }

        public virtual void izé() { }
    }

    class Program
    {
        static void Main(string[] args)
        {
            Ojjektum a = new Ojjektum(4);
            Ojjektum b = new Ojjektum(5);
            Ojjektum c = new Ojjektum(4);

            Console.WriteLine("Ojjektum a: {0}", a);
            Console.WriteLine("Ojjektum b: {0}", b);
            Console.WriteLine("Ojjektum c: {0}", c);

            Console.WriteLine("Ojjektum a és b egyenlősége: {0}", a.Equals(b));
            Console.WriteLine("Ojjektum a és c egyenlősége: {0}", a.Equals(c));
            Console.WriteLine("Ojjektum b és c egyenlősége: {0}", b.Equals(c));

            Console.ReadKey();
        }
    }
}


text:
#ifndef SOCKET_H
#define SOCKET_H 1

#include <stdlib.h>
#include <string.h>
#include <unistd.h>

#include "yajl_gen.h"

#include "journalist.h"

void rb_journalist_socket_init();
void rb_journalist_socket_send(int count, const char *event, ...);

#endif /* SOCKET_H */


text:
var assert = require('assert')

module.exports = function (_, dir, finish, gm) {

  assert.equal('gm', gm('test').constructor.name);
  assert.equal(undefined, gm.prototype._options.imageMagick);

  var sub = gm.subClass({ imageMagick: true });

  assert.equal('gm', sub('test').constructor.name);
  assert.equal(true, sub.prototype._options.imageMagick);
  assert.equal(undefined, gm.prototype._options.imageMagick);

  var s = sub('test');
  assert.equal(true, s._options.imageMagick);

  var g = gm('test');
  assert.equal(undefined, g._options.imageMagick);

  if (!gm.integration)
    return finish();

  gm(dir + '/photo.JPG')
  .thumb(50, 80, dir + '/SUBthumb.png', function subthumb (err) {
    if (err) return finish(err);
    finish();
  });
}


text:
import tryFn from './tryFn';
import promised from './promised';

export default promised(function reduceRight(collection, result, iteratee) {
    return collection.reduceRight(
        (promise, item, index, collection) => {
            return promise.then((result) => tryFn(iteratee, result, item, index, collection));
        },
        Promise.resolve(result)
    );
});


text:
namespace OpenQA.Selenium.DevTools.DOMDebugger
{
    using Newtonsoft.Json;

    /// <summary>
    /// Returns event listeners of the given object.
    /// </summary>
    public sealed class GetEventListenersCommandSettings : ICommand
    {
        private const string DevToolsRemoteInterface_CommandName = "DOMDebugger.getEventListeners";

        [JsonIgnore]
        public string CommandName
        {
            get { return DevToolsRemoteInterface_CommandName; }
        }

        /// <summary>
        /// Identifier of the object to return listeners for.
        /// </summary>
        [JsonProperty("objectId")]
        public string ObjectId
        {
            get;
            set;
        }
        /// <summary>
        /// The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the
        /// entire subtree or provide an integer larger than 0.
        /// </summary>
        [JsonProperty("depth", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public long? Depth
        {
            get;
            set;
        }
        /// <summary>
        /// Whether or not iframes and shadow roots should be traversed when returning the subtree
        /// (default is false). Reports listeners for all contexts if pierce is enabled.
        /// </summary>
        [JsonProperty("pierce", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public bool? Pierce
        {
            get;
            set;
        }
    }

    public sealed class GetEventListenersCommandResponse : ICommandResponse<GetEventListenersCommandSettings>
    {
        /// <summary>
        /// Array of relevant listeners.
        ///</summary>
        [JsonProperty("listeners")]
        public EventListener[] Listeners
        {
            get;
            set;
        }
    }
}


text:
package org.apache.spark.api.python

import java.io.{DataOutputStream, File, FileOutputStream}
import java.net.InetAddress
import java.nio.charset.StandardCharsets.UTF_8
import java.nio.file.Files

import py4j.GatewayServer

import org.apache.spark.SparkConf
import org.apache.spark.internal.Logging
import org.apache.spark.util.Utils

/**
 * Process that starts a Py4J GatewayServer on an ephemeral port.
 *
 * This process is launched (via SparkSubmit) by the PySpark driver (see java_gateway.py).
 */
private[spark] object PythonGatewayServer extends Logging {
  initializeLogIfNecessary(true)

  def main(args: Array[String]): Unit = {
    val secret = Utils.createSecret(new SparkConf())

    // Start a GatewayServer on an ephemeral port. Make sure the callback client is configured
    // with the same secret, in case the app needs callbacks from the JVM to the underlying
    // python processes.
    val localhost = InetAddress.getLoopbackAddress()
    val gatewayServer: GatewayServer = new GatewayServer.GatewayServerBuilder()
      .authToken(secret)
      .javaPort(0)
      .javaAddress(localhost)
      .callbackClient(GatewayServer.DEFAULT_PYTHON_PORT, localhost, secret)
      .build()

    gatewayServer.start()
    val boundPort: Int = gatewayServer.getListeningPort
    if (boundPort == -1) {
      logError("GatewayServer failed to bind; exiting")
      System.exit(1)
    } else {
      logDebug(s"Started PythonGatewayServer on port $boundPort")
    }

    // Communicate the connection information back to the python process by writing the
    // information in the requested file. This needs to match the read side in java_gateway.py.
    val connectionInfoPath = new File(sys.env("_PYSPARK_DRIVER_CONN_INFO_PATH"))
    val tmpPath = Files.createTempFile(connectionInfoPath.getParentFile().toPath(),
      "connection", ".info").toFile()

    val dos = new DataOutputStream(new FileOutputStream(tmpPath))
    dos.writeInt(boundPort)

    val secretBytes = secret.getBytes(UTF_8)
    dos.writeInt(secretBytes.length)
    dos.write(secretBytes, 0, secretBytes.length)
    dos.close()

    if (!tmpPath.renameTo(connectionInfoPath)) {
      logError(s"Unable to write connection information to $connectionInfoPath.")
      System.exit(1)
    }

    // Exit on EOF or broken pipe to ensure that this process dies when the Python driver dies:
    while (System.in.read() != -1) {
      // Do nothing
    }
    logDebug("Exiting due to broken pipe from Python driver")
    System.exit(0)
  }
}


text:
@interface KWExampleSuite()  {
    KWContextNode *rootNode;
    NSMutableArray *examples;
}
@end

@implementation KWExampleSuite

- (id)initWithRootNode:(KWContextNode *)contextNode
{
  if ((self = [super init])) {
    rootNode = [contextNode retain];
    examples = [[NSMutableArray alloc] init];
  }
  return self;
}

- (void)dealloc
{
  [examples release];
  [rootNode release];
  [super dealloc];
}

- (void)addExample:(KWExample *)example
{
  [examples addObject:example];
  [example setSuite:self];
}

- (void)markLastExampleAsLastInContext:(KWContextNode *)context
{
  if ([examples count] > 0) {
    KWExample *lastExample = (KWExample *)[examples lastObject];
    [lastExample.lastInContexts addObject:context];
  }
}

- (NSArray *)invocationsForTestCase;
{
  NSMutableArray *invocations = [NSMutableArray array];

  // Add a single dummy invocation for each example group

  for (KWExample *exampleGroup in examples) {
    NSMethodSignature *methodSignature = [NSMethodSignature signatureWithObjCTypes:[KWEncodingForVoidMethod() UTF8String]];
    NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:methodSignature];
    [invocations addObject:invocation];
    [invocation kw_setExample:exampleGroup];
  }

  return invocations;
}

@end

#pragma mark -

// because SenTest will modify the invocation target, we'll have to store
// another reference to the example group so we can retrieve it later

@implementation NSInvocation (KWExampleGroup)

- (void)kw_setExample:(KWExample *)exampleGroup
{
  objc_setAssociatedObject(self, kKWINVOCATION_EXAMPLE_GROUP_KEY, exampleGroup, OBJC_ASSOCIATION_RETAIN);
}

- (KWExample *)kw_example
{
  return objc_getAssociatedObject(self, kKWINVOCATION_EXAMPLE_GROUP_KEY);
}

@end


text:
package org.apache.activemq.artemis.rest.topic;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import org.apache.activemq.artemis.rest.queue.push.xml.PushRegistration;

@XmlRootElement(name = "push-topic-registration")
@XmlAccessorType(XmlAccessType.PROPERTY)
@XmlType(propOrder = {"topic"})
public class PushTopicRegistration extends PushRegistration
{
   private static final long serialVersionUID = -2526239344680405891L;
   private String topic;

   @XmlElement
   public String getTopic()
   {
      return topic;
   }

   public void setTopic(String topic)
   {
      this.topic = topic;
   }
}


text:
A simple command line tool for backup files to one location.

## Installation

    $ gem install backto

## Usage

Example of backup Sublime Text 3 config to your Dropbox. You may have some files like below in `~/Dropbox/SublimeText3`

```
├── Installed\ Packages
│   ├── 0_package_control_loader.sublime-package
│   └── Package\ Control.sublime-package
└── Packages
    └── User
        ├── Default\ (OSX).sublime-keymap
        ├── Package\ Control.sublime-settings
        └── Preferences.sublime-settings
```

Just wirte a json config file in `~/Dropbox/sublimetext3.json` like

```json
{
    "form": "./SublimeText3",
    "to": "~/Library/Application Support/Sublime Text 3"
}

```

And then execute

```
$ backto ~/Dropbox/sublimetext3.json
```


text:
layout: music
title: Album - Brian Culbertson
category: Music
keywords: music, recommended
albums:
    - title: Dreams
      artist: Brian Culbertson
      genre: Jazz
      year: 2012
      link: http://www.brianculbertson.com/dreams/
      cover: http://cps-static.rovicorp.com/3/JPG_250/MI0003/350/MI0003350075.jpg?partner=allrovi.com
---


text:
"""Representation of Z-Wave locks."""
from __future__ import annotations

from typing import Any

import voluptuous as vol
from zwave_js_server.client import Client as ZwaveClient
from zwave_js_server.const import CommandClass
from zwave_js_server.const.command_class.lock import (
    ATTR_CODE_SLOT,
    ATTR_USERCODE,
    LOCK_CMD_CLASS_TO_LOCKED_STATE_MAP,
    LOCK_CMD_CLASS_TO_PROPERTY_MAP,
    DoorLockMode,
)
from zwave_js_server.util.lock import clear_usercode, set_usercode

from homeassistant.components.lock import DOMAIN as LOCK_DOMAIN, LockEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import STATE_LOCKED, STATE_UNLOCKED
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import config_validation as cv, entity_platform
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback

from .const import (
    DATA_CLIENT,
    DOMAIN,
    LOGGER,
    SERVICE_CLEAR_LOCK_USERCODE,
    SERVICE_SET_LOCK_USERCODE,
)
from .discovery import ZwaveDiscoveryInfo
from .entity import ZWaveBaseEntity

PARALLEL_UPDATES = 0

STATE_TO_ZWAVE_MAP: dict[int, dict[str, int | bool]] = {
    CommandClass.DOOR_LOCK: {
        STATE_UNLOCKED: DoorLockMode.UNSECURED,
        STATE_LOCKED: DoorLockMode.SECURED,
    },
    CommandClass.LOCK: {
        STATE_UNLOCKED: False,
        STATE_LOCKED: True,
    },
}

async def async_setup_entry(
    hass: HomeAssistant,
    config_entry: ConfigEntry,
    async_add_entities: AddEntitiesCallback,
) -> None:
    """Set up Z-Wave lock from config entry."""
    client: ZwaveClient = hass.data[DOMAIN][config_entry.entry_id][DATA_CLIENT]

    @callback
    def async_add_lock(info: ZwaveDiscoveryInfo) -> None:
        """Add Z-Wave Lock."""
        driver = client.driver
        assert driver is not None  # Driver is ready before platforms are loaded.
        entities: list[ZWaveBaseEntity] = []
        entities.append(ZWaveLock(config_entry, driver, info))

        async_add_entities(entities)

    config_entry.async_on_unload(
        async_dispatcher_connect(
            hass, f"{DOMAIN}_{config_entry.entry_id}_add_{LOCK_DOMAIN}", async_add_lock
        )
    )

    platform = entity_platform.async_get_current_platform()

    platform.async_register_entity_service(
        SERVICE_SET_LOCK_USERCODE,
        {
            vol.Required(ATTR_CODE_SLOT): vol.Coerce(int),
            vol.Required(ATTR_USERCODE): cv.string,
        },
        "async_set_lock_usercode",
    )

    platform.async_register_entity_service(
        SERVICE_CLEAR_LOCK_USERCODE,
        {
            vol.Required(ATTR_CODE_SLOT): vol.Coerce(int),
        },
        "async_clear_lock_usercode",
    )

class ZWaveLock(ZWaveBaseEntity, LockEntity):
    """Representation of a Z-Wave lock."""

    @property
    def is_locked(self) -> bool | None:
        """Return true if the lock is locked."""
        if self.info.primary_value.value is None:
            # guard missing value
            return None
        return int(
            LOCK_CMD_CLASS_TO_LOCKED_STATE_MAP[
                CommandClass(self.info.primary_value.command_class)
            ]
        ) == int(self.info.primary_value.value)

    async def _set_lock_state(self, target_state: str, **kwargs: Any) -> None:
        """Set the lock state."""
        target_value = self.get_zwave_value(
            LOCK_CMD_CLASS_TO_PROPERTY_MAP[
                CommandClass(self.info.primary_value.command_class)
            ]
        )
        if target_value is not None:
            await self.info.node.async_set_value(
                target_value,
                STATE_TO_ZWAVE_MAP[self.info.primary_value.command_class][target_state],
            )

    async def async_lock(self, **kwargs: Any) -> None:
        """Lock the lock."""
        await self._set_lock_state(STATE_LOCKED)

    async def async_unlock(self, **kwargs: Any) -> None:
        """Unlock the lock."""
        await self._set_lock_state(STATE_UNLOCKED)

    async def async_set_lock_usercode(self, code_slot: int, usercode: str) -> None:
        """Set the usercode to index X on the lock."""
        await set_usercode(self.info.node, code_slot, usercode)
        LOGGER.debug("User code at slot %s set", code_slot)

    async def async_clear_lock_usercode(self, code_slot: int) -> None:
        """Clear the usercode at index X on the lock."""
        await clear_usercode(self.info.node, code_slot)
        LOGGER.debug("User code at slot %s cleared", code_slot)


text:
package org.apache.tapestry5.ioc;

import org.apache.tapestry5.ioc.annotations.Marker;

@Marker(RedMarker.class)
public class RedGreeterImpl implements Greeter
{

    public String getGreeting()
    {
        return null;
    }

}


text:
<TITLE>Review for Sleepy Hollow (1999)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Sleepy Hollow (1999)

reviewed by
Susan Granger

http://www.speakers-podium.com/susangranger.

Susan Granger's review of "SLEEPY HOLLOW" (Paramount Pictures)

Tim Burton fans are gonna relish this fantasy horror story,
especially the creepy beginning. It's 1799 on a misty road near the
small village of Sleepy Hollow in New York's Hudson River Valley when
a coach carrying the region's richest man (Martin Landau) is attacked
by a mysterious Headless Horseman wielding a deadly sword. Whoosh! Off
goes his head!  Then the killer strikes again. Each time, the victim
is decapitated. Understandably, the insular Dutch locals are upset,
many convinced that they're being haunted by the demonic spirit of a
Revolutionary War mercenary (Christopher Walken) who died in the West
Woods, a place where no one dares go. Then an inquisitive, if
squeamish, new constable, Ichabod Crane (Johnny Depp) appears, sent to
track down the murderer. He scoffs at the idea of a supernatural
being, focusing his forensic attention on hunky Brom Van Brunt (Casper
Van Dien) but soon learns that, perhaps, there are vengeful
supernatural forces at work. In the meantime, he falls in love with
Katrina Van Tassel (Christina Ricci - in a blonde wig), the bewitching
daughter of his landlords (Michael Gambon, Miranda Richardson).  While
the first few Horseman attacks are scary - thanks to stuntman Ray Park
- it soon becomes evident that all the women are witches and a crazed
serial killer is on the loose. Seven screenwriter Andrew Kevin Walker
revises Washington Irving's classic ghost story, concluding with a
millennial flourish, and Emmanuel Lubezki's sepia-toned cinematography
is impressive. On the Granger Movie Gauge of 1 to 10, Sleepy Hollow is
a grim, gruesome 6 - a belated Halloween treat with more style than
substance. Be warned: nearly everyone's head rolls and the brutal
beheadings are graphic and violent - not suitable for young children.

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
pilgrimmemoirs.github.io
========================


text:
package org.acra.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.StringReader;
import java.text.NumberFormat;
import java.text.ParseException;
import java.util.Locale;

import org.acra.ACRA;
import org.acra.ReportField;
import org.acra.collector.CollectorUtil;
import org.acra.collector.CrashReportData;
import org.acra.sender.ReportSenderException;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class JSONReportBuilder {
    /**
     *

     * Create a JSONObject containing the whole report data with the most
     * detailed possible structure depth. Fields are not just converted to a
     * single key=value pair. If a value can be decomposed into subobjects, it
     * is done.
     *

     *
     *

     * For example, a String containing:
     *
     *

     * some.key.name1=value1
     * some.key.name2=value2
     * some.other=value3
     * any.other.key=value4
     * key.without.value5
     *

     *
     * is converted to
     *
     *

     * {
     *   some : {
     *     key : {
     *       name1 : "value1",
     *       name2 : "value2"
     *     },
     *     other : "value3"
     *   },
     *   any : {
     *     other : {
     *       key : "value4"
     *     }
     *   }
     *   key.without.value : true
     * }
     *

     *
     *

     *
     * @param errorContent
     *            The ACRA report data structure.
     * @return A JSONObject containing all fields from the report converted to
     *         JSON.
     * @throws ReportSenderException
     * @throws JSONReportException
     */
    public static JSONObject buildJSONReport(CrashReportData errorContent) throws JSONReportException {
        JSONObject jsonReport = new JSONObject();
        BufferedReader reader = null;
        for (ReportField key : errorContent.keySet()) {
            try {
                // Each ReportField can be identified as a substructure and not
                // a simple String value.
                if (key.containsKeyValuePairs()) {
                    JSONObject subObject = new JSONObject();
                    String strContent = errorContent.getProperty(key);
                    reader = new BufferedReader(new StringReader(strContent), 1024);
                    String line = null;
                    try {
                        while ((line = reader.readLine()) != null) {
                            addJSONFromProperty(subObject, line);
                        }
                    } catch (IOException e) {
                        ACRA.log.e(ACRA.LOG_TAG, "Error while converting " + key.name() + " to JSON.", e);
                    }
                    jsonReport.accumulate(key.name(), subObject);
                } else {
                    // This field is a simple String value, store it as it is
                    jsonReport.accumulate(key.name(), guessType(errorContent.getProperty(key)));
                }
            } catch (JSONException e) {
                throw new JSONReportException("Could not create JSON object for key " + key, e);
            } finally {
            	CollectorUtil.safeClose(reader);
            }
        }
        return jsonReport;
    }

    /**
     *

     * Given a String containing key=value pairs on each line, adds a detailed
     * JSON structure to an existing JSONObject, reusing intermediate subobjects
     * if available when keys are composed of a succession of subkeys delimited
     * by dots.
     *

     *
     *

     * For example, adding the string "metrics.xdpi=160.0" to an object
     * containing
     *
     *

     * {
     *   "metrics" : { "ydpi" : "160.0"},
     *   "width" : "320",
     *   "height" : "533"
     * }
     *

     *
     * results in
     *
     *

     * {
     *   "metrics" : { "ydpi" : "160.0", "xdpi" : "160.0"},
     *   "width" : "320",
     *   "height" : "533"
     * }
     *

     *
     *

     *
     * @param destination
     *            The JSONObject where the data must be inserted.
     * @param propertyString
     *            A string containing "some.key.name=Any value"
     * @throws JSONException
     */
    private static void addJSONFromProperty(JSONObject destination, String propertyString) throws JSONException {
        int equalsIndex = propertyString.indexOf('=');
        if (equalsIndex > 0) {
            JSONObject finalObject = destination;
            String currentKey = propertyString.substring(0, equalsIndex).trim();
            String currentValue = propertyString.substring(equalsIndex + 1).trim();
            Object value = guessType(currentValue);
            if(value instanceof String) {
                value = ((String) value).replaceAll("\\\\n","\n");
            }
            String[] splitKey = currentKey.split("\\.");
            if (splitKey.length > 1) {
                addJSONSubTree(finalObject, splitKey, value);
            } else {
                finalObject.accumulate(currentKey, value);
            }
        } else {
            destination.put(propertyString.trim(), true);
        }
    }

    private static Object guessType(String value) {
        if (value.equalsIgnoreCase("true"))
            return true;
        if (value.equalsIgnoreCase("false"))
            return false;

        if (value.matches("(?:^|\\s)([1-9](?:\\d*|(?:\\d{0,2})(?:,\\d{3})*)(?:\\.\\d*[1-9])?|0?\\.\\d*[1-9]|0)(?:\\s|$)")) {
            NumberFormat format = NumberFormat.getInstance(Locale.US);
            try {
                Number number = format.parse(value);
                return number;
            } catch (ParseException e) {
                // never mind
            }
        }
        return value;
    }

    /**
     * Deep insert a value inside a JSONObject, reusing existing subobjects when
     * available or creating them when necessary.
     *
     * @param destination
     *            The JSONObject which receives the additional subitem.
     * @param keys
     *            An array containing the path keys leading to where the value
     *            has to be inserted.
     * @param value
     *            The value to be inserted.
     * @throws JSONException
     */
    private static void addJSONSubTree(JSONObject destination, String[] keys, Object value) throws JSONException {
        for (int i = 0; i < keys.length; i++) {
            String subKey = keys[i];
            if (i < keys.length - 1) {
                JSONObject intermediate = null;
                if (destination.isNull(subKey)) {
                    intermediate = new JSONObject();
                    destination.accumulate(subKey, intermediate);
                } else {
                    Object target = destination.get(subKey);
                    if (target instanceof JSONObject) {
                        intermediate = destination.getJSONObject(subKey);
                    } else if (target instanceof JSONArray) {
                        // Unexpected JSONArray, see issue #186
                        JSONArray wildCard = destination.getJSONArray(subKey);
                        for (int j = 0; j < wildCard.length(); j++) {
                            intermediate = wildCard.optJSONObject(j);
                            if (intermediate != null) {
                                // Found the original JSONObject we were looking for
                                break;
                            }
                        }
                    }

                    if (intermediate == null) {
                        ACRA.log.e(ACRA.LOG_TAG, "Unknown json subtree type, see issue #186");
                        // We should never get here, but if we do, drop this value to still send the report
                        return;
                    }
                }
                destination = intermediate;
            } else {
                destination.accumulate(subKey, value);
            }
        }
    }

    public static class JSONReportException extends Exception {
        private static final long serialVersionUID = -694684023635442219L;

        public JSONReportException(String message, Throwable e) {
            super(message, e);
        }
    };
}


text:
<TITLE>Review for Me, Myself & Irene (2000)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Me, Myself & Irene (2000)

reviewed by
Mark R. Leeper

                        ME, MYSELF, & IRENE
                  A film review by Mark R. Leeper

               Capsule: The Farrelly Brothers, more
          tasteless and less manic than the Zucker
          Brothers, give us Jim Carrey as a Rhode Island
          State Trooper with a split personality.  His
          primary personality is a non-assertive nebbish,
          his other side is an aggressive action-man who
          is also a boorish jerk.  There is little time
          for a good story with all the puerile
          scatological jokes.  Rating: 4 (0 to 10), 0 (-4
          to +4)

     The American public was introduced to the subject of split
personality with the 1957 film THE THREE FACES OF EVE.  Two years
later Hitchcock used the concept for horror impact in PSYCHO.  Since
then the concept has frequently been used in comedy, but rarely
well.  Steve Martin may have come the closest to a good comedy about
multiple personality in ALL OF ME (though technically speaking that
was more about spirit possession).  With that possible exception the
concept has never been used effectively in comedy.  ME, MYSELF, &
IRENE is not an exception.

     Charlie Bailygates (played by Jim Carrey) is a gentle soul who
happens to be a Rhode Island State Trooper.  How he manages is
unclear because people just laugh at him and figuratively walk all
over him.  The whole town knows he is a soft touch and a nice guy.
And they rudely take advantage of his good nature.  Even after his
wife runs off with another man leaving him with three children he
still cannot express his sorrow and anger.  When it finally does
come out it is as a fully formed second personality, Hank.  But when
Charlie is asked to escort Irene (Renee Zellweger) to New York and
they runs afoul of some corrupt police, the extra personality comes
in handy.

     This film spreads itself thinly among three goals.  It wants to
be a chase film about police corruption, it wants to be a comedy
about split personality, and it wants to mix in as many crude jokes
as it can--the cruder the better.  The three tasks are really more
than it can handle well.  We find out various people who are
involved with the police corruption, but it is never explained what
it all about.  The schizophrenia plot is not very creative in its
ideas and certainly leaves room for a sequel with all new jokes
(Heaven help us).  The scatological humor could work well with
sufficient shock value, but even that is wearing thin.  It can spice
up a film that has enough else going for it, but by itself it does
not make the film worth seeing.  Less might very well be a little
more here.  Basically they need a plot that stands without the shock
jokes.  This one does not.

     Jim Carrey will never be in the Dustin Hoffman range of actors
in anything but paycheck, but here he has returned to the shock
humor that gave him his start.  He manages well as a physical
comedian but the gags are stale.  Renee Zellweger plays his
bewildered foil in the kind of role Terri Garr used to take so well.
She has already done better and more challenging work.  We have the
super-mellow Robert Forster who does not have a lot to do as Jim
Carrey's superior in the state troopers.  Almost directly opposite
is Chris Cooper, who is getting a lot of roles these days.  Where
Forster seem so imperturbable, Cooper always looks like he is
holding back a storm of emotion.  He is probably wishing he could
get more roles like OCTOBER SKY.  I know I am.

     This is standard summer fluff and probably not a film that will
win any new fans for the Farrelly brothers comedies.  I give it 4 on
the 0 to 10 scale and a 0 on the -4 to +4 scale.  (If you see it,
stay through the credits.)

                                        Mark R. Leeper
                                        mleeper@lucent.com
                                        Copyright 2000 Mark R. Leeper

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
QAD EE --- Periodic Costing
===========================

#####

### Using Periodic Costing

##### 1. Labor & Burden Rates

##### 2. PC Cost Adjustments

##### 3. Periodic Costing Calculation

##### 4. Periodic Costing Reporting

##### 5. Month End Closing


text:
require 'rails_helper'

RSpec.describe 'Application' do
  it 'protects pages from guest users' do
    visit dashboard_path

    expect(page).to have_content I18n.t('devise.failure.unauthenticated')
  end

  it 'redirects banned users to the banned page' do
    create :user, banned: true, uid: '123456'

    visit user_facebook_omniauth_authorize_path

    expect(current_path).to eq banned_path
    [itineraries_path, new_itinerary_path].each do |path|
      visit path
      expect(current_path).to eq banned_path
    end
  end

  context 'Locale' do
    context 'when user is passing an unknown locale param' do
      it 'fallbacks to en-US' do
        user = create :user, uid: '123456'

        visit user_facebook_omniauth_authorize_path
        visit itineraries_user_path(user, locale: 'XX-ZZ')

        expect(page).to have_content I18n.t('users.itineraries.title', locale: 'en-US')
      end
    end

    context 'when user is passing a compatible locale param' do
      it 'fallbacks to en-US' do
        user = create :user, uid: '123456'

        visit user_facebook_omniauth_authorize_path
        visit itineraries_user_path(user, locale: 'en-XX')

        expect(page).to have_content I18n.t('users.itineraries.title', locale: 'en-US')
      end
    end

    context 'when user is coming from facebook with a compatible locale' do
      it 'fallbacks to en-US ' do
        user = create :user, uid: '123456', locale: 'en-YY'

        visit user_facebook_omniauth_authorize_path
        visit itineraries_user_path(user)

        expect(page).to have_content I18n.t('users.itineraries.title', locale: 'en-US')
      end
    end

    context 'when user is using en-XX locale' do
      it 'fallbacks to en-US' do
        user = create :user, uid: '123456', locale: 'en-GB'

        visit user_facebook_omniauth_authorize_path
        visit itineraries_user_path(user, locale: 'en')

        expect(page).to have_content I18n.t('users.itineraries.title', locale: 'en-US')
      end
    end
  end
end


text:
Brian Luu

INFO 474

## MysteryChart API

To create MysteryChart, you must have a div called 'my-div', and a svg inside called 'my-svg'.

``` html
<div class="container" id="my-div">
	<svg id="my-svg">
	</svg>
</div>
```

In your JavaScript file you can then create MysteryChart with the following calls:

``` javascript
var myChart = MysteryChart();
var chartWrapper = d3.select('#my-div').datum(dataset).call(myChart);
```

You must pass in a dataset that must be an array of objects. One field of the object must be the label and another field must be the count. E.g. {label: 'Mike', count: 100}

### MysteryChart Methods

| Method | Description |
| ------ | ----------- |
| colors | Sets the chart's colors. Pass in a string with colors separated by a space. Can also be hexadecimal values. e.g. "red #FFFFFF blue" |
| size | Sets the chart's size. Pass in an integer value |
| holeWidth | Sets the chart's hole size. Pass in an integer value |
| legend | Set legend's status (visible or not). Pass in string "true" to show, "false" to hide |
| legendRectSize | Sets the legend's rectangle size to given value. Pass in an integer value. |
| legendSpacing | Sets the legend's spacing. Pass in an integer value. |


text:
#ifndef FGMETAFORMAT_HPP
#define FGMETAFORMAT_HPP

#include "FgSerial.hpp"
#include "FgFileSystem.hpp"

namespace Fg {

template<class T>
void
saveMessage(T const & val,String8 const & filename)
{
    saveRaw(toMessage(val),filename);
}
template<class T>
T
loadMessage(String8 const & filename)
{
    return fromMessage<T>(loadRaw(filename));
}
template<class T>
void
saveMessageExplicit(T const & val,String8 const & filename)
{
    saveRaw(toMessageExplicit(val),filename);
}
template<class T>
T
loadMessageExplicit(String8 const & filename)
{
    return fromMessageExplicit<T>(loadRaw(filename));
}

// DEPRECATED:

template<class Archive>     String fgArchiveString();
template<> inline           String fgArchiveString<boost::archive::text_iarchive>() {return "Text"; }
template<> inline           String fgArchiveString<boost::archive::xml_iarchive>() {return "XML"; }
template<> inline           String fgArchiveString<boost::archive::binary_iarchive>() {return "Binary"; }
template<> inline           String fgArchiveString<portable_binary_iarchive>() {return "PBin"; }

// Returns true unless throwOnFail==false and failure occured:
template<class Archive,class T>
bool
loadBsa(
    String8 const &     filename,
    T &                 val,
    bool                throwOnFail)
{
    // If client doesn't want exceptions and the file doesn't exist, avoid an internal exception
    // polluting the debug log:
    if (!throwOnFail && !pathExists(filename))
        return false;
    try
    {
        Ifstream        ifs(filename);
        Archive         ia(ifs);
        ia >> BOOST_SERIALIZATION_NVP(val);
    }
    catch(FgException &)
    {
        if (throwOnFail)
            throw;
        else
            return false;
    }
    catch(...)
    {
        if (throwOnFail)
            fgThrow("Error while deserializing "+String(typeid(T).name())+" from "+fgArchiveString<Archive>()+" file",filename);
        else
            return false;
    }
    return true;
}

template<class T>
inline bool
loadBsaText(String8 const & filename,T & val,bool throwOnFail=true)
{return loadBsa<boost::archive::text_iarchive>(filename,val,throwOnFail); }

template<class T>
inline bool
loadBsaXml(String8 const & filename,T & val,bool throwOnFail=true)
{return loadBsa<boost::archive::xml_iarchive>(filename,val,throwOnFail); }

template<class T>
inline bool
loadBsaBin(String8 const & filename,T & val,bool throwOnFail=true)
{return loadBsa<boost::archive::binary_iarchive>(filename,val,throwOnFail); }

template<class T>
inline bool
loadBsaPBin(String8 const & filename,T & val,bool throwOnFail=true)
{return loadBsa<portable_binary_iarchive>(filename,val,throwOnFail); }

template<class T>
T
loadBsaXml(String8 const & filename)
{
    T           ret;
    loadBsaXml(filename,ret,true);
    return ret;
}

template<class T>
T
loadBsaBin(String8 const & fname)
{
    T       ret;
    loadBsaBin(fname,ret,true);
    return ret;
}

template<class T>
T
loadBsaPBin(String8 const & fname)
{
    T       ret;
    loadBsaPBin(fname,ret,true);
    return ret;
}

template<class Archive,class T>
bool
saveBsa(
    String8 const &     filename,
    T const &           val,
    bool                throwOnFail)
{
    try
    {
        Ofstream        ofs(filename);
        Archive         oa(ofs);
        oa << BOOST_SERIALIZATION_NVP(val);
    }
    catch(FgException & e)
    {
        if (throwOnFail)
            throw;
        fgout << fgnl << "ERROR (FG exception): " << e.tr_message();
        return false;
    }
    catch(std::exception & e)
    {
        if (throwOnFail)
            throw;
        fgout << fgnl << "ERROR (std::exception): " << e.what();
        return false;
    }
    catch(...)
    {
        if (throwOnFail)
            fgThrow("Error while serializing to file",filename);
        fgout << fgnl << "ERROR (unknown exception)";
        return false;
    }
    return true;
}

template<class T>
inline bool
saveBsaText(String8 const & filename,T const & val,bool throwOnFail=true)
{return saveBsa<boost::archive::text_oarchive>(filename,val,throwOnFail); }

template<class T>
inline bool
saveBsaXml(String8 const & filename,T const & val,bool throwOnFail=true)
{return saveBsa<boost::archive::xml_oarchive>(filename,val,throwOnFail); }

template<class T>
inline bool
saveBsaBin(String8 const & filename,T const & val,bool throwOnFail=true)
{return saveBsa<boost::archive::binary_oarchive>(filename,val,throwOnFail); }

template<class T>
inline bool
saveBsaPBin(String8 const & filename,T const & val,bool throwOnFail=true)
{return saveBsa<portable_binary_oarchive>(filename,val,throwOnFail); }

}

#endif


text:
package com.android.volley.toolbox;

import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Response;
import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.io.UnsupportedEncodingException;

/**
 * A request for retrieving a {@link JSONArray} response body at a given URL.
 */
public class JsonArrayRequest extends JsonRequest<JSONArray> {

    /**
     * Creates a new request.
     *
     * @param method        the HTTP method to use
     * @param url           URL to fetch the JSON from
     * @param requestBody   A {@link String} to post with the request. Null is allowed and
     *                      indicates no parameters will be posted along with request.
     * @param listener      Listener to receive the JSON response
     * @param errorListener Error listener, or null to ignore errors.
     */
    public JsonArrayRequest(int method, String url, String requestBody,
                            Listener<JSONArray> listener, ErrorListener errorListener) {
        super(method, url, requestBody, listener,
                errorListener);
    }

    /**
     * Creates a new request.
     *
     * @param url           URL to fetch the JSON from
     * @param listener      Listener to receive the JSON response
     * @param errorListener Error listener, or null to ignore errors.
     */
    public JsonArrayRequest(String url, Listener<JSONArray> listener, ErrorListener errorListener) {
        super(Method.GET, url, null, listener, errorListener);
    }

    /**
     * Creates a new request.
     *
     * @param method        the HTTP method to use
     * @param url           URL to fetch the JSON from
     * @param listener      Listener to receive the JSON response
     * @param errorListener Error listener, or null to ignore errors.
     */
    public JsonArrayRequest(int method, String url, Listener<JSONArray> listener, ErrorListener errorListener) {
        super(method, url, null, listener, errorListener);
    }

    /**
     * Creates a new request.
     *
     * @param method        the HTTP method to use
     * @param url           URL to fetch the JSON from
     * @param jsonRequest   A {@link JSONArray} to post with the request. Null is allowed and
     *                      indicates no parameters will be posted along with request.
     * @param listener      Listener to receive the JSON response
     * @param errorListener Error listener, or null to ignore errors.
     */
    public JsonArrayRequest(int method, String url, JSONArray jsonRequest,
                            Listener<JSONArray> listener, ErrorListener errorListener) {
        super(method, url, (jsonRequest == null) ? null : jsonRequest.toString(), listener,
                errorListener);
    }

    /**
     * Creates a new request.
     *
     * @param method        the HTTP method to use
     * @param url           URL to fetch the JSON from
     * @param jsonRequest   A {@link JSONObject} to post with the request. Null is allowed and
     *                      indicates no parameters will be posted along with request.
     * @param listener      Listener to receive the JSON response
     * @param errorListener Error listener, or null to ignore errors.
     */
    public JsonArrayRequest(int method, String url, JSONObject jsonRequest,
                            Listener<JSONArray> listener, ErrorListener errorListener) {
        super(method, url, (jsonRequest == null) ? null : jsonRequest.toString(), listener,
                errorListener);
    }

    /**
     * Constructor which defaults to GET if jsonRequest is
     * null, POST otherwise.
     *
     * @see #JsonArrayRequest(int, String, JSONArray, Listener, ErrorListener)
     */
    public JsonArrayRequest(String url, JSONArray jsonRequest, Listener<JSONArray> listener,
                            ErrorListener errorListener) {
        this(jsonRequest == null ? Method.GET : Method.POST, url, jsonRequest,
                listener, errorListener);
    }

    /**
     * Constructor which defaults to GET if jsonRequest is
     * null, POST otherwise.
     *
     * @see #JsonArrayRequest(int, String, JSONObject, Listener, ErrorListener)
     */
    public JsonArrayRequest(String url, JSONObject jsonRequest, Listener<JSONArray> listener,
                            ErrorListener errorListener) {
        this(jsonRequest == null ? Method.GET : Method.POST, url, jsonRequest,
                listener, errorListener);
    }

    @Override
    protected Response<JSONArray> parseNetworkResponse(NetworkResponse response) {
        try {
            String jsonString = new String(response.data,
                    HttpHeaderParser.parseCharset(response.headers, PROTOCOL_CHARSET));
            return Response.success(new JSONArray(jsonString),
                    HttpHeaderParser.parseCacheHeaders(response));
        } catch (UnsupportedEncodingException e) {
            return Response.error(new ParseError(e));
        } catch (JSONException je) {
            return Response.error(new ParseError(je));
        }
    }
}


text:
package org.codehaus.enunciate.samples.petclinic.schema;

/**
 * @author Ryan Heaton
 */
public abstract class Hobby {
}


text:
<?php

require_once(dirname(__FILE__).'/../lib/BasesfGuardForgotPasswordActions.class.php');

/**
 *
 * @package    symfony
 * @subpackage plugin
 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
 * @version    SVN: $Id: actions.class.php 7634 2008-02-27 18:01:40Z fabien $
 */
class sfGuardForgotPasswordComponents extends BasesfGuardForgotPasswordComponents
{
}


text:
var request = require('./base.js').request;
var clone = require('./base.js').clone;

var opts = {
	base: 'https://apiv1.teleapi.net',
	controller: 'voicemail',
	endpoint: ''
};

function create_inbox(name, inbox_number, pin, transcribe, callback) {
	callback = callback || function () {};
	var o = clone(opts);
	o.endpoint = 'inbox/create';
	var data = {
		name: name,
		inbox_number: inbox_number,
		pin: pin,
		transcribe: transcribe
	};
	request(o, data, callback);
}

function get_inbox(inbox_id, callback) {
	callback = callback || function () {};
	var o = clone(opts);
	o.endpoint = 'inbox/get';
	var data = { inbox_id: inbox_id };
	request(o, data, callback);
}

function list_inboxes(callback) {
	callback = callback || function () {};
	var o = clone(opts);
	o.endpoint = 'inbox/list';
	request(o, {}, callback);
}

function update_inbox(inbox_id, name, inbox_number, pin, transcribe, callback) {
	callback = callback || function () {};
	var o = clone(opts);
	o.endpoint = 'inbox/update';
	var data = {
		inbox_id: inbox_id,
		name: name,
		inbox_number: inbox_number,
		pin: pin,
		transcribe: transcribe
	};
	request(o, data, callback);
}

function remove_inbox(inbox_id, callback) {
	callback = callback || function () {};
	var o = clone(opts);
	o.endpoint = 'inbox/remove';
	var data = { inbox_id: inbox_id };
	request(o, data, callback);
}

module.exports = {
	create_inbox: create_inbox,
	get_inbox: get_inbox,
	list_inboxes: list_inboxes,
	update_inbox: update_inbox,
	remove_inbox: remove_inbox
};


text:
<?php namespace janareit\laravel5generators\Console;

use Illuminate\Console\Command;
use janareit\laravel5generators\ConsoleGenerator;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;

class ConsoleCommand extends Command
{

    /**
     * The name of command.
     *
     * @var string
     */
    protected $name = 'generate:console';

    /**
     * The description of command.
     *
     * @var string
     */
    protected $description = 'Generate a new console command.';

    /**
     * Execute the command.
     *
     * @return void
     */
    public function fire()
    {
        $generator = new ConsoleGenerator([
            'name' => $this->argument('name'),
            'force' => $this->option('force'),
            'command' => $this->option('command'),
            'description' => $this->option('description'),
        ]);

        $generator->run();

        $this->info("Console created successfully.");
    }

    /**
     * The array of command arguments.
     *
     * @return array
     */
    public function getArguments()
    {
        return [
            ['name', InputArgument::REQUIRED, 'The name of class being generated.', null],
        ];
    }

    /**
     * The array of command options.
     *
     * @return array
     */
    public function getOptions()
    {
        return [
            ['command', 'c', InputOption::VALUE_OPTIONAL, 'The name of command being used.', null],
            ['description', 'd', InputOption::VALUE_OPTIONAL, 'The description of command being used.', null],
            ['force', 'f', InputOption::VALUE_NONE, 'Force the creation if file already exists.', null],
        ];
    }
}