text:
var viewModel;
var observable = require('data/observable').Observable;

viewModel = new observable({
    debug: "",
    email: "",
    birthday: "06/21/91",
    gender: "",
    id: "",
    capabilities: []
});

module.exports = viewModel;

redpajama_set_name: RedPajamaGithub


text:
package com.ctrip.framework.cs.ui;

/**
 * Created by jiang.j on 2017/3/6.
 */
public class BuildInGCLogAnalyzer implements BuildInPage {
    @Override
    public String getId() {
        return "Analyzer-GCLogAnalyzer";
    }

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

    @Override
    public String getIcon() {
        return null;
    }
}


text:
package org.kodejava.example.lang;

public class CharacterIsDigitExample {
    public static void main(String[] args) {
        // Manually creates a string with randoms characters.
        String str = "12?ABC4!6def78+HI@0";

        for (int i = 0; i < str.length(); i++) {
            // Determines if the specified character is a digit
            if (Character.isDigit(str.charAt(i))) {
                System.out.println(str.charAt(i) + " is a digit.");
            } else {
                System.out.println(str.charAt(i) + " not a digit.");
            }
        }
    }
}


text:
extern "C" {
#endif

void InitializeMojoEmbedder() {
  mojo::embedder::test::InitWithSimplePlatformSupport();
}

#ifdef __cplusplus
}  // extern "C"
#endif


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>MNE-CPP: MNEX::PluginInputConnector Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

MNE-CPP
    beta 1.0

Main Page

Related Pages

Modules

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Hierarchy

Class Members

MNEX

PluginInputConnector

Public Types |
Public Slots |
Signals |
Public Member Functions |
List of all members

MNEX::PluginInputConnector Class Reference

The PluginConnector class provides the base to connect plug-in data.
 More...

#include <plugininputconnector.h>

Inheritance diagram for MNEX::PluginInputConnector:

  <map id="MNEX::PluginInputConnector_map" name="MNEX::PluginInputConnector_map">
<area href="class_m_n_e_x_1_1_plugin_connector.html" title="The PluginConnector class provides the base to connect plug-in data. " alt="MNEX::PluginConnector" shape="rect" coords="1057,56,1470,80"/>
<area href="class_m_n_e_x_1_1_plugin_input_data.html" alt="MNEX::PluginInputData< T >" shape="rect" coords="0,168,413,192"/>
<area href="class_m_n_e_x_1_1_plugin_input_data.html" alt="MNEX::PluginInputData< XMEASLIB::NewRealTimeMultiSampleArray >" shape="rect" coords="423,168,836,192"/>
<area href="class_m_n_e_x_1_1_plugin_input_data.html" alt="MNEX::PluginInputData< XMEASLIB::NewRealTimeSampleArray >" shape="rect" coords="846,168,1259,192"/>
<area href="class_m_n_e_x_1_1_plugin_input_data.html" alt="MNEX::PluginInputData< XMEASLIB::RealTimeCov >" shape="rect" coords="1269,168,1682,192"/>
<area href="class_m_n_e_x_1_1_plugin_input_data.html" alt="MNEX::PluginInputData< XMEASLIB::RealTimeEvoked >" shape="rect" coords="1692,168,2105,192"/>
<area href="class_m_n_e_x_1_1_plugin_input_data.html" alt="MNEX::PluginInputData< XMEASLIB::RealTimeSourceEstimate >" shape="rect" coords="2115,168,2528,192"/>
</map>

Public Types

typedef QSharedPointer< PluginInputConnector > 	SPtr

typedef QSharedPointer< const PluginInputConnector > 	ConstSPtr

 Public Types inherited from MNEX::PluginConnector

typedef QSharedPointer< PluginConnector > 	SPtr

typedef QSharedPointer< const PluginConnector > 	ConstSPtr

Public Slots

void 	update (XMEASLIB::NewMeasurement::SPtr pMeasurement)

Signals

void 	notify (XMEASLIB::NewMeasurement::SPtr pMeasurement)

Public Member Functions

 	PluginInputConnector (IPlugin *parent, const QString &name, const QString &descr)

virtual 	~PluginInputConnector ()

virtual bool 	isInputConnector () const

virtual bool 	isOutputConnector () const

 Public Member Functions inherited from MNEX::PluginConnector

 	PluginConnector (IPlugin *parent, const QString &name, const QString &descr)

virtual 	~PluginConnector ()

QString 	getName () const

Additional Inherited Members

 Protected Attributes inherited from MNEX::PluginConnector

IPlugin * 	m_pPlugin

QSet< PluginConnector::SPtr > 	m_setConnections

Detailed Description

The PluginConnector class provides the base to connect plug-in data.

Base class to connect plug-in data streams.

Definition at line 72 of file plugininputconnector.h.

Member Typedef Documentation

          typedef QSharedPointer<const PluginInputConnector> MNEX::PluginInputConnector::ConstSPtr

Const shared pointer type for PluginInputConnector.

Definition at line 77 of file plugininputconnector.h.

          typedef QSharedPointer<PluginInputConnector> MNEX::PluginInputConnector::SPtr

Shared pointer type for PluginInputConnector.

Definition at line 76 of file plugininputconnector.h.

Constructor & Destructor Documentation

          PluginInputConnector::PluginInputConnector
          (
          IPlugin *
          parent,

          const QString &
          name,

          const QString &
          descr

          )

Constructs a PluginInputConnector with the given parent.

Parameters

[in]	parent	pointer to parent plugin

[in]	name	connection name

[in]	descr	connection description

Definition at line 58 of file plugininputconnector.cpp.

          virtual MNEX::PluginInputConnector::~PluginInputConnector
          (
          	)

inlinevirtual

Destructor

Definition at line 93 of file plugininputconnector.h.

Member Function Documentation

          bool PluginInputConnector::isInputConnector
          (
          	)
           const

virtual

Returns true.

Returns

true

Implements MNEX::PluginConnector.

Definition at line 66 of file plugininputconnector.cpp.

          bool PluginInputConnector::isOutputConnector
          (
          	)
           const

virtual

Returns false.

Returns

false

Implements MNEX::PluginConnector.

Definition at line 74 of file plugininputconnector.cpp.

The documentation for this class was generated from the following files:

D:/Users/Christoph/GitHub/mne-cpp/applications/mne_x_libs/mne_x/Management/plugininputconnector.h

D:/Users/Christoph/GitHub/mne-cpp/applications/mne_x_libs/mne_x/Management/plugininputconnector.cpp

<address class="footer">
Generated on Fri Mar 27 2015 22:54:41 for MNE-CPP by

 1.8.9.1
</address>


text:
package local

import (
	"net"
	"net/http"
	"path/filepath"
	"strings"

	"github.com/yinqiwen/gsnova/common/channel"
	"github.com/yinqiwen/gsnova/common/dns"
	"github.com/yinqiwen/gsnova/common/helper"
	"github.com/yinqiwen/gsnova/common/hosts"
	"github.com/yinqiwen/gsnova/common/logger"
)

var GConf LocalConfig

const (
	BlockedByGFWRule = "BlockedByGFW"
	InHostsRule      = "InHosts"
	IsCNIPRule       = "IsCNIP"
	IsPrivateIPRule  = "IsPrivateIP"
)

func matchHostnames(pattern, host string) bool {
	host = strings.TrimSuffix(host, ".")
	pattern = strings.TrimSuffix(pattern, ".")

	if len(pattern) == 0 || len(host) == 0 {
		return false
	}

	patternParts := strings.Split(pattern, ".")
	hostParts := strings.Split(host, ".")

	if len(patternParts) != len(hostParts) {
		return false
	}

	for i, patternPart := range patternParts {
		if i == 0 && patternPart == "*" {
			continue
		}
		if patternPart != hostParts[i] {
			return false
		}
	}
	return true
}

type PACConfig struct {
	Method   []string
	Host     []string
	URL      []string
	Rule     []string
	Protocol []string
	Remote   string
}

func (pac *PACConfig) ruleInHosts(req *http.Request) bool {
	return hosts.InHosts(req.Host)
}

func (pac *PACConfig) matchProtocol(protocol string) bool {
	if len(pac.Protocol) == 0 {
		return true
	}
	for _, p := range pac.Protocol {
		if p == "*" || strings.EqualFold(p, protocol) {
			return true
		}
	}
	return false
}

func (pac *PACConfig) matchRules(ip string, req *http.Request) bool {
	if len(pac.Rule) == 0 {
		return true
	}

	ok := true

	for _, rule := range pac.Rule {
		not := false
		if strings.HasPrefix(rule, "!") {
			not = true
			rule = rule[1:]
		}
		if strings.EqualFold(rule, InHostsRule) {
			if nil == req {
				ok = false
			} else {
				ok = pac.ruleInHosts(req)
			}
		} else if strings.EqualFold(rule, BlockedByGFWRule) {
			gfwList := getGFWList()
			if nil != gfwList && nil != req {
				ok = gfwList.IsBlockedByGFW(req)
				if !ok {
					logger.Debug("#### %s is NOT BlockedByGFW", req.Host)
				}
			} else {
				ok = true
				logger.Debug("NIL GFWList object or request")
			}
		} else if strings.EqualFold(rule, IsCNIPRule) {
			if len(ip) == 0 || nil == dns.CNIPSet {
				logger.Debug("NIL CNIP content  or IP/Domain")
				ok = false
			} else {
				var err error
				if net.ParseIP(ip) == nil {
					ip, err = dns.DnsGetDoaminIP(ip)
				}
				if nil == err {
					ok = dns.CNIPSet.IsInCountry(net.ParseIP(ip), "CN")
				}
				logger.Debug("ip:%s is CNIP:%v", ip, ok)
			}
		} else if strings.EqualFold(rule, IsPrivateIPRule) {
			if len(ip) == 0 {
				ok = false
			} else {
				ok = helper.IsPrivateIP(ip)
			}
		} else {
			logger.Error("###Invalid rule:%s", rule)
		}
		if not {
			ok = ok != true
		}
		if !ok {
			break
		}
	}
	return ok
}

func MatchPatterns(str string, rules []string) bool {
	if len(rules) == 0 {
		return true
	}
	str = strings.ToLower(str)
	for _, pattern := range rules {
		matched, err := filepath.Match(pattern, str)
		if nil != err {
			logger.Error("Invalid pattern:%s with reason:%v", pattern, err)
			continue
		}
		if matched {
			return true
		}
	}
	return false
}

func (pac *PACConfig) Match(protocol string, ip string, req *http.Request) bool {
	ret := pac.matchProtocol(protocol)
	if !ret {
		return false
	}
	ret = pac.matchRules(ip, req)
	if !ret {
		return false
	}
	if nil == req {
		if len(pac.Host) > 0 || len(pac.Method) > 0 || len(pac.URL) > 0 {
			return false
		}
		return true
	}
	host := req.Host
	if len(pac.Host) > 0 && strings.Contains(host, ":") {
		host, _, _ = net.SplitHostPort(host)
	}
	return MatchPatterns(host, pac.Host) && MatchPatterns(req.Method, pac.Method) && MatchPatterns(req.URL.String(), pac.URL)
}

type HTTPDumpConfig struct {
	Dump        string
	Domain      []string
	ExcludeBody []string
	IncludeBody []string
}

func (dump *HTTPDumpConfig) MatchDomain(host string) bool {
	for _, dm := range dump.Domain {
		matched, _ := filepath.Match(dm, host)
		if matched {
			return true
		}
	}
	return false
}

type ProxyConfig struct {
	Local       string
	Forward     string
	MITM        bool //Man-in-the-middle
	Transparent bool
	HTTPDump    HTTPDumpConfig
	PAC         []PACConfig
}

