text:
<?xml version="1.0" encoding="utf-8" ?>
<values xmlns="http://www.tei-c.org/ns/1.0">
	<value><alpha>seven</alpha></value>
	<value><alpha>Ten</alpha></value>
	<value><alpha>five</alpha></value>
	<value><number>23</number></value>
	<value><number>94</number></value>
	<value><alpha>five</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>five</alpha></value>
	<value><number>0.2</number></value>
	<value><number>0.4</number></value>
	<value><number>350</number></value>
	<value><number>3</number></value>
	<value><alpha>Seven</alpha></value>
	<value><number>3</number></value>
	<value><number>4</number></value>
	<value><number>41</number></value>
	<value><number>61</number></value>
	<value><number>94</number></value>
	<value><number>8</number></value>
	<value><number>94</number></value>
	<value><number>30</number></value>
	<value><alpha>five</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><number>1</number></value>
	<value><number>3</number></value>
	<value><alpha>seven</alpha></value>
	<value><number>0.2</number></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>five</alpha></value>
	<value><number>94</number></value>
	<value><alpha>five</alpha></value>
	<value><alpha>five</alpha></value>
	<value><alpha>four</alpha></value>
	<value><alpha>five</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>six</alpha></value>
	<value><alpha>two</alpha></value>
	<value><alpha>five</alpha></value>
	<value><time>2001 August</time></value>
	<value><alpha>two</alpha></value>
	<value><number>140</number></value>
	<value><number>10</number></value>
	<value><number>10</number></value>
	<value><alpha>five</alpha></value>
	<value><number>33</number></value>
	<value><number>41</number></value>
	<value><number>61</number></value>
	<value><number>94</number></value>
	<value><alpha>one</alpha></value>
	<value><alpha>two</alpha></value>
	<value><alpha>four</alpha></value>
	<value><number>20</number></value>
	<value><alpha>two</alpha></value>
	<value><number>0.2</number></value>
	<value><number>0.9</number></value>
	<value><number>1</number></value>
	<value><number>45</number></value>
	<value><number>0.2</number></value>
	<value><alpha>two</alpha></value>
	<value>∼ <number>45</number></value>
	<value><alpha>six</alpha></value>
	<value><number>45</number></value>
	<value><number>60</number></value>
	<value><number>90</number></value>
	<value><alpha>five</alpha></value>
	<value><alpha>several</alpha></value>
	<value><number>7</number></value>
	<value><alpha>seven</alpha></value>
	<value><number>6</number></value>
	<value><alpha>five</alpha></value>
	<value><number>0</number></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><number>0</number></value>
	<value><alpha>seven</alpha></value>
	<value><number>24.6</number></value>
	<value><number>14.4</number></value>
	<value><number>8.98</number></value>
	<value><number>2.10</number> ×<base>10</base> <pow>−5</pow></value>
	<value><number>2.2</number></value>
	<value><number>2.0</number></value>
	<value><number>1.9</number></value>
	<value><number>1.5</number></value>
	<value><number>1.1</number></value>
	<value><alpha>Seven</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>five</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>five</alpha></value>
	<value><number>0.2</number></value>
	<value><alpha>five</alpha></value>
	<value><number>40</number></value>
	<value><number>3</number></value>
	<value><number>23</number></value>
	<value><number>1</number></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>five</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>five</alpha></value>
	<value><number>0.3</number></value>
	<value><number>0.5</number></value>
	<value><number>10</number></value>
	<value><alpha>two</alpha></value>
	<value><alpha>three</alpha></value>
	<value><number>0.2</number></value>
	<value><number>0.4</number></value>
	<value><number>0.5</number></value>
	<value><number>15</number></value>
	<value><number>22</number></value>
	<value><number>22</number></value>
	<value><number>20</number></value>
	<value><number>15</number></value>
	<value><number>0.2</number></value>
	<value><alpha>two</alpha></value>
	<value><number>10</number></value>
	<value><number>10</number></value>
	<value><number>350</number></value>
	<value><number>6</number></value>
	<value><number>5</number></value>
	<value><number>10</number></value>
	<value><alpha>several</alpha></value>
	<value><alpha>three</alpha></value>
	<value><alpha>two</alpha></value>
	<value><number>0.6</number></value>
	<value><number>3</number></value>
	<value><alpha>few</alpha></value>
	<value><number>350</number></value>
	<value><number>5</number></value>
	<value><number>0.5</number></value>
	<value><alpha>five</alpha></value>
	<value><number>94</number></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>four</alpha></value>
	<value><alpha>five</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><number>3.2</number></value>
	<value><number>10</number></value>
	<value><number>0.953</number></value>
	<value><alpha>seven</alpha></value>
	<value><number>350</number></value>
	<value><number>0.941</number></value>
	<value><number>6</number></value>
	<value><number>3</number></value>
	<value><number>7.5</number></value>
	<value><number>350</number></value>
	<value><time>2001 July</time></value>
	<value><time>October</time></value>
	<value><number>40</number></value>
	<value><alpha>seven</alpha></value>
	<value><number>5</number></value>
	<value><number>5</number></value>
	<value><number>3</number></value>
	<value><number>50</number></value>
	<value><number>180</number></value>
	<value><number>146</number></value>
	<value><time>1990 April 28</time></value>
	<value><time>September 20</time></value>
	<value><alpha>six</alpha></value>
	<value><number>12</number></value>
	<value><number>25</number></value>
	<value><number>60</number></value>
	<value><number>100</number></value>
	<value><number>140</number></value>
	<value><number>240</number></value>
	<value><number>25</number></value>
	<value><number>12</number></value>
	<value><number>25</number></value>
	<value><number>140</number></value>
	<value><number>240</number></value>
	<value><number>60</number></value>
	<value><number>100</number></value>
	<value><number>15</number></value>
	<value><number>12</number></value>
	<value><number>25</number></value>
	<value><number>60</number></value>
	<value><number>100</number></value>
	<value><number>12</number></value>
	<value><number>140</number></value>
	<value><number>240</number></value>
	<value><number>146</number></value>
	<value><number>1.5</number></value>
	<value><number>10</number></value>
	<value><alpha>two</alpha></value>
	<value><alpha>two</alpha></value>
	<value><number>60</number></value>
	<value><number>100</number></value>
	<value><number>12</number></value>
	<value><number>60</number></value>
	<value><number>100</number></value>
	<value><number>12</number></value>
	<value><number>140</number></value>
	<value><number>240</number></value>
	<value><number>10</number></value>
	<value><number>3.2</number></value>
	<value><number>0.953</number></value>
	<value><alpha>four</alpha></value>
	<value><number>0.5</number></value>
	<value><number>3.2</number></value>
	<value><number>350</number></value>
	<value><number>0.941</number></value>
	<value><number>3.2</number></value>
	<value><alpha>several</alpha></value>
	<value><number>350</number></value>
	<value><number>3.3</number></value>
	<value><number>1.2</number></value>
	<value><number>2.25</number></value>
	<value><number>2.8</number></value>
	<value><number>5</number></value>
	<value><number>3.2</number></value>
	<value><number>1</number></value>
	<value><number>3.2</number></value>
	<value><number>4.9</number></value>
	<value><number>3</number></value>
	<value><number>7.3</number></value>
	<value><number>9.1</number></value>
	<value><number>13.1</number></value>
	<value><alpha>few</alpha></value>
	<value><number>10</number></value>
	<value><number>40</number></value>
	<value><number>5</number></value>
	<value><alpha>two</alpha></value>
	<value><number>1</number></value>
	<value><number>3.6</number></value>
	<value><number>13</number></value>
	<value><alpha>seven</alpha></value>
	<value><number>−28</number></value>
	<value><number>0</number></value>
	<value><alpha>two</alpha></value>
	<value><alpha>five</alpha></value>
	<value><number>−17</number></value>
	<value><alpha>seven</alpha></value>
	<value><number>30</number></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><number>1</number></value>
	<value><number>7</number></value>
	<value><alpha>Two</alpha></value>
	<value><alpha>ten</alpha></value>
	<value><number>10</number></value>
	<value><alpha>ten</alpha></value>
	<value><number>1.2</number></value>
	<value><base>100</base></value>
	<value><alpha>two</alpha></value>
	<value><number>3</number></value>
	<value><number>0</number></value>
	<value><number>2.5</number></value>
	<value><number>1</number></value>
	<value><alpha>seven</alpha></value>
	<value><number>3</number></value>
	<value><number>5</number></value>
	<value><number>1.3</number></value>
	<value><number>3</number></value>
	<value><number>4</number></value>
	<value><alpha>seven</alpha></value>
	<value><number>0</number></value>
	<value><number>1</number></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>half</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><number>1</number></value>
	<value><alpha>one</alpha></value>
	<value><number>24</number></value>
	<value><number>70</number></value>
	<value><number>128</number></value>
	<value><number>207</number></value>
	<value><number>94</number></value>
	<value><number>1</number></value>
	<value><number>300</number></value>
	<value><number>24</number></value>
	<value><number>84</number></value>
	<value><number>10</number></value>
	<value><number>20</number></value>
	<value><number>90</number></value>
	<value><time>1985</time></value>
	<value><number>6</number></value>
	<value><alpha>several</alpha></value>
	<value><number>90</number></value>
	<value><number>8</number></value>
	<value><number>20</number></value>
	<value>∼<number>0.2</number></value>
	<value><number>1</number></value>
	<value><alpha>two</alpha></value>
	<value><number>−30</number></value>
	<value><number>4</number></value>
	<value><alpha>seven</alpha></value>
	<value><number>10</number></value>
	<value><number>90</number></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><number>3.55</number></value>
	<value><time>1966</time></value>
	<value><number>30</number></value>
	<value><number>30</number></value>
	<value><pow>1990</pow></value>
	<value><number>30</number></value>
	<value><number>94</number></value>
	<value><alpha>seven</alpha></value>
	<value><number>8</number></value>
	<value><number>20</number></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>Five</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>five</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><number>3.5</number></value>
	<value><number>1.5</number></value>
	<value><number>3</number></value>
	<value><number>0.5</number></value>
	<value><number>0.7</number></value>
	<value><number>0.2</number></value>
	<value><number>0.1</number></value>
	<value><number>1</number></value>
	<value><number>1</number></value>
	<value><number>1</number></value>
	<value><number>7</number></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><number>0.2</number></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><number>1</number></value>
	<value><number>3</number></value>
	<value><number>19.6</number></value>
	<value><number>12.2</number></value>
	<value><number>1.4</number></value>
	<value><number>45</number></value>
	<value><number>9</number></value>
	<value><number>512</number></value>
	<value><number>1.5</number></value>
	<value><number>3.7</number></value>
	<value><number>1.4</number></value>
	<value><alpha>three</alpha></value>
	<value><number>1.5</number></value>
	<value><number>3.7</number></value>
	<value><number>0.6</number></value>
	<value><number>15</number></value>
	<value><time>1965</time></value>
	<value><time>1995</time></value>
	<value><number>0.019</number></value>
	<value><number>33</number></value>
	<value><number>927</number></value>
	<value><time>1962</time></value>
	<value><time>1977</time></value>
	<value><number>0.167</number></value>
	<value><number>0.015</number></value>
	<value><number>8</number></value>
	<value><time>1968</time></value>
	<value><time>1984</time></value>
	<value><number>30</number></value>
	<value><time>2002 January</time></value>
	<value><base>0.10</base></value>
	<value><number>33</number></value>
	<value><time>1987</time>7</value>
	<value><number>0.32</number></value>
	<value><number>408</number></value>
	<value><time>1967</time></value>
	<value><time>1986</time></value>
	<value><number>0.33</number></value>
	<value><number>10</number></value>
	<value><number>5</number></value>
	<value><number>15</number></value>
	<value><number>90</number></value>
	<value><number>10</number></value>
	<value><number>15</number></value>
	<value><number>10</number></value>
	<value><number>1.8</number></value>
	<value><number>2.6</number></value>
	<value><number>90</number></value>
	<value><number>1.4</number></value>
	<value><time>1985</time></value>
	<value><time>1986 August</time></value>
	<value><number>43</number></value>
	<value><time>2008 January</time></value>
	<value><number>4</number></value>
	<value><number>1</number></value>
	<value><alpha>seven</alpha></value>
	<value><number>−0.53</number></value>
	<value><number>−0.167</number></value>
	<value><number>−0.22</number></value>
	<value><alpha>two</alpha></value>
	<value><number>1.20</number></value>
	<value><number>2.13</number></value>
	<value><number>26</number></value>
	<value><number>7</number></value>
	<value><number>1.5</number></value>
	<value><number>5</number></value>
	<value><number>28</number></value>
	<value><number>83</number></value>
	<value><number>1.4</number></value>
	<value><number>93</number></value>
	<value><number>-0.73</number></value>
	<value><number>22.29</number></value>
	<value><number>32</number></value>
	<value><number>33</number></value>
	<value><alpha>five</alpha></value>
	<value><number>86</number></value>
	<value><number>300</number></value>
	<value><number>353</number></value>
	<value><number>545</number></value>
	<value><number>600</number></value>
	<value><number>353</number></value>
	<value><number>666</number></value>
	<value><number>12</number></value>
	<value><number>20</number></value>
	<value><number>23</number></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>five</alpha></value>
	<value><number>4.15</number></value>
	<value><number>40</number></value>
	<value><number>50</number></value>
	<value><number>5</number></value>
	<value><alpha>two</alpha></value>
	<value><number>3</number></value>
	<value><alpha>few</alpha></value>
	<value><alpha>two</alpha></value>
	<value><alpha>two</alpha></value>
	<value><number>50</number></value>
	<value><number>30</number></value>
	<value><number>40</number></value>
	<value><number>22.29</number></value>
	<value><number>89</number></value>
	<value><number>94</number></value>
	<value><number>33</number></value>
	<value><number>2.89</number></value>
	<value><number>100</number></value>
	<value><alpha>two</alpha></value>
	<value><number>230</number></value>
	<value><number>10</number></value>
	<value><number>22.29</number></value>
	<value><number>33</number></value>
	<value><alpha>three</alpha></value>
	<value><number>14.5</number></value>
	<value><number>3.2</number></value>
	<value><number>90</number></value>
	<value><number>93</number></value>
	<value><number>16.6</number></value>
	<value><number>0.7</number></value>
	<value><number>10</number></value>
	<value><number>148.8</number></value>
	<value><number>0.2</number></value>
	<value><number>93</number></value>
	<value><number>148.5</number></value>
	<value><number>24.1</number></value>
	<value><number>0.2</number></value>
	<value><number>1.8</number></value>
	<value><number>-21</number></value>
	<value><alpha>few hundred</alpha></value>
	<value><number>5</number></value>
	<value><number>9</number></value>
	<value><number>15</number></value>
	<value><number>28</number></value>
	<value><number>67</number></value>
	<value><number>23</number></value>
	<value><number>33</number></value>
	<value><number>41</number></value>
	<value><number>61</number></value>
	<value><number>84</number></value>
	<value><number>0.9</number></value>
	<value><base>100</base></value>
	<value><number>22.29</number></value>
	<value><number>2.54</number></value>
	<value><number>10</number></value>
	<value><number>1</number></value>
	<value><number>1.4</number></value>
	<value><number>10.6</number></value>
	<value><number>5</number></value>
	<value><number>10</number></value>
	<value><number>4</number></value>
	<value><number>17</number></value>
	<value><number>43</number></value>
	<value><number>90</number></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>five</alpha></value>
	<value><number>1</number></value>
	<value><number>0.2</number></value>
	<value><number>0.4</number></value>
	<value><alpha>ten</alpha></value>
	<value><number>3</number></value>
	<value><time>2010</time></value>
	<value><alpha>seven</alpha></value>
	<value><number>3</number></value>
	<value><number>7</number></value>
	<value><number>5</number></value>
	<value><alpha>seven</alpha></value>
	<value><number>30</number></value>
	<value><alpha>Seven</alpha></value>
	<value><number>5</number></value>
	<value><alpha>five</alpha></value>
	<value><number>1</number></value>
	<value><number>3</number></value>
	<value><alpha>four</alpha></value>
	<value><number>1</number></value>
	<value><alpha>Seven</alpha></value>
	<value><alpha>seven</alpha></value>
	<value><alpha>several</alpha></value>
	<value><alpha>two</alpha></value>
	<value><alpha>two</alpha></value>
	<value><number>140</number></value>
	<value><number>1.3</number></value>
	<value><number>100</number></value>
	<value><number>0</number></value>
	<value><number>24</number></value>
	<value><time>1970</time></value>
	<value><time>1980</time></value>
	<value><time>1990</time></value>
	<value><time>1966</time></value>
	<value><number>3.5</number></value>
	<value><number>30</number></value>
	<value><time>1980</time></value>
	<value><time>1990</time></value>
	<value><number>93</number></value>
	<value><number>60.8</number></value>
	<value><number>19.3</number></value>
	<value><number>95.8</number></value>
	<value><number>5.4</number></value>
	<value><number>7.2</number></value>
	<value><alpha>five</alpha></value>
	<value><number>512</number></value>
	<value><number>13</number></value>
	<value><number>0</number></value>
	<value><number>0</number></value>
	<value><number>1</number></value>
	<value><number>39</number></value>
	<value><alpha>two</alpha></value>
	<value><number>1.5</number></value>
	<value><number>5.2</number></value>
	<value><number>9.5</number></value>
	<value><number>29</number></value>
	<value><number>200</number></value>
	<value><number>3</number></value>
	<value><number>191</number></value>
	<value><number>5</number></value>
	<value><number>186</number></value>
	<value><number>4</number></value>
	<value><number>174</number></value>
	<value><number>6</number></value>
	<value><number>7.153</number>× <base>10</base> <pow>−10</pow></value>
	<value><number>1.5</number></value>
	<value><number>2.2</number></value>
	<value><number>2.0</number></value>
	<value><number>1.9</number></value>
	<value><number>1.5</number></value>
	<value><number>1.1</number></value>
	<value><number>3.2</number></value>
	<value><number>350</number></value>
	<value><number>2.482</number> × <base>10</base> −<pow>10</pow></value>
	<value><number>19.0</number></value>
	<value><number>2.2</number></value>
	<value><number>2.0</number></value>
	<value><number>1.9</number></value>
	<value><number>1.5</number></value>
	<value><number>1.1</number></value>
	<value><number>96</number></value>
	<value><number>96</number></value>
	<value><number>107</number></value>
	<value><number>86</number></value>
	<value><number>116</number></value>
	<value><number>90</number></value>
	<value><number>1.006</number> × <base>10</base> −<pow>10</pow></value>
	<value><number>29.0</number></value>
	<value><number>2.2</number></value>
	<value><number>2.0</number></value>
	<value><number>1.9</number></value>
	<value><number>1.5</number></value>
	<value><number>1.1</number></value>
	<value><number>40</number></value>
	<value><number>40</number></value>
	<value><number>40</number></value>
	<value><number>1</number></value>
	<value><number>1</number></value>
