text:
@interface LKBAFN : NSObject

//extern BOOL whetherHaveNetwork;

+(void)GET:(NSString *)URLString parameters:(id)parameters success:(void (^)(id responseObject))success failure:(void (^)(NSError * error))failure;

+(void)POST:(NSString *)URLString parameters:(id)parameters success:(void (^)(id responseObject))success failure:(void (^)(NSError * error))failure;

@end


text:
Gasoline Turbo
==============

**Generic Template** (but "Gasoline Turbo" smells better)

**Generates Blaze, React and Angular template from the same input.**

It works both as a command line tool or you can add it as any other npm module to your node.js and/or Meteor application. Works client-side in the browser too.

Project status
==============

Under development - just started.

**Angular is not supported yet.** Contributions are welcome - please write `getAngular` function.

Example apps
============

### Meteor Kitchen

- Meteor Kitchen UI is using gasoline-turbo. See Preview video at Youtube.

### Blaze to React online converter

- Live application is here: blaze2react. You can find source code (kitchen project) here.

Related projects
================

- blaze2gasoline - converts Meteor Blaze template (html and js) to input for gasoline-turbo (and from that point you can convert to React or Angular).

Usage
=====

When installed globally as npm module `npm install -g gasoline-turbo`, you can run CLI from your terminal:

```
gasoline-turbo -i input.json -o output_dir -f blaze
	-i, --input	Input file
	-o, --output	Output directory
	-f, --format	Output format. Can be "blaze", "react", "angular" or "html". Default: "blaze"
	-k, --kitchen	Generate "Meteor Kitchen" specific code.
	-c, --container	Generate "Meteor" container (React only).
	-w, --overwrite	Overwrite existing output files.
```

Or you can add it to your node.js (or Meteor) application by running `meteor npm install --save gasoline-turbo` and in your code:

```js
const gasoline = require("gasoline-turbo");
```

*(works both-client side and server-side)*