func (cfg *ProxyConfig) getProxyChannelByHost(proto string, host string) string {
	creq, _ := http.NewRequest("Connect", "https://"+host, nil)
	return cfg.findProxyChannelByRequest(proto, host, creq)
}

func (cfg *ProxyConfig) findProxyChannelByRequest(proto string, ip string, req *http.Request) string {
	var channelName string
	// if len(ip) > 0 && helper.IsPrivateIP(ip) {
	// 	//channel = "direct"
	// 	return channel.DirectChannelName
	// }
	for _, pac := range cfg.PAC {
		if pac.Match(proto, ip, req) {
			channelName = pac.Remote
			break
		}
	}
	if len(channelName) == 0 {
		logger.Error("No proxy channel found.")
	}
	return channelName
}

type AdminConfig struct {
	Listen        string
	BroadcastAddr string
	ConfigDir     string
}

type UDPGWConfig struct {
	Addr string
}

type SNIConfig struct {
	Redirect map[string]string
}

func (sni *SNIConfig) redirect(domain string) (string, bool) {
	for k, v := range sni.Redirect {
		matched, err := filepath.Match(k, domain)
		if nil != err {
			logger.Error("Invalid pattern:%s with reason:%v", k, err)
			continue
		}
		if matched {
			return v, true
		}
	}
	return "", false
}

type GFWListConfig struct {
	URL                   string
	UserRule              []string
	Proxy                 string
	RefershPeriodMiniutes int
}

type LocalConfig struct {
	Log             []string
	Cipher          channel.CipherConfig
	Mux             channel.MuxConfig
	ProxyLimit      channel.ProxyLimitConfig
	UserAgent       string
	UPNPExposePort  int
	LocalDNS        dns.LocalDNSConfig
	UDPGW           UDPGWConfig
	SNI             SNIConfig
	Admin           AdminConfig
	GFWList         GFWListConfig
	TransparentMark int
	Proxy           []ProxyConfig
	Channel         []channel.ProxyChannelConfig
}

func (cfg *LocalConfig) init() error {
	haveDirect := false
	for i := range GConf.Channel {
		if GConf.Channel[i].Name == channel.DirectChannelName && GConf.Channel[i].Enable {
			haveDirect = true
			GConf.Channel[i].ServerList = []string{"direct://0.0.0.0:0"}
			GConf.Channel[i].ConnsPerServer = 1
		}
		if len(GConf.Channel[i].Cipher.Key) == 0 {
			GConf.Channel[i].Cipher = GConf.Cipher
		}
		if len(GConf.Channel[i].HTTP.UserAgent) == 0 {
			GConf.Channel[i].HTTP.UserAgent = GConf.UserAgent
		}
		GConf.Channel[i].Adjust()
	}

	if !haveDirect {
		directProxyChannel := make([]channel.ProxyChannelConfig, 1)
		directProxyChannel[0].Name = channel.DirectChannelName
		directProxyChannel[0].Enable = true
		directProxyChannel[0].ConnsPerServer = 1
		directProxyChannel[0].LocalDialMSTimeout = 5000
		directProxyChannel[0].ServerList = []string{"direct://0.0.0.0:0"}
		GConf.Channel = append(directProxyChannel, GConf.Channel...)
	}
	return nil
}


text:
Simple robust cookie library

##Exports

###CookieAccessInfo(domain,path,secure,script)
    class to determine matching qualities of a cookie

#####Properties
* String domain - domain to match
* String path - path to match
* Boolean secure - access is secure (ssl generally)
* Boolean script - access is from a script

###Cookie(cookiestr_or_cookie)
    turns input into a Cookie (singleton if given a Cookie)

#####Properties
* String name - name of the cookie
* String value - string associated with the cookie
* String domain - domain to match (on a cookie a '.' at the start means a wildcard matching anything ending in the rest)
* String path - base path to match (matches any path starting with this '/' is root)
* Boolean noscript - if it should be kept from scripts
* Boolean secure - should it only be transmitted over secure means
* Number expiration_date - number of millis since 1970 at which this should be removed

#####Methods
* String toString() - the __set-cookie:__ string for this cookie
* String toValueString() - the __cookie:__ string for this cookie
* Cookie parse(cookiestr) - parses the string onto this cookie or a new one if called directly
* Boolean matches(access_info) - returns true if the access_info allows retrieval of this cookie
* Boolean collidesWith(cookie) - returns true if the cookies cannot exist in the same space (domain and path match)

###CookieJar()
    class to hold numerous cookies from multiple domains correctly

#####Methods
* Cookie setCookie(cookie) - add a cookie to the jar
* Cookie[] setCookies(cookiestr_or_list) - add a large number of cookies to the jar
* Cookie getCookie(cookie_name,access_info) - get a cookie with the name and access_info matching
* Cookie[] getCookies(access_info) - grab all cookies matching this access_info


text:
## Notes

AutoCompleteBubbleText allows you to add and remove items from an EditText using a drawable as a background.

The benefit of AutoCompleteBubbleText is that you can position the ListView anywhere in the layout instead of just under the EditText.

You can also use the autocomplete filtering function of the EditText to filter items in the list.

An example use is in contact lists that need to be filtered and keep checked states.

![Sample image 1](https://github.com/FrederickRider/AutoCompleteBubbleText/blob/master/images/Screenshot_1.png)

You can also filter the list by text after the last delimiter:

![Sample image 2](https://github.com/FrederickRider/AutoCompleteBubbleText/tree/master/images/Screenshot_2.png)

## Usage

The sample activity shows a basic usage.

````````````````
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <com.mycardboarddreams.autocompletebubbletext.MultiSelectEditText
        android:id="@+id/auto_text_complete"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textColor="@android:color/black"
        android:padding="5dp"
        android:background="#FFEEEEEE"/>

    <!-- Layout where the list will go -->
    <FrameLayout
        android:id="@+id/auto_list_container"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:background="#FF666666"/>

</LinearLayout>
````````````````

Create some object that implements MultiSelectItem

````````````````
public class SampleItem implements MultiSelectItem {

    private final String mReadableName;
    private final String mId;

    public SampleItem(String readableName){
        mReadableName = readableName;
        mId = String.valueOf(readableName.hashCode());
    }

    @Override
    public String getId() {
        return mId;
    }

    @Override
    public String getReadableName() {
        return mReadableName;
    }

    @Override
    public String toString() {
        return mReadableName;
    }
}
````````````````

Once you've set up the layout, pull the ListView out of the EditText, and put it wherever in the layout you like:

````````````````
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_sample);

    //Find the MultiSelectEditText in the layout
    MultiSelectEditText editText = (MultiSelectEditText)findViewById(R.id.auto_text_complete);

    /**
     * Add some sample items
     * The type of item can be anything that implements MultiSelectItem
     */
    List<SampleItem> sampleItems = Arrays.asList(
            new SampleItem("Aaron LastName"),
            new SampleItem("Cameron Chimes"),
            new SampleItem("Tim Gibbons"),
            new SampleItem("Gary Styles"),
            new SampleItem("Bart Thompson"),
            new SampleItem("Abagail B.D.E.")
    );

    editText.addAllItems(sampleItems);

    //Pull out the ListView from the MultiSelectEditText
    ListView list = editText.getListView();

    //Add it to a ViewGroup somewhere else in the layout
    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
    list.setLayoutParams(params);

    FrameLayout frame = (FrameLayout)findViewById(R.id.auto_list_container);
    frame.addView(list);

    //Set a listener on bubble clicks
    editText.setBubbleClickListener(new MultiSelectEditText.BubbleClickListener<SampleItem>() {

        @Override
        public void onClick(SampleItem item) {
            Log.d(TAG, "Item: " + item.getReadableName());
        }
    });
}
````````````````

### You must call getListView():

````````````````
/**
 * Once the ListView is created, you must fetch
 * it and add it as a child of some other layout.
 */
ListView getListView()
````````````````

## Customization

You can customize most parts of the view.

### You may also override the following methods:

````````````````
/**
 * Override this to return a custom ListView.
 */
ListView onCreateListView()
````````````````
````````````````
/**
 * Override this to return a custom Adapter,
 * which (currently) must be an ArrayAdapter.
 */
ArrayAdapter<T> onCreateAdapter()
````````````````
````````````````
/**
 * Override this to return the resource
 * representing the bubble drawable.
 */
int getBubbleResource()
````````````````
````````````````
/**
 * Override this to return a different delimiter string.
 */
String getDelimiter()
````````````````
````````````````
/**
 * Override this to return filtered results given the last value
 * after the delimiter (default is ','), lastCommaValue.
 */
filterData(String lastCommaValue)
````````````````
````````````````
/**
 * Call this to pass a listener for clicks on bubbles
 * Pass in a class that implements BubbleClickListener
 */
setBubbleClickListener(BubbleClickListener<T> listener)
````````````````


text:
<?php

namespace CommerceGuys\Intl\NumberFormat;

/**
 * Provides metadata for number formatting.
 */
final class NumberFormat
{
    // Arabic-Indic digits.
    const NUMBERING_SYSTEM_ARABIC = 'arab';
    // Extended Arabic-Indic digits.
    const NUMBERING_SYSTEM_ARABIC_EXTENDED = 'arabext';
    // Bengali digits.
    const NUMBERING_SYSTEM_BENGALI = 'beng';
    // Devanagari digits.
    const NUMBERING_SYSTEM_DEVANAGARI = 'deva';
    // Latin digits
    const NUMBERING_SYSTEM_LATIN = 'latn';

    /**
     * The locale (i.e. "en_US").
     *
     * @var string
     */
    protected $locale;

    /**
     * The number pattern used to format decimal numbers.
     *
     * @var string
     */
    protected $decimalPattern;

    /**
     * The number pattern used to format percentages.
     *
     * @var string
     */
    protected $percentPattern;

    /**
     * The number pattern used to format currency amounts.
     *
     * @var string
     */
    protected $currencyPattern;

    /**
     * The number pattern used to format accounting currency amounts.
     *
     * @var string
     */
    protected $accountingCurrencyPattern;

    /**
     * The numbering system.
     *
     * @var string
     */
    protected $numberingSystem = self::NUMBERING_SYSTEM_LATIN;

    /**
     * The decimal separator.
     *
     * @var string
     */
    protected $decimalSeparator = '.';

    /**
     * The decimal separator for currency amounts.
     *
     * @var string
     */
    protected $decimalCurrencySeparator = '.';

    /**
     * The grouping separator.
     *
     * @var string
     */
    protected $groupingSeparator = ',';

    /**
     * The grouping separator for currency amounts.
     *
     * @var string
     */
    protected $groupingCurrencySeparator = ',';

    /**
     * The plus sign.
     *
     * @var string
     */
    protected $plusSign = '+';

    /**
     * The number symbols.
     *
     * @var string
     */
    protected $minusSign = '-';

    /**
     * The percent sign.
     *
     * @var string
     */
    protected $percentSign = '%';