</values>


text:
class PrintWorker
	@queue = :print

	def self.perform str
		puts "Worker message :" + str
	end
end

redpajama_set_name: RedPajamaGithub


text:
class AddLocationToProfiles < ActiveRecord::Migration
  def self.up
    add_column :profiles, :location, :string
    add_column :profiles, :lat, :decimal, :precision => 15, :scale => 10
    add_column :profiles, :lng, :decimal, :precision => 15, :scale => 10
    add_index  :profiles, [:lat, :lng]
  end

  def self.down
    remove_index  :profiles, [:lat, :lng]
    remove_column :profiles, :location
    remove_column :profiles, :lat
    remove_column :profiles, :lng
  end
end


text:
package org.traccar.protocol;

import org.jboss.netty.bootstrap.ConnectionlessBootstrap;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder;
import org.traccar.BaseProtocol;
import org.traccar.TrackerServer;
import org.traccar.model.Command;

import java.nio.ByteOrder;
import java.util.List;

public class CastelProtocol extends BaseProtocol {

    public CastelProtocol() {
        super("castel");
        setSupportedDataCommands(
                Command.TYPE_ENGINE_STOP,
                Command.TYPE_ENGINE_RESUME);
    }

    @Override
    public void initTrackerServers(List<TrackerServer> serverList) {
        TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
            @Override
            protected void addSpecificHandlers(ChannelPipeline pipeline) {
                pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 2, 2, -4, 0));
                pipeline.addLast("objectEncoder", new CastelProtocolEncoder());
                pipeline.addLast("objectDecoder", new CastelProtocolDecoder(CastelProtocol.this));
            }
        };
        server.setEndianness(ByteOrder.LITTLE_ENDIAN);
        serverList.add(server);

        server = new TrackerServer(new ConnectionlessBootstrap(), getName()) {
            @Override
            protected void addSpecificHandlers(ChannelPipeline pipeline) {
                pipeline.addLast("objectEncoder", new CastelProtocolEncoder());
                pipeline.addLast("objectDecoder", new CastelProtocolDecoder(CastelProtocol.this));
            }
        };
        server.setEndianness(ByteOrder.LITTLE_ENDIAN);
        serverList.add(server);
    }

}


text:
package tsukuba.emp.mirrorgl.util;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.ImageFormat;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.graphics.SurfaceTexture;
import android.hardware.Camera;
import android.media.ExifInterface;

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import tsukuba.emp.mirrorgl.SpaceEffectRenderer;

import static tsukuba.emp.mirrorgl.util.PictureProcessor.*;

public class CameraHolder implements Camera.PictureCallback {
    private Camera mCamera;
    private SpaceEffectRenderer renderer;

    private boolean safeToTakePicture = false;
    private PictureProcessor processorThread;

    private Rect faceRect = null;

    public CameraHolder(SpaceEffectRenderer renderer) {
        this.renderer = renderer;
        processorThread = new PictureProcessor();
        processorThread.start();
    }

    public void close() {
        mCamera.stopPreview();
        mCamera = null;
    }

    public void initialize(SurfaceTexture surfaceTexture) {
        int cameras = Camera.getNumberOfCameras();
        int frontFacingCameraId;
        for (frontFacingCameraId = 0; frontFacingCameraId < cameras; frontFacingCameraId++)  {
            Camera.CameraInfo info = new Camera.CameraInfo();
            Camera.getCameraInfo(frontFacingCameraId, info);
            if (info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) {
                break;
            }
        }

        mCamera = Camera.open(frontFacingCameraId);
        try {
            mCamera.setPreviewTexture(surfaceTexture);
        } catch ( IOException ignored) {
        }
    }