See [API reference](#api-reference) for list of exposed functions.

Input
=====

Input is object describing each html node plus control structures frequently used in client-side rendering templates such as "condition", "loop", etc.

Root of the object contains array of templates:

```js
{
	templates: [

	]
}
```

Template object
---------------

Template object:

```js
{
	type: "template",
	name: "HomePage",

	children: [
	],

	handlers: [
	],

	helpers: [
	]
}
```

*Example*

```js
{
	templates: [
		{
			type: "template",
			name: "HomePage",

			children: [
			],

			handlers: [
			],

			helpers: [
			]
		}

	]
}
```

This input will produce:

**Blaze**

HTML
```html
<template name="HomePage">
</template>
```

JS
```js
Template.HomePage.events({

});

Template.HomePage.helpers({

});
```

**React**

JSX

```js
export const HomePage = React.createClass({
	render() {
		return (
			<div></div>
		);
	}
});
```

**Angular 1**

(not implemented yet)

**Angular 2**

(not implemented yet)

HTML node
---------

Each object's `children` array can contain html node description like this:

```js
{
   "type": "html",
   "element": "div",
   "attributes": [
      {
         "name": "class",
         "value": "container"
      }
   ],

   "children": [
   ],

   "events": [
   ]
}

```

That will produce:

**Blaze**

```html
<div class="container"></div>
```

If output format is **React**, attribute names will be properly renamed:

```html
<div className="container"></div>
```

Text node
---------

Each object's `children` array can contain text node. Text node cannot have children. Text will be inserted into parent node.

```js
{
   "type": "text",
   "text": "Hello World!"
}
```

Example div with text:

```js
{
   "type": "html",
   "element": "div",
   "attributes": [
      {
         "name": "class",
         "value": "container"
      }
   ],
   "children": [
      {
         "type": "text",
         "text": "Hello World!"
      }
   ]
}

```

That will produce:

```html
<div class="container">
	Hello World!
</div>
```

Helpers
-------

Helper functions are defined in template object and can be used inside any element (as text or attribute name/value)

```js
{
	templates: [
		{
			type: "template",
			name: "HomePage",

			children: [
				{
					type: "html",
					element: "button",

					attributes: [
						name: "class",
						value: "{{buttonClass}}"
					],

					children: [
						{
							type: "text",
							text: "Click Me!"
						}
					]
				}
			],

			helpers: [
				{
					type: "helper",
					name: "buttonClass",
					arguments: [],
					code: "return \"btn btn-success\""
				}
			]
		}
	]
}
```

Events
------

Event handler is defined in element's parent "template" object, and can be attached to any element, for example on "click":

```js
{
	templates: [
		{
			type: "template",
			name: "HomePage",

			children: [
				{
					type: "html",
					element: "button",
					selector: ".nice-button",

					attributes: [
						name: "class",
						value: "nice-button"
					],

					children: [],

					events: [
           			   {
                             "type": "event",
                             "event": "onclick",
                             "handler": "onNiceClick"
                       }
					]
				}
			],

			handlers: [
				{
					type: "handler",
					name: "onNiceClick",
					code: "alert(\"Yeah!\");"
				}
			]
		}

	]
}
```

`selector` is used in blaze, in this example click to any element with class `.nice-button` will execute handler.
`event` is HTML event attribute name, for example: `onclick`

Resulting code:

**Blaze**

```js
Template.HomePage.events({
	"click .nice-button": function(e, t) {
		alert("Yeah!");
	}
});
```

**React**

```
export const HomePage = React.createClass({
	onNiceClick(e) {
		alert("Yeah!");
	},

	render() {
		return (
			<button className="nice-button" onClick={this.onNiceClick}></div>
		);
	}
});

```

Loop
----

Each object's `children` array can contain loop node.

```js
{
   "type": "loop",
   "dataset": "customers",
   "children": [
      {
         "type": "text",
         "text": "{{customers.name}}"
      }
   ]
}
```

That will produce:

**Blaze**

HTML
```html
{{#each customers}}
	{{name}}
{{/each}}
```

**React**

JSX

```js
{
	customers.map(function(item) {
		return item.name;
	})
}
```

**Angular 1**

(not implemented yet)

**Angular 2**

(not implemented yet)

Condition
---------

Conditional rendering. If expression evals true render one content else render another content. `children` array can contain only two objects: one of type "conditon-true" and another of type "condition-false". If condition evals true, content of `condition-true` will be rendered, otherwise content of `condition-false` will be rendered.

```js
{
	"type": "condition",
	"condition": "currentUser",

	"children": [
		{
			"type": "condition-true",

			"children": [
			]
		},

		{
			"type": "condition-false",

			"children": [
			]
		}
	]
}
```

Example input:

```js
{
	"type": "condition",
	"condition": "currentUser",

	"children": [
		{
			"type": "condition-true",

			"children": [
				{
					"type": "text",
					"text": "You are logged in!"
				}
			]
		},

		{
			"type": "condition-false",

			"children": [
				{
					"type": "text",
					"text": "You are not logged in!"
				}
			]
		}
	]
}
```

Output:

**Blaze**

HTML

```html
{{#if currentUser}}
	You are logged in!
{{else}}
	You are not logged in!
{{/if}}
```

**React**

JSX

```js
{
	currentUser ? "You are logged in!" : "You are not logged in!"
}
```

**Angular 1**

(not implemented yet)

**Angular 2**

(not implemented yet)

# API Reference

## randomString(len = 17)

Simply returns unique random string. (e.g. `XlE1N31VZA7iGLG43M`)

## addId(input, force = true)

Fuction iterates through entire `input` tree and sets each object's `_id` member to random string. If argument `force` is set to `true` then function sets `_id` even if object already have `_id` set (overwrites _id with new unique random value).

## removeId(input)

Fuction iterates through entire `input` tree and removes each object's `_id` member.

## findObject(input, objectId)

Searches `input` for object which `_id` equals `objectId` argument and returns that object. If object is not found then function returns `null`.

## findParentObject(input, objectId)

Function returns object's parent.

## findParentOfType(input, objectId, parentType)

Function searches the tree upwards starting from object's direct parent and returns first element that matches given type.

Example:

```
var template = findParentOfType(input, obj._id, "template");
```

## selectObject(input, objectId)

Object which `_id` equals `objectId` will be marked as selected (member `selected` will be set to true). All other objects will be unselected (member `selected` will be removed).

## findSelectedObject(input)

Function will return (first) object which `selected` property is `true`.

## acceptChildren(input, objectId)

Function returns `true` if object can contain children. Otherwise returns `false`.

## addObject(input, parentId, object)

Function will add new object as a child of the object which `_id` equals `parentId`.

## removeObject(input, objectId)

Object which `_id` equals `objectId` argument will be removed from the input tree.

## getBlaze(input, callback)

Function returns blaze html and js.

Example:

```js
getBlaze(input, function(err, html, js) {
	if(err) {
		alert(err);
		return;
	}

	console.log(html);
	console.log(js);
});
```

## getReact(input, callback)

Function returns react jsx.

Example:

```js
getReact(input, function(err, jsx) {
	if(err) {
		alert(err);
		return;
	}

	console.log(jsx);
});
```

## getAngular(input, callback)

*Sorry, angular is not supported yet*

## getHTML(input, callback)

Function returns pure static HTML - any control structures (loops, conditions etc.) are ignored, but their html content is included.

Example:

```js
getHTML(input, function(err, html) {
	if(err) {
		alert(err);
		return;
	}

	console.log(html);
});
```

## getWireframe(input, templateName)

Function returns static HTML which can be used by [visual UI](#example-apps).

Each element is encapsulated into `<div class="gasoline-turbo" data-id="OBJECT ID"> ... </div>` or `<span class="gasoline-turbo" data-id="OBJECT ID"> ... </span>` ("div" or "span" - depending on is element inline or block-level entity).

Example:

```js
var wireframe = getWireframe(input, "homePage");
```

---

To be continued...

redpajama_set_name: RedPajamaGithub


text:
<!doctype html>

    <meta charset="utf-8">

    <title>My Story</title>
    <meta name="description" content="Get started with amp-story">

    <meta name="viewport"
          content="width=device-width,minimum-scale=1,initial-scale=1">
    <link rel="canonical" href="/stories/features/media/">

    <amp-story standalone
    title="Stories in AMP - Media"
    publisher="AMP Project"
    publisher-logo-src="<%host%>/favicons/coast-228x228.png"
    poster-portrait-src="https://picsum.photos/300/400"
    poster-square-src="https://picsum.photos/300/300"
    poster-landscape-src="https://picsum.photos/400/300">

      <amp-story-page id="amp-img">
        <amp-story-grid-layer template="fill">
          <amp-img  src="https://unsplash.it/720/320/?image=10"
                    grid-area="middle-third"
                    width="720"
                    height="320"
                    layout="responsive"></amp-img>
        </amp-story-grid-layer>
        <amp-story-grid-layer template="thirds">

amp-img

        </amp-story-grid-layer>
      </amp-story-page>

      <amp-story-page id="amp-video">
        <amp-story-grid-layer template="fill">
          <amp-video autoplay loop
                              grid-area="middle-third"
                width="720"
                height="960"
                poster="<%host%>/img/story_video_dog_cover.jpg"
                layout="responsive">
                <source src="<%host%>/video/story_video_dog.mp4" type="video/mp4">
          </amp-video>
        </amp-story-grid-layer>
        <amp-story-grid-layer template="thirds">

amp-video

        </amp-story-grid-layer>
      </amp-story-page>

      <amp-story-page id="amp-audio">
        <amp-story-grid-layer template="fill">
          <amp-audio width="auto"
                     height="50"
                     autoplay
                     src="https://ia801402.us.archive.org/16/items/EDIS-SRP-0197-06/EDIS-SRP-0197-06.mp3">
          </amp-audio>
        </amp-story-grid-layer>
        <amp-story-grid-layer template="thirds">

amp-audio

        </amp-story-grid-layer>
      </amp-story-page>

      <amp-story-page id="amp-gfycat">
        <amp-story-grid-layer template="fill">
            <amp-gfycat data-gfyid="TautWhoppingCougar"
                        width="640"
                        height="360"
                        layout="responsive">
            </amp-gfycat>
        </amp-story-grid-layer>
        <amp-story-grid-layer template="vertical">

amp-gfycat

        </amp-story-grid-layer>
      </amp-story-page>

      <amp-story-page id="amp-google-vrview-image">
        <amp-story-grid-layer template="fill">
          <amp-google-vrview-image src="https://storage.googleapis.com/vrview/examples/coral.jpg"
                                   width="400"
                                   height="300"
                                   layout="responsive">
          </amp-google-vrview-image>
        </amp-story-grid-layer>
        <amp-story-grid-layer template="thirds">

amp-google-vrview-image

        </amp-story-grid-layer>
      </amp-story-page>

      <amp-story-bookend src="<%host%>/json/bookend.json" layout="nodisplay">
      </amp-story-bookend>

    </amp-story>


text:
package psn

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
	"sync"
)

// TransportProtocol is tcp, tcp6.
type TransportProtocol int

const (
	TypeTCP TransportProtocol = iota
	TypeTCP6
)

func (tp TransportProtocol) String() string {
	switch tp {
	case TypeTCP:
		return "tcp"
	case TypeTCP6:
		return "tcp6"
	default:
		panic(fmt.Errorf("unknown transport protocol %d", tp))
	}
}

// GetProcNetTCPByPID reads '/proc/$PID/net/tcp(6)' data.
func GetProcNetTCPByPID(pid int64, tp TransportProtocol) (ss []NetTCP, err error) {
	return parseProcNetTCPByPID(pid, tp)
}

type procNetColumnIndex int

const (
	proc_net_tcp_idx_sl procNetColumnIndex = iota
	proc_net_tcp_idx_local_address
	proc_net_tcp_idx_remote_address
	proc_net_tcp_idx_st
	proc_net_tcp_idx_tx_queue_rx_queue
	proc_net_tcp_idx_tr_tm_when
	proc_net_tcp_idx_retrnsmt
	proc_net_tcp_idx_uid
	proc_net_tcp_idx_timeout
	proc_net_tcp_idx_inode
)

var (
	// RPC_SHOW_SOCK
	// https://github.com/torvalds/linux/blob/master/include/trace/events/sunrpc.h
	netTCPStatus = map[string]string{
		"01": "ESTABLISHED",
		"02": "SYN_SENT",
		"03": "SYN_RECV",
		"04": "FIN_WAIT1",
		"05": "FIN_WAIT2",
		"06": "TIME_WAIT",
		"07": "CLOSE",
		"08": "CLOSE_WAIT",
		"09": "LAST_ACK",
		"0A": "LISTEN",
		"0B": "CLOSING",
	}
)

func parseProcNetTCPByPID(pid int64, tp TransportProtocol) ([]NetTCP, error) {
	fpath := fmt.Sprintf("/proc/%d/net/%s", pid, tp.String())
	f, err := openToRead(fpath)
	if err != nil {
		return nil, err
	}
	defer f.Close()

	rows := [][]string{}

	first := true
	scanner := bufio.NewScanner(f)
	for scanner.Scan() {
		txt := scanner.Text()
		if len(txt) == 0 {
			continue
		}

		fs := strings.Fields(txt)
		if len(fs) < int(proc_net_tcp_idx_inode+1) {
			return nil, fmt.Errorf("not enough columns at %v", fs)
		}

		if first {
			if fs[0] != "sl" { // header
				return nil, fmt.Errorf("first line must be columns but got = %#q", fs)
			}
			first = false
			continue
		}

		row := make([]string, 10)
		copy(row, fs[:proc_net_tcp_idx_inode+1])

		rows = append(rows, row)
	}
	if err := scanner.Err(); err != nil {
		return nil, err
	}

	var ipParse func(string) (string, int64, error)
	switch tp {
	case TypeTCP:
		ipParse = parseLittleEndianIpv4
	case TypeTCP6:
		ipParse = parseLittleEndianIpv6
	}

	nch, errc := make(chan NetTCP), make(chan error)
	for _, row := range rows {
		go func(row []string) {
			ns := NetTCP{}

			ns.Type = tp.String()

			sn, err := strconv.ParseUint(strings.Replace(row[proc_net_tcp_idx_sl], ":", "", -1), 10, 64)
			if err != nil {
				errc <- err
				return
			}
			ns.Sl = sn

			ns.LocalAddress = strings.TrimSpace(row[proc_net_tcp_idx_local_address])
			lp, lt, err := ipParse(row[proc_net_tcp_idx_local_address])
			if err != nil {
				errc <- err
				return
			}
			ns.LocalAddressParsedIPHost = strings.TrimSpace(lp)
			ns.LocalAddressParsedIPPort = lt

			ns.RemAddress = strings.TrimSpace(row[proc_net_tcp_idx_remote_address])
			rp, rt, err := ipParse(row[proc_net_tcp_idx_remote_address])
			if err != nil {
				errc <- err
				return
			}
			ns.RemAddressParsedIPHost = strings.TrimSpace(rp)
			ns.RemAddressParsedIPPort = rt

			ns.St = strings.TrimSpace(row[proc_net_tcp_idx_st])
			ns.StParsedStatus = strings.TrimSpace(netTCPStatus[row[proc_net_tcp_idx_st]])

			qs := strings.Split(row[proc_net_tcp_idx_tx_queue_rx_queue], ":")
			if len(qs) == 2 {
				ns.TxQueue = qs[0]
				ns.RxQueue = qs[1]
			}
			trs := strings.Split(row[proc_net_tcp_idx_tr_tm_when], ":")
			if len(trs) == 2 {
				ns.Tr = trs[0]
				ns.TmWhen = trs[1]
			}
			ns.Retrnsmt = row[proc_net_tcp_idx_retrnsmt]

			un, err := strconv.ParseUint(row[proc_net_tcp_idx_uid], 10, 64)
			if err != nil {
				errc <- err
				return
			}
			ns.Uid = un

			to, err := strconv.ParseUint(row[proc_net_tcp_idx_timeout], 10, 64)
			if err != nil {
				errc <- err
				return
			}
			ns.Timeout = to

			ns.Inode = strings.TrimSpace(row[proc_net_tcp_idx_inode])

			nch <- ns
		}(row)

	}

	nss := make([]NetTCP, 0, len(rows))
	cn, limit := 0, len(rows)
	for cn != limit {
		select {
		case err := <-errc:
			return nil, err
		case p := <-nch:
			nss = append(nss, p)
			cn++
		}
	}
	close(nch)
	close(errc)

	return nss, nil
}

// SearchInode finds the matching process to the given inode.
func SearchInode(fds []string, inode string) (pid int64) {
	var mu sync.RWMutex

	var wg sync.WaitGroup
	wg.Add(len(fds))
	for _, fd := range fds {
		go func(fdpath string) {
			defer wg.Done()

			mu.RLock()
			done := pid != 0
			mu.RUnlock()
			if done {
				return
			}

			// '/proc/[pid]/fd' contains type:[inode]
			sym, err := os.Readlink(fdpath)
			if err != nil {
				return
			}
			if !strings.Contains(strings.TrimSpace(sym), inode) {
				return
			}

			pd, err := pidFromFd(fdpath)
			if err != nil {
				return
			}
			mu.Lock()
			pid = pd
			mu.Unlock()
		}(fd)
	}
	wg.Wait()

	if pid == 0 {
		pid = -1
	}
	return
}


text:
require 'bcrypt'

class User < ActiveRecord::Base
  # Validations
  validates :first_name, :last_name, :email, :username, :password_hash, presence: true
  validates :email, :username, uniqueness: true

  # Associations
  has_and_belongs_to_many :projects
  has_and_belongs_to_many :brands
  has_many :brand_requests, through: :brands, source: :pleas
  has_many :project_requests, through: :projects, source: :pleas
  has_many :likes, :as => :likeable

  # User authentication
  include BCrypt

  def password
    @password ||= Password.new(password_hash)
  end

  def password=(new_password)
    @password = Password.create(new_password)
    self.password_hash = @password
  end

  def set_profile_pic(filename, tempfile)
    filename = "hh_#{self.username}#{File.extname(tempfile)}".split(" ").join("_")
    File.open(File.join(APP_ROOT, 'public', 'assets', 'users' , filename), "w") do |f|
      f.write(tempfile.read)
    end
    base_path = "/assets/users"
    path = [base_path, filename]
    self.profile_pic_url = path.join('/')
  end

end


text:
<?xml version="1.0" encoding="ISO-8859-1"?>
<igsSiteLog xmlns="http://sopac.ucsd.edu/ns/geodesy/doc/igsSiteLog/2004" xmlns:contact="http://sopac.ucsd.edu/ns/geodesy/doc/igsSiteLog/contact/2004" xmlns:equip="http://sopac.ucsd.edu/ns/geodesy/doc/igsSiteLog/equipment/2004" xmlns:li="http://sopac.ucsd.edu/ns/geodesy/doc/igsSiteLog/localInterferences/2004" xmlns:mi="http://sopac.ucsd.edu/ns/geodesy/doc/igsSiteLog/monumentInfo/2004" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://sopac.ucsd.edu/ns/geodesy/doc/igsSiteLog/2004  http://sopac.ucsd.edu/ns/geodesy/doc/igsSiteLog/2004/igsSiteLog.xsd"><!--Alice Springs Station Log-->
<!--Version 0.01-->
<!--Geoscience Australia Geodesy-->
<!--For More Information regarding XML based Site Logs go to-->
<!--http://sopac.ucsd.edu/projects/xml-->

  <formInformation>
    <mi:preparedBy>Lotti Jivall</mi:preparedBy>
    <mi:datePrepared>2012-12-06</mi:datePrepared>
    <mi:reportType>UPDATE</mi:reportType>
    <mi:previousLog>mar6_20120117.log</mi:previousLog>
    <mi:modifiedSections>0, 1, 10.1, 11</mi:modifiedSections>
  </formInformation>
  <siteIdentification>
    <mi:siteName>Maartsbo</mi:siteName>
    <mi:fourCharacterID>MAR6</mi:fourCharacterID>
    <mi:monumentInscription>Maartsbo SWEPOS 1993</mi:monumentInscription>
    <mi:iersDOMESNumber>10405M002</mi:iersDOMESNumber>
    <mi:cdpNumber>(A4)</mi:cdpNumber>
    <mi:monumentDescription>PILLAR</mi:monumentDescription>
    <mi:heightOfTheMonument></mi:heightOfTheMonument>
    <mi:monumentFoundation>(STEEL RODS, CONCRETE BLOCK, ROOF, etc)</mi:monumentFoundation>
    <mi:foundationDepth></mi:foundationDepth>
    <mi:markerDescription>(CHISELLED CROSS/DIVOT/BRASS NAIL/etc)</mi:markerDescription>
    <mi:dateInstalled>1993-08-01</mi:dateInstalled>
    <mi:geologicCharacteristic>BEDROCK</mi:geologicCharacteristic>
    <mi:bedrockType>(IGNEOUS/METAMORPHIC/SEDIMENTARY)</mi:bedrockType>
    <mi:bedrockCondition>FRESH</mi:bedrockCondition>
    <mi:fractureSpacing>over 200 cm</mi:fractureSpacing>
    <mi:faultZonesNearby>(YES/NO/Name of the zone)</mi:faultZonesNearby>
    <mi:distance-Activity>(multiple lines)</mi:distance-Activity>
    <mi:notes>Swedish permanent GPS Network (SWEPOS) The same monument and antenna has been for the IGEX/IGLOS-site MR6G up to 2003-08-19</mi:notes>
  </siteIdentification>
  <siteLocation>
    <mi:city>Maartsbo</mi:city>
    <mi:state></mi:state>
    <mi:country>Sweden</mi:country>
    <mi:tectonicPlate>EURASIAN</mi:tectonicPlate>
    <approximatePositionITRF>
      <mi:xCoordinateInMeters>2998189.7132</mi:xCoordinateInMeters>
      <mi:yCoordinateInMeters>931451.5886</mi:yCoordinateInMeters>
      <mi:zCoordinateInMeters>5533398.4735</mi:zCoordinateInMeters>
      <mi:latitude-North>+603542.51</mi:latitude-North>
      <mi:longitude-East>+0171530.68</mi:longitude-East>
      <mi:elevation-m_ellips.>75.4</mi:elevation-m_ellips.>
    </approximatePositionITRF>
    <mi:notes>SWEREF 99 (Swedish realisation of ETRS89)</mi:notes>
  </siteLocation>
  <gnssReceiver>
    <equip:receiverType>ROGUE SNR-8100</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>T-221</equip:serialNumber>
    <equip:firmwareVersion>2.8</equip:firmwareVersion>
    <equip:elevationCutoffSetting>15</equip:elevationCutoffSetting>
    <equip:dateInstalled>1993-08-01T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>1993-08-01</equip:dateRemoved>
    <equip:temperatureStabilization>25 +/- 3</equip:temperatureStabilization>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>ASHTECH Z-XII3</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>243</equip:serialNumber>
    <equip:firmwareVersion>8M</equip:firmwareVersion>
    <equip:elevationCutoffSetting>15</equip:elevationCutoffSetting>
    <equip:dateInstalled>1993-08-01T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>1995-09-13</equip:dateRemoved>
    <equip:temperatureStabilization>25 +/- 3</equip:temperatureStabilization>
    <equip:notes>Elevation cutoff set to 10 degrees on 1993-11-02.</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>ASHTECH Z-XII3</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>243</equip:serialNumber>
    <equip:firmwareVersion>1F00</equip:firmwareVersion>
    <equip:elevationCutoffSetting>10</equip:elevationCutoffSetting>
    <equip:dateInstalled>1995-09-13T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>1996-05-03</equip:dateRemoved>
    <equip:temperatureStabilization>25 +/- 3</equip:temperatureStabilization>
    <equip:notes>Firmware upgrade</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>ASHTECH Z-XII3</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>243</equip:serialNumber>
    <equip:firmwareVersion>1E86</equip:firmwareVersion>
    <equip:elevationCutoffSetting>10</equip:elevationCutoffSetting>
    <equip:dateInstalled>1996-05-03T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>1996-11-15</equip:dateRemoved>
    <equip:temperatureStabilization>25 +/- 3</equip:temperatureStabilization>
    <equip:notes>Firmware upgrade</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>ASHTECH Z-XII3</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>828</equip:serialNumber>
    <equip:firmwareVersion>1G00</equip:firmwareVersion>
    <equip:elevationCutoffSetting>10</equip:elevationCutoffSetting>
    <equip:dateInstalled>1996-11-15T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>1996-12-19</equip:dateRemoved>
    <equip:temperatureStabilization>25 +/- 3</equip:temperatureStabilization>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>ASHTECH Z-XII3</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>769</equip:serialNumber>
    <equip:firmwareVersion>1G00</equip:firmwareVersion>
    <equip:elevationCutoffSetting>10</equip:elevationCutoffSetting>
    <equip:dateInstalled>1996-12-19T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>1998-09-18</equip:dateRemoved>
    <equip:temperatureStabilization>25 +/- 3</equip:temperatureStabilization>
    <equip:notes>Elevation cutoff set to 5 degrees probably on 1997-04-23.</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>ASHTECH Z-XII3</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>833</equip:serialNumber>
    <equip:firmwareVersion>1G00</equip:firmwareVersion>
    <equip:elevationCutoffSetting>5</equip:elevationCutoffSetting>
    <equip:dateInstalled>1998-09-18T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>1999-02-02</equip:dateRemoved>
    <equip:temperatureStabilization>25 +/- 3</equip:temperatureStabilization>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>ASHTECH Z-XII3</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>833</equip:serialNumber>
    <equip:firmwareVersion>1F67</equip:firmwareVersion>
    <equip:elevationCutoffSetting>5</equip:elevationCutoffSetting>
    <equip:dateInstalled>1999-02-02T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>1999-07-14</equip:dateRemoved>
    <equip:temperatureStabilization>25 +/- 3</equip:temperatureStabilization>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>ASHTECH Z-XII3</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>833</equip:serialNumber>
    <equip:firmwareVersion>CC00</equip:firmwareVersion>
    <equip:elevationCutoffSetting>5</equip:elevationCutoffSetting>
    <equip:dateInstalled>1999-07-14T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>2003-08-19</equip:dateRemoved>
    <equip:temperatureStabilization>25 +/- 3</equip:temperatureStabilization>
    <equip:notes>CLOCK STEERING set to N 2000-12-06</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>JPS LEGACY</equip:receiverType>
    <equip:satelliteSystem>GPS+GLO</equip:satelliteSystem>
    <equip:serialNumber>MT300135051</equip:serialNumber>
    <equip:firmwareVersion>2.2 Oct,15,2001 p1</equip:firmwareVersion>
    <equip:elevationCutoffSetting>5</equip:elevationCutoffSetting>
    <equip:dateInstalled>2003-08-19T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>2004-07-20T13:00Z</equip:dateRemoved>
    <equip:temperatureStabilization>25 +/- 3</equip:temperatureStabilization>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>JPS LEGACY</equip:receiverType>
    <equip:satelliteSystem>GPS+GLO</equip:satelliteSystem>
    <equip:serialNumber>MT300135051</equip:serialNumber>
    <equip:firmwareVersion>2.3 Apr,28,2004 p4</equip:firmwareVersion>
    <equip:elevationCutoffSetting>5</equip:elevationCutoffSetting>
    <equip:dateInstalled>2004-07-20T13:00Z</equip:dateInstalled>
    <equip:dateRemoved>2006-06-27T13:00Z</equip:dateRemoved>
    <equip:temperatureStabilization>25 +/- 3</equip:temperatureStabilization>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>JPS E_GGD</equip:receiverType>
    <equip:satelliteSystem>GPS+GLO</equip:satelliteSystem>
    <equip:serialNumber>AG3KSX1OJY8</equip:serialNumber>
    <equip:firmwareVersion>2.4 Sep,02,2004</equip:firmwareVersion>
    <equip:elevationCutoffSetting>5</equip:elevationCutoffSetting>
    <equip:dateInstalled>2006-06-27T13:00Z</equip:dateInstalled>
    <equip:dateRemoved>2007-08-15T13:10Z</equip:dateRemoved>
    <equip:temperatureStabilization>25 +/- 3</equip:temperatureStabilization>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>JPS E_GGD</equip:receiverType>
    <equip:satelliteSystem>GPS+GLO</equip:satelliteSystem>
    <equip:serialNumber>AG3KSX1OJY8</equip:serialNumber>
    <equip:firmwareVersion>2.5 Apr,10,2007 p3</equip:firmwareVersion>
    <equip:elevationCutoffSetting>5</equip:elevationCutoffSetting>
    <equip:dateInstalled>2007-08-15T13:10Z</equip:dateInstalled>
    <equip:dateRemoved>2007-11-13</equip:dateRemoved>
    <equip:temperatureStabilization>25 +/- 3</equip:temperatureStabilization>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>JPS E_GGD</equip:receiverType>
    <equip:satelliteSystem>GPS+GLO</equip:satelliteSystem>
    <equip:serialNumber>AG3KSX1OJY8</equip:serialNumber>
    <equip:firmwareVersion>2.6.0 Apr,18,2007</equip:firmwareVersion>
    <equip:elevationCutoffSetting>5</equip:elevationCutoffSetting>
    <equip:dateInstalled>2007-11-13T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>2008-05-06T17:20Z</equip:dateRemoved>
    <equip:temperatureStabilization>25 +/- 3</equip:temperatureStabilization>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>JPS E_GGD</equip:receiverType>
    <equip:satelliteSystem>GPS+GLO</equip:satelliteSystem>
    <equip:serialNumber>AG3KSX1OJY8</equip:serialNumber>
    <equip:firmwareVersion>2.6.1 Jan,10,2008</equip:firmwareVersion>
    <equip:elevationCutoffSetting>5</equip:elevationCutoffSetting>
    <equip:dateInstalled>2008-05-06T17:35Z</equip:dateInstalled>
    <equip:dateRemoved></equip:dateRemoved>
    <equip:temperatureStabilization>25 +/- 3</equip:temperatureStabilization>
    <equip:notes>Firmware upgrade</equip:notes>
  </gnssReceiver>
  <gnssAntenna>
    <equip:antennaType>AOAD/M_T        DUTD</equip:antennaType>
    <equip:serialNumber>221</equip:serialNumber>
    <equip:antennaReferencePoint>BPA</equip:antennaReferencePoint>
    <equip:marker-arpUpEcc.>000.0710</equip:marker-arpUpEcc.>
    <equip:marker-arpNorthEcc.>000.0000</equip:marker-arpNorthEcc.>
    <equip:marker-arpEastEcc.>000.0000</equip:marker-arpEastEcc.>
    <equip:alignmentFromTrueNorth>0</equip:alignmentFromTrueNorth>
    <equip:antennaRadomeType>DUTD</equip:antennaRadomeType>
    <equip:radomeSerialNumber></equip:radomeSerialNumber>
    <equip:antennaCableType>(vendor & type number)</equip:antennaCableType>
    <equip:antennaCableLength></equip:antennaCableLength>
    <equip:dateInstalled>1993-08-01T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>1995-02-07</equip:dateRemoved>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssAntenna>
  <gnssAntenna>
    <equip:antennaType>AOAD/M_T        DOME</equip:antennaType>
    <equip:serialNumber>221</equip:serialNumber>
    <equip:antennaReferencePoint>BPA</equip:antennaReferencePoint>
    <equip:marker-arpUpEcc.>000.0710</equip:marker-arpUpEcc.>
    <equip:marker-arpNorthEcc.>000.0000</equip:marker-arpNorthEcc.>
    <equip:marker-arpEastEcc.>000.0000</equip:marker-arpEastEcc.>
    <equip:alignmentFromTrueNorth>0</equip:alignmentFromTrueNorth>
    <equip:antennaRadomeType>DOME</equip:antennaRadomeType>
    <equip:radomeSerialNumber></equip:radomeSerialNumber>
    <equip:antennaCableType>(vendor & type number)</equip:antennaCableType>
    <equip:antennaCableLength></equip:antennaCableLength>
    <equip:dateInstalled>1995-02-07T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>1995-12-14</equip:dateRemoved>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssAntenna>
  <gnssAntenna>
    <equip:antennaType>AOAD/M_T        NONE</equip:antennaType>
    <equip:serialNumber>221</equip:serialNumber>
    <equip:antennaReferencePoint>BPA</equip:antennaReferencePoint>
    <equip:marker-arpUpEcc.>000.0710</equip:marker-arpUpEcc.>
    <equip:marker-arpNorthEcc.>000.0000</equip:marker-arpNorthEcc.>
    <equip:marker-arpEastEcc.>000.0000</equip:marker-arpEastEcc.>
    <equip:alignmentFromTrueNorth>0</equip:alignmentFromTrueNorth>
    <equip:antennaRadomeType>NONE</equip:antennaRadomeType>
    <equip:radomeSerialNumber></equip:radomeSerialNumber>
    <equip:antennaCableType>(vendor & type number)</equip:antennaCableType>
    <equip:antennaCableLength></equip:antennaCableLength>
    <equip:dateInstalled>1995-12-14T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>1996-01-10</equip:dateRemoved>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssAntenna>
  <gnssAntenna>
    <equip:antennaType>AOAD/M_T        SNOW</equip:antennaType>
    <equip:serialNumber>221</equip:serialNumber>
    <equip:antennaReferencePoint>BPA</equip:antennaReferencePoint>
    <equip:marker-arpUpEcc.>000.0710</equip:marker-arpUpEcc.>
    <equip:marker-arpNorthEcc.>000.0000</equip:marker-arpNorthEcc.>
    <equip:marker-arpEastEcc.>000.0000</equip:marker-arpEastEcc.>
    <equip:alignmentFromTrueNorth>0</equip:alignmentFromTrueNorth>
    <equip:antennaRadomeType>SNOW</equip:antennaRadomeType>
    <equip:radomeSerialNumber></equip:radomeSerialNumber>
    <equip:antennaCableType>(vendor & type number)</equip:antennaCableType>
    <equip:antennaCableLength></equip:antennaCableLength>
    <equip:dateInstalled>1996-01-10T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>1996-05-07</equip:dateRemoved>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssAntenna>
  <gnssAntenna>
    <equip:antennaType>AOAD/M_T        OSOD</equip:antennaType>
    <equip:serialNumber>221</equip:serialNumber>
    <equip:antennaReferencePoint>BPA</equip:antennaReferencePoint>
    <equip:marker-arpUpEcc.>000.0710</equip:marker-arpUpEcc.>
    <equip:marker-arpNorthEcc.>000.0000</equip:marker-arpNorthEcc.>
    <equip:marker-arpEastEcc.>000.0000</equip:marker-arpEastEcc.>
    <equip:alignmentFromTrueNorth>0</equip:alignmentFromTrueNorth>
    <equip:antennaRadomeType>OSOD</equip:antennaRadomeType>
    <equip:radomeSerialNumber></equip:radomeSerialNumber>
    <equip:antennaCableType>(vendor & type number)</equip:antennaCableType>
    <equip:antennaCableLength></equip:antennaCableLength>
    <equip:dateInstalled>1996-05-07T00:00Z</equip:dateInstalled>
    <equip:dateRemoved></equip:dateRemoved>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssAntenna>
  <frequencyStandard>
    <equip:standardType>INTERNAL </equip:standardType>
    <equip:inputFrequency>(if external)</equip:inputFrequency>
    <equip:effectiveDates>1991-07-01/1997-01-01</equip:effectiveDates>
    <equip:notes>(multiple lines)</equip:notes>
  </frequencyStandard>
  <frequencyStandard>
    <equip:standardType>EXTERNAL RUBIDIUM</equip:standardType>
    <equip:inputFrequency>10 MHz</equip:inputFrequency>
    <equip:effectiveDates>1997-01-01/CCYY-MM-DD</equip:effectiveDates>
    <equip:notes>CLOCK STEERING set to N 2000-12-06</equip:notes>
  </frequencyStandard>
  <collocationInformation>
    <equip:instrumentType>GRAVITY MEASUREMENTS</equip:instrumentType>
    <equip:status>MOBILE</equip:status>
    <equip:effectiveDates>1995-09-22/1995-09-24</equip:effectiveDates>
    <equip:notes>(multiple lines)</equip:notes>
  </collocationInformation>
  <collocationInformation>
    <equip:instrumentType>GRAVITY MEASUREMENTS</equip:instrumentType>
    <equip:status>MOBILE</equip:status>
    <equip:effectiveDates>1995-09-25/1995-09-27</equip:effectiveDates>
    <equip:notes>(multiple lines)</equip:notes>
  </collocationInformation>
  <collocationInformation>
    <equip:instrumentType>GPS/GLONASS</equip:instrumentType>
    <equip:status>PERMANENT</equip:status>
    <equip:effectiveDates>1998-08-01/2003-08-19</equip:effectiveDates>
    <equip:notes>IGLOS site MR6G utilized the same pillar and antenna as MAR6.</equip:notes>
  </collocationInformation>
  <localEpisodicEvents>
    <li:date>2012-08-15/2012-08-15</li:date>
    <li:event>The radome was removed 10</li:event>
  </localEpisodicEvents>
  <contactAgency>
    <contact:agency>Lantmateriet, the Swedish mapping, cadastral and</contact:agency>
    <contact:preferredAbbreviation>LMV</contact:preferredAbbreviation>
    <contact:mailingAddress>S-801 82 Gavle, Sweden</contact:mailingAddress>
    <contact:primaryContact>
      <contact:name>SWEPOS Control centre</contact:name>
      <contact:telephonePrimary>+46 26 63 37 53</contact:telephonePrimary>
      <contact:telephoneSecondary>+46 26 63 38 84</contact:telephoneSecondary>
      <contact:fax>+46 26 65 42 75</contact:fax>
      <contact:e-mail>swepos@lm.se</contact:e-mail>
    </contact:primaryContact>
    <contact:secondaryContact>
      <contact:name>Peter Wiklund</contact:name>
      <contact:telephonePrimary>+46 26 63 38 84</contact:telephonePrimary>
      <contact:telephoneSecondary>+46 70 344 06 38</contact:telephoneSecondary>
      <contact:fax>+46 26 61 06 76</contact:fax>
      <contact:e-mail>peter.wiklund@lm.se</contact:e-mail>
    </contact:secondaryContact>
    <contact:notes>land registration authority (multiple lines)</contact:notes>
  </contactAgency>
  <responsibleAgency>
    <contact:agency>Lantmateriet, the Swedish mapping, cadastral and</contact:agency>
    <contact:preferredAbbreviation>LMV</contact:preferredAbbreviation>
    <contact:mailingAddress>(multiple lines)</contact:mailingAddress>
    <contact:primaryContact>
      <contact:name></contact:name>
      <contact:telephonePrimary></contact:telephonePrimary>
      <contact:telephoneSecondary></contact:telephoneSecondary>
      <contact:fax></contact:fax>
      <contact:e-mail></contact:e-mail>
    </contact:primaryContact>
    <contact:secondaryContact>
      <contact:name></contact:name>
      <contact:telephonePrimary></contact:telephonePrimary>
      <contact:telephoneSecondary></contact:telephoneSecondary>
      <contact:fax></contact:fax>
      <contact:e-mail></contact:e-mail>
    </contact:secondaryContact>
    <contact:notes>(multiple lines)</contact:notes>
  </responsibleAgency>
  <moreInformation>
    <mi:primaryDataCenter></mi:primaryDataCenter>
    <mi:secondaryDataCenter></mi:secondaryDataCenter>
    <mi:urlForMoreInformation></mi:urlForMoreInformation>
    <mi:hardCopyOnFile/>
    <mi:siteMap>(Y or URL)</mi:siteMap>
    <mi:siteDiagram>(Y or URL)</mi:siteDiagram>
    <mi:horizonMask>(Y or URL)</mi:horizonMask>
    <mi:monumentDescription></mi:monumentDescription>
    <mi:sitePictures>(Y or URL)</mi:sitePictures>
    <mi:notes>(multiple lines)</mi:notes>
    <mi:antennaGraphicsWithDimensions/>
    <mi:insertTextGraphicFromAntenna/>
  </moreInformation>
</igsSiteLog>


text:
#include <QApplication>

#include <QtAV>
#include <QtAVWidgets>

int main(int argc, char *argv[])
{
    QtAV::Widgets::registerRenderers();
    QApplication a(argc, argv);
    QtAV::VideoOutput renderer;
    renderer.widget()->show();
    renderer.widget()->setWindowTitle(QString::fromLatin1("Play video from qrc--QtAV %1 wbsecg1@gmail.com").arg(QtAV_Version_String_Long()));
    QtAV::AVPlayer player;
    player.setRenderer(&renderer);

    player.play(QString::fromLatin1("qrc:/test.mp4"));

    return a.exec();
}


text:
import * as react from "../../helpers/react";
import * as t from "../../../types";

export function Program(node, parent, scope, file) {
  file.set("jsxIdentifierTag", t.memberExpression(t.identifier("mu"), t.identifier("Tag")));
  file.set("jsxIdentifierElem", t.memberExpression(t.identifier("mu"), t.identifier("Elem")));
}

require("../../helpers/build-react-transformer")(exports, {
  pre(state) {
    var tagName = state.tagName;
    var args    = state.args;
    if (react.isCompatTag(tagName)) {
      args.push(t.literal(tagName));
    } else {
      args.push(state.tagExpr);
    }
  },

  post(state, file) {
    var props = state.args[1];
    if (props.type === "ObjectExpression") {
      props = props.properties;
      for (var i = 0; i < props.length; i++) {
        var prop = props[i];
        if (prop.key.name === "class") {
          prop.key.name = "className";
        }
      }
    }
    if (react.isCompatTag(state.tagName)) {
      state.callee = file.get("jsxIdentifierTag");
    } else {
      state.callee = file.get("jsxIdentifierElem");
    }
  }
});


text:
/** @babel */

import path from "path";
import gitCmd from "../git-cmd";
import helper from "../helper";
import Notifications from "../Notifications";
import RunCommandDialog from "../dialogs/RunCommandDialog";
import stringArgv from "string-argv";

export default {
	label: "Run Command...",
	description: "Run a git command",
	async command(filePaths, statusBar, git = gitCmd, notifications = Notifications, dialog = RunCommandDialog, title = "Run Command") {
		const [files, root] = await helper.getRootAndFilesStatuses(filePaths, git);
		await helper.checkGitLock(root);
		const treeView = atom.config.get("git-menu.treeView");
		const [gitCommand, selectedFiles] = await new dialog({files, treeView}).activate();
		if (!gitCommand) {
			throw "Command cannot be blank.";
		}
		const trimmedGitCommand = gitCommand.trim().replace(/^git /, "");

		statusBar.show("Running...");
		const selectedFilePaths = selectedFiles.map(file => path.join(root, file));
		const numFiles = `${selectedFiles.length} file${selectedFiles.length !== 1 ? "s" : ""}`;
		let includedFiles = false;
		const gitArgs = stringArgv(trimmedGitCommand).reduce((prev, arg) => {
			if (arg === "%files%") {
				includedFiles = true;
				selectedFilePaths.forEach(file => {
					prev.push(file);
				});
			} else {
				prev.push(arg);
			}
			return prev;
		}, []);

		await helper.checkGitLock(root);
		const result = await git.cmd(root, gitArgs);
		notifications.addGit(gitCommand, result);
		helper.refreshAtom(root);
		return {
			title,
			message: `Ran 'git ${trimmedGitCommand}'${includedFiles ? ` with ${numFiles}.` : ""}`,
		};
	},
};


text:
/**
 * This is horrible and we need a proper parser/tokenizer/lexer
 */

var util = require('util');

/**
 * Given a line, returns an array of strings to be used as arguments for commands.
 * Each string is always either a whitespace-free string, or a fragment of Javascript code to be eval'd.
 * @param line the line to parse
 * @param start the index at which to start parsing
 * @returns {Array}
 */
function parseArguments (line, start) {
    var args = [];
    var i, c, mark = start;
    for (i = start; i < line.length ; i++) {
        c = line.charAt(i);
        if (c === '(') {
            console.log('character is', c, ' running nesting');
            i = runNesting(line, i + 1);
        } else {
            console.log('character is', c, ' running to ws');
            i = runToWS(line, i + 1);
        }
        args.push(line.substring(mark, i));
        mark = 1;
    }
    console.log('Found these args');
    console.log(util.inspect(args));
    return args;
}

/**
 * Assumes the current position is the start of a Javascript nesting (either '(', '{' or '[') and returns the position where it ends. Jumps over any further nesting and strings.
 */
function runNesting (line, start) {
    var nesting = [line.charAt(start)];
    var i, c;
    for (i = start + 1 ; i < line.length ; i++) {
        c = line.charAt(i);
        if (c === '"') {
            i = runDQString(line, i + 1);
        } else if (c === "'") {
            i = runSQString(line, i + 1);
        } else if ('({['.indexOf(c) !== -1) {
            nesting.push(c);
        } else if (c === ')' && nesting[nesting.length] === '(') {
            nesting.pop();
        } else if (c === '}' && nesting[nesting.length] === '{') {
            nesting.pop();
        } else if (c === ']' && nesting[nesting.length] === '[') {
            nesting.pop();
        }
        if (!nesting.length) {
            return i;
        }
    }
    return i;
}

/**
 * Assumes the current position is the start of a double-quoted string and returns the position where it ends.
 */
function runDQString (line, start) {
    var i, c, escaping = false;
    for (i = start ; i < line.length ; i++) {
        c = line.charAt(i);
        if (escaping) {
            escaping = false;
        } else if (c === '\\') {
            escaping = true;
        } else if (c === '"') {
            return i;
        }
    }
    return i;
}

/**
 * Assumes the current position is the start of a single-quoted string and returns the position where it ends.
 */
function runSQString (line, start) {
    var i, c, escaping = false;
    for (i = start ; i < line.length ; i++) {
        c = line.charAt(i);
        if (escaping) {
            escaping = false;
        } else if (c === '\\') {
            escaping = true;
        } else if (c === "'") {
            return i;
        }
    }
    return i;
}

/**
 * Returns the position where the current whitespace ends.
 */
function runToWS (line, start) {
    var i, c;
    for (i = start ; i < line.length ; i++) {
        c = line.charAt(i);
        if (/\s/.test(c)) {
            return i;
        }
    }
    return i;
}

exports.parseArguments = parseArguments;


text:
Just an location sending app

JSON format: GEOJSON


text:
class Error(Exception):
    pass

class MissingDataError(Error):
    pass

class IncorrectCRCError(Error):
    pass


text:
@implementation StickerPackInfo

+ (NSDictionary *)loadPackInfo {
    NSString *packInfoPath = [[NSBundle mainBundle] pathForResource:@"stickerPacks" ofType:@"json"];

    NSError *error;
    NSData *packInfoData = [NSData dataWithContentsOfFile:packInfoPath];
    if (error)
        NSLog(@"error init data with url %@ %@", packInfoPath, error.localizedDescription);

    NSObject *object = [NSJSONSerialization JSONObjectWithData:packInfoData options:0 error:&error];

    if ([object isKindOfClass:[NSDictionary class]]){
        return (NSDictionary *)object;
    } else {
        return nil;
    }
}

@end


text:
import json
import os
import socket

MAX_MSG_SIZE = 4096

class CommandServer(object):
    def __init__(self, address):
        self.address = address
        self.handlers = dict()

    def addHandler(self, command, handler):
        """
        Add a handler function for a command.

        The handler must take one argument, a dictionary containing the request
        data.
        """
        if command not in self.handlers:
            self.handlers[command] = list()
        self.handlers[command].append(handler)

    def run(self):
        """
        Enter the main loop.
        """
        try:
            os.remove(self.address)
        except OSError as err:
            pass

        sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
        sock.bind(self.address)
        sock.listen(socket.SOMAXCONN)

        self.running = True
        while self.running:
            conn, address = sock.accept()
            try:
                data = conn.recv(MAX_MSG_SIZE)
                request = json.loads(data)
                cmd = request['command']
                if cmd in self.handlers:
                    for callback in self.handlers[cmd]:
                        callback(request)
            except Exception as e:
                print("Caught exception {}".format(e))
                pass
            finally:
                conn.close()

        sock.close()
        os.remove(self.address)


text:
var _ = require('lodash');
var async = require('async');

/**
 * workflow
 * @augments Augments the apos object with methods which provide
 * workflow-related services. See also pages.js.
 * @see pages
 */

module.exports = function(self) {

  // Given an array of pages retrieved from mongodb, return a
  // new array that represents what would be retrieved if all
  // outstanding drafts were published. The ._draft property is
  // set to true so you can distinguish the pages based on
  // outstanding drafts from those that are current.

  self.workflowGetDrafts = function(pages) {
    return _.map(pages, function(page) {
      if (!page.draft) {
        return page;
      }
      var draft = {};
      _.extend(draft, page);
      _.extend(draft, page.draft);
      delete draft.draft;
      // So we can distinguish drafts from live pages with no outstanding edits
      draft._draft = true;
      return draft;
    });
  };

  // Given an array of pages retrieved from mongodb, modify
  // each page object by removing any information about drafts.
  // This does not modify the database.
  self.workflowCleanPages = function(pages) {
    _.each(pages, function(page) {
      if (page.draft) {
        delete page.draft;
      }
    });
  };

  // Update the specified properties of the current draft of
  // the page in the database If those properties do not exist on the page
  // object provided, they are unset rather than set. Also
  // adds ._draft = true to the passed page object as a reminder
  // that it contains drafts rather than final content.
  //
  // It's your responsibility not to call this with dangerous
  // property names in "props", like slug, path, level, _id, pagePermissions

  self.workflowUpdatePage = function(page, props, callback) {
    // Flag what we have in memory now as a draft, so it looks like
    // what we'd get back from workflowGetDrafts, and so that the
    // versionPage method records the draftiness
    page._draft = true;
    var work = {};
    var $set = {};
    var $unset = {};
    _.each(props, function(prop) {
      if (page[prop] !== undefined) {
        $set['draft.' + prop] = page[prop];
      } else {
        $unset['draft.' + prop] = 1;
      }
    });
    if (!_.isEmpty($set)) {
      work.$set = $set;
    }
    if (!_.isEmpty($unset)) {
      work.$unset = $unset;
    }
    if (_.isEmpty(work)) {
      return setImmediate(callback);
    }
    return self.pages.update({ _id: page._id }, work, callback);
  };

  // Given a page object, update its live content to match
  // its draft.

  self.workflowApproveChanges = function(req, page, callback) {
    if (!page.draft) {
      return setImmediate(callback);
    }
    // TODO this won't know what to do if the draft change consisted
    // of deleting a property. We should move toward
    // true/false rather than true/nonexistent for boolean properties
    _.extend(page, page.draft);
    // Not a draft anymore
    delete page.draft;
    delete page.submitDraft;
    return async.series({
      beforePutPage: function(callback) {
        // Invoke this so that code intended for use
        // without workflow can still react when a
        // change is finally approved
        return self.beforePutPage(req, page, callback);
      },
      update: function(callback) {
        return self.pages.update({ _id: page._id }, page, callback);
      },
      afterPutPage: function(callback) {
        // Invoke this so that code intended for use
        // without workflow can still react when a
        // change is finally approved
        return self.afterPutPage(req, page, callback);
      }
    }, callback);
  };

  self.workflowRequestApproval = function(req, page, callback) {
    // Make someone with suitable privileges aware that
    // this page is ready for approval
    page.submitDraft = new Date();
    return self.pages.update({ _id: page._id },
      { $set: { submitDraft: page.submitDraft, draftSubmittedBy: req.user && req.user.title } },
      callback);
  };

  // Called with req.extras by renderPage
  // to shut off the _edit flag for any editable pages when we are looking
  // at the public view. Returns true if any of the pages would have been
  // editable. Also sets _contribute to true on those pages.

  self.workflowPreventEditInPublicMode = function(possiblePages) {
    var contribute = false;
    _.each(possiblePages, function(value, key) {
      if (value && value._edit) {
        contribute = true;
        value._contribute = true;
        value._edit = false;
      }
    });
    return contribute;
  };

  self.app.post('/apos/workflow-mode', function(req, res) {
    if (!self.options.workflow) {
      // Politely ignore
      return res.send({ status: 'ok' });
    }
    req.session.workflowMode = self.sanitizeSelect(req.body.mode, [ 'draft', 'public' ], 'public');
    return res.send({ status: 'ok' });
  });

  self.app.post('/apos/workflow-approve-changes', function(req, res) {
    var submitted = 0;
    var published = 0;
    if (!self.options.workflow) {
      // Politely ignore
      return res.send({ status: 'ok' });
    }
    var slugs = self.sanitizeStrings(req.body.slugs);
    // A page is the fundamental unit of publication, so
    // reduce the page:areaname slugs to just the unique
    // page slugs
    slugs = _.uniq(_.map(slugs, function(slug) {
      return slug.replace(/\:\w+$/, '');
    }));
    var page;
    return async.eachSeries(slugs, function(slug, mainCallback) {
      return async.series({
        getPage: function(callback) {
          // Get the raw mongo document, with the draft property
          return self.pages.findOne({ slug: slug }, function(err, _page) {
            if (err) {
              return callback(err);
            }
            if (!_page) {
              // Not there any more
              return mainCallback(null);
            }
            if (!_page.draft) {
              // Has not been modified
              return mainCallback(null);
            }
            if (!self.permissions.can(req, 'edit-page', _page)) {
              // Not ours. It's a pain for the browser to detect which
              // are ours, so just gracefully ignore it
              return mainCallback(null);
            }
            page = _page;
            return callback(null);
          });
        },
        putPage: function(callback) {
          if (self.permissions.can(req, 'publish-page', page)) {
            published++;
            return self.workflowApproveChanges(req, page, callback);
          } else {
            submitted++;
            return self.workflowRequestApproval(req, page, callback);
          }
        }
      }, mainCallback);
    }, function(err) {
      if (err) {
        return res.send({ status: 'error' });
      }
      return res.send({ status: 'ok', submitted: submitted, published: published });
    });
  });
};


text:
@extends('bootstrap.layouts.master')

@section('content-title')
    {{ Translate::recursive('authentication.email.change') }}
@stop

@section('content')

    {!! Form::open(array('url' => '/change-email', 'method' => 'POST', 'id' => 'changeEmail', 'class' => 'form-horizontal', 'role' => 'form')) !!}
        {!! Form::hidden('user_id', $user->id) !!}

has('email_old') ? 'has-error' : '' }} {{ in_array('email_old', $requiredFields) ? 'required' : '' }}">
                {!! Form::label('email_old', Translate::recursive('authentication.email.old') .': ', array('class' => 'control-label col-lg-3')) !!}

                    {!! Form::text('email_old', $input['email_old'], array('class' => 'form-control')) !!}
                    {!! $errors->first('email_old', ':message') !!}