    /**
     * Creates a new NumberFormat instance.
     *
     * @param array $definition The definition array.
     */
    public function __construct(array $definition)
    {
        // Validate the presence of required properties.
        $requiredProperties = [
            'locale', 'decimal_pattern', 'percent_pattern',
            'currency_pattern', 'accounting_currency_pattern',
        ];
        foreach ($requiredProperties as $requiredProperty) {
            if (empty($definition[$requiredProperty])) {
                throw new \InvalidArgumentException(sprintf('Missing required property "%s".', $requiredProperty));
            }
        }
        // Validate the numbering system.
        if (isset($definition['numbering_system'])) {
            if (!in_array($definition['numbering_system'], ['arab', 'arabext', 'beng', 'deva', 'latn'])) {
                throw new \InvalidArgumentException(sprintf('Invalid numbering system "%s".', $definition['numbering_system']));
            }
        }

        $this->locale = $definition['locale'];
        $this->decimalPattern = $definition['decimal_pattern'];
        $this->percentPattern = $definition['percent_pattern'];
        $this->currencyPattern = $definition['currency_pattern'];
        $this->accountingCurrencyPattern = $definition['accounting_currency_pattern'];
        if (isset($definition['numbering_system'])) {
            $this->numberingSystem = $definition['numbering_system'];
        }
        if (isset($definition['decimal_separator'])) {
            $this->decimalSeparator = $definition['decimal_separator'];
        }
        if (isset($definition['decimal_currency_separator'])) {
            $this->decimalCurrencySeparator = $definition['decimal_currency_separator'];
        } else {
            $this->decimalCurrencySeparator = $this->decimalSeparator;
        }
        if (isset($definition['grouping_separator'])) {
            $this->groupingSeparator = $definition['grouping_separator'];
        }
        if (isset($definition['grouping_currency_separator'])) {
            $this->groupingCurrencySeparator = $definition['grouping_currency_separator'];
        } else {
            $this->groupingCurrencySeparator = $this->groupingSeparator;
        }
        if (isset($definition['plus_sign'])) {
            $this->plusSign = $definition['plus_sign'];
        }
        if (isset($definition['minus_sign'])) {
            $this->minusSign = $definition['minus_sign'];
        }
        if (isset($definition['percent_sign'])) {
            $this->percentSign = $definition['percent_sign'];
        }
    }

    /**
     * Gets the locale.
     *
     * @return string
     */
    public function getLocale()
    {
        return $this->locale;
    }

    /**
     * Gets the number pattern used to format decimal numbers.
     *
     * @return string
     *
     * @see http://cldr.unicode.org/translation/number-patterns
     */
    public function getDecimalPattern()
    {
        return $this->decimalPattern;
    }

    /**
     * Gets the number pattern used to format percentages.
     *
     * @return string
     *
     * @see http://cldr.unicode.org/translation/number-patterns
     */
    public function getPercentPattern()
    {
        return $this->percentPattern;
    }

    /**
     * Gets the number pattern used to format currency amounts.
     *
     * @return string
     *
     * @see http://cldr.unicode.org/translation/number-patterns
     */
    public function getCurrencyPattern()
    {
        return $this->currencyPattern;
    }

    /**
     * Gets the number pattern used to format accounting currency amounts.
     *
     * Most commonly used when formatting amounts on invoices.
     *
     * @return string
     *
     * @see http://cldr.unicode.org/translation/number-patterns
     */
    public function getAccountingCurrencyPattern()
    {
        return $this->accountingCurrencyPattern;
    }

    /**
     * Gets the numbering system.
     *
     * The value is one of the NUMBERING_SYSTEM_ constants.
     *
     * @return string
     */
    public function getNumberingSystem()
    {
        return $this->numberingSystem;
    }

    /**
     * Gets the decimal separator.
     *
     * @return string
     */
    public function getDecimalSeparator()
    {
        return $this->decimalSeparator;
    }

    /**
     * Gets the decimal separator for currency amounts.
     *
     * @return string
     */
    public function getDecimalCurrencySeparator()
    {
        return $this->decimalCurrencySeparator;
    }

    /**
     * Gets the grouping separator for currency amounts.
     *
     * @return string
     */
    public function getGroupingSeparator()
    {
        return $this->groupingSeparator;
    }

    /**
     * Gets the currency grouping separator.
     *
     * @return string
     */
    public function getGroupingCurrencySeparator()
    {
        return $this->groupingCurrencySeparator;
    }

    /**
     * Gets the plus sign.
     *
     * @return string
     */
    public function getPlusSign()
    {
        return $this->plusSign;
    }

    /**
     * Gets the minus sign.
     *
     * @return string
     */
    public function getMinusSign()
    {
        return $this->minusSign;
    }

    /**
     * Gets the percent sign.
     *
     * @return string
     */
    public function getPercentSign()
    {
        return $this->percentSign;
    }
}


text:
Wraps the route53 hw-cookbook and manages the node's DNS record in the
AWS Route53 hosted zones.

## Supported Platforms

Debian

## Usage

### os-route53::default

Include `os-route53` in your node's `run_list`:

```json
{
  "run_list": [
    "recipe[os-route53::default]"
  ]
}
```

## License and Authors

Author:: OrgSync, Inc. (<ops@orgsync.com>)


text:
package com.google.cloud.automl.v1beta1.samples;

// [START automl_v1beta1_generated_AutoMl_ListColumnSpecs_sync]
import com.google.cloud.automl.v1beta1.AutoMlClient;
import com.google.cloud.automl.v1beta1.ColumnSpec;
import com.google.cloud.automl.v1beta1.ListColumnSpecsRequest;
import com.google.cloud.automl.v1beta1.TableSpecName;
import com.google.protobuf.FieldMask;

public class SyncListColumnSpecs {

  public static void main(String[] args) throws Exception {
    syncListColumnSpecs();
  }

  public static void syncListColumnSpecs() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (AutoMlClient autoMlClient = AutoMlClient.create()) {
      ListColumnSpecsRequest request =
          ListColumnSpecsRequest.newBuilder()
              .setParent(
                  TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]")
                      .toString())
              .setFieldMask(FieldMask.newBuilder().build())
              .setFilter("filter-1274492040")
              .setPageSize(883849137)
              .setPageToken("pageToken873572522")
              .build();
      for (ColumnSpec element : autoMlClient.listColumnSpecs(request).iterateAll()) {
        // doThingsWith(element);
      }
    }
  }
}
// [END automl_v1beta1_generated_AutoMl_ListColumnSpecs_sync]


text:
/*
James Cryer / Huddle 2014
URL: https://github.com/Huddle/Resemble.js
*/

