text:
package org.apache.hadoop.metrics2.util;

import java.lang.management.ManagementFactory;

import javax.management.InstanceNotFoundException;
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.InstanceAlreadyExistsException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

 /**
  * gnodet: this file mainly contains a modification in the mbean
  * registration so that they belong to org.apache.hadoop to be
  * more consistent with our other mbeans
  */
/**
 * This util class provides a method to register an MBean using
 * our standard naming convention as described in the doc
 *  for {link {@link #register(String, String, Object)}
 *
 */
public class MBeans {

  private static final Log LOG = LogFactory.getLog(MBeans.class);

  /**
   * Register the MBean using our standard MBeanName format
   * "hadoop:service=<serviceName>,name=<nameName>"
   * Where the <serviceName> and <nameName> are the supplied parameters
   *
   * @param serviceName
   * @param nameName
   * @param theMbean - the MBean to register
   * @return the named used to register the MBean
   */
  static public ObjectName register(String serviceName, String nameName,
                                    Object theMbean) {
    final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
    ObjectName name = getMBeanName(serviceName, nameName);
    try {
      mbs.registerMBean(theMbean, name);
      return name;
    } catch (InstanceAlreadyExistsException ie) {
      LOG.warn(name, ie);
    } catch (Exception e) {
      LOG.warn("Error registering "+ name, e);
    }
    return null;
  }

  static public void unregister(ObjectName mbeanName) {
    final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
    if (mbeanName == null)
        return;
    try {
      mbs.unregisterMBean(mbeanName);
    } catch (InstanceNotFoundException e ) {
      LOG.warn(mbeanName, e);
    } catch (Exception e) {
      LOG.warn("Error unregistering "+ mbeanName, e);
    }
  }

  static private ObjectName getMBeanName(String serviceName, String nameName) {
    ObjectName name = null;
    String nameStr = "org.apache.hadoop:service="+ serviceName +",name="+ nameName;
    try {
      name = new ObjectName(nameStr);
    } catch (MalformedObjectNameException e) {
      LOG.warn("Error creating MBean object name: "+ nameStr, e);
    }
    return name;
  }
}


text:
from pulp import *
from math import *

prob = LpProblem("test3", LpMinimize)

# The number of time steps
tmax = 9
# The number of thermal units
units = 5
# The minimum demand
dmin = 10.0
# The maximum demand
dmax = 150.0
# The maximum thermal production
tpmax = 150.0
# The maximum hydro production
hpmax = 100.0
# Initial hydro storage
sini = 50.0

# Time range
time = range(tmax)
# Time range (and one more step for the last state of plants)
xtime = range(tmax+1)
# Units range
unit = range(units)
# The demand
demand = [dmin+(dmax-dmin)*0.5 + 0.5*(dmax-dmin)*sin(4*t*2*3.1415/tmax) for t in time]
# Maximum output for the thermal units
pmax = [tpmax / units for i in unit]
# Minimum output for the thermal units
pmin = [tpmax / (units*3.0) for i in unit]
# Proportional cost of the thermal units
costs = [i+1 for i in unit]
# Startup cost of the thermal units.
startupcosts = [100*(i+1) for i in unit]

# Production variables for each time step and each thermal unit.
p = LpVariable.matrix("p", (time, unit), 0)
for t in time:
	for i in unit:
		p[t][i].upBound = pmax[i]

# State (started/stopped) variables for each time step and each thermal unit
d = LpVariable.matrix("d", (xtime, unit), 0, 1, LpInteger)

# Production constraint relative to the unit state (started/stoped)
for t in time:
	for i in unit:
		# If the unit is not started (d==0) then p<=0 else p<=pmax
		prob += p[t][i] <= pmax[i]*d[t][i]
		# If the unit is not started then p>=0 else p>= pmin
		prob += p[t][i] >= pmin[i]*d[t][i]

# Startup variables: 1 if the unit will be started next time step
u = LpVariable.matrix("u", (time, unit), 0)

# Dynamic startup constraints
# Initialy, all groups are started
for t in time:
	for i in unit:
		# u>=1 if the unit is started next time step
		prob += u[t][i] >= d[t+1][i] - d[t][i]

# Storage for the hydro plant (must not go below 0)
s = LpVariable.matrix("s", xtime, 0)

# Initial storage
s[0] = sini

# Hydro production
ph = [s[t]-s[t+1] for t in time]
for t in time:
	# Must be positive (no pumping)
	prob += ph[t] >= 0
	# And lower than hpmax
	prob += ph[t] <= hpmax

# Total production must equal demand
for t in time:
	prob += demand[t] == lpSum(p[t]) + ph[t]

# Thermal production cost
ctp = lpSum([lpSum([p[t][i] for t in time])*costs[i] for i in unit])
# Startup costs
cts = lpSum([lpSum([u[t][i] for t in time])*startupcosts[i] for i in unit])
# The objective is the total cost
prob += ctp + cts

# Solve the problem
prob.solve()

print "Minimum total cost:", prob.objective.value()

# Print the results
print "   D    S     U ",
for i in unit: print "  T%d    " %i,
print

for t in time:
	# Demand, hydro storage, hydro production
	print "%5.1f" % demand[t], "%5.1f" % value(s[t]), "%5.1f" % value(ph[t]),
	for i in unit:
		# Thermal production
		print "%4.1f" % value(p[t][i]),
		# The state of the unit
		if value(d[t][i]): print "+",
		else: print "-",
		# Wether the unit will be started
		if value(u[t][i]): print "*",
		else: print " ",
	print

redpajama_set_name: RedPajamaGithub


text:
/* include/config.h.  Generated from config.h.in by configure.  */
/* include/config.h.in.  Generated from configure.in by autoheader.  */

/* Define if /dev/dlpi is a directory. */
/* #undef DLPI_DEV_PREFIX */

/* Define if /dev/dlpi is available. */
/* #undef HAVE_DEV_DLPI */

/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1

/* Define if the <sys/dlpi.h> header exists. */
/* #undef HAVE_DLPI */

/* Define to 1 if you have the `gethostbyname2' function. */
#define HAVE_GETHOSTBYNAME2 1

/* Define if we're building on HP/UX. */
/* #undef HAVE_HPUX11 */

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the `nsl' library (-lnsl). */
/* #undef HAVE_LIBNSL */

/* Define to 1 if you have the `packet' library (-lpacket). */
/* #undef HAVE_LIBPACKET */

/* Define to 1 if you have the `resolv' library (-lresolv). */
/* #undef HAVE_LIBRESOLV */

/* Define to 1 if you have the `socket' library (-lsocket). */
/* #undef HAVE_LIBSOCKET */

/* Define to 1 if you have the `wpcap' library (-lwpcap). */
/* #undef HAVE_LIBWPCAP */

/* Define if you have the Linux /proc filesystem. */
#define HAVE_LINUX_PROCFS 1

/* Define to 1 if you have the <linux/socket.h> header file. */
#define HAVE_LINUX_SOCKET_H 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have the <net/ethernet.h> header file. */
/* #undef HAVE_NET_ETHERNET_H */

/* Define to 1 if you have the <net/pfilt.h> header file. */
/* #undef HAVE_NET_PFILT_H */

/* Define to 1 if you have the <net/raw.h> header file. */
/* #undef HAVE_NET_RAW_H */

/* Define if we're running on a Linux system with PF_PACKET sockets. */
/* #undef HAVE_PACKET_SOCKET */

/* Define if the sockaddr structure includes a sa_len member. */
/* #undef HAVE_SOCKADDR_SA_LEN */

/* Define if we are running on Solaris. */
/* #undef HAVE_SOLARIS */

/* Define if our version of Solaris supports IPv6. */
/* #undef HAVE_SOLARIS_IPV6 */

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the <sys/bufmod.h> header file. */
/* #undef HAVE_SYS_BUFMOD_H */

/* Define to 1 if you have the <sys/dlpi_ext.h> header file. */
/* #undef HAVE_SYS_DLPI_EXT_H */

/* Define to 1 if you have the <sys/dlpi.h> header file. */
/* #undef HAVE_SYS_DLPI_H */

/* Define to 1 if you have the <sys/net/nit.h> header file. */
/* #undef HAVE_SYS_NET_NIT_H */

/* Define to 1 if you have the <sys/sockio.h> header file. */
/* #undef HAVE_SYS_SOCKIO_H */

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* We are running on a big-endian machine. */
/* #undef LIBNET_BIG_ENDIAN */

/* Define if our build OS supports the BSD APIs */
/* #undef LIBNET_BSDISH_OS */

/* Define if libnet should byteswap data. */
/* #undef LIBNET_BSD_BYTE_SWAP */

/* We are running on a little-endian machine. */
#define LIBNET_LIL_ENDIAN 1

/* Define if snprintf() is unavailable on our system. */
/* #undef NO_SNPRINTF */

/* Name of package */
#define PACKAGE "libnet"

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""

/* Define to the full name of this package. */
#define PACKAGE_NAME "libnet"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "libnet 1.1.5"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libnet"

/* Define to the version of this package. */
#define PACKAGE_VERSION "1.1.5"

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define if our version of Solaris has broken checksums. */
/* #undef STUPID_SOLARIS_CHECKSUM_BUG */

/* Version number of package */
#define VERSION "1.1.5"

/* Define to 1 if your processor stores words with the most significant byte
   first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */

/* Define to 1 if on AIX 3.
   System headers sometimes define this.
   We just want to avoid a redefinition error message.  */
#ifndef _ALL_SOURCE
/* # undef _ALL_SOURCE */
#endif

/* Define as necessary to "unhide" header symbols. */
#define _BSD_SOURCE 1

/* Enable GNU extensions on systems that have them.  */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif

/* Define to 1 if on MINIX. */
/* #undef _MINIX */

/* Define to 2 if the system does not provide POSIX.1 features except with
   this defined. */
/* #undef _POSIX_1_SOURCE */

/* Define to 1 if you need to in order for `stat' and other things to work. */
/* #undef _POSIX_SOURCE */

/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
   <pthread.h>, or <semaphore.h> is not used. If the typedef was allowed, the
   #define below would cause a syntax error. */
/* #undef _UINT32_T */

/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
   <pthread.h>, or <semaphore.h> is not used. If the typedef was allowed, the
   #define below would cause a syntax error. */
/* #undef _UINT64_T */

/* Define as necessary to "unhide" header symbols. */
#define __BSD_SOURCE 1

/* Enable extensions on Solaris.  */
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS 1
#endif
#ifndef _TANDEM_SOURCE
# define _TANDEM_SOURCE 1
#endif

/* Define if we should favor the BSD APIs when possible in Linux. */
#define __FAVOR_BSD 1

/* Define to the type of an unsigned integer type of width exactly 16 bits if
   such a type exists and the standard includes do not define it. */
/* #undef uint16_t */

/* Define to the type of an unsigned integer type of width exactly 32 bits if
   such a type exists and the standard includes do not define it. */
/* #undef uint32_t */

/* Define to the type of an unsigned integer type of width exactly 64 bits if
   such a type exists and the standard includes do not define it. */
/* #undef uint64_t */


text:
package fate.webapp.blog.service.impl;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import fate.webapp.blog.model.Advertisement;
import fate.webapp.blog.persistence.AdvertisementDao;
import fate.webapp.blog.service.AdvertisementService;

@Service
@Transactional
public class AdvertisementServiceImpl implements AdvertisementService {

	@Autowired
	private AdvertisementDao advertisementDao;

	@Override
	public Advertisement find(int id) {
		return advertisementDao.find(id);
	}

	@Override
	public List<Advertisement> page(int curPage, int pageSize) {
		return advertisementDao.page(curPage, pageSize);
	}

	@Override
	public long count() {
		return advertisementDao.count();
	}

	@Override
	public void save(Advertisement advertisement) {
		advertisementDao.save(advertisement);
	}

	@Override
	public Advertisement update(Advertisement advertisement) {
		return advertisementDao.update(advertisement);
	}

	@Override
	public void delete(Advertisement advertisement) {
		advertisementDao.delete(advertisement);
	}

	@Override
	public Advertisement findLastByType(int type) {
		return advertisementDao.findLastByType(type);
	}

}


text:
package com.elytradev.correlated.network.inventory;

import com.elytradev.correlated.CLog;
import com.elytradev.correlated.init.CNetwork;

import com.elytradev.concrete.network.Message;
import com.elytradev.concrete.network.NetworkContext;
import com.elytradev.concrete.network.annotation.field.MarshalledAs;
import com.elytradev.concrete.network.annotation.type.ReceivedOn;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.ClickType;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;