    public void surfaceChanged() {
        try {
            mCamera.startPreview();
            safeToTakePicture = true;
            mCamera.startFaceDetection();
            mCamera.setFaceDetectionListener(renderer);
        } catch (Exception e) {

        }
    }

    public void setParameters(SurfaceTexture surfaceTexture, int width, int height) {
        if (mCamera == null) {
            initialize(surfaceTexture);
        }
        Camera.Parameters param = mCamera.getParameters();
        List<Camera.Size> psize = param.getSupportedPreviewSizes();
        if ( psize.size() > 0 ) {
            int i;
            for ( i = 0; i < psize.size(); i++ ) {
                if ( psize.get(i).width < width || psize.get(i).height < height )
                    break;
            }
            if ( i > 0 )
                i--;
            param.setPreviewSize(psize.get(i).width, psize.get(i).height);
        }

        if (width < height)
        {
            param.set("orientation", "portrait");
            param.set("rotation", 90);
        }

        mCamera.setParameters(param);
    }

    @Override
    public void onPictureTaken(byte[] data, Camera camera) {
        camera.startPreview();

        processorThread.setNext(new PictureData(data, faceRect));

        safeToTakePicture = true;
        camera.startFaceDetection();
        camera.setFaceDetectionListener(renderer);
    }

    public void tryTakePicture(Rect faceRect) {
        if (safeToTakePicture) {
            safeToTakePicture = false;
            this.faceRect = faceRect;
            mCamera.takePicture(null, null, this);
        }
    }
}


text:
<component name="libraryTable">
  <library name="permission-annotation.permission-annotation">
    <CLASSES>
      <root url="jar://$PROJECT_DIR$/permission-annotation/build/libs/permission-annotation.jar!/" />
    </CLASSES>
    <JAVADOC />
    <SOURCES />
  </library>
</component>


text:
'use strict';

describe('ExperimentProgressDirective', function () {

    var el, scope, form, template;
    beforeEach(module('wasabi.directives'));
    beforeEach(inject(function($rootScope, $compile){
        el = angular.element(
            '<div experiment-progress progress-value-model="experiment.progress" progress-days-left="{{experiment.progressDaysLeft}}" class="exprHead"><canvas width="70" height="70"></canvas></div>'
        );

        scope = $rootScope.$new();
        scope.experiment = {
            'progress': 3,
            'progressDaysLeft': 15
        };
        template = $compile(el)(scope);
        scope.$digest();
        form = scope.myForm;
    }));

    it('should exist', function () {
        expect(template.find('canvas').length).to.eql(1);
    });

    it('should handle value change', function () {
        scope.experiment.progress = 6;
        scope.$digest();

        expect(template.find('canvas').length).to.eql(1);
    });
});


text:
<?php
return array (
  'Click, to finish this task' => 'Klicke, um die Aufgabe zu beenden.',
  'This task is already done' => 'Diese Aufgabe ist bereits abgeschlossen',
  'This task is already done. Click to reopen.' => 'Diese Aufgabe ist bereits abgeschlossen. Klicke um sie wieder zu aktivieren.',
  'You\'re not assigned to this task' => 'Diese Aufgabe ist dir nicht zugeordnet',
);


text:
package org.hhorton.queries.draft;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@SuppressWarnings("SpellCheckingInspection")
@Repository
public class UndraftDefense {
    private JdbcTemplate jdbcTemplate;
    public UndraftDefense(JdbcTemplate jdbcTemplate){
        this.jdbcTemplate = jdbcTemplate;
    }

    public Integer execute(String teamId){
        return this.jdbcTemplate.update("UPDATE team SET drafted = FALSE WHERE team_id = ?", teamId.toUpperCase());
    }
}


text:
.saveErrorPopupSocial .modal-logo {
	position: absolute;
	top: -20px;
	left: -20px;
	width: 48px;
	height: 48px;
	background: url(../_resources/icons/warning-icon.png);
	background-size: 42px 42px;
	background-repeat: no-repeat;
	border: 4px solid #FFF;
	border-radius: 24px;
}

.saveErrorPopupSocial .tooltip.in {
	opacity: 1.0;
}

.saveErrorPopupSocial .panel1 .tooltip-inner {
	max-width: 266px !important;
	width: 266px;
	padding-bottom: 8px;
}

.saveErrorPopupSocial .panel2 {
	margin-top: 10px;
}

.saveErrorPopupSocial .panel3 {
	margin-top: 25px;
}

.saveErrorPopupSocial .panel2 .form-group {
	margin-left: 10px;
}

.saveErrorPopupSocial .modal-footer {
	padding-top: 30px;
}

.saveErrorPopupSocial .stop-asking {
	float: left;
	margin-top: -6px;
    margin-left: 10px;
}

.saveErrorPopupSocial .stop-asking label.disabled {
	color: #CCC;
	cursor: not-allowed;
}


text:
fps
===

Measures frames per second

Installation
------------

You can acquire `fps` via bower

```sh
bower install cois-fps
```

and then include it in your html page

```html
<script type="text/javascript" src="bower_components/cois-fps/fps.js"></script>
```

Usage
-----

You first need to create a `fps.FrameCounter`

```js
var counter = new fps.FrameCounter();
```

This `counter` can be used to count frames e.g. in a game loop.

```js
function tick() {
	counter.registerFrame();
	requestAnimationFrame(tick);
}
```

You can then retrieve the frames per second `fps` method.

```js
var fpsSpan = document.getElementById('fps');
setInterval(function(){
	fpsSpan.textContent = counter.fps() + ' fps';
}, 1000); // update every second
```

### Options

Options are provided with an options hash. The options that are
supported are described below. If unknown options are provided an
exception is thrown.

#### clock

*default* `function(){ return new Date(); }`

Responsible for keeping track of time. Used when `registerFrame` is
called. When called should return the milliseconds elapsed since an
epoch, e.g. 1 January 1970.

#### strategy

*default* `fps.averageStrategy(20)`

Responsible for the actual calculation of the frames per second. When
called should return the frames per second that will be reported by a
call to the `fps` method.

It is provided with two arguments

1. `currentTime`. The current time as reported by the `clock`.
2. `lastTime`. The previous time `registerFrame` was called.

Development
-----------

We use [gulp][] to manage our minification of our javascript
files. You acquire it with the following command:

```sh
npm install
```

You run it with

```sh
gulp
```

[gulp]: http://gulpjs.com/


text:
#ifndef TENSORFLOW_CORE_LIB_RANDOM_RANDOM_DISTRIBUTIONS_H_
#define TENSORFLOW_CORE_LIB_RANDOM_RANDOM_DISTRIBUTIONS_H_

#define _USE_MATH_DEFINES
#include <math.h>
#include <cmath>
#undef _USE_MATH_DEFINES

#include <string.h>
#include <algorithm>
#include <type_traits>

#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/lib/bfloat16/bfloat16.h"
#include "tensorflow/core/lib/random/philox_random.h"

namespace tensorflow {
namespace random {

// Helper function to convert a 16-bit integer to a half between [0..1).
PHILOX_DEVICE_INLINE Eigen::half Uint16ToHalf(uint16 x);
// Helper function to convert a 16-bit integer to a bfloat16 between [0..1).
PHILOX_DEVICE_INLINE bfloat16 Uint16ToGfloat16(uint16 x);
// Helper function to convert a 32-bit integer to a float between [0..1).
PHILOX_DEVICE_INLINE float Uint32ToFloat(uint32 x);
// Helper function to convert two 32-bit integers to a double between [0..1).
PHILOX_DEVICE_INLINE double Uint64ToDouble(uint32 x0, uint32 x1);

// Computes a + b. Requires that the result is representable in the destination
// type and that b is not maximal (i.e. b + 1 is not 0). Notably, the addend b
// need *not* be representable in that type. (The condition on b excludes the
// extremal case INT_MIN + UINT_MAX = INT_MAX, which this function cannot
// compute.)
template <typename Int>
PHILOX_DEVICE_INLINE Int SignedAdd(Int a,
                                   typename std::make_unsigned<Int>::type b) {
  // Implementation note: both b_div_2 and b - b_div_2 are positive and
  // representatble as Int.
  auto b_div_2 = b >> 1;
  return a + static_cast<Int>(b_div_2) + static_cast<Int>(b - b_div_2);
}

// A class that generates uniform distribution random numbers from the
// underlying random integer generator.
// Arguments:
//   Generator: a generator type that returns a number of uint32 upon each
//              invocation. It needs to define kResultElementCount for the
//              sample count for each invocation, and ResultType for the
//              actual returned sample type.
//   RealType: the data type of the real numbers that will be returned by the
//             distribution. This could be either float or double for now.
// This class is meant to be implemented through specialization. The default
// is not defined by design.
template <class Generator, typename RealType>
class UniformDistribution;

template <class Generator>
class UniformDistribution<Generator, Eigen::half> {
 public:
  // The number of elements that will be returned.
  static const int kResultElementCount = Generator::kResultElementCount;
  // Cost of generation of a single element (in cycles).
  static const int kElementCost = 3;
  // Indicate that this distribution may take variable number of samples
  // during the runtime.
  static const bool kVariableSamplesPerOutput = false;
  typedef Array<Eigen::half, kResultElementCount> ResultType;
  typedef Eigen::half ResultElementType;

  PHILOX_DEVICE_INLINE
  ResultType operator()(Generator* gen) {
    typename Generator::ResultType sample = (*gen)();
    ResultType result;
    for (int i = 0; i < kResultElementCount; ++i) {
      result[i] = Uint16ToHalf(sample[i]);  // Truncate the upper 16 bits.
    }
    return result;
  }
};

template <class Generator>
class UniformDistribution<Generator, bfloat16> {
 public:
  // The number of elements that will be returned.
  static const int kResultElementCount = Generator::kResultElementCount;
  // Cost of generation of a single element (in cycles).
  static const int kElementCost = 3;
  // Indicate that this distribution may take variable number of samples
  // during the runtime.
  static const bool kVariableSamplesPerOutput = false;
  typedef Array<bfloat16, kResultElementCount> ResultType;
  typedef bfloat16 ResultElementType;

  PHILOX_DEVICE_INLINE
  ResultType operator()(Generator* gen) {
    typename Generator::ResultType sample = (*gen)();
    ResultType result;
    for (int i = 0; i < kResultElementCount; ++i) {
      result[i] = Uint16ToGfloat16(sample[i]);
    }
    return result;
  }
};

template <class Generator>
class UniformDistribution<Generator, float> {
 public:
  // The number of elements that will be returned.
  static const int kResultElementCount = Generator::kResultElementCount;
  // Cost of generation of a single element (in cycles).
  static const int kElementCost = 3;
  // Indicate that this distribution may take variable number of samples
  // during the runtime.
  static const bool kVariableSamplesPerOutput = false;
  typedef Array<float, kResultElementCount> ResultType;
  typedef float ResultElementType;