(function(_this){
	'use strict';

	var pixelTransparency = 1;

	var errorPixelColor = { // Color for Error Pixels. Between 0 and 255.
		red: 255,
		green: 0,
		blue: 255,
		alpha: 255
	};

	var errorPixelTransform = {
		flat : function (d1, d2){
			return {
				r: errorPixelColor.red,
				g: errorPixelColor.green,
				b: errorPixelColor.blue,
				a: errorPixelColor.alpha
			}
		},
		movement: function (d1, d2){
			return {
				r: ((d2.r*(errorPixelColor.red/255)) + errorPixelColor.red)/2,
				g: ((d2.g*(errorPixelColor.green/255)) + errorPixelColor.green)/2,
				b: ((d2.b*(errorPixelColor.blue/255)) + errorPixelColor.blue)/2,
				a: d2.a
			}
		}
	};

	var errorPixelTransformer = errorPixelTransform.flat;

	var largeImageThreshold = 1200;

	_this['resemble'] = function( fileData ){

		var data = {};
		var images = [];
		var updateCallbackArray = [];

		var tolerance = { // between 0 and 255
			red: 16,
			green: 16,
			blue: 16,
			alpha: 16,
			minBrightness: 16,
			maxBrightness: 240
		};

		var ignoreAntialiasing = false;
		var ignoreColors = false;

		function triggerDataUpdate(){
			var len = updateCallbackArray.length;
			var i;
			for(i=0;i<len;i++){
				if (typeof updateCallbackArray[i] === 'function'){
					updateCallbackArray[i](data);
				}
			}
		}

		function loop(x, y, callback){
			var i,j;

			for (i=0;i<x;i++){
				for (j=0;j<y;j++){
					callback(i, j);
				}
			}
		}

		function parseImage(sourceImageData, width, height){

			var pixelCount = 0;
			var redTotal = 0;
			var greenTotal = 0;
			var blueTotal = 0;
			var brightnessTotal = 0;

			loop(height, width, function(verticalPos, horizontalPos){
				var offset = (verticalPos*width + horizontalPos) * 4;
				var red = sourceImageData[offset];
				var green = sourceImageData[offset + 1];
				var blue = sourceImageData[offset + 2];
				var brightness = getBrightness(red,green,blue);

				pixelCount++;

				redTotal += red / 255 * 100;
				greenTotal += green / 255 * 100;
				blueTotal += blue / 255 * 100;
				brightnessTotal += brightness / 255 * 100;
			});

			data.red = Math.floor(redTotal / pixelCount);
			data.green = Math.floor(greenTotal / pixelCount);
			data.blue = Math.floor(blueTotal / pixelCount);
			data.brightness = Math.floor(brightnessTotal / pixelCount);

			triggerDataUpdate();
		}

		function loadImageData( fileData, callback ){
			var fileReader;
			var hiddenImage = new Image();
			hiddenImage.setAttribute("crossOrigin", "crossOrigin");

			hiddenImage.onload = function() {

				var hiddenCanvas =  document.createElement('canvas');
				var imageData;
				var width = hiddenImage.width;
				var height = hiddenImage.height;

				hiddenCanvas.width = width;
				hiddenCanvas.height = height;
				hiddenCanvas.getContext('2d').drawImage(hiddenImage, 0, 0, width, height);
				imageData = hiddenCanvas.getContext('2d').getImageData(0, 0, width, height);

				images.push(imageData);

				callback(imageData, width, height);
			};

			if (typeof fileData === 'string') {
				hiddenImage.src = fileData;
			} else if (typeof fileData.data !== 'undefined'
					&& typeof fileData.width === 'number'
					&& typeof fileData.height === 'number') {
				images.push(fileData);
				callback(fileData, fileData.width, fileData.height);
			} else {
				fileReader = new FileReader();
				fileReader.onload = function (event) {
					hiddenImage.src = event.target.result;
				};
				fileReader.readAsDataURL(fileData);
			}
		}

		function isColorSimilar(a, b, color){

			var absDiff = Math.abs(a - b);

			if(typeof a === 'undefined'){
				return false;
			}
			if(typeof b === 'undefined'){
				return false;
			}

			if(a === b){
				return true;
			} else if ( absDiff < tolerance[color] ) {
				return true;
			} else {
				return false;
			}
		}

		function isNumber(n) {
			return !isNaN(parseFloat(n));
		}

		function isPixelBrightnessSimilar(d1, d2){
			var alpha = isColorSimilar(d1.a, d2.a, 'alpha');
			var brightness = isColorSimilar(d1.brightness, d2.brightness, 'minBrightness');
			return brightness && alpha;
		}

		function getBrightness(r,g,b){
			return 0.3*r + 0.59*g + 0.11*b;
		}

		function isRGBSame(d1,d2){
			var red = d1.r === d2.r;
			var green = d1.g === d2.g;
			var blue = d1.b === d2.b;
			return red && green && blue;
		}

		function isRGBSimilar(d1, d2){
			var red = isColorSimilar(d1.r,d2.r,'red');
			var green = isColorSimilar(d1.g,d2.g,'green');
			var blue = isColorSimilar(d1.b,d2.b,'blue');
			var alpha = isColorSimilar(d1.a, d2.a, 'alpha');

			return red && green && blue && alpha;
		}

		function isContrasting(d1, d2){
			return Math.abs(d1.brightness - d2.brightness) > tolerance.maxBrightness;
		}

		function getHue(r,g,b){

			r = r / 255;
			g = g / 255;
			b = b / 255;
			var max = Math.max(r, g, b), min = Math.min(r, g, b);
			var h;
			var d;

			if (max == min){
				h = 0; // achromatic
			} else{
				d = max - min;
				switch(max){
					case r: h = (g - b) / d + (g < b ? 6 : 0); break;
					case g: h = (b - r) / d + 2; break;
					case b: h = (r - g) / d + 4; break;
				}
				h /= 6;
			}

			return h;
		}

		function isAntialiased(sourcePix, data, cacheSet, verticalPos, horizontalPos, width){
			var offset;
			var targetPix;
			var distance = 1;
			var i;
			var j;
			var hasHighContrastSibling = 0;
			var hasSiblingWithDifferentHue = 0;
			var hasEquivilantSibling = 0;

			addHueInfo(sourcePix);

			for (i = distance*-1; i <= distance; i++){
				for (j = distance*-1; j <= distance; j++){

					if(i===0 && j===0){
						// ignore source pixel
					} else {

						offset = ((verticalPos+j)*width + (horizontalPos+i)) * 4;
						targetPix = getPixelInfo(data, offset, cacheSet);

						if(targetPix === null){
							continue;
						}

						addBrightnessInfo(targetPix);
						addHueInfo(targetPix);

						if( isContrasting(sourcePix, targetPix) ){
							hasHighContrastSibling++;
						}

						if( isRGBSame(sourcePix,targetPix) ){
							hasEquivilantSibling++;
						}

						if( Math.abs(targetPix.h - sourcePix.h) > 0.3 ){
							hasSiblingWithDifferentHue++;
						}

						if( hasSiblingWithDifferentHue > 1 || hasHighContrastSibling > 1){
							return true;
						}
					}
				}
			}

			if(hasEquivilantSibling < 2){
				return true;
			}

			return false;
		}

		function errorPixel(px, offset, data1, data2){
			var data = errorPixelTransformer(data1, data2);
			px[offset] = data.r;
			px[offset + 1] = data.g;
			px[offset + 2] = data.b;
			px[offset + 3] = data.a;
		}

		function copyPixel(px, offset, data){
			px[offset] = data.r; //r
			px[offset + 1] = data.g; //g
			px[offset + 2] = data.b; //b
			px[offset + 3] = data.a * pixelTransparency; //a
		}

		function copyGrayScalePixel(px, offset, data){
			px[offset] = data.brightness; //r
			px[offset + 1] = data.brightness; //g
			px[offset + 2] = data.brightness; //b
			px[offset + 3] = data.a * pixelTransparency; //a
		}

		function getPixelInfo(data, offset, cacheSet){
			var r;
			var g;
			var b;
			var d;
			var a;

			r = data[offset];

			if(typeof r !== 'undefined'){
				g = data[offset+1];
				b = data[offset+2];
				a = data[offset+3];
				d = {
					r: r,
					g: g,
					b: b,
					a: a
				};

				return d;
			} else {
				return null;
			}
		}

		function addBrightnessInfo(data){
			data.brightness = getBrightness(data.r,data.g,data.b); // 'corrected' lightness
		}

		function addHueInfo(data){
			data.h = getHue(data.r,data.g,data.b);
		}

		function analyseImages(img1, img2, width, height){

			var hiddenCanvas = document.createElement('canvas');

			var data1 = img1.data;
			var data2 = img2.data;

			hiddenCanvas.width = width;
			hiddenCanvas.height = height;

			var context = hiddenCanvas.getContext('2d');
			var imgd = context.createImageData(width,height);
			var targetPix = imgd.data;

			var mismatchCount = 0;

			var time = Date.now();

			var skip;

			if(!!largeImageThreshold && ignoreAntialiasing && (width > largeImageThreshold || height > largeImageThreshold)){
				skip = 6;
			}

			loop(height, width, function(verticalPos, horizontalPos){

				if(skip){ // only skip if the image isn't small
					if(verticalPos % skip === 0 || horizontalPos % skip === 0){
						return;
					}
				}

				var offset = (verticalPos*width + horizontalPos) * 4;
				var pixel1 = getPixelInfo(data1, offset, 1);
				var pixel2 = getPixelInfo(data2, offset, 2);

				if(pixel1 === null || pixel2 === null){
					return;
				}

				if (ignoreColors){

					addBrightnessInfo(pixel1);
					addBrightnessInfo(pixel2);

					if( isPixelBrightnessSimilar(pixel1, pixel2) ){
						copyGrayScalePixel(targetPix, offset, pixel2);
					} else {
						errorPixel(targetPix, offset, pixel1, pixel2);
						mismatchCount++;
					}
					return;
				}

				if( isRGBSimilar(pixel1, pixel2) ){
					copyPixel(targetPix, offset, pixel1, pixel2);

				} else if( ignoreAntialiasing && (
						addBrightnessInfo(pixel1), // jit pixel info augmentation looks a little weird, sorry.
						addBrightnessInfo(pixel2),
						isAntialiased(pixel1, data1, 1, verticalPos, horizontalPos, width) ||
						isAntialiased(pixel2, data2, 2, verticalPos, horizontalPos, width)
					)){

					if( isPixelBrightnessSimilar(pixel1, pixel2) ){
						copyGrayScalePixel(targetPix, offset, pixel2);
					} else {
						errorPixel(targetPix, offset, pixel1, pixel2);
						mismatchCount++;
					}
				} else {
					errorPixel(targetPix, offset, pixel1, pixel2);
					mismatchCount++;
				}

			});

			data.misMatchPercentage = (mismatchCount / (height*width) * 100).toFixed(2);
			data.analysisTime = Date.now() - time;

			data.getImageDataUrl = function(text){
				var barHeight = 0;

				if(text){
					barHeight = addLabel(text,context,hiddenCanvas);
				}

				context.putImageData(imgd, 0, barHeight);

				return hiddenCanvas.toDataURL("image/png");
			};
		}

		function addLabel(text, context, hiddenCanvas){
			var textPadding = 2;

			context.font = '12px sans-serif';

			var textWidth = context.measureText(text).width + textPadding*2;
			var barHeight = 22;

			if(textWidth > hiddenCanvas.width){
				hiddenCanvas.width = textWidth;
			}

			hiddenCanvas.height += barHeight;

			context.fillStyle = "#666";
			context.fillRect(0,0,hiddenCanvas.width,barHeight -4);
			context.fillStyle = "#fff";
			context.fillRect(0,barHeight -4,hiddenCanvas.width, 4);

			context.fillStyle = "#fff";
			context.textBaseline = "top";
			context.font = '12px sans-serif';
			context.fillText(text, textPadding, 1);

			return barHeight;
		}

		function normalise(img, w, h){
			var c;
			var context;

			if(img.height < h || img.width < w){
				c = document.createElement('canvas');
				c.width = w;
				c.height = h;
				context = c.getContext('2d');
				context.putImageData(img, 0, 0);
				return context.getImageData(0, 0, w, h);
			}

			return img;
		}

		function compare(one, two){

			function onceWeHaveBoth(){
				var width;
				var height;
				if(images.length === 2){
					width = images[0].width > images[1].width ? images[0].width : images[1].width;
					height = images[0].height > images[1].height ? images[0].height : images[1].height;

					if( (images[0].width === images[1].width) && (images[0].height === images[1].height) ){
						data.isSameDimensions = true;
					} else {
						data.isSameDimensions = false;
					}

					data.dimensionDifference = { width: images[0].width - images[1].width, height: images[0].height - images[1].height };

					analyseImages( normalise(images[0],width, height), normalise(images[1],width, height), width, height);

					triggerDataUpdate();
				}
			}

			images = [];
			loadImageData(one, onceWeHaveBoth);
			loadImageData(two, onceWeHaveBoth);
		}

		function getCompareApi(param){

			var secondFileData,
				hasMethod = typeof param === 'function';

			if( !hasMethod ){
				// assume it's file data
				secondFileData = param;
			}

			var self = {
				ignoreNothing: function(){

					tolerance.red = 16;
					tolerance.green = 16;
					tolerance.blue = 16;
					tolerance.alpha = 16;
					tolerance.minBrightness = 16;
					tolerance.maxBrightness = 240;

					ignoreAntialiasing = false;
					ignoreColors = false;

					if(hasMethod) { param(); }
					return self;
				},
				ignoreAntialiasing: function(){

					tolerance.red = 32;
					tolerance.green = 32;
					tolerance.blue = 32;
					tolerance.alpha = 32;
					tolerance.minBrightness = 64;
					tolerance.maxBrightness = 96;

					ignoreAntialiasing = true;
					ignoreColors = false;

					if(hasMethod) { param(); }
					return self;
				},
				ignoreColors: function(){

					tolerance.alpha = 16;
					tolerance.minBrightness = 16;
					tolerance.maxBrightness = 240;

					ignoreAntialiasing = false;
					ignoreColors = true;

					if(hasMethod) { param(); }
					return self;
				},
				repaint: function(){
					if(hasMethod) { param(); }
					return self;
				},
				onComplete: function( callback ){

					updateCallbackArray.push(callback);

					var wrapper = function(){
						compare(fileData, secondFileData);
					};

					wrapper();

					return getCompareApi(wrapper);
				}
			};

			return self;
		}

		return {
			onComplete: function( callback ){
				updateCallbackArray.push(callback);
				loadImageData(fileData, function(imageData, width, height){
					parseImage(imageData.data, width, height);
				});
			},
			compareTo: function(secondFileData){
				return getCompareApi(secondFileData);
			}
		};

	};

	_this['resemble'].outputSettings = function(options){
		var key;
		var undefined;

		if(options.errorColor){
			for (key in options.errorColor) {
				errorPixelColor[key] = options.errorColor[key] === undefined ? errorPixelColor[key] : options.errorColor[key];
			}
		}

		if(options.errorType && errorPixelTransform[options.errorType] ){
			errorPixelTransformer = errorPixelTransform[options.errorType];
		}

		pixelTransparency = isNaN(Number(options.transparency)) ? pixelTransparency : options.transparency;

		if (options.largeImageThreshold !== undefined) {
			largeImageThreshold = options.largeImageThreshold;
		}

		return this;
	};

}(this));


text:
package teamspace

import (
	"errors"
	"github.com/watermint/toolbox/domain/dropbox/api/dbx_client"
	"github.com/watermint/toolbox/domain/dropbox/service/sv_profile"
	"github.com/watermint/toolbox/domain/dropbox/service/sv_teamfolder"
)

var (
	ErrorRootNamespaceNotFound = errors.New("root namespace not found")
)

func FindRootNamespaceIdAsMember(client dbx_client.Client) (rootNamespaceId string, err error) {
	profile, err := sv_profile.NewProfile(client).Current()
	if err != nil {
		return "", err
	}
	return profile.RootNamespaceId, nil
}

func FindRootNamespaceIdAsAdmin(client dbx_client.Client) (rootNamespaceId string, err error) {
	teamfolders, err := sv_teamfolder.New(client).List()
	if err != nil {
		return "", err
	}

	for _, teamfolder := range teamfolders {
		if teamfolder.IsTeamSharedDropbox {
			return teamfolder.TeamFolderId, nil
		}
	}
	return "", ErrorRootNamespaceNotFound
}

func ClientForRootNamespaceAsMember(client dbx_client.Client) (dbx_client.Client, error) {
	rootNamespaceId, err := FindRootNamespaceIdAsMember(client)
	if rootNamespaceId == "" || err != nil {
		return nil, err
	}
	return client.WithPath(dbx_client.Root(rootNamespaceId)), nil
}

func ClientForRootNamespaceAsAdmin(client dbx_client.Client) (dbx_client.Client, error) {
	admin, err := sv_profile.NewTeam(client).Admin()
	if err != nil {
		return nil, err
	}
	rootNamespaceId, err := FindRootNamespaceIdAsAdmin(client)
	if rootNamespaceId == "" || err != nil {
		return nil, err
	}
	return client.AsAdminId(admin.TeamMemberId).WithPath(dbx_client.Root(rootNamespaceId)), nil
}