@ReceivedOn(Side.SERVER)
public class InsertAllMessage extends Message {

	@MarshalledAs("i32")
	public int windowId;
	public ItemStack template;

	public InsertAllMessage(NetworkContext ctx) {
		super(ctx);
	}

	public InsertAllMessage(int windowId, ItemStack template) {
		super(CNetwork.CONTEXT);
		this.windowId = windowId;
		this.template = template;
	}

	@Override
	protected void handle(EntityPlayer sender) {
		if (sender.isSpectator()) {
			CLog.warn("{}, a spectator, tried to send a packet only applicable to non-spectators", sender.getDisplayNameString());
			return;
		}
		if (sender.openContainer.windowId == windowId) {
			for (Slot s : sender.openContainer.inventorySlots) {
				if (s.inventory instanceof InventoryPlayer && s.getHasStack()
						&& ItemStack.areItemsEqual(s.getStack(), template)
						&& ItemStack.areItemStackTagsEqual(s.getStack(), template)) {
					sender.openContainer.slotClick(s.slotNumber, 0, ClickType.QUICK_MOVE, sender);
				}
			}
		}
	}

}


text:
// Example usage:
// runs = ["train", "test", "test1", "test2"]
// ccs = new ColorScale();
// ccs.domain(runs);
// ccs.getColor("train");
// ccs.getColor("test1");
import * as d3 from 'd3';  // from //third_party/javascript/typings/d3_v4
import {palettes} from './palettes'

export class ColorScale {
  private palette: string[];
  private identifiers = d3.map();

  /**
   * Creates a color scale with optional custom palette.
   *  @param {string[]} [palette=palettes.googleColorBlind] - The color
   *                 palette you want as an Array of hex strings.
   */
  constructor(palette: string[] = palettes.googleColorBlindAssist) {
    this.palette = palette;
  }

  /**
   * Set the domain of strings.
   * @param {string[]} strings - An array of possible strings to use as the
   *                             domain for your scale.
   */
  public domain(strings: string[]): this {
    this.identifiers = d3.map();
    strings.forEach((s, i) => {
      this.identifiers.set(s, this.palette[i % this.palette.length]);
    });
    return this;
  }

  /**
   * Use the color scale to transform an element in the domain into a color.
   * @param {string} The input string to map to a color.
   * @return {string} The color corresponding to that input string.
   * @throws Will error if input string is not in the scale's domain.
   */
  public scale(s: string): string {
    if (!this.identifiers.has(s)) {
      throw new Error('String was not in the domain.');
    }
    return this.identifiers.get(s) as string;
  }
}

Polymer({
  is: 'tf-color-scale',
  properties: {
    runs: {
      type: Array,
    },
    outColorScale: {
      type: Object,
      readOnly: true,
      notify: true,
      value: function() {
        return new ColorScale();
      },
    },
  },
  observers: ['updateColorScale(runs.*)'],
  updateColorScale: function(runsChange) {
    this.outColorScale.domain(this.runs);
  },
});


text:
example_node
============

node --harmony app.js


text:
<?php

require_once(dirname(__FILE__) . '/../utils/ExpressionType.php');
require_once(dirname(__FILE__) . '/RecordProcessor.php');
require_once(dirname(__FILE__) . '/AbstractProcessor.php');

/**
 *
 * This class processes the VALUES statements.
 *
 * @author arothe
 *
 */
class ValuesProcessor extends AbstractProcessor {

    private $recordProcessor;

    public function __construct() {
        $this->recordProcessor = new RecordProcessor();
    }

    public function process($tokens) {
        $unparsed = "";
        foreach ($tokens['VALUES'] as $k => $v) {
            if ($this->isWhitespaceToken($v)) {
                continue;
            }
            $unparsed .= $v;
        }

        $values = $this->splitSQLIntoTokens($unparsed);

        $parsed = array();
        foreach ($values as $k => $v) {
            if ($this->isCommaToken($v)) {
                unset($values[$k]);
            } else {
                $processor = new RecordProcessor();
                $values[$k] = array('expr_type' => ExpressionType::RECORD, 'base_expr' => $v,
                                    'data' => $this->recordProcessor->process($v));
            }
        }

        $tokens['VALUES'] = array_values($values);
        return $tokens;
    }

}
?>


text:
package main

var tb byte = byte('b')
var ti byte = byte('i')
var tf byte = byte('f')
var ts byte = byte('s')
var tl byte = byte('l')
var tm byte = byte('m')
var tn byte = byte('n')
var crlf []byte = []byte("\\r\\n")
var delimit []byte = []byte("\r\r\r\n")
var delimit2 []byte = []byte("\r\t")
var blank []byte = []byte("")
var comma []byte = []byte(",")
var questionMark []byte = []byte("?")
var partitionMark []byte = []byte("|")
var delimiter []byte = []byte(":")
var equal []byte = []byte("=")
var greater []byte = []byte(">")
var greaterEqual []byte = []byte(">=")
var less []byte = []byte("<")
var lessEqual []byte = []byte("<=")
var zero []byte = []byte("0")
var one []byte = []byte("1")
var cindex []byte = []byte("index")


text:
class Room

  attr_accessor :name, :description, :paths

  def initialize(name, description)
    @name = name
    @description = description
    @paths = {}
  end

  def go(direction)
    @paths[direction]
  end

  def add_paths(paths)
    @paths.update(paths)
  end

end

central_corridor = Room.new("Central Corridor",
%q{
The Gothons of Planet Percal #25 have invaded your ship and destroyed
your entire crew.  You are the last surviving member and your last
mission is to get the neutron destruct bomb from the Weapons Armory,
put it in the bridge, and blow the ship up after getting into an
escape pod.

You're running down the central corridor to the Weapons Armory when
a Gothon jumps out, red scaly skin, dark grimy teeth, and evil clown costume
flowing around his hate filled body.  He's blocking the door to the
Armory and about to pull a weapon to blast you.
})

laser_weapon_armory = Room.new("Laser Weapon Armory",
%q{
Lucky for you they made you learn Gothon insults in the academy.
You tell the one Gothon joke you know:
Lbhe zbgure vf fb sng, jura fur fvgf nebhaq gur ubhfr, fur fvgf nebhaq gur ubhfr.
The Gothon stops, tries not to laugh, then busts out laughing and can't move.
While he's laughing you run up and shoot him square in the head
putting him down, then jump through the Weapon Armory door.

You do a dive roll into the Weapon Armory, crouch and scan the room
for more Gothons that might be hiding.  It's dead quiet, too quiet.
You stand up and run to the far side of the room and find the
neutron bomb in its container.  There's a keypad lock on the box
and you need the code to get the bomb out.  If you get the code
wrong 10 times then the lock closes forever and you can't
get the bomb.  The code is 3 digits.
})

the_bridge = Room.new("The Bridge",
%q{
The container clicks open and the seal breaks, letting gas out.
You grab the neutron bomb and run as fast as you can to the
bridge where you must place it in the right spot.

You burst onto the Bridge with the netron destruct bomb
under your arm and surprise 5 Gothons who are trying to
take control of the ship.  Each of them has an even uglier
clown costume than the last.  They haven't pulled their
weapons out yet, as they see the active bomb under your
arm and don't want to set it off.
})

escape_pod = Room.new("Escape Pod",
%q{
You point your blaster at the bomb under your arm
and the Gothons put their hands up and start to sweat.
You inch backward to the door, open it, and then carefully
place the bomb on the floor, pointing your blaster at it.
You then jump back through the door, punch the close button
and blast the lock so the Gothons can't get out.
Now that the bomb is placed you run to the escape pod to
get off this tin can.

You rush through the ship desperately trying to make it to
the escape pod before the whole ship explodes.  It seems like
hardly any Gothons are on the ship, so your run is clear of
interference.  You get to the chamber with the escape pods, and
now need to pick one to take.  Some of them could be damaged
but you don't have time to look.  There's 5 pods, which one
do you take?
})

the_end_winner = Room.new("The End",
%q{
You jump into pod 2 and hit the eject button.
The pod easily slides out into space heading to
the planet below.  As it flies to the planet, you look
back and see your ship implode then explode like a
bright star, taking out the Gothon ship at the same
time.  You won!
})

the_end_loser = Room.new("The End",
%q{
You jump into a random pod and hit the eject button.
The pod escapes out into the void of space, then
implodes as the hull ruptures, crushing your body
into jam jelly.
})

escape_pod.add_paths({
    '2' => the_end_winner,
    '*' => the_end_loser
})

generic_death = Room.new("death", "You died.")

the_bridge.add_paths({
    'throw the bomb' => generic_death,
    'slowly place the bomb' => escape_pod
})

laser_weapon_armory.add_paths({
    '0132' => the_bridge,
    '*' => generic_death
})

central_corridor.add_paths({
    'shoot!' => generic_death,
    'dodge!'=> generic_death,
    'tell a joke' => laser_weapon_armory
})

START = central_corridor


text:
import sensor, image, time

sensor.reset()
sensor.set_pixformat(sensor.RGB565) # or GRAYSCALE...
sensor.set_framesize(sensor.QVGA) # or QQVGA...
sensor.skip_frames(time = 2000)
clock = time.clock()

while(True):
    clock.tick()

    # seed_threshold controls the maximum allowed difference between
    # the initial pixel and any filled pixels. It's important to
    # set this such that flood fill doesn't fill the whole image.

    # floating_threshold controls the maximum allowed difference
    # between any two pixels. This can easily fill the whole image
    # with even a very low threshold.

    # flood_fill will fill pixels that both thresholds.

    # You can invert what gets filled with "invert" and clear
    # everything but the filled area with "clear_background".

    x = sensor.width() // 2
    y = sensor.height() // 2
    img = sensor.snapshot().flood_fill(x, y, \
        seed_threshold=0.05, floating_thresholds=0.05, \
        color=(255, 0, 0), invert=False, clear_background=False)

    print(clock.fps())


text:
Deface::Override.new(
    :virtual_path => 'spree/admin/shared/_product_tabs',
    :name => 'add_order_info_to_admin_product_tabs',
    :insert_bottom => "[data-hook='admin_product_tabs']",
    :text => "<%= content_tag :li, class: ('active' if current == :order_info) do %>
      <%= link_to_with_icon 'info-sign', Spree.t(:order_info), spree.admin_product_product_order_info_items_url(@product) %>
    <% end if can?(:admin, Spree::Product) %>"
)


text:
* Ruby 2.0 Compatibility

## 0.7.0 (Aug 04 2013)

* Adds date formatting support for dd/mm/yyyy
* Adds Profile#account
* Adds Profile#scrape / League#scrape for rescraping domain models
* Fixes League scraping via `league_id` instead of `url`
* Adds clan name and tag to `Profile`
* Documentation updates

## 0.6.0 (May 09 2013)

* Adds GrandmasterScraper to pull all grandmasters by region
* Updates Portrait names for anniversary
* Improves portait code
* Documentation updates

## 0.5.0 (Mar 29 2013)

* Adds Heart of the Swarm Portrait Names
* Updates Achievement Progress Categories for Heart of the Swarm
* Adds Achievement to replace hash output
* Replace FakeWeb specs with VCR
* Typecast numerics to Fixnum instead of strings
* Typecast dates to Date instead of Strings (`Achievement#earned=`)
* Fix wins/losses in MatchHistoryScraper
* Adds Campaign Completion indicators (`Profile#campaign_completion`)
* Extensive internal refactoring and decoupling

## 0.4.0 (Feb 22 2013)

* Revamped ProfileScraper API
* Uses VCR for test fixtures
* Switched from Hash output to Profile object on ProfileScraper
* MatchHistoryScraper now returns array of Matches instead of Hashes
* Adds Swarm Level to Profile
* Full-scrape pulls achievements, match history, and league information

## 0.3.1 (Sep 24 2012)

* Throws BnetScraper::InvalidProfileError when instantiating a scraper with poorly
formatted profile URL

## 0.3.0 (Sep 22 2012)

* Adds portrait name scraping to ProfileScraper

## 0.2.1 (Aug 04 2012)

* Adds race condition for profile scraping accounts playing in their first season

## 0.2.0 (Aug 03 2012)

* Adds domain remapping to regions
* Fixes bug with EU profile scraping due to language selection
* Parses new player stats (Career Wins, Most Played Type, Games This Season)
* Parses new league stats (Current/Highest Solo/Team Leagues)

## 0.1.3 (Jul 26 2012)

* Adds checks to prevent parse issues with accounts that don't ladder

## 0.1.2 (Jul 20 2012)