has('email_new') ? 'has-error' : '' }} {{ in_array('email_new', $requiredFields) ? 'required' : '' }}">
                {!! Form::label('email_new', Translate::recursive('authentication.email.new') .': ', array('class' => 'control-label col-lg-3')) !!}

                    {!! Form::text('email_new', $input['email_new'], array('class' => 'form-control')) !!}
                    {!! $errors->first('email_new', ':message') !!}

has('email_confirm') ? 'has-error' : '' }} {{ in_array('email_confirm', $requiredFields) ? 'required' : '' }}">
                {!! Form::label('email_confirm', Translate::recursive('authentication.email.confirm') .': ', array('class' => 'control-label col-lg-3')) !!}

                    {!! Form::text('email_confirm', $input['email_confirm'], array('class' => 'form-control')) !!}
                    {!! $errors->first('email_confirm', ':message') !!}

has('password') ? 'has-error' : '' }} {{ in_array('password', $requiredFields) ? 'required' : '' }}">
                {!! Form::label('password', Translate::recursive('members.password') .': ', array('class' => 'control-label col-lg-3')) !!}

                    {!! Form::password('password', array('class' => 'form-control')) !!}
                    {!! $errors->first('password', ':message') !!}

            {!! Form::submit(Translate::recursive('common.submit'), array('class' => 'btn btn-primary')) !!}
            {!! HTML::linkRoute('admin.users.show', Translate::recursive('common.cancel'), array($user->id), array('class' => 'btn btn-danger')) !!}

    {!! Form::close() !!}