  PHILOX_DEVICE_INLINE
  ResultType operator()(Generator* gen) {
    typename Generator::ResultType sample = (*gen)();
    ResultType result;
    for (int i = 0; i < kResultElementCount; ++i) {
      result[i] = Uint32ToFloat(sample[i]);
    }
    return result;
  }
};

template <class Generator>
class UniformDistribution<Generator, double> {
 public:
  // The number of elements that will be returned.
  static const int kResultElementCount = Generator::kResultElementCount / 2;
  // Cost of generation of a single element (in cycles).
  static const int kElementCost = 3;
  // Indicate that this distribution may take variable number of samples
  // during the runtime.
  static const bool kVariableSamplesPerOutput = false;
  typedef Array<double, kResultElementCount> ResultType;
  typedef double ResultElementType;

  PHILOX_DEVICE_INLINE
  ResultType operator()(Generator* gen) {
    typename Generator::ResultType sample = (*gen)();
    ResultType result;
    for (int i = 0; i < kResultElementCount; ++i) {
      result[i] = Uint64ToDouble(sample[2 * i], sample[2 * i + 1]);
    }
    return result;
  }
};

template <class Generator>
class UniformDistribution<Generator, int32> {
 public:
  // The number of elements that will be returned.
  static const int kResultElementCount = Generator::kResultElementCount;
  // Cost of generation of a single element (in cycles).
  static const int kElementCost = 3;
  // Indicate that this distribution may take variable number of samples
  // during the runtime.
  static const bool kVariableSamplesPerOutput = false;
  typedef Array<int32, kResultElementCount> ResultType;
  typedef int32 ResultElementType;

  // Must have lo < hi
  UniformDistribution(int32 lo, int32 hi)
      : lo_(lo), range_(static_cast<uint32>(hi) - static_cast<uint32>(lo)) {}

  PHILOX_DEVICE_INLINE
  ResultType operator()(Generator* gen) {
    typename Generator::ResultType sample = (*gen)();
    ResultType result;
    for (int i = 0; i < kResultElementCount; ++i) {
      result[i] = SignedAdd(lo_, sample[i] % range_);
    }
    return result;
  }

 private:
  // Note that lo_ is intentionally signed while range_ is intentionally
  // unsigned.  This is because hi - lo can overflow signed integers if
  // lo < 0 < hi, but always fits in unsigned.
  int32 lo_;
  uint32 range_;
};

template <class Generator>
class UniformDistribution<Generator, int64> {
 public:
  // The number of elements that will be returned.
  static const int kResultElementCount = Generator::kResultElementCount / 2;
  // Cost of generation of a single element (in cycles).
  static const int kElementCost = 3;
  // Indicate that this distribution may take variable number of samples
  // during the runtime.
  static const bool kVariableSamplesPerOutput = false;
  typedef Array<int64, kResultElementCount> ResultType;
  typedef int64 ResultElementType;

  // Must have lo < hi
  UniformDistribution(int64 lo, int64 hi)
      : lo_(lo), range_(static_cast<uint64>(hi) - static_cast<uint64>(lo)) {}

  PHILOX_DEVICE_INLINE
  ResultType operator()(Generator* gen) {
    typename Generator::ResultType sample = (*gen)();
    ResultType result;
    for (int i = 0; i < kResultElementCount; ++i) {
      auto bits = sample[2 * i] | static_cast<uint64>(sample[2 * i + 1]) << 32;
      result[i] = SignedAdd(lo_, bits % range_);
    }
    return result;
  }

 private:
  // Note that lo_ is intentionally signed while range_ is intentionally
  // unsigned.  This is because hi - lo can overflow signed integers if
  // lo < 0 < hi, but always fits in unsigned.
  int64 lo_;
  uint64 range_;
};

// A class that adapts the underlying native multiple samples to return a single
// sample at a time.
template <class Generator>
class SingleSampleAdapter {
 public:
  // The number of elements that will be returned.
  static const int kResultElementCount = 1;
  // The number of elements that will be returned by the underlying generator.
  static const int kNativeElementCount = Generator::kResultElementCount;
  typedef typename Generator::ResultElementType ResultType;
  typedef typename Generator::ResultElementType ResultElementType;

  PHILOX_DEVICE_INLINE
  explicit SingleSampleAdapter(Generator* gen)
      : generator_(gen), used_result_index_(Generator::kResultElementCount) {}

  PHILOX_DEVICE_INLINE
  ResultType operator()() {
    if (used_result_index_ == Generator::kResultElementCount) {
      unused_results_ = (*generator_)();
      used_result_index_ = 0;
    }

    return unused_results_[used_result_index_++];
  }

  PHILOX_DEVICE_INLINE
  void Skip(uint64 num_skips) {
    if (!num_skips) {
      return;
    }
    int num_unused_results = kNativeElementCount - used_result_index_;
    if (num_skips <= num_unused_results) {
      used_result_index_ += num_skips;
      return;
    }
    num_skips -= num_unused_results;
    used_result_index_ = kNativeElementCount;
    SkipFromGenerator(num_skips / kNativeElementCount);
    num_skips = num_skips % kNativeElementCount;
    if (num_skips) {
      unused_results_ = (*generator_)();
      used_result_index_ = num_skips;
    }
  }

 private:
  // This implementation iteratively skips over `num_skips` samples
  // from `generator_`. There is an O(1) implementation for PhiloxRandom
  // in random_distributions.cc.
  PHILOX_DEVICE_INLINE
  void SkipFromGenerator(uint64 num_skips) {
    while (num_skips--) {
      (*generator_)();
    }
  }

  Generator* generator_;
  typename Generator::ResultType unused_results_;
  int used_result_index_;
};

// A class that generates unit normal distribution random numbers from the
// underlying random integer generator.
// Arguments:
//   Generator: a generator type that returns a number of uint32 upon each
//              each invocation. It needs to define kResultElementCount for the
//              sample count for each invocation, and ResultType for actual
//              returned sample type.
//   RealType: the data type of the real numbers that will be returned by the
//             distribution. This could be either float or double for now.
// This class is meant to be implemented through specialization. The default
// is not defined by design.
template <class Generator, typename RealType>
class NormalDistribution;

PHILOX_DEVICE_INLINE
void BoxMullerFloat(uint32 x0, uint32 x1, float* f0, float* f1);

PHILOX_DEVICE_INLINE
void BoxMullerDouble(uint32 x0, uint32 x1, uint32 x2, uint32 x3, double* d0,
                     double* d1);

// Exactly like the float version, except that we convert to half afterwards;
// since we don't have half-precision sin/cos even on GPUs, there's nothing to
// gain from working in half internally.
template <class Generator>
class NormalDistribution<Generator, Eigen::half> {
 public:
  // The number of elements that will be returned.
  static const int kResultElementCount = Generator::kResultElementCount;
  // Cost of generation of a single element (in cycles).
  static const int kElementCost = 70;
  // Indicate that this distribution may take variable number of samples
  // during the runtime.
  static const bool kVariableSamplesPerOutput = false;
  typedef Array<Eigen::half, kResultElementCount> ResultType;
  typedef Eigen::half ResultElementType;

  PHILOX_DEVICE_INLINE
  ResultType operator()(Generator* gen) {
    typename Generator::ResultType sample = (*gen)();
    ResultType result;
    for (int i = 0; i < kResultElementCount; i += 2) {
      float f[2];
      BoxMullerFloat(sample[i], sample[i + 1], &f[0], &f[1]);
      result[i] = Eigen::half(f[0]);
      result[i + 1] = Eigen::half(f[1]);
    }
    return result;
  }
};

template <class Generator>
class NormalDistribution<Generator, bfloat16> {
 public:
  // The number of elements that will be returned.
  static const int kResultElementCount = Generator::kResultElementCount;
  // Cost of generation of a single element (in cycles).
  static const int kElementCost = 70;
  // Indicate that this distribution may take variable number of samples
  // during the runtime.
  static const bool kVariableSamplesPerOutput = false;
  typedef Array<bfloat16, kResultElementCount> ResultType;
  typedef bfloat16 ResultElementType;

  PHILOX_DEVICE_INLINE
  ResultType operator()(Generator* gen) {
    typename Generator::ResultType sample = (*gen)();
    ResultType result;
    static_assert(kResultElementCount % 2 == 0,
                  "kResultElementCount should be an even number");
    for (int i = 0; i < kResultElementCount; i += 2) {
      float f[2];
      // Box-Muller transform requires processing 2 elements at a time.
      BoxMullerFloat(sample[i], sample[i + 1], &f[0], &f[1]);
      result[i] = bfloat16(f[0]);
      result[i + 1] = bfloat16(f[1]);
    }
    return result;
  }
};

template <class Generator>
class NormalDistribution<Generator, float> {
 public:
  // The number of elements that will be returned.
  static const int kResultElementCount = Generator::kResultElementCount;
  // Cost of generation of a single element (in cycles).
  static const int kElementCost = 70;
  // Indicate that this distribution may take variable number of samples
  // during the runtime.
  static const bool kVariableSamplesPerOutput = false;
  typedef Array<float, kResultElementCount> ResultType;
  typedef float ResultElementType;

  PHILOX_DEVICE_INLINE
  ResultType operator()(Generator* gen) {
    typename Generator::ResultType sample = (*gen)();
    ResultType result;
    for (int i = 0; i < kResultElementCount; i += 2) {
      BoxMullerFloat(sample[i], sample[i + 1], &result[i], &result[i + 1]);
    }
    return result;
  }
};

template <class Generator>
class NormalDistribution<Generator, double> {
 public:
  // The number of elements that will be returned.
  static const int kResultElementCount = Generator::kResultElementCount / 2;
  // Cost of generation of a single element (in cycles).
  static const int kElementCost = 70;
  // Indicate that this distribution may take variable number of samples
  // during the runtime.
  static const bool kVariableSamplesPerOutput = false;
  typedef Array<double, kResultElementCount> ResultType;
  typedef double ResultElementType;

  PHILOX_DEVICE_INLINE
  ResultType operator()(Generator* gen) {
    typename Generator::ResultType sample = (*gen)();
    ResultType result;
    for (int i = 0; i < kResultElementCount; i += 2) {
      const int i2 = 2 * i;
      BoxMullerDouble(sample[i2], sample[i2 + 1], sample[i2 + 2],
                      sample[i2 + 3], &result[i], &result[i + 1]);
    }
    return result;
  }
};

// A class that returns standard normal distribution between
// [-kTruncateValue, kTruncateValue].
// Arguments:
//   Generator: a generator type that returns a number of uint32 upon each
//              each invocation. It needs to define kResultElementCount for the
//              sample count for each invocation, and ResultType for actual
//              returned sample type.
//   RealType: the data type of the real numbers that will be returned by the
//             distribution. This could be either float or double for now.
// This class is meant to be implemented through specialization. The default
// is not defined by design.
template <class SingleSampleGenerator, typename RealType>
class TruncatedNormalDistribution;

// Exactly like the float version, except that we convert to half afterwards;
// since we don't have half-precision sin/cos even on GPUs, there's nothing to
// gain from working in half internally.
template <class SingleSampleGenerator>
class TruncatedNormalDistribution<SingleSampleGenerator, Eigen::half> {
 public:
  // The number of elements that will be returned.
  static const int kResultElementCount =
      SingleSampleGenerator::kNativeElementCount;
  // Cost of generation of a single element (in cycles).
  static const int kElementCost = 90;
  // Indicate that this distribution may take variable number of samples
  // during the runtime.
  static const bool kVariableSamplesPerOutput = true;
  // The threshold where the normal distribution is truncated.
  const float kTruncateValue = 2.0f;