* We don't talk about 0.1.2...

## 0.1.1 (Jul 20 2012)

* Adds BnetScraper::Starcraft2.valid\_profile?
* Adds BnetScraper::Starcraft2::BaseScraper#valid?

## 0.1.0 (Jul 06 2012)

* Replaces open-uri with Faraday
* Adds BnetScraper::InvalidProfileError when unsuccessfully scraping

## 0.0.2 (Apr 20 2012)

* Adds Battle.net Status API
* Adds Match History scraping
* Adds Achievement scraping
* Documentation Improvements
* Adds Travis-CI Support

## 0.1.0 (Mar 13 2012)

* Initial Release


text:
import * as React from "react";

import useBuildInfo from "./api/useSessionInfo";

export const SessionInfo: React.FunctionComponent = () => {
  const { userName, nodeName, buildInfo } = useBuildInfo();
  return (

User Name: {userName}

Build Version: {buildInfo.buildVersion}

Build Date: {buildInfo.buildDate}

Up Date: {buildInfo.upDate}

Node Name: {nodeName}

  );
};


text:
package com.github.alex.zuy.boilerplate.boilerplate.test;

import com.github.alex.zuy.boilerplate.boilerplate.IncludeMarker;

@IncludeMarker
public class Person {

    private String name;

    private Address address;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }
}


text:
package de.uni_heidelberg.cos.agw.ij.regions;

import ij.ImagePlus;
import ij.process.ImageProcessor;

import javax.vecmath.Point3i;
import java.util.List;

public class MergeOperation extends AbstractMapBasedMultiPointOperation {

    public MergeOperation(ImagePlus imp) {
        super(imp);
    }

    @Override
    public String getName() {
        return "Merge";
    }

    @Override
    public void run() {
        List<Integer> selectedValues = getSelectedValues();
        if (selectedValues.size() < 2) {
            return;
        }

        int mergedValue = selectedValues.get(0);
        for (int i = 1; i < selectedValues.size(); ++i) {
            int value = selectedValues.get(i);
            List<Point3i> pixels = intensityMap.remove(value);
            if (pixels == null) {
                continue;
            }

            ImageProcessor stackIp;
            for (Point3i pixel : pixels) {
                stackIp = stack.getProcessor(pixel.z);
                stackIp.putPixel(pixel.x, pixel.y, mergedValue);
            }
            intensityMap.get(mergedValue).addAll(pixels);
        }
        postRun();
    }
}


text:
const initialState = {
  answer: null
};

export default function reducer(state=initialState, action={}) {
  if (action.type === 'FOO_SUCCESS') {
    return {
      ...state,
      answer: action.payload
    };
  }
  return state;
}


text:
layout: post
title: Major Update to the Player Code!
date: 2016-12-13 17:06:00
categories: tracker, fasttracker, webaudio
short_description: Major changes to the internals of the audio engine that plays
  the music. Now much more in-line with WebAudio, and more amenable to advanced
  features such as filters and effects.
image_preview: images/node_graphs_thumb.png
---