@stop


text:
package org.shujito.addressbook.controller.exception;

import java.util.HashMap;
import java.util.Map;

public class ServerException extends Exception
{
	private static final long serialVersionUID = 1L;
	private Map<String, String> errorMap = null;
	private int statusCode = 400;

	public ServerException(String message)
	{
		super(message);
		this.errorMap = new HashMap<String, String>();
	}

	public int getStatusCode()
	{
		return this.statusCode;
	}

	public String getError(String error)
	{
		return this.errorMap.get(error);
	}

	public ServerException setStatusCode(int statusCode)
	{
		this.statusCode = statusCode;
		return this;
	}

	public ServerException putError(String error, String description)
	{
		this.errorMap.put(error, description);
		return this;
	}
}


text:
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.TimeZone;

/**
 * Copied from ZoneInfo and ZoneInfoDB in dalvik.
 * {@hide}
 */
public class ZoneInfo extends TimeZone {

    private static final long MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000;
    private static final long MILLISECONDS_PER_400_YEARS =
        MILLISECONDS_PER_DAY * (400 * 365 + 100 - 3);

    private static final long UNIX_OFFSET = 62167219200000L;

    private static final int[] NORMAL = new int[] {
        0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334,
    };

    private static final int[] LEAP = new int[] {
        0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335,
    };