  typedef Array<Eigen::half, kResultElementCount> ResultType;
  typedef Eigen::half ResultElementType;

  PHILOX_DEVICE_INLINE
  ResultType operator()(SingleSampleGenerator* gen) {
    ResultType results;
    int index = 0;
    while (true) {
      // Repeatedly take samples from the normal distribution, until we have
      // the desired number of elements that fall within the pre-defined cutoff
      // threshold.
      const uint32 x0 = (*gen)();
      const uint32 x1 = (*gen)();
      float f[2];
      BoxMullerFloat(x0, x1, &f[0], &f[1]);

      for (int i = 0; i < 2; ++i) {
        if (Eigen::numext::abs(f[i]) < kTruncateValue) {
          results[index++] = Eigen::half(f[i]);
          if (index >= kResultElementCount) {
            return results;
          }
        }
      }
    }
  }
};

template <class SingleSampleGenerator>
class TruncatedNormalDistribution<SingleSampleGenerator, bfloat16> {
 public:
  // The number of elements that will be returned.
  static const int kResultElementCount =
      SingleSampleGenerator::kNativeElementCount;
  // Cost of generation of a single element (in cycles).
  static const int kElementCost = 90;
  // Indicate that this distribution may take variable number of samples
  // during the runtime.
  static const bool kVariableSamplesPerOutput = true;
  // The threshold where the normal distribution is truncated.
  const float kTruncateValue = 2.0f;

  typedef Array<bfloat16, kResultElementCount> ResultType;
  typedef bfloat16 ResultElementType;

  PHILOX_DEVICE_INLINE
  ResultType operator()(SingleSampleGenerator* gen) {
    ResultType results;
    int index = 0;
    while (true) {
      // Repeatedly take samples from the normal distribution, until we have
      // the desired number of elements that fall within the pre-defined cutoff
      // threshold.
      const uint32 x0 = (*gen)();
      const uint32 x1 = (*gen)();
      float f[2];
      BoxMullerFloat(x0, x1, &f[0], &f[1]);

      for (int i = 0; i < 2; ++i) {
        if (Eigen::numext::abs(f[i]) < kTruncateValue) {
          results[index++] = bfloat16(f[i]);
          if (index >= kResultElementCount) {
            return results;
          }
        }
      }
    }
  }
};

// Partial specialization for float.
template <class SingleSampleGenerator>
class TruncatedNormalDistribution<SingleSampleGenerator, float> {
 public:
  // The number of elements that will be returned.
  static const int kResultElementCount =
      SingleSampleGenerator::kNativeElementCount;
  // Cost of generation of a single element (in cycles).
  static const int kElementCost = 90;
  // Indicate that this distribution may take variable number of samples
  // during the runtime.
  static const bool kVariableSamplesPerOutput = true;
  // The threshold where the normal distribution is truncated.
  const float kTruncateValue = 2.0f;

  typedef Array<float, kResultElementCount> ResultType;
  typedef float ResultElementType;

  PHILOX_DEVICE_INLINE
  ResultType operator()(SingleSampleGenerator* gen) {
    ResultType results;
    int index = 0;
    while (true) {
      // Repeatedly take samples from the normal distribution, until we have
      // the desired number of elements that fall within the pre-defined cutoff
      // threshold.
      const uint32 x0 = (*gen)();
      const uint32 x1 = (*gen)();
      float f[2];
      BoxMullerFloat(x0, x1, &f[0], &f[1]);

      for (int i = 0; i < 2; ++i) {
        if (Eigen::numext::abs(f[i]) < kTruncateValue) {
          results[index++] = f[i];
          if (index >= kResultElementCount) {
            return results;
          }
        }
      }
    }
  }
};

// Partial specialization for double.
template <class SingleSampleGenerator>
class TruncatedNormalDistribution<SingleSampleGenerator, double> {
 public:
  // The number of elements that will be returned.
  static const int kResultElementCount =
      (SingleSampleGenerator::kNativeElementCount > 1)
          ? SingleSampleGenerator::kNativeElementCount / 2
          : 1;
  // Cost of generation of a single element (in cycles).
  static const int kElementCost = 90;
  // Indicate that this distribution may take variable number of samples
  // during the runtime.
  static const bool kVariableSamplesPerOutput = true;
  typedef Array<double, kResultElementCount> ResultType;
  typedef double ResultElementType;
  const double kTruncateValue = 2.0;

  PHILOX_DEVICE_INLINE
  ResultType operator()(SingleSampleGenerator* gen) {
    ResultType results;
    int index = 0;
    while (1) {
      const uint32 x0 = (*gen)();
      const uint32 x1 = (*gen)();
      const uint32 x2 = (*gen)();
      const uint32 x3 = (*gen)();
      double d[2];
      BoxMullerDouble(x0, x1, x2, x3, &d[0], &d[1]);

      for (int i = 0; i < 2; ++i) {
        if (Eigen::numext::abs(d[i]) < kTruncateValue) {
          results[index++] = d[i];
          if (index >= kResultElementCount) {
            return results;
          }
        }
      }
    }
  }
};

// Helper function to convert two 32-bit uniform integers to two floats
// under the unit normal distribution.
PHILOX_DEVICE_INLINE
void BoxMullerFloat(uint32 x0, uint32 x1, float* f0, float* f1) {
  // This function implements the Box-Muller transform:
  // http://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform#Basic_form
  // Do not send a really small number to log().
  // We cannot mark "epsilon" as "static const" because NVCC would complain
  const float epsilon = 1.0e-7f;
  float u1 = Uint32ToFloat(x0);
  if (u1 < epsilon) {
    u1 = epsilon;
  }
  const float v1 = 2.0f * M_PI * Uint32ToFloat(x1);
  const float u2 = Eigen::numext::sqrt(-2.0f * Eigen::numext::log(u1));
#if defined(TENSORFLOW_USE_SYCL) || !defined(__linux__)
  *f0 = Eigen::numext::sin(v1);
  *f1 = Eigen::numext::cos(v1);
#else
  sincosf(v1, f0, f1);
#endif
  *f0 *= u2;
  *f1 *= u2;
}

// Helper function to convert four 32-bit uniform integers to two doubles
// under the unit normal distribution.
PHILOX_DEVICE_INLINE
void BoxMullerDouble(uint32 x0, uint32 x1, uint32 x2, uint32 x3, double* d0,
                     double* d1) {
  // This function implements the Box-Muller transform:
  // http://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform#Basic_form
  // Do not send a really small number to log().
  // We cannot mark "epsilon" as "static const" because NVCC would complain
  const double epsilon = 1.0e-7;
  double u1 = Uint64ToDouble(x0, x1);
  if (u1 < epsilon) {
    u1 = epsilon;
  }
  const double v1 = 2 * M_PI * Uint64ToDouble(x2, x3);
  const double u2 = Eigen::numext::sqrt(-2.0 * Eigen::numext::log(u1));
#if defined(TENSORFLOW_USE_SYCL) || !defined(__linux__)
  *d0 = Eigen::numext::sin(v1);
  *d1 = Eigen::numext::cos(v1);
#else
  sincos(v1, d0, d1);
#endif
  *d0 *= u2;
  *d1 *= u2;
}

// Helper function to convert an 16-bit integer to a half between [0..1).
PHILOX_DEVICE_INLINE Eigen::half Uint16ToHalf(uint16 x) {
  // IEEE754 halfs are formatted as follows (MSB first):
  //    sign(1) exponent(5) mantissa(10)
  // Conceptually construct the following:
  //    sign == 0
  //    exponent == 15  -- an excess 15 representation of a zero exponent
  //    mantissa == 10 random bits
  const uint16 man = x & 0x3ffu;  // 10 bit mantissa
  const uint16 exp = static_cast<uint16>(15);
  const uint16 val = (exp << 10) | man;

  Eigen::half result;
  result.x = val;
  return result - Eigen::half(1.0);
}

// Helper function to convert an 16-bit integer to a bfloat16 between [0..1).
// This can create a uniform distribution of values between [0..1).
PHILOX_DEVICE_INLINE bfloat16 Uint16ToGfloat16(uint16 x) {
  // bfloat are formatted as follows (MSB first):
  //    sign(1) exponent(8) mantissa(7)
  // Conceptually construct the following:
  //    sign == 0
  //    exponent == 127  -- an excess 127 representation of a zero exponent
  //    mantissa == 7 random bits
  const uint16 man = x & 0x7fu;  // 7 bit mantissa
  const uint16 exp = static_cast<uint16>(127);
  const uint16 val = (exp << 7) | man;

  bfloat16 result;
  memcpy(&result, &val, sizeof(val));
  // The mantissa has an implicit leading 1, so the above code creates a value
  // in [1, 2). The minus will not cause a rounding that makes the result 1.
  // Instead it will just be close to 1.
  return result - bfloat16(1.0);
}

// Helper function to convert an 32-bit integer to a float between [0..1).
PHILOX_DEVICE_INLINE float Uint32ToFloat(uint32 x) {
  // IEEE754 floats are formatted as follows (MSB first):
  //    sign(1) exponent(8) mantissa(23)
  // Conceptually construct the following:
  //    sign == 0
  //    exponent == 127  -- an excess 127 representation of a zero exponent
  //    mantissa == 23 random bits
  const uint32 man = x & 0x7fffffu;  // 23 bit mantissa
  const uint32 exp = static_cast<uint32>(127);
  const uint32 val = (exp << 23) | man;

  // Assumes that endian-ness is same for float and uint32.
  float result;
  memcpy(&result, &val, sizeof(val));
  return result - 1.0f;
}

// Helper function to convert two 32-bit integers to a double between [0..1).
PHILOX_DEVICE_INLINE double Uint64ToDouble(uint32 x0, uint32 x1) {
  // IEEE754 doubles are formatted as follows (MSB first):
  //    sign(1) exponent(11) mantissa(52)
  // Conceptually construct the following:
  //    sign == 0
  //    exponent == 1023  -- an excess 1023 representation of a zero exponent
  //    mantissa == 52 random bits
  const uint32 mhi = x0 & 0xfffffu;  // upper 20 bits of mantissa
  const uint32 mlo = x1;             // lower 32 bits of mantissa
  const uint64 man = (static_cast<uint64>(mhi) << 32) | mlo;  // mantissa
  const uint64 exp = static_cast<uint64>(1023);
  const uint64 val = (exp << 52) | man;
  // Assumes that endian-ness is same for double and uint64.
  double result;
  memcpy(&result, &val, sizeof(val));
  return result - 1.0;
}

}  // namespace random
}  // namespace tensorflow

#endif  // TENSORFLOW_CORE_LIB_RANDOM_RANDOM_DISTRIBUTIONS_H_