While the outstanding audio engine from [a1k0n](https://github.com/a1k0n) has
proven to be a perfect starting point, and invaluable in getting the project
kickstarted while testing and building the core user interface elements, I
started to realise some limitations. These limitations are not an indication of
anything wrong with the jsxm engine, but rather a misuse of the code, which is
perfectly suited to playback of .xm files, but not perfect for an authoring tool
which needs different capabilities and controls.

I have been working on a refactoring of that engine, not a complete replacement,
a lot of the effect processing code, logic and inherent Fasttracker 2 format and
playback knowledge is just as valid in the new system. To explain the changes,
and the reasoning, a short, very limited explanation of how jsxm works.

In a nutshell, jsxm does everything in a single ScriptProcessorNode, processing
effects, combining samples, applying pitch changes, applying volume changes,
extracting visualisation information, etc. This is very much in line with what
you'd expect from a Fasttracker player, where mimicking the capabilities of the
original engine is paramount. This approach gives ultimate control. The cost is
that it's difficult to control tracks individually, and it's quite expensive in
terms of processing in Javascript. While I never actually noticed any
performance issue with jsxm, a testament to the quality of the Javascript, the
lack of track level control did become an issue in WeTracker. So, with a1k0n's
help, I've reworked the internals and moved some of the heavy lifting out into
WebAudio nodes.

The new engine lookes like this...

The engine manages an Instrument object for each instrument in the song, which
contains an array of AudioBuffer objects converted from the samples in the song
on loading. A Javascript scheduler creates lightweight PlayerInstrument objects
during playback to represent notes played in the song during scheduling. These
objects hold the AudioBufferSourceNode, GainNode and StereoPannerNode needed to
process the audio and send it further down the graph. These PlayerInstruments
last as long as necessary to complete the note, as soon as they finish, or are
replaced by another instrument on the same track, the are cleaned up. The output
from the PlayerInstrument goes to a GainNode per track, which affords
direct control over the volume and mute of each track. The output of these is
directed into an AnalyserNode per track, which is read by the monitors to
display FFT curves for the notes playing on that track. The scheduling is based
on the excellent artick by Chris Wilson, [A Tale of Two Clocks - Scheduling Web
Audio with
Precision](https://www.html5rocks.com/en/tutorials/audio/scheduling/).

Onwards and upwards.


text:
CameraController::CameraController(Ogre::Camera* cam)
{
    setCamera(cam);
    setMode(CM_BLENDER);
}

CameraController::~CameraController()
{}

void CameraController::reset()
{
    mCameraNode->setPosition(0, 3, 0);
    mCameraNode->resetOrientation();
    mCamera->setPosition(Ogre::Vector3(0, 0, 10));
}

void CameraController::setCamera(Ogre::Camera* cam)
{
    mCamera = cam;
    mCamera->detachFromParent();

    mCameraNode = mCamera->getSceneManager()->getRootSceneNode()->createChildSceneNode();
    mCameraNode->attachObject(mCamera);
    mCameraNode->setPosition(0, 3, 0);
    mCameraNode->resetOrientation();

    mCamera->setPosition(Ogre::Vector3(0, 0, 10));
    mCamera->lookAt(Ogre::Vector3(0, 0, 0));
    mCamera->setNearClipDistance(10.0f);
    mCamera->setFarClipDistance(10000.0f);
    mCamera->setAutoAspectRatio(true);
}

void CameraController::setTarget(Ogre::SceneNode* target)
{
    if (target != mTarget)
    {
        mTarget = target;
        if (target)
        {
            setYawPitchDist(Ogre::Degree(0), Ogre::Degree(15), 150);
        }
        else
        {
            mCamera->setAutoTracking(false);
        }
    }
}

void CameraController::manualStop()
{
    if (mMode == CM_FLY)
    {
        mGoingForward = false;
        mGoingBack = false;
        mGoingLeft = false;
        mGoingRight = false;
        mGoingUp = false;
        mGoingDown = false;
        mVelocity = Ogre::Vector3::ZERO;
    }
}

void CameraController::setYawPitchDist(Ogre::Radian yaw, Ogre::Radian pitch, Ogre::Real dist)
{
    mCamera->setPosition(mTarget->_getDerivedPositionUpdated());
    mCamera->setOrientation(mTarget->_getDerivedOrientationUpdated());
    mCamera->yaw(yaw);
    mCamera->pitch(-pitch);
    mCamera->moveRelative(Ogre::Vector3(0, 0, dist));
}

void CameraController::setMode(CameraMode mode)
{
    if (mMode != CM_BLENDER && mode == CM_BLENDER)
    {
        setTarget(mTarget ? mTarget : mCamera->getSceneManager()->getRootSceneNode());
        setYawPitchDist(Ogre::Degree(0), Ogre::Degree(15), 150);
    }
    else if (mMode != CM_FLY && mode == CM_FLY)
    {
        mCamera->setAutoTracking(false);
        mCamera->setFixedYawAxis(true);
    }

    if (mTarget == nullptr)
    {
        setTarget(mTarget ? mTarget : mCamera->getSceneManager()->getRootSceneNode());
    }
    mMode = mode;
}

void CameraController::setProjectionType(Ogre::ProjectionType pt)
{
    if (pt == Ogre::PT_PERSPECTIVE)
    {
        mCamera->setCustomProjectionMatrix(false);
    }
    mCamera->setProjectionType(pt);
}

void CameraController::setView(View newView)
{
    switch (newView)
    {
    case VI_TOP:
        mCameraNode->setOrientation(sqrt(0.5), -sqrt(0.5), 0, 0);
        break;
    case VI_BOTTOM:
        mCameraNode->setOrientation(sqrt(0.5), sqrt(0.5), 0, 0);
        break;
    case VI_LEFT:
        mCameraNode->setOrientation(sqrt(0.5), 0, -sqrt(0.5), 0);
        break;
    case VI_RIGHT:
        mCameraNode->setOrientation(sqrt(0.5), 0, sqrt(0.5), 0);
        break;
    case VI_FRONT:
        mCameraNode->setOrientation(1, 0, 0, 0);
        break;
    case VI_BACK:
        setView(VI_FRONT); // Recursion
        mCameraNode->setOrientation(0, 0, 1, 0);
    }
    mCurrentView = newView;
}

void CameraController::rotatePerspective(Direction dir)
{
    Ogre::Radian amount = Ogre::Radian(Ogre::Degree(15));
    switch (dir)
    {
    case DR_FORWARD:
        mCameraNode->rotate(Ogre::Vector3(1, 0, 0), -amount);
        break;
    case DR_BACKWARD:
        mCameraNode->rotate(Ogre::Vector3(1, 0, 0), amount);
        break;
    case DR_LEFT:
        mCameraNode->rotate(Ogre::Vector3(0, 1, 0), -amount, Ogre::Node::TS_WORLD);
        break;
    case DR_RIGHT:
        mCameraNode->rotate(Ogre::Vector3(0, 1, 0), amount, Ogre::Node::TS_WORLD);
        break;
    }
}

void CameraController::numpadViewSwitch(const QKeyEvent* evt)
{
    bool ctrl = evt->modifiers().testFlag(Qt::ControlModifier);
    bool numpad = evt->modifiers().testFlag(Qt::KeypadModifier);
    if (numpad)
    {
        switch (evt->key())
        {
        case Qt::Key_1:
            setView(ctrl ? VI_BACK : VI_FRONT);
            break;
        case Qt::Key_2:
            rotatePerspective(DR_BACKWARD);
            break;
        case Qt::Key_3:
            setView(ctrl ? VI_LEFT : VI_RIGHT);
            break;
        case Qt::Key_4:
            rotatePerspective(DR_LEFT);
            break;
        case Qt::Key_5:
            setProjectionType((mCamera->getProjectionType() == Ogre::PT_PERSPECTIVE) ? Ogre::PT_ORTHOGRAPHIC : Ogre::PT_PERSPECTIVE);
            break;
        case Qt::Key_6:
            rotatePerspective(DR_RIGHT);
            break;
        case Qt::Key_7:
            setView(ctrl ? VI_BOTTOM : VI_TOP);
            break;
        case Qt::Key_8:
            rotatePerspective(DR_FORWARD);
            break;
        }
    }
}

bool CameraController::frameRenderingQueued(const Ogre::FrameEvent& evt)
{
    if (mMode == CM_FLY)
    {
        // build our acceleration vector based on keyboard input composite
        Ogre::Vector3		accel = Ogre::Vector3::ZERO;
        if (mGoingForward)	accel += mCamera->getDirection();
        if (mGoingBack)		accel -= mCamera->getDirection();
        if (mGoingRight)	accel += mCamera->getRight();
        if (mGoingLeft)		accel -= mCamera->getRight();
        if (mGoingUp)		accel += mCamera->getUp();
        if (mGoingDown)		accel -= mCamera->getUp();

        // if accelerating, try to reach top speed in a certain time
        Ogre::Real topSpeed = mShiftDown ? mTopSpeed * 20 : mTopSpeed;
        if (accel.squaredLength() != 0)
        {
            accel.normalise();
            mVelocity += accel * topSpeed * evt.timeSinceLastFrame * 10;
        }
        // if not accelerating, try to stop in a certain time
        else mVelocity -= mVelocity * evt.timeSinceLastFrame * 10;

        Ogre::Real tooSmall = std::numeric_limits<Ogre::Real>::epsilon();

        // keep camera velocity below top speed and above epsilon
        if (mVelocity.squaredLength() > topSpeed * topSpeed)
        {
            mVelocity.normalise();
            mVelocity *= topSpeed;
        }
        else if (mVelocity.squaredLength() < tooSmall * tooSmall)
            mVelocity = Ogre::Vector3::ZERO;

        if (mVelocity != Ogre::Vector3::ZERO) mCamera->move(mVelocity * evt.timeSinceLastFrame);
    }
    return true;
}

void CameraController::keyPress(const QKeyEvent* evt)
{
    if (mMode == CM_FLY)
    {
        if (evt->key() == Qt::Key_W)
        {
            mGoingForward = true;
        }
        else if (evt->key() == Qt::Key_A)
        {
            mGoingLeft = true;
        }
        else if (evt->key() == Qt::Key_S)
        {
            mGoingBack = true;
        }
        else if (evt->key() == Qt::Key_D)
        {
            mGoingRight = true;
        }
    }
    if (evt->key() == Qt::Key_Shift)
    {
        mShiftDown = true;
    }
    if (mMode == CM_BLENDER)
    {
        Ogre::Vector3 accel = Ogre::Vector3::ZERO;
        if (evt->key() == Qt::Key_W)
        {
            accel += mCamera->getDirection();
        }
        else if (evt->key() == Qt::Key_A)
        {
            accel -= mCamera->getRight();
        }
        else if (evt->key() == Qt::Key_S)
        {
            accel -= mCamera->getDirection();
        }
        else if (evt->key() == Qt::Key_D)
        {
            accel += mCamera->getRight();
        }
        if (accel != Ogre::Vector3::ZERO)
        {
            accel.normalise();
            mCamera->move(accel * 1.5);
        }

        numpadViewSwitch(evt);
    }
}

void CameraController::keyRelease(const QKeyEvent* evt)
{
    if (evt->key() == Qt::Key_W)
        mGoingForward = false;
    else if (evt->key() == Qt::Key_A)
        mGoingLeft = false;
    else if (evt->key() == Qt::Key_S)
        mGoingBack = false;
    else if (evt->key() == Qt::Key_D)
        mGoingRight = false;
    if (evt->key() == Qt::Key_Shift)
        mShiftDown = false;
}

void CameraController::mouseMove(Ogre::Vector2 mousePos)
{
    if (mMode == CM_FLY)
    {
        mCamera->yaw(Ogre::Degree(-mousePos.x * 0.15f));
        mCamera->pitch(Ogre::Degree(-mousePos.y * 0.15f));
    }
    if (mMode == CM_BLENDER || mMode == CM_ORBIT)
    {
        if (mOrbiting && !mShiftDown)
        {
            rotate(mousePos.x, mousePos.y);
            if (mCurrentView != VI_USER)
                mCurrentView = VI_USER;
        }
        else if ((mOrbiting && mShiftDown) && mMode == CM_BLENDER)
        {
            pan(mousePos.x, mousePos.y);
        }
    }
}

void CameraController::mouseWheel(const QWheelEvent* evt)
{
    mMouseWheelDelta = evt->delta();
    //qDebug() << (uint64_t)mCamera << ", " << (uint64_t)mTarget;
    mDistFromTarget = (mCamera->getPosition() - mTarget->_getDerivedPositionUpdated()).length();
    mCamera->moveRelative(Ogre::Vector3(0, 0, -mMouseWheelDelta * 0.0004f * mDistFromTarget));
}

void CameraController::mousePress(const QMouseEvent* evt)
{
    if (mMode == CM_BLENDER || mMode == CM_ORBIT)
    {
        if (evt->button() == Qt::MiddleButton || evt->button() == Qt::LeftButton)
        {
            mOrbiting = true;
        }
    }
}

void CameraController::mouseRelease(const QMouseEvent* evt)
{
    if (mMode == CM_BLENDER || mMode == CM_ORBIT)
    {
        if (evt->button() == Qt::MiddleButton || evt->button() == Qt::LeftButton)
        {
            mOrbiting = false;
        }
    }
}

void CameraController::rotate(int x, int y)
{
    mCameraNode->yaw(Ogre::Degree(-x * 0.4f), Ogre::Node::TS_PARENT);
    mCameraNode->pitch(Ogre::Degree(-y * 0.4f));
}

void CameraController::pan(float x, float y)
{
    Ogre::Vector3 transVector(-x, y, 0);
    if (mTarget)
    {
        mDistFromTarget = (mCamera->getPosition() - mTarget->_getDerivedPositionUpdated()).length();

        if (mTarget->numAttachedObjects() > 0 && mTarget->getAttachedObject(0))
            transVector *= mTarget->getAttachedObject(0)->getWorldRadius() * (mDistFromTarget / 10000.0f);
        else
            transVector *= (mDistFromTarget / 500.f);
    }
    mCameraNode->translate(transVector, Ogre::Node::TS_LOCAL);
}


text:
import jsdom from 'jsdom';

// http://mochajs.org/#root-level-hooks

before((done) => {
  jsdom.env('<!DOCTYPE html>', (err, window) => {
    if (err) { return done(err); }
    global.window = window;
    global.document = window.document;
    global.navigator = window.navigator;
    global.Element = window.Element;
    done();
  });
});


text:
This project is no longer maintained.

[![Build Status](https://travis-ci.org/felipediesel/school.svg?branch=master)](https://travis-ci.org/felipediesel/school)
[![Coverage Status](https://coveralls.io/repos/github/felipediesel/school/badge.svg?branch=master)](https://coveralls.io/github/felipediesel/school?branch=master)
[![Code Climate](https://codeclimate.com/github/felipediesel/school/badges/gpa.svg)](https://codeclimate.com/github/felipediesel/school)

This is an Open Source app that lets you to manage any type of school, specially a Dojo.

## License

[MIT License](LICENSE.txt)


text:
- site: http://12factor.net/
- repo: https://github.com/heroku/12factor
- fork: https://github.com/dyweb/12factor

## CodeBase

- site: http://12factor.net/codebase
- zh-cn: http://12factor.net/zh_cn/codebase

- A codebase is a repo in git, it has many deploys, production, staging, developer 1's local machine, dev2 etc
- Use libraries and dependency management tools to share code between codebase

## Dependency

- site: http://12factor.net/dependencies
- zh-cn: http://12factor.net/zh_cn/dependencies

- explicit dependency declaration
- dependency isolation

DONT use system wide tool or lib, since they may not be installed on all machines or has wrong version. use vendored system tools.
(TODO: how to do that in php, have a curl binary inside vendor folder?)

## Config

- site: http://12factor.net/config
- zh-cn: http://12factor.net/zh_cn/config

- store config value in environment variables

DONT use language or framework specific config like `database.yml` `console.properties`.

## Backing Services

- site: http://12factor.net/backing-services
- zh-cn: http://12factor.net/zh_cn/backing-services

- local and remote services are all attached resources through network. ie: Database in local server and Amazon.

## Build release run

- site: http://12factor.net/build-release-run
- zh-cn: http://12factor.net/zh_cn/build-release-run

- separate build, release and run.
- build, compile code, contact, compress etc. can be complex and show error messages to developer
- release, build + config
- run, launch app process against a selected release. should be simple.
- able to rollback ie: Capistrano

## Processes

- site: http://12factor.net/processes
- zh-cn: http://12factor.net/zh_cn/processes

- stateless, persist in database or cache.

## Port binding

- site: http://12factor.net/port-binding
- zh-cn: http://12factor.net/zh_cn/port-binding

- have a build in http server, can become a backing service

## Concurrency

- site: http://12factor.net/concurrency
- zh-cn: http://12factor.net/zh_cn/concurrency

- use process to scale out
- processes share nothing
- use process managers to manage, such as upstart, foreman

## Disposability

- site: http://12factor.net/disposability
- zh-cn:


text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>animateMotion - path</title>
        <meta name="keywords" content="diseño gráfico, diseño web, responsive web design, ebooks" >
        <meta name="description" content="Diseñador gráfico y web en Zaragoza. Maquetación y diseño web con HTML5, SVG, CSS3, Responsive Web Design y Mobile-First.">
        <meta name="author" content="jorgeATGU" >
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="author" href="humans.txt" />
        <link rel="stylesheet" href="style.css">

    Menu
    <input id="toggle" type="checkbox"/>

VOLVER AL BLOG

Close

Twitter

Facebook

Codepen

Behance

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1200" height="300" viewBox="0 0 1200 300">

<path fill="none" stroke="black" d="M197,167.5c0,0,433-285.5,433,0"/>

  <circle fill="#F7931E" r="8">
    <animateMotion dur="10s" path="M197,167.5c0,0,433-285.5,433,0" fill="freeze" />
  </circle>

</svg>


text:
function t_midgetRGCMosaicNasalVsTemporalRetina()

    % Generate mosaics in the left eye
    whichEye = 'left eye';

    % At a radial eccentricity of 20 degs
    radialEcc = 25;

    % And an angle of 0 degress (horizontal meridian)
    thetaDegs = 0;

    % Nasal mosaic
    % Compute the mosaic's (x,y) eccentricity based on its retinal meridian location
    [horizontalEcc,~] = cMosaic.eccentricitiesForRetinaMeridianInEye(radialEcc*cosd(thetaDegs), 'nasal meridian', whichEye);
    [~,verticalEcc]   = cMosaic.eccentricitiesForRetinaMeridianInEye(radialEcc*sind(thetaDegs), 'inferior meridian', whichEye);

    % Generate the mosaic
    theNasalMidgetRGCmosaic = midgetRGCMosaic(...
           'sourceLatticeSizeDegs', 60, ...
           'eccentricityDegs', [horizontalEcc verticalEcc], ...
           'sizeDegs', [1 1], ...
           'whichEye', whichEye ...
     );

    % Temporal mosaic
    % Compute the mosaic's (x,y) eccentricity based on its retinal meridian location
    [horizontalEcc,~] = cMosaic.eccentricitiesForRetinaMeridianInEye(radialEcc*cosd(thetaDegs), 'temporal meridian', whichEye);
    [~,verticalEcc] =   cMosaic.eccentricitiesForRetinaMeridianInEye(radialEcc*sind(thetaDegs), 'inferior meridian', whichEye);

    % Generate the mosaic
    theTemporalMidgetRGCmosaic = midgetRGCMosaic(...
           'sourceLatticeSizeDegs', 60, ...
           'eccentricityDegs', [horizontalEcc verticalEcc], ...
           'sizeDegs', [1 1], ...
           'whichEye', whichEye ...
     );

    % Temporal mosaic at the temporal equivalent eccentricity corresponding
    % to the eccentricity of the nasal mosaic
    % Compute the nasal mosaic's temporal equivalent eccentricity
    temporalEquivalentEccDegs = theNasalMidgetRGCmosaic.temporalEquivalentEccentricityDegs();

    % Generate the mosaic
    theEquivalentTemporalEccentricityTemporalMidgetRGCmosaic = midgetRGCMosaic(...
           'sourceLatticeSizeDegs', 60, ...
           'eccentricityDegs', temporalEquivalentEccDegs, ...
           'sizeDegs', [1 1], ...
           'whichEye', whichEye);

    % Visualize the three mosaics
    hFig = figure(1); clf;
    set(hFig, 'Position', [10 10 1900 550], 'Color', [1 1 1]);

    % The nasal-inferior mosaic at the target eccentricity
    ax = subplot(1,3,1);
    theNasalMidgetRGCmosaic.visualize(...
            'figureHandle', hFig, ...
            'axesHandle', ax, ...
            'maxVisualizedRFs', 18, ...
            'xRangeDegs', [-0.25 0.25], ...
            'yRangeDegs', [-0.25 0.25], ...
            'fontSize', 20, ...
            'retinalMeridianAxesLabeling', true, ...
            'plotTitle', sprintf('%s\nTEE: (%2.1f,%2.1f) degs', ...
                            theNasalMidgetRGCmosaic.whichEye, ...
                            theNasalMidgetRGCmosaic.temporalEquivalentEccentricityDegs(1), ...
                            theNasalMidgetRGCmosaic.temporalEquivalentEccentricityDegs(2)));

    % The nasal-inferior mosaic at the equivalent temporal eccentricity
    ax = subplot(1,3,2);
    theEquivalentTemporalEccentricityTemporalMidgetRGCmosaic.visualize(...
            'figureHandle', hFig, ...
            'axesHandle', ax, ...
            'maxVisualizedRFs', 18, ...
            'xRangeDegs', [-0.25 0.25], ...
            'yRangeDegs', [-0.25 0.25], ...
            'fontSize', 20, ...
            'retinalMeridianAxesLabeling', true, ...
            'plotTitle', sprintf('%s\n(temporal equiv. ecc)', ...
                            theNasalMidgetRGCmosaic.whichEye));

    % The temporal-inferior mosaic at the target eccentricity
    ax = subplot(1,3,3);
    theTemporalMidgetRGCmosaic.visualize(...
            'figureHandle', hFig, ...
            'axesHandle', ax, ...
            'maxVisualizedRFs', 18, ...
            'xRangeDegs', [-0.25 0.25], ...
            'yRangeDegs', [-0.25 0.25], ...
            'fontSize', 20, ...
            'retinalMeridianAxesLabeling', true, ...
            'plotTitle', sprintf('%s\nTEE: (%2.1f,%2.1f) degs', ...
                            theTemporalMidgetRGCmosaic.whichEye, ...
                            theTemporalMidgetRGCmosaic.temporalEquivalentEccentricityDegs(1), ...
                            theTemporalMidgetRGCmosaic.temporalEquivalentEccentricityDegs(2)));

end


text:
package org.omg.CORBA;

/** Represents a <tt>DynAny</tt> object associated
 *  with an array.
 * @deprecated Use the new DynArray instead
 */
@Deprecated
public interface DynArray extends org.omg.CORBA.Object, org.omg.CORBA.DynAny
{
    /**
     * Returns the value of all the elements of this array.
     *
     * @return the array of Any objects that is the value
         *         for this DynArray object
         * @see #set_elements
     */
    public org.omg.CORBA.Any[] get_elements();

    /**
     * Sets the value of this
     * DynArray object to the given array.
     *
     * @param value the array of Any objects
     * @exception InvalidSeq if the sequence is bad
         * @see #get_elements
     */
    public void set_elements(org.omg.CORBA.Any[] value)
        throws org.omg.CORBA.DynAnyPackage.InvalidSeq;
}


text:
"""
Create a model based on an image file
-------------------------------------

Function :func:`fatiando.datasets.from_image` allows us to create a model
template from an image file. We can use it to assign a physical property value
to each color of an image. The model can later be fed to a forward modeling
function to produce synthetic data or even as a starting estimate for an
inversion.
"""
from fatiando import datasets
import matplotlib.pyplot as plt

# Use a sample image packaged with Fatiando for this example
template = datasets.from_image(datasets.SAMPLE_IMAGE)

# Use the template to assign velocity values to each color of the image
model = template.copy()
model[template == 0] = 3000
model[template == 1] = 6000
model[template == 2] = 0
model[template == 3] = 8000

# Now we can plot our velocity model
plt.figure(figsize=(7, 5.5))
plt.title('Velocity model')
plt.imshow(model, cmap="viridis")
plt.colorbar(pad=0, aspect=40).set_label('velocity (m/s)')
plt.tight_layout()
plt.show()


text:
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using System.Reflection;

using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.IEmulatorExtensions;
using BizHawk.Client.Common;

namespace BizHawk.Client.EmuHawk
{
	public partial class CoreFeatureAnalysis : Form, IToolFormAutoConfig
	{
		#region ConfigPersist

		private class CoreInfo
		{
			public string CoreName { get; set; }
			public string TypeName { get; set; }
			public bool Released { get; set; }
			public Dictionary<string, ServiceInfo> Services { get; set; }
			public List<string> NotApplicableTypes { get; set; }

			public CoreInfo() { }
			public CoreInfo(IEmulator emu)
			{
				TypeName = emu.GetType().ToString();
				CoreName = emu.Attributes().CoreName;
				Released = emu.Attributes().Released;
				Services = new Dictionary<string, ServiceInfo>();
				var ser = emu.ServiceProvider;
				foreach (Type t in ser.AvailableServices.Where(type => type != emu.GetType()))
				{
					var si = new ServiceInfo(t, ser.GetService(t));
					Services.Add(si.TypeName, si);
				}

				var notapplicableAttr = ((ServiceNotApplicable)Attribute
					.GetCustomAttribute(emu.GetType(), typeof(ServiceNotApplicable)));

				if (notapplicableAttr != null)
				{
					NotApplicableTypes = notapplicableAttr.NotApplicableTypes
					.Select(x => x.ToString())
					.ToList();
				}
				else
				{
					NotApplicableTypes = new List<string>();
				}
			}
		}

		private class ServiceInfo
		{
			public string TypeName { get; set; }
			public bool Complete { get; set; }
			public List<FunctionInfo> Functions { get; set; }

			public ServiceInfo() { }
			public ServiceInfo(Type servicetype, object service)
			{
				if (servicetype.IsGenericType)
				{
					TypeName = servicetype.GetGenericTypeDefinition().ToString();
				}
				else
				{
					TypeName = servicetype.ToString();
				}
				Functions = new List<FunctionInfo>();

				IEnumerable<MethodInfo> methods = servicetype.GetMethods(); // .Concat(servicetype.GetProperties().Select(p => p.GetGetMethod()));

				if (servicetype.IsInterface)
				{
					var map = service.GetType().GetInterfaceMap(servicetype);
					// project interface methods to actual implementations
					methods = methods.Select(
						m => map.TargetMethods[Array.IndexOf(map.InterfaceMethods, m)]);
				}

				foreach (var method in methods)
				{
					Functions.Add(new FunctionInfo(method, service));
				}
				Complete = Functions.All(f => f.Complete);
			}
		}

		private class FunctionInfo
		{
			public string TypeName { get; set; }
			public bool Complete { get; set; }

			public FunctionInfo() { }
			public FunctionInfo(MethodInfo m, object service)
			{
				TypeName = m.ToString();
				try
				{
					Complete = m.IsImplemented();
				}
				catch
				{
					Complete = false; // TODO: fixme
				}
			}
		}

		[ConfigPersist]
		private Dictionary<string, CoreInfo> KnownCores { get; set; }

		#endregion

		[RequiredService]
		IEmulator emu { get; set; }

		public CoreFeatureAnalysis()
		{
			InitializeComponent();
			KnownCores = new Dictionary<string, CoreInfo>();
		}

		private void OkBtn_Click(object sender, EventArgs e)
		{
			Close();
		}

		public void NewUpdate(ToolFormUpdateType type) { }

		private TreeNode CreateCoreTree(CoreInfo ci)
		{
			var ret = new TreeNode
			{
				Text = ci.CoreName + (ci.Released ? string.Empty : " (UNRELEASED)"),
				ForeColor = ci.Released ? Color.Black : Color.DarkGray
			};

			foreach (var service in ci.Services.Values)
			{
				string img = service.Complete ? "Good" : "Bad";
				var serviceNode = new TreeNode
				{
					Text = service.TypeName,
					ForeColor = service.Complete ? Color.Black : Color.Red,
					ImageKey = img,
					SelectedImageKey = img,
					StateImageKey = img
				};

				foreach (var function in service.Functions)
				{
					img = function.Complete ? "Good" : "Bad";
					serviceNode.Nodes.Add(new TreeNode
					{
						Text = function.TypeName,
						ForeColor = function.Complete ? Color.Black : Color.Red,
						ImageKey = img,
						SelectedImageKey = img,
						StateImageKey = img
					});
				}
				ret.Nodes.Add(serviceNode);
			}

			var knownServies = Assembly.GetAssembly(typeof(IEmulator))
				.GetTypes()
				.Where(t => typeof(IEmulatorService).IsAssignableFrom(t))
				.Where(t => t != typeof(IEmulatorService))
				.Where(t => t.IsInterface);

			var additionalServices = knownServies
				.Where(t => !ci.Services.ContainsKey(t.ToString()))
				.Where(t => !ci.NotApplicableTypes.Contains(t.ToString()))
				.Where(t => !typeof(ISpecializedEmulatorService).IsAssignableFrom(t)); // We don't want to show these as unimplemented, they aren't expected services

			foreach (Type service in additionalServices)
			{
				string img = "Bad";
				var serviceNode = new TreeNode
				{
					Text = service.ToString(),
					ForeColor = Color.Red,
					ImageKey = img,
					SelectedImageKey = img,
					StateImageKey = img
				};
				ret.Nodes.Add(serviceNode);
			}
			return ret;
		}

		private void DoCurrentCoreTree(CoreInfo ci)
		{
			CurrentCoreTree.ImageList = new ImageList();
			CurrentCoreTree.ImageList.Images.Add("Good", Properties.Resources.GreenCheck);
			CurrentCoreTree.ImageList.Images.Add("Bad", Properties.Resources.ExclamationRed);

			CurrentCoreTree.Nodes.Clear();
			CurrentCoreTree.BeginUpdate();
			var coreNode = CreateCoreTree(ci);
			coreNode.Expand();
			CurrentCoreTree.Nodes.Add(coreNode);
			CurrentCoreTree.EndUpdate();
		}

		private void DoAllCoresTree(CoreInfo current_ci)
		{
			CoreTree.ImageList = new ImageList();
			CoreTree.ImageList.Images.Add("Good", Properties.Resources.GreenCheck);
			CoreTree.ImageList.Images.Add("Bad", Properties.Resources.ExclamationRed);
			CoreTree.ImageList.Images.Add("Unknown", Properties.Resources.RetroQuestion);

			var possiblecoretypes =
				Assembly
				.Load("BizHawk.Emulation.Cores")
				.GetTypes()
				.Where(t => typeof(IEmulator).IsAssignableFrom(t) && !t.IsAbstract)
				.Select(t => new
				{
					Type = t,
					CoreAttributes = (CoreAttributes)t.GetCustomAttributes(typeof(CoreAttributes), false).First()
				})
				.OrderByDescending(t => t.CoreAttributes.Released)
				.ThenBy(t => t.CoreAttributes.CoreName)
				.ToList();

			toolStripStatusLabel1.Text = string.Format("Total: {0} Released: {1} Profiled: {2}",
				possiblecoretypes.Count,
				KnownCores.Values.Count(c => c.Released),
				KnownCores.Count);

			CoreTree.Nodes.Clear();
			CoreTree.BeginUpdate();

			foreach (var ci in KnownCores.Values)
			{
				var coreNode = CreateCoreTree(ci);

				if (ci.CoreName == current_ci.CoreName)
				{
					coreNode.Expand();
				}
				CoreTree.Nodes.Add(coreNode);
			}

			foreach (var t in possiblecoretypes)
			{
				if (!KnownCores.ContainsKey(t.CoreAttributes.CoreName))
				{
					string img = "Unknown";
					var coreNode = new TreeNode
					{
						Text = t.CoreAttributes.CoreName + (t.CoreAttributes.Released ? string.Empty : " (UNRELEASED)"),
						ForeColor = t.CoreAttributes.Released ? Color.Black : Color.DarkGray,
						ImageKey = img,
						SelectedImageKey = img,
						StateImageKey = img
					};
					CoreTree.Nodes.Add(coreNode);
				}
			}

			CoreTree.EndUpdate();
		}

		#region IToolForm

		public void UpdateValues()
		{
		}

		public void FastUpdate()
		{
		}

		public void Restart()
		{
			var ci = new CoreInfo(emu);
			KnownCores[ci.CoreName] = ci;

			DoCurrentCoreTree(ci);
			DoAllCoresTree(ci);
		}

		public bool AskSaveChanges()
		{
			return true;
		}

		public bool UpdateBefore
		{
			get { return false; }
		}

		#endregion
	}
}


text:
package circumflex
package web

import java.io.Serializable
import javax.servlet.http.Cookie

/*!# HTTP Cookies

HTTP is stateless protocol. [RFC2965](http://www.faqs.org/rfcs/rfc2965.html) describes
a way for a web application to send state information to the user agent and for the user
agent to return the state information to the origin web application. This state information
is often referred to as _cookie_.

Circumflex Web Framework helps you set response cookies and access request cookies
throughout your application using case class `HttpCookie`. It is mutable and dead simple.
*/
case class HttpCookie(var name: String,
                      var value: String,
                      var domain: String = null,
                      var path: String = null,
                      var comment: String = null,
                      var secure: Boolean = false,
                      var maxAge: Int = -1)
    extends Serializable {

  /*! You can convert `HttpCookie` back to `javax.servlet.Cookie` using `convert` method. */
  def convert(): Cookie = {
    val c = new Cookie(name, value)
    if (domain != null) c.setDomain(domain)
    if (path != null) c.setPath(path)
    if (comment != null) c.setComment(comment)
    c.setSecure(secure)
    c.setMaxAge(maxAge)
    c
  }

  override def toString = name + " = " + value

}

/*! Depending on your application needs you can obtain an instance of `HttpCookie` by
supplying `javax.servlet.Cookie` as an argument to `apply` method of `HttpCookie` singleton:

```
HttpCookie(rawCookie)
```
*/
object HttpCookie {
  def apply(cookie: Cookie): HttpCookie =
    new HttpCookie(
      cookie.getName,
      cookie.getValue,
      cookie.getDomain,
      cookie.getPath,
      cookie.getComment,
      cookie.getSecure,
      cookie.getMaxAge)
}


text:
.. _coap-client-sample:

CoAP client
###########

Overview
********

This sample is a simple CoAP client showing how to retrieve information
from a resource.

This demo assumes that the platform of choice has networking support,
some adjustments to the configuration may be needed.

This sample will make a GET request with path 'test' to the IPv6
multicast address reserved for CoAP nodes, so the URI can be
represented as:

.. code-block:: none

    coap://[ff02::fd]:5683/test

Building and Running
********************

This project will print all the octets of the response received, more context can
be obtained by using a tool such as tcpdump or wireshark.

See the `net-tools`_ project for more details.

This sample can be built and executed on QEMU as described
in :ref:`networking_with_qemu`.

Sample output
=============

.. code-block:: console

  reply: 60 00 00 00 00 24 11 40 fe 80 00 00 00 00 00 00 5c 25 e2 ff fe
  15 01 01 fe 80 00 00 00 00 00 00 5c 25 e2 ff fe 15 01 01 16 33 16 33
  00 24 3d 86 60 40 00 01 ff 54 79 70 65 3a 20 30 0a 43 6f 64 65 3a 20
  31 0a 4d 49 44 3a 20 31 0a (76 bytes)

.. note: The values shown above might differ.

.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools


text:
"use babel";
// @flow

export type featureLoadAction = {
  type: "FEATURE_LOAD",
  payload: {
    featureName: string,
  },
};

export function featureLoad(name: string): featureLoadAction {
  return {
    type: "FEATURE_LOAD",
    payload: {
      featureName: name,
    },
  };
}


text:
//
//  YHCityGroupModel.h
//  YHMeiTuanHD
//
//  Created by 杨应海 on 2016/10/30.
//  Copyright © 2016年 YYH. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface YHCityGroupModel : NSObject

/** 组头标题 */
@property (nonatomic, copy) NSString *title;
/** 城市数组 */
@property (nonatomic, strong) NSArray *cities;

@end


text:
export interface AureliaClassDecorators {
  customElement: string;
  useView: string;
  noView: string;
}

type AureliaClassDecoratorPossibilites =
  | 'customElement'
  | 'useView'
  | 'noView'
  | '';

interface DecoratorInfo {
  decoratorName: AureliaClassDecoratorPossibilites;
  decoratorArgument: string;
}

import * as fs from 'fs';
import * as Path from 'path';

import { SyntaxKind, ts } from 'ts-morph';

import { getElementNameFromClassDeclaration } from '../../common/className';
import {
  AureliaClassTypes,
  AureliaDecorator,
  AureliaViewModel,
} from '../../common/constants';
import { UriUtils } from '../../common/view/uri-utils';
import { IAureliaClassMember, IAureliaComponent } from '../aotTypes';
import { Optional } from '../parser/regions/ViewRegions';
import { ConventionService } from './ConventionService';
import { ValueConverterAnalyser } from './ValueConverterAnalyser';

export class CustomElementAnalyser {
  public static getAureliaComponentInfoFromClassDeclaration(
    sourceFile: ts.SourceFile,
    checker: ts.TypeChecker
  ): Optional<IAureliaComponent, 'viewRegions'> | undefined {
    let result: Optional<IAureliaComponent, 'viewRegions'> | undefined;
    let targetClassDeclaration: ts.ClassDeclaration | undefined;

    sourceFile.forEachChild((node) => {
      const isClassDeclaration = ts.isClassDeclaration(node);
      if (!isClassDeclaration) return;

      const fulfillsAureliaConventions =
        ConventionService.fulfillsAureliaConventions(node);
      const validForAurelia =
        isNodeExported(node) && fulfillsAureliaConventions;

      if (validForAurelia) {
        targetClassDeclaration = node;

        if (node.name == null) return;
        const symbol = checker.getSymbolAtLocation(node.name);

        let documentation = '';
        if (symbol != null) {
          // console.log('No symbol found for: ', node.name.getText());

          documentation = ts.displayPartsToString(
            symbol.getDocumentationComment(checker)
          );
        }

        // Value Converter
        const isValueConverterModel =
          ValueConverterAnalyser.checkValueConverter(targetClassDeclaration);
        if (isValueConverterModel) {
          result = ValueConverterAnalyser.getComponentInfo(
            targetClassDeclaration,
            sourceFile,
            documentation
          );
          return;
        }

        // Standard Component
        const { fileName } = targetClassDeclaration.getSourceFile();
        const conventionViewFilePath = fileName.replace(/.[jt]s$/, '.html');
        let viewFilePath: string = '';
        if (fs.existsSync(conventionViewFilePath)) {
          viewFilePath = UriUtils.toSysPath(conventionViewFilePath);
        } else {
          viewFilePath =
            getTemplateImportPathFromCustomElementDecorator(
              targetClassDeclaration,
              sourceFile
            ) ?? '';
        }

        // TODO: better way to filter out non aurelia classes?
        if (viewFilePath === '') return;

        const resultClassMembers = getAureliaViewModelClassMembers(
          targetClassDeclaration,
          checker
        );
        const viewModelName = getElementNameFromClassDeclaration(
          targetClassDeclaration
        );

        // Decorator
        const customElementDecorator = getCustomElementDecorator(
          targetClassDeclaration
        );
        let decoratorComponentName;
        let decoratorStartOffset;
        let decoratorEndOffset;
        if (customElementDecorator) {
          // get argument for name property in decorator
          customElementDecorator.expression.forEachChild((decoratorChild) => {
            // @customElement('empty-view')
            if (ts.isStringLiteral(decoratorChild)) {
              decoratorComponentName = decoratorChild
                .getText()
                .replace(/['"]/g, '');
              decoratorStartOffset = decoratorChild.getStart() + 1; // start quote
              decoratorEndOffset = decoratorChild.getEnd(); // include the last character, ie. the end quote
            }

            // @customElement({ name: 'my-view', template })
            else if (ts.isObjectLiteralExpression(decoratorChild)) {
              decoratorChild.forEachChild((decoratorArgument) => {
                if (!ts.isPropertyAssignment(decoratorArgument)) return;
                decoratorArgument.forEachChild((decoratorProp) => {
                  if (!ts.isStringLiteral(decoratorProp)) {
                    // TODO: What if name is not a string? --> Notify users [ISSUE-8Rh31VAG]
                    return;
                  }

                  decoratorComponentName = decoratorProp
                    .getText()
                    .replace(/['"]/g, '');
                  decoratorStartOffset = decoratorProp.getStart() + 1; // start quote
                  decoratorEndOffset = decoratorProp.getEnd(); // include the last character, ie. the end quote
                });
              });
            }
          });
        }

        result = {
          documentation,
          className: targetClassDeclaration.name?.getText() ?? '',
          componentName: viewModelName,
          decoratorComponentName,
          decoratorStartOffset,
          decoratorEndOffset,
          baseViewModelFileName: Path.parse(sourceFile.fileName).name,
          viewModelFilePath: UriUtils.toSysPath(sourceFile.fileName),
          viewFilePath,
          type: AureliaClassTypes.CUSTOM_ELEMENT,
          classMembers: resultClassMembers,
          sourceFile,
        };
      }
    });

    return result;
  }

  public static getClassDecoratorInfos(
    classDeclaration: ts.ClassDeclaration
  ): DecoratorInfo[] {
    const classDecoratorInfos: DecoratorInfo[] = [];

    const aureliaDecorators = ['customElement', 'useView', 'noView'];
    classDeclaration.decorators?.forEach((decorator) => {
      const result: DecoratorInfo = {
        decoratorName: '',
        decoratorArgument: '',
      };

      decorator.expression.forEachChild((decoratorChild) => {
        const childName =
          decoratorChild.getText() as AureliaClassDecoratorPossibilites;
        const isAureliaDecorator = aureliaDecorators.includes(childName);

        if (isAureliaDecorator) {
          if (ts.isIdentifier(decoratorChild)) {
            result.decoratorName = childName;
          }
        }
        // @customElement({name:>'my-name'<})
        else if (ts.isObjectLiteralExpression(decoratorChild)) {
          decoratorChild.forEachChild((decoratorArgChild) => {
            // {>name:'my-name'<}
            if (ts.isPropertyAssignment(decoratorArgChild)) {
              if (decoratorArgChild.name.getText() === 'name') {
                const value = decoratorArgChild.getLastToken()?.getText();
                if (value == null) return;
                result.decoratorArgument = value;
              }
            }
          });
        } else if (ts.isToken(decoratorChild)) {
          result.decoratorArgument = childName;
        }
      });

      const withoutQuotes = result.decoratorArgument.replace(/['"]/g, '');
      result.decoratorArgument = withoutQuotes;
      classDecoratorInfos.push(result);
    });

    return classDecoratorInfos.filter((info) => info.decoratorName !== '');
  }
}

function isNodeExported(node: ts.ClassDeclaration): boolean {
  return (ts.getCombinedModifierFlags(node) & ts.ModifierFlags.Export) !== 0;
}

function getAureliaViewModelClassMembers(
  classDeclaration: ts.ClassDeclaration,
  checker: ts.TypeChecker
): IAureliaClassMember[] {
  const classMembers: IAureliaClassMember[] = [];

  classDeclaration.forEachChild((classMember) => {
    // Constructor members
    if (ts.isConstructorDeclaration(classMember)) {
      const constructorMember = classMember;
      constructorMember.forEachChild((constructorArgument) => {
        if (constructorArgument.kind !== SyntaxKind.Parameter) return;
        const hasModifier = getConstructorHasModifier(constructorArgument);
        if (hasModifier === false) return;

        constructorArgument.forEachChild((argumentPart) => {
          if (argumentPart.kind !== SyntaxKind.Identifier) return;

          const name = argumentPart.getText();
          const symbol = checker.getSymbolAtLocation(argumentPart);
          const commentDoc = ts.displayPartsToString(
            symbol?.getDocumentationComment(checker)
          );

          const result: IAureliaClassMember = {
            name,
            documentation: commentDoc,
            isBindable: false,
            syntaxKind: argumentPart.kind,
            start: constructorArgument.getStart(),
            end: constructorArgument.getEnd(),
          };
          classMembers.push(result);
        });
      });
    }

    // Class Members
    else if (
      ts.isPropertyDeclaration(classMember) ||
      ts.isGetAccessorDeclaration(classMember) ||
      ts.isMethodDeclaration(classMember)
    ) {
      const classMemberName = classMember.name?.getText();

      const isBindable = classMember.decorators?.find((decorator) => {
        return decorator.getText().includes('@bindable');
      });

      // Get bindable type. If bindable type is undefined, we set it to be "unknown".
      const memberType =
        classMember.type?.getText() !== undefined
          ? classMember.type?.getText()
          : 'unknown';
      const memberTypeText =
        '' + `${isBindable ? 'Bindable ' : ''}` + `Type: \`${memberType}\``;
      // Add comment documentation if available
      const symbol = checker.getSymbolAtLocation(classMember.name);
      const commentDoc = ts.displayPartsToString(
        symbol?.getDocumentationComment(checker)
      );

      let defaultValueText: string = '';
      if (ts.isPropertyDeclaration(classMember)) {
        // Add default values. The value can be undefined, but that is correct in most cases.
        const defaultValue = classMember.initializer?.getText() ?? '';
        defaultValueText = `Default value: \`${defaultValue}\``;
      }

      // Concatenate documentation parts with spacing
      const documentation = `${commentDoc}\n\n${memberTypeText}\n\n${defaultValueText}`;

      const result: IAureliaClassMember = {
        name: classMemberName,
        documentation,
        isBindable: Boolean(isBindable),
        syntaxKind: ts.isPropertyDeclaration(classMember)
          ? ts.SyntaxKind.VariableDeclaration
          : ts.SyntaxKind.MethodDeclaration,
        start: classMember.getStart(),
        end: classMember.getEnd(),
      };
      classMembers.push(result);
    }
  });

  return classMembers;
}

function getConstructorHasModifier(constructorArgument: ts.Node) {
  let hasModifier = false;
  constructorArgument.forEachChild((argumentPart) => {
    if (hasModifier === true) return;

    const isPrivate = argumentPart.kind === SyntaxKind.PrivateKeyword;
    const isPublic = argumentPart.kind === SyntaxKind.PublicKeyword;
    const isProtected = argumentPart.kind === SyntaxKind.ProtectedKeyword;
    const isReadonly = argumentPart.kind === SyntaxKind.ReadonlyKeyword;
    hasModifier = isPrivate || isPublic || isProtected || isReadonly;
  });
  return hasModifier;
}

/**
 * [refactor]: also get other decorators
 */
function getCustomElementDecorator(classDeclaration: ts.ClassDeclaration) {
  const target = classDeclaration.decorators?.find((decorator) => {
    const result = decorator
      .getText()
      .includes(AureliaDecorator.CUSTOM_ELEMENT);
    return result;
  });
  return target;
}

function getTemplateImportPathFromCustomElementDecorator(
  classDeclaration: ts.ClassDeclaration,
  sourceFile: ts.SourceFile
): string | undefined {
  if (!classDeclaration.decorators) return;

  const customElementDecorator = classDeclaration.decorators.find(
    (decorator) => {
      const result = decorator
        .getText()
        .includes(AureliaDecorator.CUSTOM_ELEMENT);
      return result;
    }
  );

  if (!customElementDecorator) return;

  const hasTemplateProp = customElementDecorator
    .getText()
    .includes(AureliaViewModel.TEMPLATE);
  if (!hasTemplateProp) return;

  let templateImportPath = '';
  const templateImport = sourceFile.statements.find((statement) => {
    const isImport = statement.kind === ts.SyntaxKind.ImportDeclaration;
    if (!isImport) {
      return false;
    }

    let foundTemplateImport = false;
    statement.getChildren().forEach((child) => {
      if (child.kind === ts.SyntaxKind.ImportClause) {
        if (child.getText().includes(AureliaViewModel.TEMPLATE)) {
          foundTemplateImport = true;
        }
      }
    });

    return foundTemplateImport;
  });

  templateImport?.getChildren().forEach((child) => {
    if (child.kind === ts.SyntaxKind.StringLiteral) {
      templateImportPath = child.getText().replace(/['"]/g, '');
    }
  });

  templateImportPath = Path.resolve(
    Path.dirname(UriUtils.toSysPath(sourceFile.fileName)),
    templateImportPath
  );

  return templateImportPath;
}


text:
//
//  QYProfileController.m
//  约吧
//
//  Created by Shreker on 16/4/26.
//  Copyright © 2016年 云菲. All rights reserved.
//

#import "QYEditProfileController.h"
#import "QYSelectionController.h"
#import "QYAccountInfoController.h"
#import "QYAccountInfoEntranceCell.h"
#import "QLProfileInfo.h"
#import "QYProfileSectionModel.h"
#import "QYCreateTextController.h"
#import "ProfileCommon.h"
#import "QYSelectModel.h"
#import "QYPhotoWall.h"
#import "QYSingleSelectionCell.h"
#import "QYMultipleSelectionCell.h"
@interface QYEditProfileController () <UITableViewDataSource, UITableViewDelegate>
{

    QLProfileInfo *_profileInfo;
}
@property (nonatomic, strong) QYPhotoWall *wall;
@end

@implementation QYEditProfileController

#pragma mark - ♻ LifeCycle Methods
- (void)viewDidLoad {
    [super viewDidLoad];
    [self loadDefaultSetting];
}

/** Load the default UI elements And prepare some datas needed. */
- (void)loadDefaultSetting {
    _profileInfo = [QLProfileInfo profileInfo];

    self.tableView.estimatedRowHeight = 80;
    //self.tableView.rowHeight = UITableViewAutomaticDimension;
    self.tableView.tableHeaderView = self.wall;
}

-(QYPhotoWall *)wall{
    if (_wall == nil) {
        _wall = [QYPhotoWall photoWallWithPhotos:self.wallPhotos];
    }
    return _wall;
}

#pragma mark - 🔌 Delegate Methods
#pragma mark UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return _profileInfo.arrProfileInfos.count + 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    if (section == 0) {
        return 1;
    }
    QYProfileSectionModel *sectionModel = _profileInfo.arrProfileInfos[section - 1];
    return sectionModel.celldatas.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    if (indexPath.section == 0) { //个人信息修改入口
        QYAccountInfoEntranceCell *cell = [QYAccountInfoEntranceCell cellWithTableView:tableView];
        return cell;
    } else if (indexPath.section == 1 || indexPath.section == 2 ) {//我的信息、我的社交账号
        QYSingleSelectionCell *cell = [QYSingleSelectionCell singleSelectionCellForTableView:tableView forIndexPath:indexPath];
        QYProfileSectionModel *sectionModel = _profileInfo.arrProfileInfos[indexPath.section - 1];
        cell.cellModel = sectionModel.celldatas[indexPath.row];
        return cell;
    } else if (indexPath.section == 3 || indexPath.section == 4) {//我的标签、我的兴趣
        QYMultipleSelectionCell *cell = [QYMultipleSelectionCell multipleSelectionCellForTableView:tableView forIndexPath:indexPath];
        QYProfileSectionModel *sectionModel = _profileInfo.arrProfileInfos[indexPath.section - 1];
        cell.cellModel = sectionModel.celldatas[indexPath.row];
        return cell;
    } else {
        NSAssert(0 > 1, @"数据错误, 请检查");
        return nil;
    }
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
    if (section == 0) {
        return nil;
    }
    QYProfileSectionModel *sectionModel = _profileInfo.arrProfileInfos[section - 1];
    return sectionModel.sectionheader;
}

#pragma mark UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    //[tableView deselectRowAtIndexPath:indexPath animated:NO];
    //NSLog(@"%@",self.wall.imagesOfWall);
    UIViewController *viewController = nil;

    if (indexPath.section == 0) {
        viewController = [self.storyboard instantiateViewControllerWithIdentifier:@"accountInfo"];

    }else{
        QYBaseSelectionCell *selectionCell = [tableView cellForRowAtIndexPath:indexPath];
        __weak QYEditProfileController *weakSelf = self;
        if (selectionCell.cellModel.type == MyProfileCellWillPresentedTypeSelection) {
            viewController = [QYSelectionController new];
            [viewController setValue:selectionCell.cellModel forKey:@"selectionCellModel"];
            void (^changeDidSelectedModel)(QYProfileCellModel *model) = ^(QYProfileCellModel *model){
                [weakSelf changeDidSelectedContent:model];
            };
            [viewController setValue:changeDidSelectedModel forKey:@"backPreviousVC"];
        }else if (selectionCell.cellModel.type == MyProfileCellWillPresentedTypeInput){
            viewController = [QYCreateTextController new];

            viewController.title = selectionCell.cellModel.title;
            [viewController setValue:selectionCell.cellModel.content forKey:@"textContent"];
            void (^changeDidSelectedModel)(QYSelectModel *model) = ^(QYSelectModel *model){
                [weakSelf contentDidEndEdit:model];
            };
            [viewController setValue:changeDidSelectedModel forKey:@"contentDidEndEdit"];
        }
    }

    if (viewController) {
        [self.navigationController pushViewController:viewController animated:YES];
    }
}
//处理QYSelectionController回调
-(void)changeDidSelectedContent:(QYProfileCellModel *)cellModel{
    NSIndexPath *selectedIndexPath = self.tableView.indexPathForSelectedRow;
    QYProfileSectionModel *sectionModel = _profileInfo.arrProfileInfos[selectedIndexPath.section - 1];
    [sectionModel.celldatas replaceObjectAtIndex:selectedIndexPath.row withObject:cellModel];
    [self.tableView reloadData];
}

//处理QYCreateTextController回调
-(void)contentDidEndEdit:(QYSelectModel *)model{
    NSIndexPath *selectedIndexPath = self.tableView.indexPathForSelectedRow;
    QYProfileSectionModel *sectionModel = _profileInfo.arrProfileInfos[selectedIndexPath.section - 1];
    QYProfileCellModel *cellModel = (QYProfileCellModel *)sectionModel.celldatas[selectedIndexPath.row];
    cellModel.content = model.strText;
    [self.tableView reloadData];
}

- (IBAction)done:(UIBarButtonItem *)sender {
    [NSKeyedArchiver archiveRootObject:_profileInfo toFile:kProfilePath];
    //进行网络请求保存编辑后的个人信息
    NSMutableDictionary *uploadDict = [NSMutableDictionary dictionary];
    for (QYProfileSectionModel *model in _profileInfo.arrProfileInfos) {
        [model.celldatas enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
            if ([obj isKindOfClass:[QYProfileCellModel class]]) {
                QYProfileCellModel *cellModel = (QYProfileCellModel *)obj;
                if (cellModel.content.length > 0) {
                    [uploadDict setObject:cellModel.content forKey:cellModel.key];
                }
            }
        }];
    }

    if (_didEditProfile) {
        _didEditProfile(_wall.imagesOfWall);
        [self.navigationController popViewControllerAnimated:YES];
    }
}

@end


text:
<?php

namespace Inlead\Easyscreen\SearchBundle\AlmaClient;

use Symfony\Component\Config\Definition\Exception\Exception;

class AlmaClientReservationNotFound extends Exception {

}


text:
layout: page
title: Lotus Solutions Dinner
date: 2016-05-24
author: Ralph Todd
tags: weekly links, java
status: published
summary: Pellentesque at dolor ante. Donec mattis accumsan elit et placerat.
banner: images/banner/leisure-05.jpg
booking:
  startDate: 10/23/2016
  endDate: 10/25/2016
  ctyhocn: OBEFLHX
  groupCode: LSD
published: true
---
Cras viverra posuere blandit. Fusce nisl augue, aliquam sed massa in, lacinia porttitor risus. Nam a ex id dolor mollis hendrerit at in tortor. Cras vel ante ut risus elementum viverra vel sit amet neque. In tincidunt auctor eros in placerat. Vivamus rhoncus tincidunt velit ut feugiat. Phasellus tincidunt convallis nunc eget dapibus. In ultrices purus in molestie eleifend. Quisque vel arcu vestibulum, rutrum nunc at, finibus turpis. Donec tempor dui dolor, non mollis nulla feugiat vitae. Nullam nec neque quis arcu sagittis dignissim at id nulla. Phasellus elit felis, sodales ac tristique in, suscipit eget nunc. Fusce gravida ultricies scelerisque.

* Cras convallis ipsum et felis tristique accumsan non quis erat
* Duis aliquet est a lorem imperdiet sodales.

Aenean facilisis ultricies lorem non lacinia. Quisque maximus nibh at lorem sagittis accumsan. Pellentesque interdum ante quis semper dapibus. Ut diam justo, dictum sed metus in, egestas gravida dui. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse laoreet risus sed nisi dictum ullamcorper nec a velit. Interdum et malesuada fames ac ante ipsum primis in faucibus. Ut ornare mi eget purus vulputate fermentum. In eu euismod ex, nec euismod odio. Aliquam erat volutpat. Proin placerat nisi et eleifend vestibulum. Donec gravida massa eu ipsum pretium aliquam.
Aenean feugiat pellentesque augue, ac fringilla nibh rutrum at. Proin finibus, ex ut varius tincidunt, ipsum arcu lobortis orci, id semper lectus nisi at est. Vestibulum pharetra lorem eu arcu fringilla finibus. In porttitor ac tortor nec laoreet. Mauris commodo placerat felis in blandit. Suspendisse potenti. Proin id consectetur lorem, at iaculis ex. Aliquam tempor turpis vel molestie rutrum. Sed non neque non dolor tincidunt tempor et a nulla.


text:
use crate::error::Result;
use crate::xsd::constants::{ANNOTATION, APP_INFO, DOCUMENTATION, NAME};
use crate::xsd::id::{Id, Lineage, RootNodeType};
use crate::xsd::Xsd;
use std::fmt::{Debug, Formatter};

#[derive(Clone, Debug)]
pub struct Annotation {
    pub id: Id,
    pub items: Vec<Item>,
}

#[derive(Clone, Debug)]
pub enum Item {
    Documentation(String),
    AppInfo(String),
}

impl Annotation {
    pub fn documentation(&self) -> String {
        for item in &self.items {
            if let Item::Documentation(s) = &item {
                return s.clone();
            }
        }
        "".to_owned()
    }

    pub fn from_xml(node: &exile::Element, lineage: Lineage, xsd: &Xsd) -> Result<Self> {
        check!(ANNOTATION, node, xsd)?;
        let (id, lineage) = Id::make(lineage, node)?;
        let mut items = Vec::new();
        for inner in node.children() {
            let t = inner.name.as_str();
            if let Some(s) = inner.text() {
                match t {
                    DOCUMENTATION => items.push(Item::Documentation(s)),
                    APP_INFO => items.push(Item::AppInfo(s)),
                    _ => {
                        return raise!(
                            "expected either '{}' or '{}', got '{}'",
                            DOCUMENTATION,
                            APP_INFO,
                            t
                        );
                    }
                }
            }
        }
        Ok(Annotation { id, items })
    }
}

#[test]
fn parse() {
    let want_index: u64 = 13;
    let want_name = "4594507136952412519";
    let want_doc = "bishop is sleeping.";
    let xml = exile::Element {
        namespace: Some("xs".to_owned()),
        name: ANNOTATION.to_owned(),
        attributes: Default::default(),
        nodes: vec![exile::Node::Element(exile::Element {
            namespace: Some("xs".to_owned()),
            name: DOCUMENTATION.to_owned(),
            attributes: Default::default(),
            nodes: vec![exile::Node::Text(want_doc.to_owned())],
        })],
    };

    let annotation =
        Annotation::from_xml(&xml, Lineage::Index(want_index), &Xsd::new("xs")).unwrap();
    let got_doc = annotation.documentation();
    assert_eq!(got_doc.as_str(), want_doc);
    let got_index = annotation.id.index().unwrap();
    assert_eq!(got_index, want_index);
    let got_name = annotation.id.name();
    assert_eq!(got_name, want_name);
    let got_type = annotation.id.root_node_type().unwrap();
    assert_eq!(got_type, RootNodeType::Annotation);
}

#[test]
fn parse_foo_err() {
    let want_index: u64 = 13;
    let want_name = "4594507136952412519";
    let want_doc = "bishop is sleeping.";
    let xml = exile::Element {
        namespace: Some("xs".to_owned()),
        name: ANNOTATION.to_owned(),
        attributes: Default::default(),
        nodes: vec![exile::Node::Element(exile::Element {
            namespace: Some("xs".to_owned()),
            name: DOCUMENTATION.to_owned(),
            attributes: Default::default(),
            nodes: vec![exile::Node::Text(want_doc.to_owned())],
        })],
    };

    let result = Annotation::from_xml(&xml, Lineage::Index(want_index), &Xsd::new("foo"));
    assert!(result.is_err());
}

#[test]
fn parse_foo_ok() {
    let want_index: u64 = 13;
    let want_name = "4594507136952412519";
    let want_doc = "bishop is sleeping.";
    let xml = exile::Element {
        namespace: Some("foo".to_owned()),
        name: ANNOTATION.to_owned(),
        attributes: Default::default(),
        nodes: vec![exile::Node::Element(exile::Element {
            namespace: Some("foo".to_owned()),
            name: DOCUMENTATION.to_owned(),
            attributes: Default::default(),
            nodes: vec![exile::Node::Text(want_doc.to_owned())],
        })],
    };

    let result = Annotation::from_xml(&xml, Lineage::Index(want_index), &Xsd::new("foo"));
    assert!(result.is_ok());
}


text: sample remote repo


text:
/* $Id: list.h,v 1.8 2004/08/31 19:29:08 rjoseph Exp $ */
#ifndef __LIST_H
#define __LIST_H

#include "ea.h"
#include "util.h"

typedef struct list_entry {
   void *data;
   struct list_entry *next;
   struct list_entry *prev;
   int pri;
} l_ent;

/* next time you knock macros, check out this badass shit */
#define donodeswap(t, x, y) do { l_ent *t2; t2 = t->x->x; \
t->x->y = t->y; if (t->y) t->y->x = t->x; if (t2) t2->y = t; \
t->y = t->x; t->x->x = t; t->x = t2; } while (0)

/* the list_pri_ functions are named as such to denote that they
   mess with the l_ent.pri element -- they can be used on regular
   lists, but know that doing so will most likely cause the list to
   reorder itself at some point. */
extern l_ent  *list_init();
extern l_ent  *list_add(l_ent **);
extern l_ent  *list_add_with_data(l_ent **, void *);
extern l_ent  *list_find(l_ent *, void *, int (*)(void *, void *));
extern l_ent  *list_delete(l_ent **, void *, int (*)(void *, void *));
extern l_ent  *list_pri_add(l_ent **, int);
extern l_ent  *list_pri_add_wd(l_ent **, int, void *);
extern void    list_pri_shuffle(l_ent **);
extern void    list_pri_adjust(l_ent **, l_ent *);
extern void    list_pri_sort(l_ent **, int (*)(void *));
extern size_t  list_size(l_ent *);
extern void    list_free(l_ent *, void (*)(void *));
extern void    list_debug_print(l_ent *, char *(*)(void *));
extern void    list_free_noop(void *);
extern void    list_free_generic(void *);

#endif


text:
.checkbox label {
  padding-left: 3px;
  font-family: Tahoma, Helvetica, Arial, sans-serif;
  font-size: 13px;
}

aggregation-dialog-checkbox-label {
  padding-left: 3px;
  font-family: Tahoma, Helvetica, Arial, sans-serif;
  font-size: 0.65em;
}

.waiting .waiting-indicator {
  background: white;
  color: #444;
  font: bold 13px Tahoma, Helvetica, Arial, sans-serif;
  padding: 10px;
  margin: 0;
  height: auto;
}

.waiting .waiting-indicator-img {
  background: white;
  margin-right: 8px;
  float: left;
  vertical-align: top;
}

.waiting-msg {
  background: white;
  font: normal 10px Tahoma, Helvetica, Arial, sans-serif;
}

.modalDialogPageBackground {
  opacity: 0.20;
  background-color: #000000;
  /* Transparency for IE */
  background-image: expression('url(wait-background.gif)');
  background-color: expression('transparent');
  /*
  opacity: 0.20;
  position: expression('absolute');
  height: expression(document.documentElement.scrollHeight+'px');
  width: expression(document.documentElement.scrollWidth+'px');
  */
  cursor: wait;
}

.waitingDialog {
  position: absolute;
  left: 44%;
  top: 44%;
  padding: 15px 8px;
  z-index: 20001;
  height: auto;
  border: 1px solid #ccc;
  background: white;
  border-collapse: separate;
}

.waitingDialog_table {
  color: #444;
  background-image: url(large-loading.gif);
  background-position: left center;
  background-repeat: no-repeat;
  font: bold 13px Tahoma, Helvetica, Arial, sans-serif;
}

.waitingDialog_title {

  color: #444;
  font: bold 14px tahoma, arial, helvetica;
  margin-left: 40px;
  padding-bottom: 3px;
}

.waitingDialog_msg {
  font: normal 12px Tahoma, Helvetica, Arial, sans-serif;
  margin-left: 40px;
}

#waitingDialog,
#waitingForSomethingBox {
  border-collapse: separate;
}

#csvColumnsHeader {
  border-spacing: 0px;
  padding: 10px;
  background-color: #cccccc;
  border-bottom: thin solid black;
}

#csvPreviewPanel {
  border-spacing: 0px;
}

#csvColumnsBox {
  border-spacing: 0px;
}

#csvColumnsContent {
  /*margin-left: 10px;*/
}

#csvEnclosure {
  padding-left: 10px;
  position: relative;
  top: -4px;
}

.gwt-FileUpload {
  width: 160px;
}

#columnsHeaderLabel {
}

#enclosureRadioGroup .radio {
  font-size: 13px;
}

#delimiterRadioGroup .radio {
  font-size: 13px;
}

#csvModelDataTable {
}

.dialogContent,
.dialog-content,
#main_box,
#stepsPanel table,
#datasourceInfoBox,
#csvPropertiesContent table,
#csvColumnsContent table,
#csvDeckPanel,
#propertiesBox,
#otherRadioHbox table,
#configOptionsBox,
#csvSourceInputBox,
#filesListBox,
#csvPreviewDialog,
#filesPropertiesBox {
  border-spacing: 0px;
  border-collapse: collapse;
}