    private static String nullName(byte[] data, int where, int off) {
        if (off < 0)
            return null;

        int end = where + off;
        while (end < data.length && data[end] != '\0')
            end++;

        return new String(data, where + off, end - (where + off));
    }

    public static ZoneInfo make(String name, byte[] data) {
        int ntransition = read4(data, 32);
        int ngmtoff = read4(data, 36);
        int base = 44;

        int[] transitions = new int[ntransition];
        for (int i = 0; i < ntransition; i++)
            transitions[i] = read4(data, base + 4 * i);
        base += 4 * ntransition;

        byte[] type = new byte[ntransition];
        for (int i = 0; i < ntransition; i++)
            type[i] = data[base + i];
        base += ntransition;

        int[] gmtoff = new int[ngmtoff];
        byte[] isdst = new byte[ngmtoff];
        byte[] abbrev = new byte[ngmtoff];
        for (int i = 0; i < ngmtoff; i++) {
            gmtoff[i] = read4(data, base + 6 * i);
            isdst[i] = data[base + 6 * i + 4];
            abbrev[i] = data[base + 6 * i + 5];
        }

        base += 6 * ngmtoff;

        return new ZoneInfo(name, transitions, type, gmtoff, isdst, abbrev, data, base);
    }

    private static int read4(byte[] data, int off) {
        return ((data[off    ] & 0xFF) << 24) |
               ((data[off + 1] & 0xFF) << 16) |
               ((data[off + 2] & 0xFF) <<  8) |
               ((data[off + 3] & 0xFF) <<  0);
    }