text:
"""
compare_na.py
=============

Tool to compare contents of NASA Ames files or directories full of files.
Allows you to compare headers and data blocks in NASA Ames.

Usage:
======

    compare_na.py [-h | --header-only]  [-b | --body-only]
                  [-n | --number-strict] [-a | --approx-equal]
                  [-1 <delimiter_1> | --delimiter-1=<delimiter_1>]
                  [-2 <delimiter_2> | --delimiter-2=<delimiter_2>]
                  <item1> <item2>

Where:
======

    <item1> and <item2> 	can either be a text file or directory.
    -h | --header-only    	selects compare only header(s)
    -b | --body-only		selects compare only body(s)
    -n | --number-strict	compares exact formatting of numbers in data block
                                (default is to compare them by value).
    -a | --approx-equal         considers any two numbers being compared the same as long
                                as the difference between them is less than 1%.
    <delimiter_1>		delimiter to use for file 1.
    <delimiter_2>		delimiter to use for file 2.

"""

# Import standard library modules
import os
import sys
import re
import getopt

# Import local modules
from compare import *

equality_threshold = 0.01 # i.e. within 1% of each other
file_exclusion_patterns = (".*CSV.*", ".*svn.*", "\..*", ".*\.pyc$", ".*~$")
file_exclusions = [re.compile(pattn) for pattn in file_exclusion_patterns]
letter_match = re.compile("[a-zA-Z]")

def exitNicely(msg):
    "Tidy exit."
    print __doc__
    print msg
    sys.exit()

def compareNA(i1, i2, **kwargs):
    """
    Compares items whether files or directories.
    Reports any differences at the command line but
    also returns them in a dictionary as:
    ???
    **kwargs are forwarded as dictionary to compNAFiles().
    """
    if os.path.isfile(i1):
        apply(compNAFiles, (i1, i2), kwargs)
    elif os.path.isdir(i1):
        compDirs(i1, i2)
    else:
        exitNicely("Cannot recognise/find item '" + i1 + "'.")

def compareSections(l1, l2, number_clever=True, approx_equal=False,
                   delimiter_1=None, delimiter_2=None):
    """
    Compares sections of NASA Ames files (i.e. headers and bodies).
    """
    leng = len(l1)
    if len(l2) < leng:
        leng = len(l2)

    all_same = True

    for i in range(leng):

        # Start by setting same equal to True and then try and disprove this
        same = True

        l1[i] = l1[i].strip()
        l2[i] = l2[i].strip()

        # If letters found in line then not going to be numeric
        # Hence we can just test if lines are identical
        if letter_match.search(l1[i]):
            if l1[i] == l2[i]:
                continue

        items1 = l1[i].split(delimiter_1)
        items2 = l2[i].split(delimiter_2)

        if len(items1) != len(items2):
            # Check that space delimiter hasn't just split identical lines to different lengths
            if len(items1) == 1 and items1[0].split() == items2:
                continue
            elif len(items2) == 1 and items2[0].split() == items1:
                continue
            else:
                same = False
        else:
            if number_clever == False:
                if items1 != items2:
                    same = False
            else:
                for count in range(len(items1)):
                    try:
                        a = float(items1[count])
                        b = float(items2[count])
                    except:
                        a = items1[count]
                        b = items2[count]

                    if a != b:

                        if approx_equal:
                        # Check to see if testing for approximate equality
                            if a == 0:  a = 0.000000001
                            if b == 0:  b = 0.000000001
                            divided = a/b
                            if divided < 1:
                                divided = b/a
                            if (1 - divided) > equality_threshold:
                                same = False
                                break
                        else:
                            same = False
                            break

        if same == False:
            all_same = False
            print "Line %s:" % (i+1)
            print ">>>", l1[i]
            print "<<<", l2[i]

    return all_same

def compNAFiles(f1, f2, header=True, body=True, number_clever=True, approx_equal=False,
                delimiter_1=None, delimiter_2=None):
    """
    Compares contents of two NASA Ames files f1 and f2.
    header=False or body=False will not compare these sections of the files.
    number_clever=True will compare 5.00000 and 5 making them equal in the body.
    If approx_equal is True then approximate equality is good enough to return two
    numbers as being equal (within equality_threshold set at top of this module).
    If f1_delimiter and f2_delimiter are provided then the comparer will consider
    two lines identical if they have the delimiters sent in as arguments.
    """
    name = os.path.split(f1)[-1]
    # Ignore anything that is in exclusion list
    for excl in file_exclusions:
        if excl.match(name):
            print "IGNORING EXCLUDED file:", f1
            return

    # Check they exist
    for f in (f1, f2):
        if not os.path.isfile(f):
            exitNicely("CANNOT compare files as item does not exist:" + f)

    # Note delimiter set as None will do split on white-space (which we want!)

    l1 = open(f1).readlines()
    l2 = open(f2).readlines()
    head_len1 = int(l1[0].split(delimiter_1)[0])
    head_len2 = int(l2[0].split(delimiter_2)[0])

    header1 = l1[:head_len1]
    header2 = l2[:head_len2]
    body1 = l1[head_len1:]
    body2 = l2[head_len2:]

    same = True
    if header == True:
        print "Comparing headers:"
        print ">>> %s header:" % f1
        print "<<< %s header:" % f2
        same = compareSections(header1, header2, number_clever, approx_equal, delimiter_1, delimiter_2)
        if same == True:
            print "HEADERS ARE IDENTICAL."
        if len(header1) != len(header2):
            print "Header lengths differ:\n>>> %s: %s\n<<< %s: %s" % (f1, len(header1), f2, len(header2))

    if body == True:
        print "Comparing bodies:"
        print ">>> %s body:" % f1
        print "<<< %s body:" % f2
        same = compareSections(body1, body2, number_clever, approx_equal, delimiter_1, delimiter_2)
        if same == True:
            print "BODIES ARE IDENTICAL."
        if len(body1) != len(body2):
            print "Body lengths differ:\n>>> %s: %s\n<<< %s: %s" % (f1, len(body1), f2, len(body2))

    return same

def parseArgs(args):
    """
    Parses arguments returning a dictionary.
    """
    arg_dict = {}
    a = arg_dict
    a["header"] = True
    a["body"] = True
    a["number_clever"] = True
    a["approx_equal"] = False
    a["delimiter_1"] = None
    a["delimiter_2"] = None

    (arg_list, files) = getopt.getopt(args, "hbna1:2:", ["header-only", "body-only",
                    "number-strict", "approx-equal", "delimiter-1=", "delimiter-2="])

    for arg, value in arg_list:
        if arg in ("--header-only", "-h"):
            a["body"] = False
        elif arg in ("--body-only", "-b"):
            a["header"] = False
        elif arg in ("--number-strict", "-n"):
            a["number_clever"] = False
        elif arg in ("--approx-equal", "-a"):
            a["approx_equal"] = True
        elif arg in ("--delimiter-1", "-1"):
            a["delimiter_1"] = value
        elif arg in ("--delimiter-2", "-2"):
            a["delimiter_2"] = value
        else:
            exitNicely("Unrecognised argument provided: " + arg)

    if len(files) != 2:
        exitNicely("Must provide a minimum of two file names as command line arguments.")

    if a["header"] == False and a["body"] == False:
        exitNicely("Invalid selection: header-only and body-only cannot be selected together.")

    return (files, a)

def main(args):
    "Main controller."
    files, arg_dict = parseArgs(args)
    apply(compareNA, files, arg_dict)

if __name__=="__main__":

    args = sys.argv[1:]
    main(args)


text:
using System;
using Tt195361.Casl2Simulator.Common;
using Tt195361.Casl2Simulator.Properties;

namespace Tt195361.Casl2Simulator.Casl2
{
    /// <summary>
    /// アセンブラ命令の DS です。
    /// </summary>
    internal class AsmDsInstruction : ProgramInstruction
    {
        #region Instance Fields
        private WordCount m_wordCount;
        #endregion

        internal AsmDsInstruction()
            : base(MnemonicDef.DS)
        {
            //
        }

        internal WordCount WordCount
        {
            get { return m_wordCount; }
        }

        /// <summary>
        /// DS 命令のオペランドを解釈します。記述の形式は "語数" です。
        /// </summary>
        /// <param name="lexer">オペランドの字句を解析する <see cref="OperandLexer"/> のオブジェクトです。</param>
        /// <returns>
        /// 解釈した結果として生成した <see cref="Operand"/> クラスのオブジェクトを返します。
        /// </returns>
        protected override Operand ParseSpecificOperand(OperandLexer lexer)
        {
            m_wordCount = WordCount.Parse(lexer);
            return m_wordCount;
        }

        protected override String OperandSyntax
        {
            get { return Resources.SYN_WordCount; }
        }

        internal override Int32 GetCodeWordCount()
        {
            return m_wordCount.Value;
        }

        internal override void GenerateCode(Label definedLabel, RelocatableModule relModule)
        {
            // 指定した語数の領域を確保する。指定の語数分の 0 を追加する。
            relModule.AddWords(Word.Zero, m_wordCount.Value);
        }

        internal void SetWordCountValueForUnitTest(Int32 wordCountValue)
        {
            m_wordCount = WordCount.MakeForUnitTest(wordCountValue);
        }
    }
}


text:
<?php
header("Access-Control-Allow-Origin: *");
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, Authorization, X-Request-With');
header('Access-Control-Allow-Credentials: true');
include('db_config.php');
date_default_timezone_set('Asia/Kolkata');

$json = file_get_contents('php://input');
$obj = json_decode($json, true);