.IE .dialogContent,
.IE .dialog-content {
  border-spacing: inherit;
  border-collapse: inherit;
}

.dialog-content {
  border-collapse: expression('separate', cellSpacing = '0px'); /* IE hack  */
  border-collapse: separate;
  height: auto !important;
}

#controller_panel {
  /*border-top: 1px solid black;*/
  padding-top: 5px;
  border-collapse: separate;
}

#step_grid td {
  padding-top: 5px;
  padding-bottom: 10px;
}

#step_grid td>div.xul-label {
    word-wrap: break-word !important;
    white-space: normal !important;
    padding-right: 10px !important;
}

.roundedbutton-label {
  white-space: nowrap;
}

#filesLabel {
  white-space: nowrap;
}

#csvDescriptionLabel {
  white-space: normal;
}

#modelerDecision .radio {
  font-size: 13px;
}

#summaryDialogContainer {
  padding: 5px;
}

#summaryDialogRowsLoaded {
}

#errorLogExpander {
  margin-top: 20px;
}

#fileUpload > tbody > tr > td > form {
  margin-bottom: 0px;
}

#configOptionsBox > tbody > tr > td > div > fieldset > div {
  padding: 0px !important;
}

#otherRadioHbox {
  width: 100%;
}

#sourcestep,
#stagedatastep,
#summaryDialogContainer,
#csvPreviewContent,
#errorDetailsDialogContainer,
#errorDialogContainer,
#mainBox {
  border-collapse: separate;
}