    /*package*/ ZoneInfo(String name, int[] transitions, byte[] type,
                     int[] gmtoff, byte[] isdst, byte[] abbrev,
                     byte[] data, int abbrevoff) {
        mTransitions = transitions;
        mTypes = type;
        mGmtOffs = gmtoff;
        mIsDsts = isdst;
        mUseDst = false;
        setID(name);

        // Find the latest GMT and non-GMT offsets for their abbreviations

        int lastdst;
        for (lastdst = mTransitions.length - 1; lastdst >= 0; lastdst--) {
            if (mIsDsts[mTypes[lastdst] & 0xFF] != 0)
                break;
        }

        int laststd;
        for (laststd = mTransitions.length - 1; laststd >= 0; laststd--) {
            if (mIsDsts[mTypes[laststd] & 0xFF] == 0)
                break;
        }

        if (lastdst >= 0) {
            mDaylightName = nullName(data, abbrevoff,
                                     abbrev[mTypes[lastdst] & 0xFF]);
        }
        if (laststd >= 0) {
            mStandardName = nullName(data, abbrevoff,
                                     abbrev[mTypes[laststd] & 0xFF]);
        }

        // Use the latest non-DST offset if any as the raw offset

        if (laststd < 0) {
            laststd = 0;
        }

        if (laststd >= mTypes.length) {
            mRawOffset = mGmtOffs[0];
        } else {
            mRawOffset = mGmtOffs[mTypes[laststd] & 0xFF];
        }

        // Subtract the raw offset from all offsets so it can be changed
        // and affect them too.
        // Find whether there exist any observances of DST.

        for (int i = 0; i < mGmtOffs.length; i++) {
            mGmtOffs[i] -= mRawOffset;

            if (mIsDsts[i] != 0) {
                mUseDst = true;
            }
        }

        mRawOffset *= 1000;
    }