text:
xcopy ..\..\build\thinktecture.identitymodel.client.dll lib\portable-net45+wp80+win8+wpa81 /y
xcopy ..\..\build\thinktecture.identitymodel.client.pdb lib\portable-net45+wp80+win8+wpa81 /y

xcopy ..\..\build\thinktecture.identitymodel.client.net45.dll lib\net45 /y
xcopy ..\..\build\thinktecture.identitymodel.client.net45.pdb lib\net45 /y

NuGet.exe pack Thinktecture.IdentityModel.Client.nuspec -exclude *.cmd -OutputDirectory ..\


text: IBDesignable example in Objective-C


text:
  <md-toolbar class="md-whiteframe-2dp main-tb">

Daniel & Patricia .com

      <md-button class="md-raised" ng-click="showRsvp($event)">
         RSVP ONLINE
      </md-button>

      <md-input-container>
        <md-select ng-model="language" class="md-body-1" aria-label="{{content[language].language}}" ng-change="changeLanguage()">
          <md-option ng-value="language.code" ng-repeat="language in languages">{{language.label}}</md-option>
        </md-select>
      </md-input-container>

  </md-toolbar>

  <md-content class="invitation-body">

        {{content[language].patricia}}
        &
        {{content[language].daniel}}

        {{content[language].invitation[0]}}
        {{content[language].invitation[1]}}
        {{content[language].invitation[2]}}
        {{content[language].invitation[3]}}

        {{content[language].church[0]}}
        {{content[language].church[1]}}

		        	{{content[language].church[2]}}
          {{content[language].church[3]}}

        {{content[language].reception[0]}}
        {{content[language].reception[1]}}

		        	{{content[language].reception[2]}}
          {{content[language].reception[3]}}

        {{content[language].wedding_registry}}

          <md-button class="md-raised" ng-click="showGift($event)">
             {{content[language].financial_gift}}
          </md-button>
          <md-button class="md-raised" href="https://www.amazon.com/wedding/daniel-peykov-patricia-kaminska-montreal-september-2016/registry/HB680RH2Y87T" target="_blank">
             {{content[language].physical_gift}}
          </md-button>

  </md-content>


text:
{% extends "base.html" %}
{% load static from staticfiles %}
{% load dict_get %}
{% load divisible_by %}

{% block title %}
指标状态 | 随访工具 | 医时代
{% endblock %}

{% block css %}
  <link rel="stylesheet" type="text/css" href="{% static "css/normalize.css" %}" />

  <link rel="stylesheet" type="text/css" href="{% static "plugins/jquery-ui/themes/97suifang/jquery-ui.css" %}" />
  <link rel="stylesheet" type="text/css" href="{% static "plugins/thickbox/thickbox.css" %}" />
  <link rel="stylesheet" type="text/css" href="{% static "plugins/qtip2/jquery.qtip.min.css" %}" />
  <link rel="stylesheet" type="text/css" href="{% static "plugins/qtip2/qtip.97suifang.css" %}" />
  <link rel="stylesheet" type="text/css" href="{% static "css/sheet_default.css" %}" />
{% endblock %}

{% block scripts %}

{% endblock %}

{% block page %}
  {% csrf_token %}

        isuifangqa

退出

随访医学指标

      {% comment %}

以下可能是您感兴趣的指标,您可以点击卡片右上角"X",取消关注。

      {% endcomment %}

      {% for ind in indicators %}