#stageDataDescription,
#waitingDialogLabel,
#summaryDialogDescription,
#errorLabel {
  white-space: normal;
}

#summaryDialogDescription {
  padding-left: 3px;
}

/* this makes sure the fieldsets aren't any bigger than their defined sizes */
#csvDeckPanel .xul-fieldset {
  overflow: hidden;
}

#showModelerCheckboxHider .xul-fieldset {
  overflow: hidden;
}

#csvTextPreviewLabel > .xul-pre {
  width: 630px;
}

#database-options-box {
  height: 350px !important;
}

#database-options-box input {
  width: 260px !important;
}

#database-options-box .vbox {
  height: 325px !important;
}

#generic_message_label {
  white-space: normal;
}

#csvTextPreview > pre {
  font-size: 14px;
}

#csvTextPreviewLabel > pre {
  font-size: 14px;
}

/* This CSS file is mixed with Analyzer CSS so make sure*/
/* to qualify element selectors with something specific to*/
/* datasourceEditorDialog*/
.gwt-DialogBox input, .gwt-DialogBox select {
  font-size: 13px;
}

.drop-popup > .popupContent {
  font-size: 16px;
}

#csvDeckPanel .custom-list-textbox,
#datasourceName,
#uploadedFile,
.dataTable .gwt-HTML {
  font-family: Tahoma, Helvetica, Arial, sans-serif;
  font-size: 13px;
}