    @Override
    public int getOffset(@SuppressWarnings("unused") int era,
        int year, int month, int day,
        @SuppressWarnings("unused") int dayOfWeek,
        int millis) {
        // XXX This assumes Gregorian always; Calendar switches from
        // Julian to Gregorian in 1582.  What calendar system are the
        // arguments supposed to come from?

        long calc = (year / 400) * MILLISECONDS_PER_400_YEARS;
        year %= 400;

        calc += year * (365 * MILLISECONDS_PER_DAY);
        calc += ((year + 3) / 4) * MILLISECONDS_PER_DAY;

        if (year > 0)
            calc -= ((year - 1) / 100) * MILLISECONDS_PER_DAY;

        boolean isLeap = (year == 0 || (year % 4 == 0 && year % 100 != 0));
        int[] mlen = isLeap ? LEAP : NORMAL;

        calc += mlen[month] * MILLISECONDS_PER_DAY;
        calc += (day - 1) * MILLISECONDS_PER_DAY;
        calc += millis;

        calc -= mRawOffset;
        calc -= UNIX_OFFSET;

        return getOffset(calc);
    }

    @Override
    public int getOffset(long when) {
        int unix = (int) (when / 1000);
        int trans = Arrays.binarySearch(mTransitions, unix);

        if (trans == ~0) {
            return mGmtOffs[0] * 1000 + mRawOffset;
        }
        if (trans < 0) {
            trans = ~trans - 1;
        }

        return mGmtOffs[mTypes[trans] & 0xFF] * 1000 + mRawOffset;
    }

    @Override
    public int getRawOffset() {
        return mRawOffset;
    }

    @Override
    public void setRawOffset(int off) {
        mRawOffset = off;
    }

    @Override
    public boolean inDaylightTime(Date when) {
        int unix = (int) (when.getTime() / 1000);
        int trans = Arrays.binarySearch(mTransitions, unix);

        if (trans == ~0) {
            return mIsDsts[0] != 0;
        }
        if (trans < 0) {
            trans = ~trans - 1;
        }

        return mIsDsts[mTypes[trans] & 0xFF] != 0;
    }

    @Override
    public boolean useDaylightTime() {
        return mUseDst;
    }

    private int mRawOffset;
    private int[] mTransitions;
    private int[] mGmtOffs;
    private byte[] mTypes;
    private byte[] mIsDsts;
    private boolean mUseDst;
    private String mDaylightName;
    private String mStandardName;

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof ZoneInfo)) {
           return false;
        }
        ZoneInfo other = (ZoneInfo) obj;
        return mUseDst == other.mUseDst
                && (mDaylightName == null ? other.mDaylightName == null :
                        mDaylightName.equals(other.mDaylightName))
                && (mStandardName == null ? other.mStandardName == null :
                        mStandardName.equals(other.mStandardName))
                && mRawOffset == other.mRawOffset
                // Arrays.equals returns true if both arrays are null
                && Arrays.equals(mGmtOffs, other.mGmtOffs)
                && Arrays.equals(mIsDsts, other.mIsDsts)
                && Arrays.equals(mTypes, other.mTypes)
                && Arrays.equals(mTransitions, other.mTransitions);
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((mDaylightName == null) ? 0 :
                mDaylightName.hashCode());
        result = prime * result + Arrays.hashCode(mGmtOffs);
        result = prime * result + Arrays.hashCode(mIsDsts);
        result = prime * result + mRawOffset;
        result = prime * result + ((mStandardName == null) ? 0 :
                mStandardName.hashCode());
        result = prime * result + Arrays.hashCode(mTransitions);
        result = prime * result + Arrays.hashCode(mTypes);
        result = prime * result + (mUseDst ? 1231 : 1237);
        return result;
    }
}