{{ ind|dict_get:"name" }}

            {{ ind|dict_get:"ref_text" }}
            {{ ind|dict_get:"ref_value"|safe }}
            {% if ind|dict_get:"std_unit_symbol"%}{{ ind|dict_get:"std_unit_symbol"|safe}}{% endif %}

            {% if ind|dict_get:"record_empty" %}
            {# record_empty==True, hide 'last_edit_data' #}

            {% else %}
            {# indicator has records #}

            {% endif %}
              {{ ind|dict_get:"last_record"|dict_get:"value_html"|safe }}
              {% if ind|dict_get:"std_unit_symbol" %}{{ ind|dict_get:"std_unit_symbol" }}{% endif %}

            {% if ind|dict_get:"record_empty" %}

            {% else %}

            {% endif %}

            {% if ind|dict_get:"record_empty" %}

            {% else %}

            {% endif %}
              记录日期
              {{ ind|dict_get:"last_record"|dict_get:"date" }}

            {% comment %}
            {% if ind|dict_get:"record_empty" %}

            {% else %}

            {% endif %}
            {% endcomment %}

              {% if ind|dict_get:"dataType" == DATA_TYPES|dict_get:"INTEGER_TYPE" %}
              {# INTEGER_TYPE #}
              TODO
              {% elif ind|dict_get:"dataType" == DATA_TYPES|dict_get:"FLOAT_TYPE" %}
              {# FLOAT_TYPE #}
              <input class="data_input to_validate" type="text" value="" autocomplete="off" />
              {% elif ind|dict_get:"dataType" == DATA_TYPES|dict_get:"RANGE_TYPE" %}
              {# RANGE_TYPE #}
              <input class="data_input to_validate" type="text" value="" autocomplete="off" />
              {% elif ind|dict_get:"dataType" == DATA_TYPES|dict_get:"FLOAT_RANGE_TYPE" %}
              {# FLOAT_RANGE_TYPE #}
              <input class="data_input to_validate" type="text" value="" autocomplete="off" />
              {% elif ind|dict_get:"dataType" == DATA_TYPES|dict_get:"PM_TYPE" %}
              {# PM_TYPE #}

                <input type="radio" id="minus_r" name="pm_data" value="-" />
                阴性(-)
                <input type="radio" id="plus_r" name="pm_data" value="+" />
                阳性(+)

              {% elif ind|dict_get:"dataType" == DATA_TYPES|dict_get:"KIND_TYPE" %}
              {# KIND_TYPE #}
              TODO
              {% else %}
              {# UNKNOWN TYPE #}
              ERROR: unknown data type
              {% endif %}

{% if ind|dict_get:"std_unit_symbol" %}{{ ind|dict_get:"std_unit_symbol" }}{% endif %}

                <input class="datepicker date_input to_validate" type="text" autocomplete="off" />

          {% if ind|dict_get:"record_empty" %}

          {% else %}

          {% endif %}

点击右上角的按钮开始添加数据

          {% if ind|dict_get:"record_empty" %}

          {% else %}

          {% endif %}

了解该指标

仿真化验单

              详细历史记录

          {% comment %}
            thickbox插件:
            方便父级页面与子级弹出层的MVC隔离,
            方便子级弹出层的复杂需求,如:搜索、分页…
            height参数为弹出层页面高度+2,
            width参数为弹出层页面宽度+2,
            card_id参数为 "卡片id"
          {% endcomment %}

      {% endfor %} {# end: indicators #}

Indicator

          <input class="collapse_btn" type="button" value="收 起" />

          <input class="recent_three_month shift_date unselected" begin_date="2013-08-04" end_date="2013-08-10" type="button" value="最近三个月" />
          <input class="recent_six_month shift_date unselected" begin_date="2013-07-28" end_date="2013-08-10" type="button" value="最近六个月" />

            截止日期
            <input class="datepicker end_date" id="search_end_date" type="text" value="" />

            起始日期
            <input class="datepicker begin_date" id="search_begin_date" type="text" value="" />

              化验日期
              数据记录
              状态

          <input class="see_more_btn" type="button" value="浏览更多记录" />

      {% if indicators|length|divisible_by:"2" %}
      {# number of followed indicators: even #}

      {% else %}

      {% endif %}

          添加或删除关注指标

{% endblock page %}

{# vim: set ts=2 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #}


text:
var webdriver = require('selenium-webdriver');
var chrome = require('selenium-webdriver/chrome');
var By = webdriver.By;
var until = webdriver.until;
var test = require('selenium-webdriver/testing');
var $q = require('q');

var userName = 'admin',
    password = 'admin';

function ChackCountries(name) {
}
test.describe('Check ', function () {
    var driver;

    test.before(function () {

        var options = new chrome.Options();
        driver = new webdriver.Builder()
            .withCapabilities({'unexpectedAlertBehaviour': 'dismiss'})
            .forBrowser('chrome')
            .setChromeOptions(options)
            .build();

        driver.get('http://localhost/litecart/admin/');
        driver.manage().timeouts().implicitlyWait(10000);
        driver.findElement(By.name('username')).sendKeys(userName);
        driver.findElement(By.name('password')).sendKeys(password);
        driver.findElement(By.xpath("//button[@name='login']")).click();
    });

    test.after(function () {
        driver.quit();
    });

    test.it('Проверяем порядок стран', function () {

        driver.findElement(By.linkText("Catalog")).click();
        driver.wait(driver.findElement(By.linkText("Rubber Ducks")).click(), 1000);
        driver.findElements(By.xpath("//a[contains(text(),'Duck')]"))
            .then((listProducts) => {
                var arr = [];
                var i = 1;
                listProducts.map((curProduct) => {
                    arr.push(
                        driver.findElements(By.xpath("//a[contains(text(),'Duck')]"))
                            .then((products) => {
                                products[i].click().then((prodClick) => {
                                    driver.manage().logs().get( "browser" ).then(function( logsEntries ) {
                                        logsEntries.forEach( (item) => {
                                            console.log(item);
                                        });
                                        driver.findElement(By.css("button[name='cancel']")).click();
                                    });
                                });
                                i++;

                            }));

                });
                $q.all(arr);
            });
    });
});


text:
@implementation MTMd5

@end
NSString *MD5String(NSData *data)
{
    return MD5StringFrom((const void*)data.bytes, data.length);
}

NSString *MD5StringFrom(const void* bytes, unsigned long size)
{
    md5_state_t state;
    md5_init(&state);
    md5_append(&state, bytes, size);
    md5_byte_t outPut[17];
    memset((void*)outPut, 0, sizeof(md5_byte_t) * 17);
    char outStr[33];
    md5_finish(&state, outPut);
    for (int di = 0; di < 16; ++di)
        sprintf(outStr + di * 2, "%02x", outPut[di]);
    outStr[32] = 0;
    return [NSString stringWithUTF8String:outStr];
}

@implementation NSString (MTMd5)

- (NSString *)MD5String {
    const char *chs = self.UTF8String;
    return MD5StringFrom(chs, strlen(chs));
}

@end


text:
package com.nu1silva.xtracker.service.impl;

import com.nu1silva.xtracker.model.Account;
import com.nu1silva.xtracker.service.AccountService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.Optional;
import java.util.Set;
import java.util.UUID;

@Slf4j
@Service
@RequiredArgsConstructor
public class AccountServiceImpl implements AccountService {

    @Override
    public Account create(Account account) {
        return null;
    }

    @Override
    public Account delete(Account account) {
        return null;
    }

    @Override
    public Account update(Account account) {
        return null;
    }

    @Override
    public Set<Account> getAllAccounts() {
        return null;
    }

    @Override
    public Optional<Account> getAccountByUUID(UUID accountId) {
        return Optional.empty();
    }

    @Override
    public Optional<Account> getAccountByEmail(String email) {
        return Optional.empty();
    }
}


text:
The Meteor Web-app for a simple greenhouse monitoring tool. Requires a raspberry pi with one or more temperature sensors running [Greenhouse-Pi](https://github.com/Architecty/greenhouse-Pi).

This is a [MeteorJS](https://www.meteor.com) app. To install the application on your own server, please follow the instructions [here](https://www.digitalocean.com/community/tutorials/how-to-deploy-a-meteor-js-application-on-ubuntu-14-04-with-nginx), or use [MUP](https://github.com/arunoda/meteor-up).

Once you have the application installed, create your first user using `yourhost.com/signup`. This is what you use to log in.

Next, you'll need to add a controller, which currently means a Raspberry Pi. To begin, click the list symbol at the top right to go to the controller list view. Next, choose 'Add Your First Controller'.

//Old//

You'll use this user to authetiticate your [Raspberry Pi](https://github.com/Architecty/greenhouse-Pi). Add the email and password to the config file on your Raspberry Pi, using the [Greenhouse Pi Instructions](https://github.com/Architecty/greenhouse-Pi).

Next, create your personal user, again using `yourhost.com/signup`. Technically, you could use the same account for both, but it would mean changing the password in the config file anytime you changed your own.

With the Meteor app running and your Pi set up,


text:
package org.apache.kafka.common.requests;

import org.apache.kafka.common.acl.AccessControlEntryFilter;
import org.apache.kafka.common.acl.AclBindingFilter;
import org.apache.kafka.common.acl.AclOperation;
import org.apache.kafka.common.acl.AclPermissionType;
import org.apache.kafka.common.errors.UnsupportedVersionException;
import org.apache.kafka.common.protocol.types.Struct;
import org.apache.kafka.common.resource.PatternType;
import org.apache.kafka.common.resource.ResourcePatternFilter;
import org.apache.kafka.common.resource.ResourceType;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class DescribeAclsRequestTest {
    private static final short V0 = 0;
    private static final short V1 = 1;

    private static final AclBindingFilter LITERAL_FILTER = new AclBindingFilter(new ResourcePatternFilter(ResourceType.TOPIC, "foo", PatternType.LITERAL),
        new AccessControlEntryFilter("User:ANONYMOUS", "127.0.0.1", AclOperation.READ, AclPermissionType.DENY));

    private static final AclBindingFilter PREFIXED_FILTER = new AclBindingFilter(new ResourcePatternFilter(ResourceType.GROUP, "prefix", PatternType.PREFIXED),
        new AccessControlEntryFilter("User:*", "127.0.0.1", AclOperation.CREATE, AclPermissionType.ALLOW));

    private static final AclBindingFilter ANY_FILTER = new AclBindingFilter(new ResourcePatternFilter(ResourceType.GROUP, "bar", PatternType.ANY),
        new AccessControlEntryFilter("User:*", "127.0.0.1", AclOperation.CREATE, AclPermissionType.ALLOW));

    private static final AclBindingFilter UNKNOWN_FILTER = new AclBindingFilter(new ResourcePatternFilter(ResourceType.UNKNOWN, "foo", PatternType.LITERAL),
        new AccessControlEntryFilter("User:ANONYMOUS", "127.0.0.1", AclOperation.READ, AclPermissionType.DENY));

    @Test(expected = UnsupportedVersionException.class)
    public void shouldThrowOnV0IfPrefixed() {
        new DescribeAclsRequest(PREFIXED_FILTER, V0);
    }

    @Test(expected = IllegalArgumentException.class)
    public void shouldThrowIfUnknown() {
        new DescribeAclsRequest(UNKNOWN_FILTER, V0);
    }

    @Test
    public void shouldRoundTripLiteralV0() {
        final DescribeAclsRequest original = new DescribeAclsRequest(LITERAL_FILTER, V0);
        final Struct struct = original.toStruct();

        final DescribeAclsRequest result = new DescribeAclsRequest(struct, V0);

        assertRequestEquals(original, result);
    }

    @Test
    public void shouldRoundTripAnyV0AsLiteral() {
        final DescribeAclsRequest original = new DescribeAclsRequest(ANY_FILTER, V0);
        final DescribeAclsRequest expected = new DescribeAclsRequest(
            new AclBindingFilter(new ResourcePatternFilter(
                ANY_FILTER.patternFilter().resourceType(),
                ANY_FILTER.patternFilter().name(),
                PatternType.LITERAL),
                ANY_FILTER.entryFilter()), V0);

        final Struct struct = original.toStruct();
        final DescribeAclsRequest result = new DescribeAclsRequest(struct, V0);

        assertRequestEquals(expected, result);
    }

    @Test
    public void shouldRoundTripLiteralV1() {
        final DescribeAclsRequest original = new DescribeAclsRequest(LITERAL_FILTER, V1);
        final Struct struct = original.toStruct();

        final DescribeAclsRequest result = new DescribeAclsRequest(struct, V1);

        assertRequestEquals(original, result);
    }

    @Test
    public void shouldRoundTripPrefixedV1() {
        final DescribeAclsRequest original = new DescribeAclsRequest(PREFIXED_FILTER, V1);
        final Struct struct = original.toStruct();

        final DescribeAclsRequest result = new DescribeAclsRequest(struct, V1);

        assertRequestEquals(original, result);
    }

    @Test
    public void shouldRoundTripAnyV1() {
        final DescribeAclsRequest original = new DescribeAclsRequest(ANY_FILTER, V1);
        final Struct struct = original.toStruct();

        final DescribeAclsRequest result = new DescribeAclsRequest(struct, V1);

        assertRequestEquals(original, result);
    }

    private static void assertRequestEquals(final DescribeAclsRequest original, final DescribeAclsRequest actual) {
        final AclBindingFilter originalFilter = original.filter();
        final AclBindingFilter acttualFilter = actual.filter();
        assertEquals(originalFilter, acttualFilter);
    }
}


text:
@interface OAAppData : NSObject <NSCoding>

@property OAMapSource* lastMapSource;

@property OAMapSource* overlayMapSource;
@property OAMapSource* underlayMapSource;
@property (nonatomic) double overlayAlpha;
@property (nonatomic) double underlayAlpha;

@property (readonly) OAObservable* overlayMapSourceChangeObservable;
@property (readonly) OAObservable* underlayMapSourceChangeObservable;
@property (readonly) OAObservable* overlayAlphaChangeObservable;
@property (readonly) OAObservable* underlayAlphaChangeObservable;

@property (nonatomic) BOOL hillshade;
@property (readonly) OAObservable* hillshadeChangeObservable;
@property (readonly) OAObservable* hillshadeResourcesChangeObservable;

@property (readonly) OAObservable* mapLayerChangeObservable;

@property (readonly) OAObservable* lastMapSourceChangeObservable;
- (OAMapSource *) lastMapSourceByResourceId:(NSString *)resourceId;

@property (readonly) OAMapViewState* mapLastViewedState;

@property (readonly) OAMapLayersConfiguration* mapLayersConfiguration;

@property (nonatomic) NSMutableArray *destinations;
@property (readonly) OAObservable* destinationsChangeObservable;
@property (readonly) OAObservable* destinationAddObservable;
@property (readonly) OAObservable* destinationRemoveObservable;
@property (readonly) OAObservable* destinationShowObservable;
@property (readonly) OAObservable* destinationHideObservable;

@property (nonatomic) OARTargetPoint *pointToStart;
@property (nonatomic) OARTargetPoint *pointToNavigate;
@property (nonatomic) NSArray<OARTargetPoint *> *intermediatePoints;

@property (readonly) OAObservable* applicationModeChangedObservable;

- (void) clearPointToStart;
- (void) clearPointToNavigate;

- (void) addIntermediatePoint:(OARTargetPoint *)point;
- (void) insertIntermediatePoint:(OARTargetPoint *)point index:(int)index;
- (void) deleteIntermediatePoint:(int)index;
- (void) clearIntermediatePoints;

- (void) backupTargetPoints;
- (void) restoreTargetPoints;
- (BOOL) restorePointToStart;

+ (OAAppData*) defaults;

- (void) setLastMapSourceVariant:(NSString *)variant;

@end


text:
package de.cdietze.ld37.core;

import playn.core.Platform;
import playn.scene.Layer;
import playn.scene.Pointer;
import playn.scene.SceneGame;
import pythagoras.i.Dimension;
import tripleplay.game.ScreenStack;
import tripleplay.game.trans.SlideTransition;
import tripleplay.util.Layers;

public class MainGame extends SceneGame {

  public final ScreenStack screens = new ScreenStack(this, rootLayer) {
    @Override
    protected Transition defaultPushTransition() {
      return new SlideTransition(this).left();
    }
    @Override
    protected Transition defaultPopTransition() {
      return new SlideTransition(this).right();
    }
  };

  public final ImageLoader.Images images;

  public MainGame(Platform plat) {
    super(plat, 33); // update our "simulation" 33ms (30 times per second)

    this.images = ImageLoader.loadImages(plat);
    // create and add background image layer
    Layer bgLayer = Layers.solid(0xff626262, plat.graphics().screenSize().width(), plat.graphics().screenSize().height());
    // scale the background to fill the screen
    //bgLayer.setSize(plat.graphics().viewSize);
    rootLayer.add(bgLayer);

    // Register Pointer so we can handle any pointer input (clicks, mouse/touch events etc.)
    new Pointer(plat, rootLayer, true);

    LevelGenerator.Level level = LevelGenerator.generate(new Dimension(8, 8));
    BoardState boardState = new BoardState(level);
    screens.push(new BoardScreen(this, boardState));
  }
}


text:
using System;

namespace WebApplication.Controls
{
    public partial class GenerateMainNav : System.Web.UI.UserControl
    {
        protected void Page_PreRender(object sender, EventArgs e)
        {
            //if (this.BasePage.FrameworkBaseMedia.RootMedia != null)
            GenerateNav.RootMedia = this.BasePage.CurrentWebsite.Media;
        }

        public bool RenderRootMedia
        {
            get { return GenerateNav.RenderRootMedia; }
            set { GenerateNav.RenderRootMedia = value; }
        }

        public string RootUlClasses
        {
            get { return GenerateNav.RootULClasses; }
            set { GenerateNav.RootULClasses = value; }
        }

        public bool IsFooterMenu
        {
            get { return GenerateNav.IsFooterMenu; }
            set { GenerateNav.IsFooterMenu = value; }
        }

        public int RenderDepth
        {
            get { return GenerateNav.RenderDepth; }
            set { GenerateNav.RenderDepth = value; }
        }

        public bool RenderParentItemInChildNav
        {
            get { return GenerateNav.RenderParentItemInChildNav; }
            set { GenerateNav.RenderParentItemInChildNav = value; }
        }

        private BasePage BasePage
        {
            get { return (BasePage)this.Page; }
        }
    }
}


text:
<!DOCTYPE html>
<html lang="en">
{include file="head$TEMPLATE_EXT"}
    <body id="page_body">
        <!--==============================header=================================-->
{include file="header$TEMPLATE_EXT"}
        <!--==============================content================================-->
{include file="content/$page$TEMPLATE_EXT"}
        <!--==============================footer=================================-->
{include file="footer$TEMPLATE_EXT"}
    </body>
</html>


text:
<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Clientcontactperson extends CI_Controller
{
    function __construct()
    {
        parent::__construct();
        $this->load->model('Clientcontactperson_model');
        $this->load->library(array('form_validation','template'));
    }

    public function index()
    {
        $q = urldecode($this->input->get('q', TRUE));
        $start = intval($this->input->get('start'));

        if ($q <> '') {
            $config['base_url'] = base_url() . 'clientcontactperson/index.html?q=' . urlencode($q);
            $config['first_url'] = base_url() . 'clientcontactperson/index.html?q=' . urlencode($q);
        } else {
            $config['base_url'] = base_url() . 'clientcontactperson/';
            $config['first_url'] = base_url() . 'clientcontactperson/';
        }

        $config['per_page'] = 10;
        $config['page_query_string'] = TRUE;
        $config['total_rows'] = $this->Clientcontactperson_model->total_rows($q);
        $clientcontactperson = $this->Clientcontactperson_model->get_limit_data($config['per_page'], $start, $q);

        $this->load->library('pagination');
        $this->pagination->initialize($config);

        $data = array(
            'clientcontactperson_data' => $clientcontactperson,
            'q' => $q,
            'pagination' => $this->pagination->create_links(),
            'total_rows' => $config['total_rows'],
            'start' => $start,
        );
        $this->template->caplet('clientcontactperson_list', $data);
    }

    public function read($id)
    {
        $row = $this->Clientcontactperson_model->get_by_id($id);
        if ($row) {
            $data = array(
		'id' => $row->id,
		'entityId' => $row->entityId,
		'clientId' => $row->clientId,
		'clientCode' => $row->clientCode,
		'contactName' => $row->contactName,
		'salutation' => $row->salutation,
		'position' => $row->position,
		'handphone' => $row->handphone,
		'emailAddress' => $row->emailAddress,
	    );
            $this->load->view('clientcontactperson_read', $data);
        } else {
            $this->session->set_flashdata('message', 'Record Not Found');
            redirect(site_url('clientcontactperson'));
        }
    }

    public function create()
    {
        $data = array(
            'button' => 'Create',
            'action' => site_url('clientcontactperson/create_action'),
	    'id' => set_value('id'),
	    'entityId' => set_value('entityId'),
	    'clientId' => set_value('clientId'),
	    'clientCode' => set_value('clientCode'),
	    'contactName' => set_value('contactName'),
	    'salutation' => set_value('salutation'),
	    'position' => set_value('position'),
	    'handphone' => set_value('handphone'),
	    'emailAddress' => set_value('emailAddress'),
	);
        $this->load->view('clientcontactperson_form', $data);
    }

    public function create_action()
    {
        $this->_rules();

        if ($this->form_validation->run() == FALSE) {
            $this->create();
        } else {
            $data = array(
		'entityId' => $this->input->post('entityId',TRUE),
		'clientId' => $this->input->post('clientId',TRUE),
		'clientCode' => $this->input->post('clientCode',TRUE),
		'contactName' => $this->input->post('contactName',TRUE),
		'salutation' => $this->input->post('salutation',TRUE),
		'position' => $this->input->post('position',TRUE),
		'handphone' => $this->input->post('handphone',TRUE),
		'emailAddress' => $this->input->post('emailAddress',TRUE),
	    );

            $this->Clientcontactperson_model->insert($data);
            $this->session->set_flashdata('message', 'Create Record Success');
            redirect(site_url('clientcontactperson'));
        }
    }

    public function update($id)
    {
        $row = $this->Clientcontactperson_model->get_by_id($id);

        if ($row) {
            $data = array(
                'button' => 'Update',
                'action' => site_url('clientcontactperson/update_action'),
		'id' => set_value('id', $row->id),
		'entityId' => set_value('entityId', $row->entityId),
		'clientId' => set_value('clientId', $row->clientId),
		'clientCode' => set_value('clientCode', $row->clientCode),
		'contactName' => set_value('contactName', $row->contactName),
		'salutation' => set_value('salutation', $row->salutation),
		'position' => set_value('position', $row->position),
		'handphone' => set_value('handphone', $row->handphone),
		'emailAddress' => set_value('emailAddress', $row->emailAddress),
	    );
            $this->load->view('clientcontactperson_form', $data);
        } else {
            $this->session->set_flashdata('message', 'Record Not Found');
            redirect(site_url('clientcontactperson'));
        }
    }

    public function update_action()
    {
        $this->_rules();

        if ($this->form_validation->run() == FALSE) {
            $this->update($this->input->post('id', TRUE));
        } else {
            $data = array(
		'entityId' => $this->input->post('entityId',TRUE),
		'clientId' => $this->input->post('clientId',TRUE),
		'clientCode' => $this->input->post('clientCode',TRUE),
		'contactName' => $this->input->post('contactName',TRUE),
		'salutation' => $this->input->post('salutation',TRUE),
		'position' => $this->input->post('position',TRUE),
		'handphone' => $this->input->post('handphone',TRUE),
		'emailAddress' => $this->input->post('emailAddress',TRUE),
	    );

            $this->Clientcontactperson_model->update($this->input->post('id', TRUE), $data);
            $this->session->set_flashdata('message', 'Update Record Success');
            redirect(site_url('clientcontactperson'));
        }
    }

    public function delete($id)
    {
        $row = $this->Clientcontactperson_model->get_by_id($id);

        if ($row) {
            $this->Clientcontactperson_model->delete($id);
            $this->session->set_flashdata('message', 'Delete Record Success');
            redirect(site_url('clientcontactperson'));
        } else {
            $this->session->set_flashdata('message', 'Record Not Found');
            redirect(site_url('clientcontactperson'));
        }
    }

    public function _rules()
    {
	$this->form_validation->set_rules('entityId', 'entityid', 'trim|required');
	$this->form_validation->set_rules('clientId', 'clientid', 'trim|required');
	$this->form_validation->set_rules('clientCode', 'clientcode', 'trim|required');
	$this->form_validation->set_rules('contactName', 'contactname', 'trim|required');
	$this->form_validation->set_rules('salutation', 'salutation', 'trim|required');
	$this->form_validation->set_rules('position', 'position', 'trim|required');
	$this->form_validation->set_rules('handphone', 'handphone', 'trim|required');
	$this->form_validation->set_rules('emailAddress', 'emailaddress', 'trim|required');

	$this->form_validation->set_rules('id', 'id', 'trim');
	$this->form_validation->set_error_delimiters('', '');
    }

    public function excel()
    {
        $this->load->helper('exportexcel');
        $namaFile = "clientcontactperson.xls";
        $judul = "clientcontactperson";
        $tablehead = 0;
        $tablebody = 1;
        $nourut = 1;
        //penulisan header
        header("Pragma: public");
        header("Expires: 0");
        header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
        header("Content-Type: application/force-download");
        header("Content-Type: application/octet-stream");
        header("Content-Type: application/download");
        header("Content-Disposition: attachment;filename=" . $namaFile . "");
        header("Content-Transfer-Encoding: binary ");

        xlsBOF();

        $kolomhead = 0;
        xlsWriteLabel($tablehead, $kolomhead++, "No");
	xlsWriteLabel($tablehead, $kolomhead++, "EntityId");
	xlsWriteLabel($tablehead, $kolomhead++, "ClientId");
	xlsWriteLabel($tablehead, $kolomhead++, "ClientCode");
	xlsWriteLabel($tablehead, $kolomhead++, "ContactName");
	xlsWriteLabel($tablehead, $kolomhead++, "Salutation");
	xlsWriteLabel($tablehead, $kolomhead++, "Position");
	xlsWriteLabel($tablehead, $kolomhead++, "Handphone");
	xlsWriteLabel($tablehead, $kolomhead++, "EmailAddress");

	foreach ($this->Clientcontactperson_model->get_all() as $data) {
            $kolombody = 0;

            //ubah xlsWriteLabel menjadi xlsWriteNumber untuk kolom numeric
            xlsWriteNumber($tablebody, $kolombody++, $nourut);
	    xlsWriteNumber($tablebody, $kolombody++, $data->entityId);
	    xlsWriteNumber($tablebody, $kolombody++, $data->clientId);
	    xlsWriteLabel($tablebody, $kolombody++, $data->clientCode);
	    xlsWriteLabel($tablebody, $kolombody++, $data->contactName);
	    xlsWriteNumber($tablebody, $kolombody++, $data->salutation);
	    xlsWriteLabel($tablebody, $kolombody++, $data->position);
	    xlsWriteLabel($tablebody, $kolombody++, $data->handphone);
	    xlsWriteLabel($tablebody, $kolombody++, $data->emailAddress);

	    $tablebody++;
            $nourut++;
        }

        xlsEOF();
        exit();
    }

    public function word()
    {
        header("Content-type: application/vnd.ms-word");
        header("Content-Disposition: attachment;Filename=clientcontactperson.doc");

        $data = array(
            'clientcontactperson_data' => $this->Clientcontactperson_model->get_all(),
            'start' => 0
        );

        $this->load->view('clientcontactperson_doc',$data);
    }

}

/* End of file Clientcontactperson.php */
/* Location: ./application/controllers/Clientcontactperson.php */
/* Please DO NOT modify this information : */
/* Generated by Harviacode Codeigniter CRUD Generator 2017-01-26 11:41:07 */
/* http://harviacode.com */


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.synapse.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.synapse.fluent.models.GeoBackupPolicyInner;
import com.azure.resourcemanager.synapse.models.GeoBackupPolicyName;

/** An instance of this class provides access to all the operations defined in SqlPoolGeoBackupPoliciesClient. */
public interface SqlPoolGeoBackupPoliciesClient {
    /**
     * Get list of SQL pool geo backup policies.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param sqlPoolName SQL pool name.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of SQL pool geo backup policies as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<GeoBackupPolicyInner> list(String resourceGroupName, String workspaceName, String sqlPoolName);

    /**
     * Get list of SQL pool geo backup policies.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param sqlPoolName SQL pool name.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of SQL pool geo backup policies as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<GeoBackupPolicyInner> list(
        String resourceGroupName, String workspaceName, String sqlPoolName, Context context);

    /**
     * Updates a SQL Pool geo backup policy.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param sqlPoolName SQL pool name.
     * @param geoBackupPolicyName The name of the geo backup policy.
     * @param parameters The required parameters for creating or updating the geo backup policy.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a database geo backup policy.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    GeoBackupPolicyInner createOrUpdate(
        String resourceGroupName,
        String workspaceName,
        String sqlPoolName,
        GeoBackupPolicyName geoBackupPolicyName,
        GeoBackupPolicyInner parameters);

    /**
     * Updates a SQL Pool geo backup policy.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param sqlPoolName SQL pool name.
     * @param geoBackupPolicyName The name of the geo backup policy.
     * @param parameters The required parameters for creating or updating the geo backup policy.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a database geo backup policy along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<GeoBackupPolicyInner> createOrUpdateWithResponse(
        String resourceGroupName,
        String workspaceName,
        String sqlPoolName,
        GeoBackupPolicyName geoBackupPolicyName,
        GeoBackupPolicyInner parameters,
        Context context);

    /**
     * Get the specified SQL pool geo backup policy.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param sqlPoolName SQL pool name.
     * @param geoBackupPolicyName The name of the geo backup policy.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the specified SQL pool geo backup policy.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    GeoBackupPolicyInner get(
        String resourceGroupName, String workspaceName, String sqlPoolName, GeoBackupPolicyName geoBackupPolicyName);

    /**
     * Get the specified SQL pool geo backup policy.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param sqlPoolName SQL pool name.
     * @param geoBackupPolicyName The name of the geo backup policy.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the specified SQL pool geo backup policy along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<GeoBackupPolicyInner> getWithResponse(
        String resourceGroupName,
        String workspaceName,
        String sqlPoolName,
        GeoBackupPolicyName geoBackupPolicyName,
        Context context);
}


text:
<?php

namespace Contentful\Tests\E2E;

use Contentful\Delivery\Client;

class UriOverrideTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var Client
     */
    private $client;

    public function setUp()
    {
        $this->client = new Client('e5e8d4c5c122cf28fc1af3ff77d28bef78a3952957f15067bbc29f2f0dde0b50', 'cfexampleapi', false, null, [
            'uriOverride' => 'https://preview.contentful.com/'
        ]);
    }

    /**
     * @vcr e2e_uri_override.json
     */
    public function testBasicSync()
    {
        $space = $this->client->getSpace();

        $this->assertEquals('Contentful Example API', $space->getName());
    }
}


text:
namespace SFA.DAS.EmployerUsers.Api.Types
{
    public class UpdateUser
    {
        public string GovUkIdentifier { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string Email { get; set; }
        public UpdateUser(string govUkIdentifier, string firstName, string lastName, string email)
        {
            GovUkIdentifier = govUkIdentifier;
            FirstName = firstName;
            LastName = lastName;
            Email = email;
        }

    }
}


text:
/*
* fallback transition for slide in non-3D supporting browsers (which tend to handle complex transitions poorly in general
*/

(function( $, window, undefined ) {

$.mobile.transitionFallbacks.slide = "fade";

})( jQuery, this );


text:
package de.danoeh.antennapod.activity;

import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.ViewGroup;
import android.widget.FrameLayout;

import java.lang.ref.WeakReference;

import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.preferences.PreferenceController;

/**
 * PreferenceActivity for API 11+. In order to change the behavior of the preference UI, see
 * PreferenceController.
 */
public class PreferenceActivity extends ActionBarActivity {

    private PreferenceController preferenceController;
    private MainFragment prefFragment;
    private static WeakReference<PreferenceActivity> instance;

    private final PreferenceController.PreferenceUI preferenceUI = new PreferenceController.PreferenceUI() {
        @TargetApi(Build.VERSION_CODES.HONEYCOMB)
        @Override
        public Preference findPreference(CharSequence key) {
            return prefFragment.findPreference(key);
        }

        @Override
        public Activity getActivity() {
            return PreferenceActivity.this;
        }
    };

    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // This must be the FIRST thing we do, otherwise other code may not have the
        // reference it needs
        instance = new WeakReference<PreferenceActivity>(this);

        setTheme(UserPreferences.getTheme());
        super.onCreate(savedInstanceState);

        ActionBar ab = getSupportActionBar();
        if (ab != null) {
            ab.setDisplayHomeAsUpEnabled(true);
        }

        // set up layout
        FrameLayout root = new FrameLayout(this);
        root.setId(R.id.content);
        root.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.MATCH_PARENT));
        setContentView(root);

        // we need to create the PreferenceController before the MainFragment
        // since the MainFragment depends on the preferenceController already being created
        preferenceController = new PreferenceController(preferenceUI);

        prefFragment = new MainFragment();
        getFragmentManager().beginTransaction().replace(R.id.content, prefFragment).commit();
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        preferenceController.onActivityResult(requestCode, resultCode, data);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        super.onCreateOptionsMenu(menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home:
                finish();
                return true;
            default:
                return false;
        }
    }

    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
    public static class MainFragment extends PreferenceFragment {

        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            addPreferencesFromResource(R.xml.preferences);
            PreferenceActivity activity = instance.get();
            if(activity != null && activity.preferenceController != null) {
                activity.preferenceController.onCreate();
            }
        }

        @Override
        public void onResume() {
            super.onResume();
            PreferenceActivity activity = instance.get();
            if(activity != null && activity.preferenceController != null) {
                activity.preferenceController.onResume();
            }
        }
    }
}


text:
{{ theme.openhead }}
{{ theme.style }}
<title>{{ sitename }} · {{ post.name }}</title>
{{ theme.closehead }}
{{ theme.openbody }}
{{ theme.header }}
{{ theme.opencontent }}

{{ post.name }}

Created: {{ post.cdate }}

Last modified: {{ post.mdate }} at {{ post.mtime }}

{{ post.contents }}
{{disqus}}
{{ theme.closecontent }}
{{ theme.closebody }}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;

namespace WPFTP
{
    public partial class FtpDirectoryBrowser : PhoneApplicationPage
    {
        public FtpDirectoryBrowser()
        {
            InitializeComponent();
        }

        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            while (this.NavigationService.CanGoBack)
            {
                this.NavigationService.RemoveBackEntry();
            }
            (App.Current as App).Client.FtpDirectoryListed += Client_FtpDirectoryListed;
            await(App.Current as App).Client.GetDirectoryListingAsync();
            base.OnNavigatedTo(e);
        }

        protected async override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
        {
            switch (MessageBox.Show("Do you want to disconnect and exit", "WPFTP Demo App", MessageBoxButton.OKCancel))
            {
                case MessageBoxResult.OK:
                    await (App.Current as App).Client.DisconnectAsync();
                    break;

                case MessageBoxResult.Cancel:
                    e.Cancel = true;
                    break;
            }

            base.OnBackKeyPress(e);
        }

        void Client_FtpDirectoryListed(object sender, WPFTPService.FtpService.FtpDirectoryListedEventArgs e)
        {
            this.Dispatcher.BeginInvoke(() =>
            {
                if (e.GetFilenames().Length > 0)
                {
                    txtblkNoFiles.Visibility = System.Windows.Visibility.Collapsed;
                    lstFiles.Visibility = System.Windows.Visibility.Visible;
                    lstFiles.ItemsSource = e.GetFilenames();
                }
                else
                {
                    txtblkNoFiles.Visibility = System.Windows.Visibility.Visible;
                    lstFiles.Visibility = System.Windows.Visibility.Collapsed;
                }

                List<String> dirList = new List<String>();
                if (!(App.Current as App).ServerCurrentWorkingDirectory.Equals("/"))
                {
                    dirList.Add("...");
                }
                dirList.AddRange(e.GetDirectories());
                lstDirectories.ItemsSource = dirList;
            });
        }

        private async void txtblkDirName_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            if ((sender as TextBlock).DataContext.ToString().Equals("..."))
            {
                await (App.Current as App).Client.ChangeWorkingDirectoryAsync("..");
            }
            else
            {
                await (App.Current as App).Client.ChangeWorkingDirectoryAsync((sender as TextBlock).DataContext.ToString());
            }
            await (App.Current as App).Client.GetDirectoryListingAsync();
        }

        private void txtblkFileName_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {

        }
    }
}


text:
from functools import wraps
from flask import request, Response

def check_auth(username, password):
    return username == 'foo' and password == 'bar'

def authenticate():
    return Response(
        'Could not verify your access level for that URL.\n'
        'You have to login with proper credentials', 401,
        {'WWW-Authenticate': 'Basic realm="Login Required"'})

def requires_auth(f):
    @wraps(f)
    def decorated(*args, **kwargs):
        auth = request.authorization
        if not auth or not check_auth(auth.username, auth.password):
            return authenticate()
        return f(*args, **kwargs)

    return decorated


text:
{% extends "user.base.html" %}

{% set nav_bar = [
  ("/", "Home"),
  ("/account/settings", "Settings")
] -%}

{% block content %}
{% with nav_bar = nav_bar %}
  {% include "navbar.html" %}
{% endwith %}

Account Settings

Hey, {{ current_user.firstname }}!

Change your name

        <form id="name-form" method="POST" action="/account">
          <input type="hidden" name="setting" value="name"/>
          {% for field in name_form %}
            {{ render_field(field) }}
          {% endfor %}

            <button class="btn" type="submit">Change Name</button>

        </form>

Change your password

        <form id="password-form" method="POST" action="/account">
          <input type="hidden" name="setting" value="password"/>
          {% for field in password_form %}
            {{ render_field(field) }}
          {% endfor %}

            <button class="btn" type="submit">Change Password</button>

        </form>

{% endblock %}

{% block scripts %}
{% endblock %}


text:
namespace System.IdentityModel.Tokens.Jwt
{
    /// <summary>
    /// Constants for Json Web tokens.
    /// </summary>
    public static class JsonClaimValueTypes
    {
        /// <summary>
        /// A URI that represents the JSON XML data type.
        /// </summary>
        /// <remarks>When mapping json to .Net Claim(s), if the value was not a string (or an enumeration of strings), the ClaimValue will serialized using the current JSON serializer, a property will be added with the .Net type and the ClaimTypeValue will be set to 'JsonClaimValueType'.</remarks>
        public const string Json = Microsoft.IdentityModel.JsonWebTokens.JsonClaimValueTypes.Json;

        /// <summary>
        /// A URI that represents the JSON array XML data type.
        /// </summary>
        /// <remarks>When mapping json to .Net Claim(s), if the value was not a string (or an enumeration of strings), the ClaimValue will serialized using the current JSON serializer, a property will be added with the .Net type and the ClaimTypeValue will be set to 'JsonClaimValueType'.</remarks>
        public const string JsonArray = Microsoft.IdentityModel.JsonWebTokens.JsonClaimValueTypes.JsonArray;

        /// <summary>
        /// A URI that represents the JSON null data type
        /// </summary>
        /// <remarks>When mapping json to .Net Claim(s), we use empty string to represent the claim value and set the ClaimValueType to JsonNull</remarks>
        public const string JsonNull = Microsoft.IdentityModel.JsonWebTokens.JsonClaimValueTypes.JsonNull;
    }
}


text:
import pandas as pd
import numpy as np
from sklearn import model_selection
from sklearn.svm import SVC as svc
from sklearn.metrics import accuracy_score

import os
import sys

eps = sys.float_info.epsilon

training_data = pd.read_csv(os.getenv('TRAINING'), header=0)
tournament_data = pd.read_csv(os.getenv('TESTING'), header=0)
features = [f for f in list(training_data) if 'feature' in f]

#this returns four arrays which is in the order of features_train, features_test, labels_train, labels_test
features_train, features_test, labels_train, labels_test = model_selection.train_test_split(training_data[features], training_data['target'], test_size=0.3, random_state=0)

clf = svc(C=1.0, probability=True).fit(features_train, labels_train)
# Alternative: calibration.CalibratedClassifierCV(svm.LinearSVC(C=1.0, verbose=True))

#predicting our target value with the 30% remnant of the training_data
predictions = clf.predict(features_test)
print(predictions)

accuracy = accuracy_score(labels_test,predictions, normalize=True, sample_weight=None)
print(accuracy)
#c = 1.0 -> 0.514361849391
#c = 100.0 -> 0.518133997785

prob_predictions_tourney = clf.predict_proba(tournament_data[features])

t_id = tournament_data['id']

results = prob_predictions_tourney[:, 1]
results_df = pd.DataFrame(data={'probability':results})
joined = pd.DataFrame(t_id).join(np.clip(results_df, 0.0 + eps, 1.0 - eps))
joined.to_csv(os.getenv('PREDICTING'), index=False, float_format='%.16f')


text:
package main;

/**
 * @author Tony Liang
 *
 */
public class TestDeepCopy
{
	public static void main(String[] args) throws CloneNotSupportedException
	{
		House house1 = new House(1, 1750.50);
		House house2 = (House)house1.clone();

		System.out.println("House 1");
		System.out.println("ID: " + house1.getId());
		System.out.println("Area: " + house1.getArea());
		System.out.println("When the house was built: " + house1.getWhenBuilt());

		System.out.println("\nHouse 2");
		System.out.println("ID: " + house2.getId());
		System.out.println("Area: " + house2.getArea());
		System.out.println("When the house was built: " + house2.getWhenBuilt());

		System.out.println("\nhouse1.whenBuilt.equals(house2.whenBuilt)? " + house1.getWhenBuilt().equals(house2.getWhenBuilt()));
		System.out.println("house1.whenBuilt == house2.whenBuilt? " + (house1.getWhenBuilt() == house2.getWhenBuilt()));
		System.out.println("house1 == house2? " + (house1 == house2));
	}
}