#hierarchy_message_label,
#dimension_message_label {
  white-space: normal;
}

#metadatastep {
  border-collapse: separate;
}

#metadatastep .scroll-panel {
  overflow-x: hidden !important;
}

#metadatastep .gwt-Tree {
  width: auto !important;
}

#metadatastep .gwt-Tree div {
  width: auto !important;
  padding: 0px;
}

#metadatastep #fieldList {
  font-size: 14px;
}

#schema-toolbar-groupbox > .vbox {
  height: 443px !important;
}

#schema-toolbar-groupbox {
  height: 463px !important;
}

#propertiesPanel .xul-textbox {
  width: 202px !important;
}

#messages2label {
  height: 50px;
  width: 188px;
  white-space: normal !important;
}

#joinDefinitionWindow,
#joinSelectionWindow {
  border-collapse: separate;
}

.rowHeaderFormat .xul-label {

}

#addFileButton {
  font-size: .65em;
  padding: 3px 10px;
}

.IE #addFileButton {
  background-color: #000000;
  height: 24px;
}

#otherRadio .gwt-TextBox {
  width: 150px;
}

#field_column_name {
  width: 230px;
  overflow: hidden;
}

#sql-text {
  box-sizing: border-box;
}

.IE #sql-text {
  height: 285px !important;
}

#pooling-description {
  box-sizing: border-box;
}

.IE #pooling-description {
  height: 40px !important;
}

#options-parameter-tree .gwt-ScrollTable {
  height: 220px !important;
}

#options-parameter-tree .gwt-ScrollTable .dataWrapper {
  height: 100% !important;
}

@-moz-document url-prefix() {
  #puc_options-parameter-tree .gwt-ScrollTable {
    height: 330px !important;
    overflow: auto !important;
  }
  #puc_options-parameter-tree .gwt-ScrollTable .dataWrapper {
    height: 100% !important;
  }
}