text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <title>Admin</title>
        <link rel="shortcut icon" href="/static/images/favicon.ico">
        <link rel="icon" href="/static/images/favicon.ico" type="image/x-icon">
        <link href='http://fonts.googleapis.com/css?family=Jacques+Francois' rel='stylesheet' type='text/css'>
        <link href='http://fonts.googleapis.com/css?family=Alegreya+Sans' rel='stylesheet' type='text/css'>
        <link href='/static/css/style.css' rel='stylesheet' type='text/css'>
        <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />

admin

            <form name="album-review-form" class="admin blogpost-form" action="" method="post" enctype='multipart/form-data'>
                {{form.csrf_token}}

                    Message: {{form.body(rows=15, cols=60)|nl2br}}
                    Link: {{form.link(class_='admin-form-field')}}

                    {{form.image()}}
                    {{form.content_type}}

<input type="submit" value="Create">

            </form>


text:
package org.ejml.alg.block;

import org.ejml.alg.dense.misc.UnrolledInverseFromMinor;
import org.ejml.alg.generic.GenericMatrixOps;
import org.ejml.data.DenseMatrix64F;
import org.ejml.ops.CommonOps;
import org.ejml.ops.MatrixFeatures;
import org.ejml.ops.RandomMatrices;
import org.junit.Test;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Random;

import static org.junit.Assert.*;

/**
 * @author Peter Abeles
 */
public class TestBlockInnerTriangularSolver {

    Random rand = new Random(234534);

    @Test
    public void testInvertLower_two() {
        DenseMatrix64F A = RandomMatrices.createUpperTriangle(5,0,-1,1,rand);
        CommonOps.transpose(A);

        DenseMatrix64F A_inv = A.copy();

        BlockInnerTriangularSolver.invertLower(A.data,A_inv.data,5,0,0);

        DenseMatrix64F S = new DenseMatrix64F(5,5);
        CommonOps.mult(A,A_inv,S);

        assertTrue(GenericMatrixOps.isIdentity(S,1e-8));

        // see if it works with the same input matrix
        BlockInnerTriangularSolver.invertLower(A.data,A.data,5,0,0);

        assertTrue(MatrixFeatures.isIdentical(A,A_inv,1e-8));
    }

    @Test
    public void testInvertLower_one() {
        DenseMatrix64F A = RandomMatrices.createUpperTriangle(5,0,-1,1,rand);
        CommonOps.transpose(A);

        DenseMatrix64F A_inv = A.copy();

        BlockInnerTriangularSolver.invertLower(A_inv.data,5,0);

        DenseMatrix64F S = new DenseMatrix64F(5,5);
        CommonOps.mult(A,A_inv,S);

        assertTrue(GenericMatrixOps.isIdentity(S,1e-8));
    }

    /**
     * Test all inner block solvers using reflections to look up the functions
     */
    @Test
    public void testSolveArray() {
        Method methods[] = BlockInnerTriangularSolver.class.getMethods();

        int numFound = 0;
        for( Method m : methods) {
            String name = m.getName();

            if( !name.contains("solve") || name.compareTo("solve") == 0 || name.compareTo("solveBlock") == 0 )
                continue;

//            System.out.println("name = "+name);

            boolean solveL = name.contains("L");
            boolean transT;
            boolean transB = name.contains("TransB");

            if( solveL )
                transT = name.contains("TransL");
            else
                transT = name.contains("TransU");

            check_solve_array(m,solveL,transT,transB);

            numFound++;
        }

        // make sure all the functions were in fact tested
        assertEquals(5,numFound);
    }

    /**
     * Checks to see if solve functions that use arrays as input work correctly.
     */
    private void check_solve_array(Method m,
                                   boolean solveL, boolean transT, boolean transB) {
        int offsetL = 2;
        int offsetB = 3;

        DenseMatrix64F L = createRandomLowerTriangular(3);

        if( !solveL ) {
            CommonOps.transpose(L);
        }

        if( transT ) {
            CommonOps.transpose(L);
        }

        DenseMatrix64F L_inv = L.copy();
        UnrolledInverseFromMinor.inv(L_inv,L_inv);

        DenseMatrix64F B = RandomMatrices.createRandom(3,4,rand);
        DenseMatrix64F expected = RandomMatrices.createRandom(3,4,rand);
        DenseMatrix64F found = B.copy();

        // compute the expected solution
        CommonOps.mult(L_inv,B,expected);

        if( transT ) {
            CommonOps.transpose(L);
        }

        if( transB ) {
            CommonOps.transpose(found);
            CommonOps.transpose(expected);
        }

        // create arrays that are offset from the original
        // use two different offsets to make sure it doesn't confuse them internally
        double dataL[] = offsetArray(L.data,offsetL);
        double dataB[] = offsetArray(found.data,offsetB);

        try {
            m.invoke(null,dataL,dataB,3,4,3,offsetL,offsetB);
        } catch (IllegalAccessException e) {
            fail("invoke failed");
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e.getCause());
        }

        // put the solution into B, minus the offset
        System.arraycopy(dataB,offsetB,found.data,0,found.data.length);

        assertTrue(MatrixFeatures.isIdentical(expected,found,1e-8));
    }

    private DenseMatrix64F createRandomLowerTriangular( int N ) {
        DenseMatrix64F U = RandomMatrices.createUpperTriangle(N,0,-1,1,rand);

        CommonOps.transpose(U);

        return U;
    }

    private double[] offsetArray( double[] orig , int offset )
    {
        double[] ret = new double[ orig.length + offset ];

        System.arraycopy(orig,0,ret,offset,orig.length);

        return ret;
    }
}


text:
Meteor.startup(() => {
	return RocketChat.MessageAction.addButton({
		id: 'mark-message-as-unread',
		icon: 'icon-flag',
		i18nLabel: 'Mark_as_unread',
		context: ['message', 'message-mobile'],
		action() {
			const message = this._arguments[1];
			RocketChat.MessageAction.hideDropDown();
			return Meteor.call('unreadMessages', message, function(error) {
				if (error) {
					return handleError(error);
				}
				const subscription = ChatSubscription.findOne({
					rid: message.rid
				});
				if (subscription == null) {
					return;
				}
				RoomManager.close(subscription.t + subscription.name);
				return FlowRouter.go('home');
			});
		},
		validation(message) {
			return message.u._id !== Meteor.user()._id;
		},
		order: 22
	});
});


text:
<!DOCTYPE HTML>

<title>com.github.hypfvieh.dbus.examples.struct (dbus-java-examples 4.2.0 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2022-09-05">
<meta name="description" content="declaration: package: com.github.hypfvieh.dbus.examples.struct">
<meta name="generator" content="javadoc/PackageWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../jquery-ui.overrides.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Index

Help

Package:

Description |

Related Packages |

Classes and Interfaces

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

Package com.github.hypfvieh.dbus.examples.struct

package com.github.hypfvieh.dbus.examples.struct

<button id="class-summary-tab0" role="tab" aria-selected="true" aria-controls="class-summary.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('class-summary', 'class-summary', 2)" class="active-table-tab">All Classes and Interfaces</button><button id="class-summary-tab1" role="tab" aria-selected="false" aria-controls="class-summary.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('class-summary', 'class-summary-tab1', 2)" class="table-tab">Interfaces</button><button id="class-summary-tab2" role="tab" aria-selected="false" aria-controls="class-summary.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('class-summary', 'class-summary-tab2', 2)" class="table-tab">Classes</button>

Class

Description

IStructServer

Interface for sample struct server.

SampleStruct

Sample Struct to demonstrate struct usage in Variants.

StructClient

Sample client connecting to struct server.

StructServer

Sample on how to use structs wrapped in Variant or not wrapped at all.

Copyright © 2022. All rights reserved.


text:
{% extends "base.html" %}
{% import '_snippets.html' as snippets %}

{% block title %}
{{title}}
{% endblock %}

{% block bodyclass %}owner{% endblock %}

{% block content %}

            {% if owner %}

{{ owner }}

            {% endif %}
            {% if name %}

{{ name }}

            {% endif %}
            {% if joinDate %}

Since {{ joinDate }}

            {% endif %}

Recent events

        {% if events|length > 0 %}

          {% for item in events %}
            {% if item.event_entity === 'flow' %}

              {{ item.dataset }}

                {{ item.event_action }} {{ item.timeago }}

            {% elif item.event_entity === 'account' %}

              You {{ item.event_action }}
              {{ item.timeago }}

            {% endif %}
          {% endfor %}

        {% else %}
          No events.
        {% endif %}

Datasets {{packages.summary.total}}

            <form class="search-form form form-inline" class="input-group col-xs-12" action="/{{ owner }}" method="GET">
              <input type="text" class="form-control" placeholder="Search..." name="q" value="{{ queryString }}" required autofocus/>
            </form>

          {% if packages.results|length > 0 %}
            {{ snippets.package_list_show(packages.results) }}
            {% if packages.summary.total > 20 %}

                      «
                      Previous

                  {% for page in pages %}
                    {% if page == '...' %}

{{page}}

                    {% else %}

{{page}}

                    {% endif %}

                  {% endfor %}

                      »
                      Next

            {% endif %}
          {% endif %}

{% endblock %}