$key_array = array();
$doctors = array();
$cond = array();
	try
		{
			if($obj['api_key'] != "5+`C%@>9RvJ'y?8:"){
				$response['ResponseCode'] = "400";
		    $response['ResponseMessage'] = "Invalid api_key"; //user friendly message
		    $status['Status'] = $response;
		    header('Content-type: application/json');
		    echo json_encode($status);
				die();
			}
			foreach ($obj['Disease'] as $disease)
			{
				$result2 = $db->prepare("SELECT cc.ConditionCategory, s.SpecID from conditionscategory cc inner join speciality s
				 where cc.ConditionName = :ConditionName and s.Speciality = cc.ConditionCategory ");
				$result2->bindParam(':ConditionName', $disease['ConditionName'], PDO::PARAM_STR);
				$result2->execute();

				while ( $row2 = $result2->fetch())
				{
					$result = $db->prepare(" SELECT u.FName, u.LName, dp.ExStart, dp.Fee, dp.Pic, c.DID, c.ClinicID, c.ClinicName, c.Address2, (((acos(sin((:Latitude3*pi()/180)) * sin((c.ClinicLat*pi()/180))+cos((:Latitude4*pi()/180)) * cos((c.ClinicLat*pi()/180)) * cos(((:Longitude2 - c.ClinicLong)*pi()/180))))*180/pi())*60*1.1515)
						as Distance from clinics c inner join user u inner join doctorprofile dp inner join doctorspec ds
						WHERE ds.DID = u.UserID and c.DID = u.UserID and dp.DID=u.UserID and ds.SpecID = :SpecID");

					$result->bindParam(':Latitude3', $obj['Latitude'], PDO::PARAM_STR);
					$result->bindParam(':Latitude4', $obj['Latitude'], PDO::PARAM_STR);
					$result->bindParam(':Longitude2', $obj['Longitude'], PDO::PARAM_STR);
					$result->bindParam(':SpecID', $row2['SpecID'], PDO::PARAM_STR);
					$result->execute();
					while($row = $result->fetch())
					{
						$result3 = $db->prepare("SELECT s.Speciality from doctorspec ds inner join speciality s where s.SpecID=ds.SpecID and ds.DID=:DID ");
						$result3->bindParam(':DID', $row['DID'], PDO::PARAM_STR);
						$result3->execute();
						$doctorspec = "";
						while ($spec = $result3->fetch())
						{
							$doctorspec = $doctorspec.$spec['Speciality'].", ";
						}
						$doctorspec = substr($doctorspec, 0, -2);

						if(is_null($row['Pic']))
							$fpic = "http://ec2-52-37-68-149.us-west-2.compute.amazonaws.com/default.png";
						else
							$fpic = $row['Pic'];

						$name = "Dr."." ".$row['FName']." ".$row['LName'];

						$datetime = new DateTime(date("Y-m-d H:i:s"));
						$datetime1 = new DateTime($row['ExStart']);
			            $interval = $datetime1->diff($datetime);
			            $interval = $interval->format('%y');

			            if(is_null($row['Distance']))
			            	$distance = "0.1";
			            else
			            	$distance = sprintf("%.2f", $row['Distance']);

			            if(!in_array($row['DID'], $key_array))
			            {
			            	$key_array[$i] = $row['DID'];
			            	$i++;
							$doctor[] = array('Name' => (string)$name , 'Speciality' => (string)$doctorspec, 'Experience' => (string)$interval, 'Fee' => (string)$row['Fee'], 'DID' => (string)$row['DID'], 'ClinicID' => (string)$row['ClinicID'],
							'ClinicName' => (string)$row['ClinicName'], 'ClinicArea' => (string)$row['Address2'], 'Distance' => (string)$distance, 'Pic' => (string)$fpic);
			            	//$doctor[] = array('Speciality' => (string)$row2['ConditionCategory']);
			            }

					}
				}

			}
			//unique_multidim_array($doctor,'DID');
			//$doctors = array_unique($doctors);
			$response['ResponseCode'] = "200";
			$response['ResponseMessage'] = "Patient Home Data";

			$response['Doctors'] = $doctor;
			$response['Conditions'] = $cond;

			$status['Status'] = $response;
			header('Content-type: application/json');
			echo json_encode($status);
		}
	catch(PDOException $ex)
		{
			$response['ResponseCode'] = "500";
		    $response['ResponseMessage'] = "An Error occured!" . $ex; //user friendly message
		    $status['Status'] = $response;
		    header('Content-type: application/json');
			echo json_encode($status);
		}

		function unique_multidim_array($array, $key)
		{
    $temp_array = array();
    $i = 0;
    $j = 0;
    $key_array = array();

    foreach($array as $val)
    {
        if (!in_array($val[$key], $key_array))
        {
            $key_array[$i] = $val[$key];
            $temp_array[$j] = $val[$i];
            $j++;
        }
        $i++;
    }
    $response['Doctors'] = $temp_array;
    //return $temp_array;
}
// }


text:
<#PSScriptInfo

.VERSION 1.0.1

.GUID 35577e76-36ce-4e73-a84c-2f872a08fe08

.AUTHOR DSC Community

.COMPANYNAME DSC Community

.COPYRIGHT DSC Community contributors. All rights reserved.

.TAGS DSCConfiguration

.LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE

.PROJECTURI https://github.com/dsccommunity/DnsServerDsc

.ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png

.EXTERNALMODULEDEPENDENCIES

.REQUIREDSCRIPTS

.EXTERNALSCRIPTDEPENDENCIES

.RELEASENOTES
Updated author, copyright notice, and URLs.

.PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core

#>

#Requires -Module DnsServerDsc

<#
    .DESCRIPTION
        This configuration will ensure a DNS A record does not exist when mandatory properties are specified.

        Note that not all mandatory properties are necessarily key properties. Non-key property values will be ignored when determining whether the record is to be removed.
#>

Configuration DnsRecordAScoped_Remove_config
{
    Import-DscResource -ModuleName 'DnsServerDsc'

    Node localhost
    {
        DnsRecordAScoped 'TestRecord'
        {
            ZoneName    = 'contoso.com'
            ZoneScope   = 'external'
            Name        = 'www'
            IPv4Address = '192.168.50.10'
            Ensure      = 'Absent'
        }
    }
}


text:
del ..\JustLogicBuildTest\Assets\JustLogic\Plugins\*.dll
del ..\JustLogicBuildTest\Assets\JustLogic\Plugins\*.xml
del ..\JustLogicBuildTest\Assets\JustLogic\Plugins\*.pdb
del ..\JustLogicBuildTest\Assets\JustLogic\Plugins\*.mdb
del ..\JustLogicBuildTest\Assets\JustLogic\Editor\*.dll

cd ..
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "deployscript\JustLogicBuild.sln" /t:Clean,Build /p:Configuration=Release

@if %errorlevel% neq 0 pause
cd deployscript


text:
from __future__ import (
    absolute_import, division, print_function, unicode_literals
)

from . import schemes

__all__ = ['Response']

class Response(object):
    """TChannel Response"""

    # TODO implement __repr__

    __slots__ = (
        'body',
        'headers',
        'transport',
    )

    def __init__(self, body=None, headers=None, transport=None):
        self.body = body
        self.headers = headers
        self.transport = transport

class TransportHeaders(object):
    """Response-specific Transport Headers"""

    # TODO implement __repr__

    __slots__ = (
        'failure_domain',
        'scheme',
    )

    def __init__(self,
                 failure_domain=None,
                 scheme=None,
                 **kwargs):

        if scheme is None:
            scheme = schemes.RAW

        self.failure_domain = failure_domain
        self.scheme = scheme

def response_from_mixed(mixed):
    """Create Response from mixed input."""

    # if none then give empty Response
    if mixed is None:
        return Response()

    # if not Response, then treat like body
    if not isinstance(mixed, Response):
        return Response(mixed)

    # it's already a Response
    return mixed


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

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

Module base

Classes

    AttachmentMixin
    Document
    DocumentBase
    DocumentSchema
    QueryMixin
    ReservedWordError
    SchemaProperties
    StaticDocument

Functions

    check_reserved_words

    valid_id

Variables

    ALLOWED_PROPERTY_TYPES

    _NODOC_WORDS

    _RESERVED_WORDS

    __package__

[hide private]


text:
import 'regenerator-runtime/runtime'
import 'whatwg-fetch'
import 'react-app-polyfill/ie9' // For IE 9-11 support
import Promise from 'bluebird'
import smoothscroll from 'smoothscroll-polyfill'

import React from 'react'
import ReactDOM from 'react-dom'
import PropTypes from 'prop-types'
import {BrowserRouter} from 'react-router-dom'
import {dataProvidersConfig} from 'data-provider'
import './customBootstrap.css'
import App from './components/App'
import Loading from './components/Loading/Loading'
import {GoogleAnalyticsInitializer} from './utils'
import getConfiguredStore from './configureStore'
import {Provider} from 'react-redux'

window.Promise = Promise
smoothscroll.polyfill()

dataProvidersConfig({loadingComponent: <Loading />})

// a short-term fix for data-provider, should get fixed in next release
class DispatchProvider extends React.Component {
  static childContextTypes = {
    dispatch: PropTypes.func,
  }

  getChildContext() {
    return {dispatch: this.props.dispatch}
  }

  render() {
    return this.props.children
  }
}

const store = getConfiguredStore()
ReactDOM.render(
  <GoogleAnalyticsInitializer>
    <Provider store={store}>
      <BrowserRouter basename={process.env.REACT_APP_BASENAME}>
        <DispatchProvider dispatch={store.dispatch}>
          <App />
        </DispatchProvider>
      </BrowserRouter>
    </Provider>
  </GoogleAnalyticsInitializer>,
  document.getElementById('root')
)


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web.Mvc;

namespace Xania.AspNet.TagHelpers
{
    public class TagHelperFilterAttribute : ActionFilterAttribute
    {
        private readonly IDependencyResolver _defaultDependencyResolver;
        public Type[] TagHelpers { get; set; }

        public TagHelperFilterAttribute()
            : this(DependencyResolver.Current)
        {
        }

        public TagHelperFilterAttribute(IDependencyResolver defaultDependencyResolver)
        {
            _defaultDependencyResolver = defaultDependencyResolver;
        }

        public override void OnActionExecuted(ActionExecutedContext filterContext)
        {
            if (filterContext.Result is ViewResultBase)
                filterContext.Result = GetFilterResult(filterContext);
        }

        protected virtual ActionResult GetFilterResult(ActionExecutedContext filterContext)
        {
            var q = from th in TagHelpers ?? Enumerable.Empty<Type>()
                from name in GetTagNames(th)
                select new KeyValuePair<string, Type>(name, th);

            return new TagHelperFilterResult(_defaultDependencyResolver, filterContext.Result, q);
        }

        private IEnumerable<string> GetTagNames(Type tagHelperType)
        {
            var tagNameAttr = tagHelperType.GetCustomAttribute<TagNameAttribute>();
            if (tagNameAttr != null)
            {
                foreach (var name in tagNameAttr.Names)
                    yield return name;
            }
            else
            {
                var typeName = tagHelperType.Name;
                if (typeName.EndsWith("TagHelper"))
                    yield return typeName.Substring(0, typeName.Length - "TagHelper".Length);
                else
                    yield return typeName;
            }
        }
    }
}


text:
/* http://keith-wood.name/countdown.html
 * Czech initialisation for the jQuery countdown extension
 * Written by Miroslav Koula mkoula@gmail.com (2008) */
$.countdown.regional['cs'] = {
	labels: ['Roky', 'Měsíce', 'Týdny', 'Dny', 'Hodiny', 'Minuty', 'Sekundy'],
	labelsSingle: ['Roky', 'Měsíce', 'Týdny', 'Dny', 'Hodiny', 'Minuty', 'Sekundy'],
	compactLabels: ['r', 'm', 't', 'd'], compactLabelsSingle: ['r', 'm', 't', 'd'],
	timeSeparator: ':'};
$.countdown.setDefaults($.countdown.regional['cs']);


text:
/*
 * @lc app=leetcode id=439 lang=java
 *
 * [439] Ternary Expression Parser
 *
 * https://leetcode.com/problems/ternary-expression-parser/description/
 *
 * algorithms
 * Medium (56.47%)
 * Total Accepted:    20.7K
 * Total Submissions: 36.6K
 * Testcase Example:  '"T?2:3"'
 *
 * Given a string representing arbitrarily nested ternary expressions,
 * calculate the result of the expression. You can always assume that the given
 * expression is valid and only consists of digits 0-9, ?, :, T and F (T and F
 * represent True and False respectively).
 *
 * Note:
 *
 * The length of the given string is ≤ 10000.
 * Each number will contain only one digit.
 * The conditional expressions group right-to-left (as usual in most
 * languages).
 * The condition will always be either T or F. That is, the condition will
 * never be a digit.
 * The result of the expression will always evaluate to either a digit 0-9, T
 * or F.
 *
 *
 *
 *
 * Example 1:
 *
 * Input: "T?2:3"
 *
 * Output: "2"
 *
 * Explanation: If true, then result is 2; otherwise result is 3.
 *
 *
 *
 *
 * Example 2:
 *
 * Input: "F?1:T?4:5"
 *
 * Output: "4"
 *
 * Explanation: The conditional expressions group right-to-left. Using
 * parenthesis, it is read/evaluated as:
 *
 *             "(F ? 1 : (T ? 4 : 5))"                   "(F ? 1 : (T ? 4 :
 * 5))"
 *          -> "(F ? 1 : 4)"                 or       -> "(T ? 4 : 5)"
 *          -> "4"                                    -> "4"
 *
 *
 *
 *
 * Example 3:
 *
 * Input: "T?T?F:5:3"
 *
 * Output: "F"
 *
 * Explanation: The conditional expressions group right-to-left. Using
 * parenthesis, it is read/evaluated as:
 *
 *             "(T ? (T ? F : 5) : 3)"                   "(T ? (T ? F : 5) :
 * 3)"
 *          -> "(T ? F : 3)"                 or       -> "(T ? F : 5)"
 *          -> "F"                                    -> "F"
 *
 *
 */
class Solution {
    public String parseTernary(String exp) {
        while (true) {
            int last = exp.lastIndexOf("?");
            if (last < 0)
                return exp;
            char ch = exp.charAt(last-1);
            int first = exp.indexOf(":", last);
            int second = exp.indexOf(":", first+1);
            second = second < 0 ? exp.length() : second;
            String v;
            if (ch == 'T')
                v = exp.substring(last+1, first);
            else
                v = exp.substring(first+1, second);
            exp = exp.substring(0, last-1) + v + exp.substring(second);
        }
    }
}


text:
package com.jsyn;

import com.jsyn.devices.AudioDeviceManager;
import com.jsyn.unitgen.UnitGenerator;
import com.softsynth.shared.time.ScheduledCommand;
import com.softsynth.shared.time.TimeStamp;

/**
 * A synthesizer used by JSyn to generate audio. The synthesizer executes a network of unit
 * generators to create an audio signal.
 *
 * @author Phil Burk (C) 2010 Mobileer Inc
 */
public interface Synthesizer {

    public final static int FRAMES_PER_BLOCK = 8;

    /**
     * Starts a background thread that generates audio using the default frame rate of 44100 and two
     * stereo output channels.
     */
    public void start();

    /**
     * Starts a background thread that generates audio using the specified frame rate and two stereo
     * output channels.
     *
     * @param frameRate in Hertz
     */
    public void start(int frameRate);

    /**
     * Starts the synthesizer using specific audio devices.
     *

     * Note that using more than 2 channels will probably require the use of JPortAudio because
     * JavaSound currently does not support more than two channels.
     * JPortAudio is available at
     * http://www.softsynth.com/jsyn/developers/download.php.
     *

     * If you use more than 2 inputs or outputs then you will probably want to use {@link com.jsyn.unitgen.ChannelIn}
     * or {@link com.jsyn.unitgen.ChannelOut}, which can be associated with any indexed channel.
     *
     * @param frameRate in Hertz
     * @param inputDeviceID obtained from an {@link AudioDeviceManager} or pass
     *            AudioDeviceManager.USE_DEFAULT_DEVICE
     * @param numInputChannels 0 for no input, 1 for mono, 2 for stereo, etcetera
     * @param ouputDeviceID obtained from an AudioDeviceManager or pass
     *            AudioDeviceManager.USE_DEFAULT_DEVICE
     * @param numOutputChannels 0 for no output, 1 for mono, 2 for stereo, etcetera
     */
    public void start(int frameRate, int inputDeviceID, int numInputChannels, int ouputDeviceID,
            int numOutputChannels);

    /** @return JSyn version as a string */
    public String getVersion();

    /** @return version as an integer that always increases */
    public int getVersionCode();

    /** Stops the background thread that generates the audio. */
    public void stop();

    /**
     * An AudioDeviceManager is an interface to audio hardware. It might be implemented using
     * JavaSound or a wrapper around PortAudio.
     *
     * @return audio device manager being used by the synthesizer.
     */
    public AudioDeviceManager getAudioDeviceManager();

    /** @return the frame rate in samples per second */
    public int getFrameRate();

    /**
     * Add a unit generator to the synthesizer so it can be played. This is required before starting
     * or connecting a unit generator into a network.
     *
     * @param ugen a unit generator to be executed by the synthesizer
     */
    public void add(UnitGenerator ugen);

    /** Removes a unit generator added using add(). */
    public void remove(UnitGenerator ugen);

    /** @return the current audio time in seconds */
    public double getCurrentTime();

    /**
     * Start a unit generator at the specified time. This is not needed if a unit generator's output
     * is connected to other units. Typically you only need to start units that have no outputs, for
     * example LineOut or ChannelOut.
     */
    public void startUnit(UnitGenerator unit, double time);

    public void startUnit(UnitGenerator unit, TimeStamp timeStamp);

    /**
     * The startUnit and stopUnit methods are mainly for internal use.
     * Please call unit.start() or unit.stop() instead.
     * @param unit
     */
    public void startUnit(UnitGenerator unit);

    public void stopUnit(UnitGenerator unit, double time);

    public void stopUnit(UnitGenerator unit, TimeStamp timeStamp);

    /**
     * The startUnit and stopUnit methods are mainly for internal use.
     * Please call unit.start() or unit.stop() instead.
     * @param unit
     */
    public void stopUnit(UnitGenerator unit);

    /**
     * Sleep until the specified audio time is reached. In non-real-time mode, this will enable the
     * synthesizer to run.
     */
    public void sleepUntil(double time) throws InterruptedException;

    /**
     * Sleep for the specified audio time duration. In non-real-time mode, this will enable the
     * synthesizer to run.
     */
    public void sleepFor(double duration) throws InterruptedException;

    /**
     * If set true then the synthesizer will generate audio in real-time. Set it true for live
     * audio. If false then JSyn will run in non-real-time mode. This can be used to generate audio
     * to be written to a file. The default is true.
     *
     * @param realTime
     */
    public void setRealTime(boolean realTime);

    /** Is JSyn running in real-time mode? */
    public boolean isRealTime();

    /** Create a TimeStamp using the current audio time. */
    public TimeStamp createTimeStamp();

    /** @return the current CPU usage as a fraction between 0.0 and 1.0 */
    public double getUsage();

    /** @return inverse of frameRate, to avoid expensive divides */
    public double getFramePeriod();

    /**
     * This count is not reset if you stop and restart.
     *
     * @return number of frames synthesized
     */
    public long getFrameCount();

    /** Queue a command to be processed at a specific time in the background audio thread. */
    public void scheduleCommand(TimeStamp timeStamp, ScheduledCommand command);

    /** Queue a command to be processed at a specific time in the background audio thread. */
    public void scheduleCommand(double time, ScheduledCommand command);

    /** Queue a command to be processed as soon as possible in the background audio thread. */
    public void queueCommand(ScheduledCommand command);

    /**
     * Clear all scheduled commands from the queue.
     * Commands will be discarded.
     */
    public void clearCommandQueue();

    /**
     * @return true if the Synthesizer has been started
     */
    public boolean isRunning();

    /**
     * Add a task that will be run repeatedly on the Audio Thread before it generates every new block of Audio.
     * This task must be very quick and should not perform any blocking operations. If you are not
     * certain that you need an Audio rate task then don't use this.
     *
     * @param task
     */
    public void addAudioTask(Runnable task);

    public void removeAudioTask(Runnable task);

}


text:
namespace ash {

// static
std::string QuickStartScreen::GetResultString(Result result) {
  switch (result) {
    case Result::CANCEL:
      return "Cancel";
  }
}

QuickStartScreen::QuickStartScreen(QuickStartView* view,
                                   const ScreenExitCallback& exit_callback)
    : BaseScreen(QuickStartView::kScreenId, OobeScreenPriority::DEFAULT),
      view_(view),
      exit_callback_(exit_callback) {
  if (view_)
    view_->Bind(this);
}

QuickStartScreen::~QuickStartScreen() {
  if (view_)
    view_->Unbind();
}

void QuickStartScreen::OnViewDestroyed(TView* view) {
  if (view_ == view)
    view_ = nullptr;
}

bool QuickStartScreen::MaybeSkip(WizardContext* context) {
  return false;
}

void QuickStartScreen::ShowImpl() {
  if (view_) {
    view_->Show();
  }
  base::SequencedTaskRunnerHandle::Get()->PostDelayedTask(
      FROM_HERE,
      base::BindOnce(&QuickStartScreen::SendRandomFiguresForTesting,  // IN-TEST
                     base::Unretained(this)),
      base::Seconds(1));
}

void QuickStartScreen::HideImpl() {}

void QuickStartScreen::OnUserAction(const std::string& action_id) {
  SendRandomFiguresForTesting();  // IN-TEST
  BaseScreen::OnUserAction(action_id);
}

void QuickStartScreen::SendRandomFiguresForTesting() const {
  std::string token = base::UTF16ToASCII(
      base::TimeFormatWithPattern(base::Time::Now(), "MMMMdjmmss"));
  const auto& shapes = quick_start::GenerateShapes(token);
  view_->SetShapes(shapes);
}

}  // namespace ash


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".SendEmail" >

    <Button
        android:id="@+id/buttonSend"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/editTextEmail"
        android:layout_marginTop="99dp"
        android:text="Send" />

    <EditText
        android:id="@+id/editTextEmail"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="131dp"
        android:ems="10"
        android:hint="Enter Email"
        android:onClick= "onClick"/>

</RelativeLayout>


text:
/*----------- system components */
export Link from './Link/Link'
export List from './List/List'
export Input from './Input/Input'
export Select from './Select/Select'
export InputClean from './InputClean/InputClean'
export Svg from './Svg/Svg'
export Title from './Title/Title'
export Content from './Content/Content'
export Button from './Button/Button'
export Container from './Container/Container'
export FlexGrid from './FlexGrid/FlexGrid'
export Checkbox from './Checkbox/Checkbox'
export FormGroup from './FormGroup/FormGroup'
export ButtonCircle from './ButtonCircle/ButtonCircle'
export ButtonAdd from './ButtonAdd/ButtonAdd'
export RouteQuery from './RouteQuery/RouteQuery'
export RouteNotify from './RouteNotify/RouteNotify'
export Table from './Table/Table'
export PagesTransitions from './PagesTransitions/PagesTransitions'
export Preloader from './Preloader/Preloader'
export LoadingAnimation from './LoadingAnimation/LoadingAnimation'
export Map from './Map/Map'
export Resize from './Resize/Resize'
export Carousel from './Carousel/Carousel'
export PageLoadingAnimation from './PageLoadingAnimation/PageLoadingAnimation'
export FilterSlider from './FilterSlider/FilterSlider'
export ErrorMessage from './ErrorMessage/ErrorMessage'
export ExternalComponent from './ExternalComponent/ExternalComponent'
export TransitionLink from './TransitionLink/TransitionLink'
export PageHead from './PageHead/PageHead'


text:
package ro.fortsoft.wicket.dashboard;

import java.util.List;

/**
 * @author Decebal Suiu
 */
public interface WidgetActionsFactory {

	public List<WidgetAction> createWidgetActions(Widget widget);

}