text:
from django.core.cache.backends.base import BaseCache, InvalidCacheBackendError
from django.core.exceptions import ImproperlyConfigured
from django.utils import importlib
from django.utils.encoding import smart_unicode, smart_str
from django.utils.datastructures import SortedDict

try:
    import cPickle as pickle
except ImportError:
    import pickle

try:
    import redis
except ImportError:
    raise InvalidCacheBackendError(
        "Redis cache backend requires the 'redis-py' library")
from redis.connection import UnixDomainSocketConnection, Connection
from redis.connection import DefaultParser

class CacheKey(object):
    """
    A stub string class that we can use to check if a key was created already.
    """
    def __init__(self, key):
        self._key = key

    def __eq__(self, other):
        return self._key == other

    def __str__(self):
        return self.__unicode__()

    def __repr__(self):
        return self.__unicode__()

    def __unicode__(self):
        return smart_str(self._key)

class CacheConnectionPool(object):
    _connection_pool = None

    def get_connection_pool(self, host='127.0.0.1', port=6379, db=1,
        password=None, parser_class=None,
        unix_socket_path=None):
        if self._connection_pool is None:
            connection_class = (
                unix_socket_path and UnixDomainSocketConnection or Connection
            )
            kwargs = {
                'db': db,
                'password': password,
                'connection_class': connection_class,
                'parser_class': parser_class,
            }
            if unix_socket_path is None:
                kwargs.update({
                    'host': host,
                    'port': port,
                })
            else:
                kwargs['path'] = unix_socket_path
            self._connection_pool = redis.ConnectionPool(**kwargs)
        return self._connection_pool
pool = CacheConnectionPool()

class CacheClass(BaseCache):
    def __init__(self, server, params):
        """
        Connect to Redis, and set up cache backend.
        """
        self._init(server, params)

    def _init(self, server, params):
        super(CacheClass, self).__init__(params)
        self._server = server
        self._params = params

        unix_socket_path = None
        if ':' in self.server:
            host, port = self.server.rsplit(':', 1)
            try:
                port = int(port)
            except (ValueError, TypeError):
                raise ImproperlyConfigured("port value must be an integer")
        else:
            host, port = None, None
            unix_socket_path = self.server

        kwargs = {
            'db': self.db,
            'password': self.password,
            'host': host,
            'port': port,
            'unix_socket_path': unix_socket_path,
        }
        connection_pool = pool.get_connection_pool(
            parser_class=self.parser_class,
            **kwargs
        )
        self._client = redis.Redis(
            connection_pool=connection_pool,
            **kwargs
        )

    @property
    def server(self):
        return self._server or "127.0.0.1:6379"

    @property
    def params(self):
        return self._params or {}

    @property
    def options(self):
        return self.params.get('OPTIONS', {})

    @property
    def db(self):
        _db = self.params.get('db', self.options.get('DB', 1))
        try:
            _db = int(_db)
        except (ValueError, TypeError):
            raise ImproperlyConfigured("db value must be an integer")
        return _db

    @property
    def password(self):
        return self.params.get('password', self.options.get('PASSWORD', None))

    @property
    def parser_class(self):
        cls = self.options.get('PARSER_CLASS', None)
        if cls is None:
            return DefaultParser
        mod_path, cls_name = cls.rsplit('.', 1)
        try:
            mod = importlib.import_module(mod_path)
            parser_class = getattr(mod, cls_name)
        except (AttributeError, ImportError):
            raise ImproperlyConfigured("Could not find parser class '%s'" % parser_class)
        return parser_class

    def __getstate__(self):
        return {'params': self._params, 'server': self._server}

    def __setstate__(self, state):
        self._init(**state)

    def make_key(self, key, version=None):
        """
        Returns the utf-8 encoded bytestring of the given key as a CacheKey
        instance to be able to check if it was "made" before.
        """
        if not isinstance(key, CacheKey):
            key = CacheKey(key)
        return key

    def add(self, key, value, timeout=None, version=None):
        """
        Add a value to the cache, failing if the key already exists.

        Returns ``True`` if the object was added, ``False`` if not.
        """
        key = self.make_key(key, version=version)
        if self._client.exists(key):
            return False
        return self.set(key, value, timeout)

    def get(self, key, default=None, version=None):
        """
        Retrieve a value from the cache.

        Returns unpickled value if key is found, the default if not.
        """
        key = self.make_key(key, version=version)
        value = self._client.get(key)
        if value is None:
            return default
        try:
            result = int(value)
        except (ValueError, TypeError):
            result = self.unpickle(value)
        return result

    def _set(self, key, value, timeout, client):
        if timeout == 0:
            return client.set(key, value)
        elif timeout > 0:
            return client.setex(key, value, int(timeout))
        else:
            return False

    def set(self, key, value, timeout=None, version=None, client=None):
        """
        Persist a value to the cache, and set an optional expiration time.
        """
        if not client:
            client = self._client
        key = self.make_key(key, version=version)
        if timeout is None:
            timeout = self.default_timeout
        try:
            value = float(value)
            # If you lose precision from the typecast to str, then pickle value
            if int(value) != value:
                raise TypeError
        except (ValueError, TypeError):
            result = self._set(key, pickle.dumps(value), int(timeout), client)
        else:
            result = self._set(key, int(value), int(timeout), client)
        # result is a boolean
        return result

    def delete(self, key, version=None):
        """
        Remove a key from the cache.
        """
        self._client.delete(self.make_key(key, version=version))

    def delete_many(self, keys, version=None):
        """
        Remove multiple keys at once.
        """
        if keys:
            keys = map(lambda key: self.make_key(key, version=version), keys)
            self._client.delete(*keys)

    def clear(self):
        """
        Flush all cache keys.
        """
        # TODO : potential data loss here, should we only delete keys based on the correct version ?
        self._client.flushdb()

    def unpickle(self, value):
        """
        Unpickles the given value.
        """
        value = smart_str(value)
        return pickle.loads(value)

    def get_many(self, keys, version=None):
        """
        Retrieve many keys.
        """
        if not keys:
            return {}
        recovered_data = SortedDict()
        new_keys = map(lambda key: self.make_key(key, version=version), keys)
        map_keys = dict(zip(new_keys, keys))
        results = self._client.mget(new_keys)
        for key, value in zip(new_keys, results):
            if value is None:
                continue
            try:
                value = int(value)
            except (ValueError, TypeError):
                value = self.unpickle(value)
            if isinstance(value, basestring):
                value = smart_unicode(value)
            recovered_data[map_keys[key]] = value
        return recovered_data

    def set_many(self, data, timeout=None, version=None):
        """
        Set a bunch of values in the cache at once from a dict of key/value
        pairs. This is much more efficient than calling set() multiple times.

        If timeout is given, that timeout will be used for the key; otherwise
        the default cache timeout will be used.
        """
        pipeline = self._client.pipeline()
        for key, value in data.iteritems():
            self.set(key, value, timeout, version=version, client=pipeline)
        pipeline.execute()

    def incr(self, key, delta=1, version=None):
        """
        Add delta to value in the cache. If the key does not exist, raise a
        ValueError exception.
        """
        key = self.make_key(key, version=version)
        exists = self._client.exists(key)
        if not exists:
            raise ValueError("Key '%s' not found" % key)
        try:
            value = self._client.incr(key, delta)
        except redis.ResponseError:
            value = self.get(key) + 1
            self.set(key, value)
        return value

class RedisCache(CacheClass):
    """
    A subclass that is supposed to be used on Django >= 1.3.
    """

    def make_key(self, key, version=None):
        if not isinstance(key, CacheKey):
            key = CacheKey(super(CacheClass, self).make_key(key, version))
        return key

    def incr_version(self, key, delta=1, version=None):
        """
        Adds delta to the cache version for the supplied key. Returns the
        new version.

        Note: In Redis 2.0 you cannot rename a volitle key, so we have to move
        the value from the old key to the new key and maintain the ttl.
        """
        if version is None:
            version = self.version
        old_key = self.make_key(key, version)
        value = self.get(old_key, version=version)
        ttl = self._client.ttl(old_key)
        if value is None:
            raise ValueError("Key '%s' not found" % key)
        new_key = self.make_key(key, version=version+delta)
        # TODO: See if we can check the version of Redis, since 2.2 will be able
        # to rename volitile keys.
        self.set(new_key, value, timeout=ttl)
        self.delete(old_key)
        return version + delta


text:
The following examples explain the Invoice Reminders section of the SDK.  The API documentation on Invoice Reminders can be found [here](https://developer.xero.com/documentation/api/invoice-reminders).

### Supported functions

* Retrieve Invoice Reminder Setting

These functions are explained further below.

### Entity Helper

The entity helper that has been created for the invoice reminders functions exists in the following place:

`client.core.invoiceReminders`

This helper contains the following functions:

* `getInvoiceReminders([options])`

### Retrieving Invoice Reminders

This example shows how to retrieve the Invoice Reminder settings.

```javascript

xeroClient.core.invoiceReminders.getInvoiceReminders()
   .then(function(invoiceReminders) {
      //We've got the Invoice Reminders
      invoiceReminders.forEach(function(reminder){
         //do something useful
         console.log(reminder.Enabled);
      });
   })
```

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

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

    <title>Levin Keller - personal homepage</title>

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

    <link href="css/grayscale.css" rel="stylesheet">

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

    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" rel="stylesheet" type="text/css">
    <link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">

                </button>

                      Levin Keller

                        About

                        Projects

                        Resources

                        Contact

Welcome

This is Levin Keller's personal homepage.
Scroll down to find out more.

About Levin Keller

Dear visitor, my Name is Levin Keller, I am 30 years old and fell down the Bitcoin rabbit hole.

I believe that blockchain-based technology will change our society for the better and work on spreading the word, teaching people about Bitcoin and enable them to use it as much as they can.

On this page you will find links to my social network profiles, projects that I am working on and ways to get in touch.

Projects I'm currently involved with:

Hardfork - managing director.

Links & resources

My Prezi Profile

                A collection of publicly available (and reusable) presentations. No need to mention my name if you have use for any of the content here.

Lecture about Bitcoin (German)

                A (German) lecture class that I gave at the FrOSCon 2014.

Get in touch!

Please contact me if you have questions or an interesting project that you need help with.

contact@levinkeller.de

You can also contact me through other platforms:

                         Github

                         Twitter

            Imprint

                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>

Imprint

In accordance with § 5 TMG:

                            Levin Keller
Hardfork GmbH
Mühlenstr. 8a
14167 Berlin

Responsible for content according to § 55 Abs. 2 RStV:

                            Levin Keller
Hardfork GmbH
Mühlenstr. 8a
14167 Berlin


text:
'use strict';
var Config = require('../../../Common/Config');

var Docker = require('dockerode');

var MetricsProvider = function () {
    this._docker = {};
    this.containerMetrics = {};
    this.init();
};

MetricsProvider.prototype = {
    init: function (logger) {
        var self = this;

        this._logger = logger;
        this._docker = new Docker({socketPath: Config.ContainerManagement.initOptions.socketPath});
        this._docker.getEvents(function (err, stream) {
            if (err) {
                this._logger.error(err);
            }

            stream.on('data', function (data) {
                var dataObj = JSON.parse(data.toString('utf8'));
                if (!self.containerMetrics[dataObj.id]) {
                    self.containerMetrics[dataObj.id] = {};
                }

                self.containerMetrics[dataObj.id][dataObj.status] = dataObj.time;
            });
        });
    },

    getMetricsForContainer: function (id) {
        if (this.containerMetrics[id] && this.containerMetrics[id].die) {
            var metrics = this.containerMetrics[id];
            delete this.containerMetrics[id];
            return metrics;
        } else {
            return false;
        }
    }
};

module.exports = MetricsProvider;


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_enabled="false">
        <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
            <item>
                <bitmap android:src="@mipmap/bg_rect_btn_disabled"
                    android:gravity="center"/>
            </item>
            <item android:left="20dp">
                <bitmap android:src="@mipmap/icon_item_user_press"
                    android:gravity="left" />
            </item>
        </layer-list>
    </item>
    <item android:state_pressed="true">
        <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
            <item>
                <bitmap android:src="@mipmap/bg_rect_btn_press"
                android:gravity="center"/>
            </item>
            <item android:left="20dp">
                <bitmap android:src="@mipmap/icon_item_user_press"
                android:gravity="left" />
            </item>
        </layer-list>
    </item>
    <item android:state_selected="true">
        <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
            <item>
                <bitmap android:src="@mipmap/bg_rect_btn_selected"
                    android:gravity="center"/>
            </item>
            <item android:left="20dp">
                <bitmap android:src="@mipmap/icon_item_user_normal"
                    android:gravity="left"/>
            </item>
        </layer-list>
    </item>
    <item>
        <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
            <item>
                <bitmap android:src="@mipmap/bg_rect_btn_normal"
                    android:gravity="center"/>
            </item>
            <item android:left="20dp">
                <bitmap android:src="@mipmap/icon_item_user_normal"
                    android:gravity="left"/>
            </item>
        </layer-list>
    </item>
</selector>


text:
#import "SCMSandboxEntry.h"

@interface SCMSandboxEntry (PBXIconImageAdditions)
- (id)iconImage;
@end


text:
<?php

namespace Composer\Util;

/**
 * @author Andreas Schempp <andreas.schempp@terminal42.ch>
 */
class Zip
{
    /**
     * Gets content of the root composer.json inside a ZIP archive.
     *
     * @param string $pathToZip
     * @param string $filename
     *
     * @return string|null
     */
    public static function getComposerJson($pathToZip)
    {
        if (!extension_loaded('zip')) {
            throw new \RuntimeException('The Zip Util requires PHP\'s zip extension');
        }

        $zip = new \ZipArchive();
        if ($zip->open($pathToZip) !== true) {
            return null;
        }

        if (0 == $zip->numFiles) {
            $zip->close();

            return null;
        }

        $foundFileIndex = self::locateFile($zip, 'composer.json');
        if (false === $foundFileIndex) {
            $zip->close();

            return null;
        }

        $content = null;
        $configurationFileName = $zip->getNameIndex($foundFileIndex);
        $stream = $zip->getStream($configurationFileName);

        if (false !== $stream) {
            $content = stream_get_contents($stream);
        }

        $zip->close();

        return $content;
    }

    /**
     * Find a file by name, returning the one that has the shortest path.
     *
     * @param \ZipArchive $zip
     * @param string      $filename
     *
     * @return bool|int
     */
    private static function locateFile(\ZipArchive $zip, $filename)
    {
        $indexOfShortestMatch = false;
        $lengthOfShortestMatch = -1;

        for ($i = 0; $i < $zip->numFiles; $i++) {
            $stat = $zip->statIndex($i);
            if (strcmp(basename($stat['name']), $filename) === 0) {
                $directoryName = dirname($stat['name']);
                if ($directoryName === '.') {
                    //if composer.json is in root directory
                    //it has to be the one to use.
                    return $i;
                }

                if (strpos($directoryName, '\\') !== false ||
                    strpos($directoryName, '/') !== false) {
                    //composer.json files below first directory are rejected
                    continue;
                }

                $length = strlen($stat['name']);
                if ($indexOfShortestMatch === false || $length < $lengthOfShortestMatch) {
                    //Check it's not a directory.
                    $contents = $zip->getFromIndex($i);
                    if ($contents !== false) {
                        $indexOfShortestMatch = $i;
                        $lengthOfShortestMatch = $length;
                    }
                }
            }
        }

        return $indexOfShortestMatch;
    }
}


text:
/* ** GENEREATED FILE - DO NOT MODIFY ** */
package com.wilutions.mslib.outlook.impl;
import com.wilutions.com.*;

@SuppressWarnings("all")
@CoClass(guid="{C091A92D-A463-DB41-5DAE-69E7A5F7FCBC}")
public class FormDescriptionImpl extends Dispatch implements com.wilutions.mslib.outlook.FormDescription {
  @DeclDISPID(61440)  public com.wilutions.mslib.outlook._Application getApplication() throws ComException {
    final Object obj = this._dispatchCall(61440,"Application", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return Dispatch.as(obj, com.wilutions.mslib.outlook.impl._ApplicationImpl.class);
  }
  @DeclDISPID(61450)  public com.wilutions.mslib.outlook.OlObjectClass getClass_() throws ComException {
    final Object obj = this._dispatchCall(61450,"Class", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return com.wilutions.mslib.outlook.OlObjectClass.valueOf((Integer)obj);
  }
  @DeclDISPID(61451)  public com.wilutions.mslib.outlook._NameSpace getSession() throws ComException {
    final Object obj = this._dispatchCall(61451,"Session", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return Dispatch.as(obj, com.wilutions.mslib.outlook.impl._NameSpaceImpl.class);
  }
  @DeclDISPID(61441)  public IDispatch getParent() throws ComException {
    final Object obj = this._dispatchCall(61441,"Parent", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (IDispatch)obj;
  }
  @DeclDISPID(13060)  public String getCategory() throws ComException {
    final Object obj = this._dispatchCall(13060,"Category", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(13060)  public void setCategory(final String value) throws ComException {
    assert(value != null);
    this._dispatchCall(13060,"Category", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(13061)  public String getCategorySub() throws ComException {
    final Object obj = this._dispatchCall(13061,"CategorySub", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(13061)  public void setCategorySub(final String value) throws ComException {
    assert(value != null);
    this._dispatchCall(13061,"CategorySub", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(12292)  public String getComment() throws ComException {
    final Object obj = this._dispatchCall(12292,"Comment", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(12292)  public void setComment(final String value) throws ComException {
    assert(value != null);
    this._dispatchCall(12292,"Comment", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(13059)  public String getContactName() throws ComException {
    final Object obj = this._dispatchCall(13059,"ContactName", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(13059)  public void setContactName(final String value) throws ComException {
    assert(value != null);
    this._dispatchCall(13059,"ContactName", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(12289)  public String getDisplayName() throws ComException {
    final Object obj = this._dispatchCall(12289,"DisplayName", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(12289)  public void setDisplayName(final String value) throws ComException {
    assert(value != null);
    this._dispatchCall(12289,"DisplayName", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(13063)  public Boolean getHidden() throws ComException {
    final Object obj = this._dispatchCall(13063,"Hidden", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (Boolean)obj;
  }
  @DeclDISPID(13063)  public void setHidden(final Boolean value) throws ComException {
    assert(value != null);
    this._dispatchCall(13063,"Hidden", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(4093)  public String getIcon() throws ComException {
    final Object obj = this._dispatchCall(4093,"Icon", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(4093)  public void setIcon(final String value) throws ComException {
    assert(value != null);
    this._dispatchCall(4093,"Icon", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(102)  public Boolean getLocked() throws ComException {
    final Object obj = this._dispatchCall(102,"Locked", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (Boolean)obj;
  }
  @DeclDISPID(102)  public void setLocked(final Boolean value) throws ComException {
    assert(value != null);
    this._dispatchCall(102,"Locked", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(26)  public String getMessageClass() throws ComException {
    final Object obj = this._dispatchCall(26,"MessageClass", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(4092)  public String getMiniIcon() throws ComException {
    final Object obj = this._dispatchCall(4092,"MiniIcon", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(4092)  public void setMiniIcon(final String value) throws ComException {
    assert(value != null);
    this._dispatchCall(4092,"MiniIcon", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(61469)  public String getName() throws ComException {
    final Object obj = this._dispatchCall(61469,"Name", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(61469)  public void setName(final String value) throws ComException {
    assert(value != null);
    this._dispatchCall(61469,"Name", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(104)  public String getNumber() throws ComException {
    final Object obj = this._dispatchCall(104,"Number", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(104)  public void setNumber(final String value) throws ComException {
    assert(value != null);
    this._dispatchCall(104,"Number", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(101)  public Boolean getOneOff() throws ComException {
    final Object obj = this._dispatchCall(101,"OneOff", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (Boolean)obj;
  }
  @DeclDISPID(101)  public void setOneOff(final Boolean value) throws ComException {
    assert(value != null);
    this._dispatchCall(101,"OneOff", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(109)  public String getScriptText() throws ComException {
    final Object obj = this._dispatchCall(109,"ScriptText", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(106)  public String getTemplate() throws ComException {
    final Object obj = this._dispatchCall(106,"Template", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(106)  public void setTemplate(final String value) throws ComException {
    assert(value != null);
    this._dispatchCall(106,"Template", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(105)  public Boolean getUseWordMail() throws ComException {
    final Object obj = this._dispatchCall(105,"UseWordMail", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (Boolean)obj;
  }
  @DeclDISPID(105)  public void setUseWordMail(final Boolean value) throws ComException {
    assert(value != null);
    this._dispatchCall(105,"UseWordMail", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(13057)  public String getVersion() throws ComException {
    final Object obj = this._dispatchCall(13057,"Version", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(13057)  public void setVersion(final String value) throws ComException {
    assert(value != null);
    this._dispatchCall(13057,"Version", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(107)  public void PublishForm(final com.wilutions.mslib.outlook.OlFormRegistry Registry, final Object Folder) throws ComException {
    assert(Registry != null);
    assert(Folder != null);
    this._dispatchCall(107,"PublishForm", DISPATCH_METHOD,null,Registry.value,Variant.param(Folder));
  }
  public FormDescriptionImpl(String progId) throws ComException {
    super(progId, "{00063046-0000-0000-C000-000000000046}");
  }
  protected FormDescriptionImpl(long ndisp) {
    super(ndisp);
  }
  public String toString() {
    return "[FormDescriptionImpl" + super.toString() + "]";
  }
}


text:
require 'spec_helper'

describe ApiV1::Admin::Internal::PipelinesController do
  before(:each) do
    @pipeline_config_service = double('pipeline_config_service')
    controller.stub('pipeline_config_service').and_return(@pipeline_config_service)
  end

  describe :security do
    describe :index do
      it 'should allow anyone, with security disabled' do
        disable_security

        expect(controller).to allow_action(:get, :index)
      end

      it 'should disallow non-admin user, with security enabled' do
        enable_security
        login_as_user

        expect(controller).to disallow_action(:get, :index).with(401, 'You are not authorized to perform this action.')
      end

      it 'should allow admin users, with security enabled' do
        login_as_admin

        expect(controller).to allow_action(:get, :index)
      end

      it 'should allow group admin users, with security enabled' do
        login_as_group_admin

        expect(controller).to allow_action(:get, :index)
      end
    end
  end

  describe :action do
    before :each do
      enable_security
    end

    describe :index do
      it 'should fetch all the pipelines for the user' do
        login_as_admin
        pipeline_configs = BasicPipelineConfigs.new(PipelineConfigMother.createPipelineConfigWithStages('regression', 'fetch', 'run'))
        pipeline_configs_list = Arrays.asList(pipeline_configs)

        @pipeline_config_service.should_receive(:viewableOrOperatableGroupsFor).with(controller.current_user).and_return(pipeline_configs_list)

        get_with_api_header :index

        expect(response).to be_ok
        expected_response = expected_response(pipeline_configs_list, ApiV1::Config::PipelineConfigsWithMinimalAttributesRepresenter)
        expect(actual_response).to eq(expected_response)
      end
    end
  end
end


text:
$(window).on('load', function () {
    // Animate loader off screen
    $(".se-pre-con").fadeOut("slow");
});


text:
'use strict';

import Emitter from 'utils/Emitter';

import {
  WEBGL_IS_INTERSECTING,
  WEBGL_IS_NOT_INTERSECTING,
  WEBGL_CLICK_ON_OBJECT
} from '../../config/messages';

export default Vue.extend({

  template: require('./template.html'),

  data() {

    return {
      name: ''
    };
  },

  created() {
    this.bind();
  },

  ready() {
    this.generateGSAPTimeline();

    this.addEventListeners();
  },

  beforeDestroy() {
    this.removeEventListeners();
  },

  methods: {

    /*
     * Binding & Events
     */

    bind() {
    },

    addEventListeners() {

      Emitter.on(WEBGL_IS_INTERSECTING, ::this.onIsIntersecting);
      Emitter.on(WEBGL_IS_NOT_INTERSECTING, ::this.onIsNotIntersecting);
      Emitter.on(WEBGL_CLICK_ON_OBJECT, ::this.onClickOnObject);

    },

    removeEventListeners() {

      Emitter.off(WEBGL_IS_INTERSECTING, ::this.onIsIntersecting);
      Emitter.off(WEBGL_IS_NOT_INTERSECTING, ::this.onIsNotIntersecting);
      Emitter.off(WEBGL_CLICK_ON_OBJECT, ::this.onClickOnObject);

    },

    generateGSAPTimeline() {
      this.enterTl = new TimelineMax({paused: true});
      this.leaveTl = new TimelineMax({paused: true});

      this.enterTl
        .fromTo(this.$els.container, 1, {width: '0%', opacity: 1}, {width: '100%', opacity: 1, ease: Expo.easeOut});

      this.leaveTl
        .fromTo(this.$els.container, 1, {opacity: 1}, {opacity: 0, ease: Expo.easeOut});
    },

    onIsIntersecting(intersectObject) {
      this.name = intersectObject.object.name;
      this.leaveTl.stop();
      this.enterTl.play(0);
      console.log('intersecting');
    },

    onIsNotIntersecting() {
      this.enterTl.stop();
      this.leaveTl.play(0);
    },

    onClickOnObject() {
      this.enterTl.time(0);
      this.enterTl.stop();
      this.leaveTl.play(0);
    }

  }
});


text:
package org.op4j.operators.qualities;

import org.javaruntype.type.Type;
import org.op4j.functions.IFunction;

/**
 *

 * This interface contains methods for executing functions on operators with
 * array target objects.
 *

 *
 * @since 1.0
 *
 * @author Daniel Fernández
 *
 */
public interface ExecutableArrayOperator<T> {

    /**
     *

     * Executes the specified function on the target object, creating a new operator
     * containing the result of the execution.
     *

     *

     * This function must be able to take as input an array of the current operator's
     * target type, and will return an array of the same type and structure.
     *

     *
     * @param function the function to be executed
     * @return an operator on the results of function execution
     */
    public ExecutableArrayOperator<T> execAsArray(final IFunction<? super T[],? extends T[]> function);

    /**
     *

     * Executes the specified function on the target object, creating a new operator
     * containing the result of the execution.
     *

     *

     * This function must be able to take as input an array of the current operator's
     * target type, and can return an array of a different type (specified by the type parameter),
     * which will be from then on the new operator's target type.
     *

     *
     * @param <X> the type of the result elements
     * @param type the new type for the operator
     * @param function the function to be executed
     * @return an operator on the results of function execution
     */
    public <X> ExecutableArrayOperator<X> execAsArrayOf(final Type<X> type, final IFunction<? super T[],X[]> function);

    /**
     *

     * Executes a function in a way equivalent to {@link #execAsArray(IFunction)} but only
     * on selected elements, leaving all other elements untouched.
     *

     *
     * @param function the function to be executed on the selected elements
     * @return an operator on the results of function execution
     */
    public ExecutableArrayOperator<T> execIfNotNullAsArray(final IFunction<? super T[],? extends T[]> function);

    /**
     *

     * Executes a function in a way equivalent to {@link #execAsArray(IFunction)} but only
     * on selected elements, leaving all other elements untouched.
     *

     *
     * @param function the function to be executed on the selected elements
     * @return an operator on the results of function execution
     */
    public ExecutableArrayOperator<T> execIfNullAsArray(final IFunction<? super T[],? extends T[]> function);

    /**
     *

     * Executes a function in a way equivalent to {@link #execAsArray(IFunction)} but only
     * on selected elements, leaving all other elements untouched.
     *

     *
     * @param eval the evaluation function used to select elements
     * @param function the function to be executed on the selected elements
     * @return an operator on the results of function execution
     */
    public ExecutableArrayOperator<T> execIfTrueAsArray(final IFunction<? super T[], Boolean> eval, final IFunction<? super T[],? extends T[]> function);

    /**
     *

     * Executes a function in a way equivalent to {@link #execAsArray(IFunction)} but only
     * on selected elements, leaving all other elements untouched.
     *

     *
     * @param eval the evaluation function used to select elements
     * @param function the function to be executed on the selected elements
     * @return an operator on the results of function execution
     */
    public ExecutableArrayOperator<T> execIfFalseAsArray(final IFunction<? super T[], Boolean> eval, final IFunction<? super T[],? extends T[]> function);

    /**
     *

     * Executes a function in a way equivalent to {@link #execAsArray(IFunction)} but only
     * on selected elements, leaving all other elements untouched.
     *

     *
     * @param <X> the new type returned by the functions
     * @param type the new type returned by the functions
     * @param function the function to be executed on the selected elements
     * @param elseFunction the function to be executed on the non-selected elements
     * @return an operator on the results of function execution
     */
    public <X> ExecutableArrayOperator<X> execIfNotNullAsArrayOf(final Type<X> type, final IFunction<? super T[],X[]> function, final IFunction<? super T[],X[]> elseFunction);

    /**
     *

     * Executes a function in a way equivalent to {@link #execAsArray(IFunction)} but only
     * on selected elements, leaving all other elements untouched.
     *

     *
     * @param <X> the new type returned by the functions
     * @param type the new type returned by the functions
     * @param function the function to be executed on the selected elements
     * @param elseFunction the function to be executed on the non-selected elements
     * @return an operator on the results of function execution
     */
    public <X> ExecutableArrayOperator<X> execIfNullAsArrayOf(final Type<X> type, final IFunction<? super T[],X[]> function, final IFunction<? super T[],X[]> elseFunction);

    /**
     *

     * Executes a function in a way equivalent to {@link #execAsArray(IFunction)} but only
     * on selected elements, leaving all other elements untouched.
     *

     *
     * @param <X> the new type returned by the functions
     * @param type the new type returned by the functions
     * @param eval the evaluation function used to select elements
     * @param function the function to be executed on the selected elements
     * @param elseFunction the function to be executed on the non-selected elements
     * @return an operator on the results of function execution
     */
    public <X> ExecutableArrayOperator<X> execIfTrueAsArrayOf(final Type<X> type, final IFunction<? super T[], Boolean> eval, final IFunction<? super T[],X[]> function, final IFunction<? super T[],X[]> elseFunction);

    /**
     *

     * Executes a function in a way equivalent to {@link #execAsArray(IFunction)} but only
     * on selected elements, leaving all other elements untouched.
     *

     *
     * @param <X> the new type returned by the functions
     * @param type the new type returned by the functions
     * @param eval the evaluation function used to select elements
     * @param function the function to be executed on the selected elements
     * @param elseFunction the function to be executed on the non-selected elements
     * @return an operator on the results of function execution
     */
    public <X> ExecutableArrayOperator<X> execIfFalseAsArrayOf(final Type<X> type, final IFunction<? super T[], Boolean> eval, final IFunction<? super T[],X[]> function, final IFunction<? super T[],X[]> elseFunction);

    /**
     *

     * Executes the specified function on the target object, creating a new generic operator
     * containing the result of the execution and setting the new operator type to the one
     * specified.
     *

     *
     * @param <X> the type of the result object
     * @param function the function to be executed
     * @return an operator on the results of function execution
     */
    public <X> Operator exec(final IFunction<? super T[],X> function);

    /**
     *

     * Executes the specified function on each of the elements, creating a new operator
     * containing the result of all the executions and setting the new operator type to the one
     * specified.
     *

     *

     * This method is equivalent to <tt>forEach().exec(type, function).endFor()</tt>.
     *

     *
     * @param <X> the type of the result elements
     * @param type the new type for the operator
     * @param function the function to be executed
     * @return an operator on the results of function execution on each element
     */
    public <X> ExecutableArrayOperator<X> map(final Type<X> type, final IFunction<? super T,X> function);

    /**
     *

     * Executes the specified function on each of the elements, creating a new operator
     * containing the result of all the executions but not changing the operator type. The
     * specified function will have to return results compatible with the current operator type.
     *

     *

     * This method is equivalent to <tt>forEach().exec(function).endFor()</tt>.
     *

     *
     * @param function the function to be executed
     * @return an operator on the results of function execution on each element
     */
    public ExecutableArrayOperator<T> map(final IFunction<? super T,? extends T> function);

    /**
     *

     * Maps a function in a way equivalent to {@link #map(IFunction)} but only
     * on selected elements, leaving all other elements untouched.
     *

     *
     * @param function the function to be executed on the selected elements
     * @return an operator on the results of function execution
     */
    public ExecutableArrayOperator<T> mapIfNotNull(final IFunction<? super T,? extends T> function);

    /**
     *

     * Maps a function in a way equivalent to {@link #map(IFunction)} but only
     * on selected elements, leaving all other elements untouched.
     *

     *
     * @param function the function to be executed on the selected elements
     * @return an operator on the results of function execution
     */
    public ExecutableArrayOperator<T> mapIfNull(final IFunction<? super T,? extends T> function);

    /**
     *

     * Maps a function in a way equivalent to {@link #map(IFunction)} but only
     * on selected elements, leaving all other elements untouched.
     *

     *
     * @param eval the evaluation function used to select elements
     * @param function the function to be executed on the selected elements
     * @return an operator on the results of function execution
     */
    public ExecutableArrayOperator<T> mapIfTrue(final IFunction<? super T, Boolean> eval, final IFunction<? super T,? extends T> function);

    /**
     *

     * Maps a function in a way equivalent to {@link #map(IFunction)} but only
     * on selected elements, leaving all other elements untouched.
     *

     *
     * @param eval the evaluation function used to select elements
     * @param function the function to be executed on the selected elements
     * @return an operator on the results of function execution
     */
    public ExecutableArrayOperator<T> mapIfFalse(final IFunction<? super T, Boolean> eval, final IFunction<? super T,? extends T> function);

    /**
     *

     * Maps a function in a way equivalent to {@link #map(IFunction)} but only
     * on selected elements, leaving all other elements untouched.
     *

     *
     * @param <X> the new type returned by the functions
     * @param type the new type returned by the functions
     * @param function the function to be executed on the selected elements
     * @param elseFunction the function to be executed on the non-selected elements
     * @return an operator on the results of function execution
     */
    public <X> ExecutableArrayOperator<X> mapIfNotNull(final Type<X> type, final IFunction<? super T,X> function, final IFunction<? super T,X> elseFunction);

    /**
     *

     * Maps a function in a way equivalent to {@link #map(IFunction)} but only
     * on selected elements, leaving all other elements untouched.
     *

     *
     * @param <X> the new type returned by the functions
     * @param type the new type returned by the functions
     * @param function the function to be executed on the selected elements
     * @param elseFunction the function to be executed on the non-selected elements
     * @return an operator on the results of function execution
     */
    public <X> ExecutableArrayOperator<X> mapIfNull(final Type<X> type, final IFunction<? super T,X> function, final IFunction<? super T,X> elseFunction);

    /**
     *

     * Maps a function in a way equivalent to {@link #map(IFunction)} but only
     * on selected elements, leaving all other elements untouched.
     *

     *
     * @param <X> the new type returned by the functions
     * @param type the new type returned by the functions
     * @param eval the evaluation function used to select elements
     * @param function the function to be executed on the selected elements
     * @param elseFunction the function to be executed on the non-selected elements
     * @return an operator on the results of function execution
     */
    public <X> ExecutableArrayOperator<X> mapIfTrue(final Type<X> type, final IFunction<? super T, Boolean> eval, final IFunction<? super T,X> function, final IFunction<? super T,X> elseFunction);

    /**
     *

     * Maps a function in a way equivalent to {@link #map(IFunction)} but only
     * on selected elements, leaving all other elements untouched.
     *

     *
     * @param <X> the new type returned by the functions
     * @param type the new type returned by the functions
     * @param eval the evaluation function used to select elements
     * @param function the function to be executed on the selected elements
     * @param elseFunction the function to be executed on the non-selected elements
     * @return an operator on the results of function execution
     */
    public <X> ExecutableArrayOperator<X> mapIfFalse(final Type<X> type, final IFunction<? super T, Boolean> eval, final IFunction<? super T,X> function, final IFunction<? super T,X> elseFunction);

}


text:
package com.example.qyu4.reflectiontester;

/**
 * Created by qyu4 on 10/1/15.
 * this class is Player Four model
 * and this class is keep the count that player four has
 * the number of chance to answer the question
 */
public class PlayerFour extends PlayerModel {
    public PlayerFour(int count) {
        super(count);
    }
}


text:
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)

_sym_db = _symbol_database.Default()

DESCRIPTOR = _descriptor.FileDescriptor(
  name='components/auth/proto/machine_token.proto',
  package='components.auth',
  syntax='proto3',
  serialized_options=None,
  create_key=_descriptor._internal_create_key,
  serialized_pb=b'\n)components/auth/proto/machine_token.proto\x12\x0f\x63omponents.auth\"\x86\x01\n\x10MachineTokenBody\x12\x14\n\x0cmachine_fqdn\x18\x01 \x01(\t\x12\x11\n\tissued_by\x18\x02 \x01(\t\x12\x11\n\tissued_at\x18\x03 \x01(\x04\x12\x10\n\x08lifetime\x18\x04 \x01(\x04\x12\r\n\x05\x63\x61_id\x18\x05 \x01(\x03\x12\x0f\n\x07\x63\x65rt_sn\x18\x07 \x01(\x0cJ\x04\x08\x06\x10\x07\"N\n\x14MachineTokenEnvelope\x12\x12\n\ntoken_body\x18\x01 \x01(\x0c\x12\x0e\n\x06key_id\x18\x02 \x01(\t\x12\x12\n\nrsa_sha256\x18\x03 \x01(\x0c\x62\x06proto3'
)

_MACHINETOKENBODY = _descriptor.Descriptor(
  name='MachineTokenBody',
  full_name='components.auth.MachineTokenBody',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  create_key=_descriptor._internal_create_key,
  fields=[
    _descriptor.FieldDescriptor(
      name='machine_fqdn', full_name='components.auth.MachineTokenBody.machine_fqdn', index=0,
      number=1, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=b"".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='issued_by', full_name='components.auth.MachineTokenBody.issued_by', index=1,
      number=2, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=b"".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='issued_at', full_name='components.auth.MachineTokenBody.issued_at', index=2,
      number=3, type=4, cpp_type=4, label=1,
      has_default_value=False, default_value=0,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='lifetime', full_name='components.auth.MachineTokenBody.lifetime', index=3,
      number=4, type=4, cpp_type=4, label=1,
      has_default_value=False, default_value=0,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='ca_id', full_name='components.auth.MachineTokenBody.ca_id', index=4,
      number=5, type=3, cpp_type=2, label=1,
      has_default_value=False, default_value=0,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='cert_sn', full_name='components.auth.MachineTokenBody.cert_sn', index=5,
      number=7, type=12, cpp_type=9, label=1,
      has_default_value=False, default_value=b"",
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  serialized_options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=63,
  serialized_end=197,
)

_MACHINETOKENENVELOPE = _descriptor.Descriptor(
  name='MachineTokenEnvelope',
  full_name='components.auth.MachineTokenEnvelope',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  create_key=_descriptor._internal_create_key,
  fields=[
    _descriptor.FieldDescriptor(
      name='token_body', full_name='components.auth.MachineTokenEnvelope.token_body', index=0,
      number=1, type=12, cpp_type=9, label=1,
      has_default_value=False, default_value=b"",
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='key_id', full_name='components.auth.MachineTokenEnvelope.key_id', index=1,
      number=2, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=b"".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='rsa_sha256', full_name='components.auth.MachineTokenEnvelope.rsa_sha256', index=2,
      number=3, type=12, cpp_type=9, label=1,
      has_default_value=False, default_value=b"",
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  serialized_options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=199,
  serialized_end=277,
)

DESCRIPTOR.message_types_by_name['MachineTokenBody'] = _MACHINETOKENBODY
DESCRIPTOR.message_types_by_name['MachineTokenEnvelope'] = _MACHINETOKENENVELOPE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)

MachineTokenBody = _reflection.GeneratedProtocolMessageType('MachineTokenBody', (_message.Message,), {
  'DESCRIPTOR' : _MACHINETOKENBODY,
  '__module__' : 'components.auth.proto.machine_token_pb2'
  # @@protoc_insertion_point(class_scope:components.auth.MachineTokenBody)
  })
_sym_db.RegisterMessage(MachineTokenBody)

MachineTokenEnvelope = _reflection.GeneratedProtocolMessageType('MachineTokenEnvelope', (_message.Message,), {
  'DESCRIPTOR' : _MACHINETOKENENVELOPE,
  '__module__' : 'components.auth.proto.machine_token_pb2'
  # @@protoc_insertion_point(class_scope:components.auth.MachineTokenEnvelope)
  })
_sym_db.RegisterMessage(MachineTokenEnvelope)

# @@protoc_insertion_point(module_scope)


text:
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="home.Tests.GroupDeletionTests" tests="1" skipped="0" failures="0" errors="0" timestamp="2017-04-15T08:42:37" hostname="pacpc" time="2.362">
  <properties/>
  <testcase name="testGroupDeletion" classname="home.Tests.GroupDeletionTests" time="2.362"/>
  <system-out><![CDATA[]]></system-out>
  <system-err><![CDATA[]]></system-err>
</testsuite>


text:
package main

import (
	"fmt"
	"github.com/kormat/go-slackapi/config"
	"github.com/kormat/go-slackapi/groups"
)

type GroupInfo struct {
	Args struct {
		ID string `description:"Group ID"`
	} `positional-args:"yes" required:"yes"`
}
type GroupList struct{}
type GroupInvite struct {
	Args struct {
		Group string `positional-arg-name:"CHAN" description:"Group ID"`
		User  string `positional-arg-name:"USER" description:"User ID"`
	} `positional-args:"yes" required:"yes"`
}

type GroupKick struct {
	GroupInvite
}

var groupInfo GroupInfo
var groupList GroupList
var groupInvite GroupInvite
var groupKick GroupKick

func init() {
	parser.AddCommand("groups.info", "Show group info", "", &groupInfo)
	parser.AddCommand("groups.list", "List groups", "", &groupList)
	parser.AddCommand("groups.invite", "Invite user to group", "", &groupInvite)
	parser.AddCommand("groups.kick", "Kick user from group", "", &groupKick)
}

func (g *GroupInfo) Execute(_ []string) error {
	if config.CfgErr != nil {
		return config.CfgErr
	}
	info, err := groups.Info(g.Args.ID)
	if err != nil {
		return err
	}
	fmt.Println(info)
	return nil
}

func (gl *GroupList) Execute(_ []string) error {
	if config.CfgErr != nil {
		return config.CfgErr
	}
	glist, err := groups.List()
	if err != nil {
		return err
	}
	for i, g := range glist {
		fmt.Printf("%d. `%s` (Id: %s)\n", i, g.Name, g.ID)
	}
	return nil
}

func (g *GroupInvite) Execute(_ []string) error {
	if config.CfgErr != nil {
		return config.CfgErr
	}
	return groups.Invite(g.Args.Group, g.Args.User)
}

func (g *GroupKick) Execute(_ []string) error {
	if config.CfgErr != nil {
		return config.CfgErr
	}
	return groups.Kick(g.Args.Group, g.Args.User)
}


text:
namespace std
{

template <class CharT, class Traits>
std::basic_ostream<CharT, Traits>&
operator<<(std::basic_ostream<CharT, Traits>& os, const std::chrono::year& y) noexcept
{
    os << static_cast<int>(y);
    return os;
}

template <class CharT, class Traits>
std::basic_ostream<CharT, Traits>&
operator<<(std::basic_ostream<CharT, Traits>& os, const std::chrono::month& m) noexcept
{
    os << static_cast<unsigned>(m);
    return os;
}

template <class CharT, class Traits>
std::basic_ostream<CharT, Traits>&
operator<<(std::basic_ostream<CharT, Traits>& os, const std::chrono::day& d) noexcept
{
    os << static_cast<unsigned>(d);
    return os;
}

template<typename T, typename R>
auto& operator << (std::ostream& os, const std::chrono::duration<T,R>& d) noexcept
{
    os << d.count();
    return os;
}

} // namespace std

namespace ext
{

inline auto stoi(std::string_view sv, std::size_t* pos = nullptr, int base = 10)
{
    char* end;
    auto i = std::strtol(sv.data(), &end, base);
    if(pos) *pos = std::distance<const char*>(sv.data(), end);
    return static_cast<std::int32_t>(i);
}

inline auto stou(std::string_view sv, std::size_t* pos = nullptr, int base = 10)
{
    char* end;
    auto i = std::strtol(sv.data(), &end, base);
    if(pos) *pos = std::distance<const char*>(sv.data(), end);
    return static_cast<std::uint32_t>(i);
}

inline auto stol(std::string_view sv, std::size_t* pos = nullptr, int base = 10)
{
    char* end;
    auto i = std::strtol(sv.data(), &end, base);
    if(pos) *pos = std::distance<const char*>(sv.data(), end);
    return i;
}

inline auto stoll(std::string_view sv, std::size_t* pos = nullptr, int base = 10)
{
    char* end;
    auto ll = std::strtoll(sv.data(), &end, base);
    if(pos) *pos = std::distance<const char*>(sv.data(), end);
    return ll;
}

inline std::string operator+(std::string str, std::string_view sv)
{
	return str.append(sv.data(), sv.size());
}

static const std::string g_number2month[] = {"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};

constexpr auto& to_string(const std::chrono::month& m) noexcept
{
    const auto n = static_cast<unsigned>(m);
    return g_number2month[n];
}

static const std::string g_number2weekday[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};

constexpr auto& to_string(const std::chrono::weekday& wd) noexcept
{
    const auto n = wd.c_encoding();
    return g_number2weekday[n];
}

template<typename T>
auto to_rfc1123(const std::chrono::time_point<T>& current_time) noexcept
{
    const auto midnight = std::chrono::floor<std::chrono::days>(current_time);
    const auto weekday = std::chrono::weekday{midnight};
    const auto date = std::chrono::year_month_day{midnight};
    const auto time = std::chrono::hh_mm_ss{current_time - midnight};
    // Sun, 22 Feb 2112 10:00:00
    auto os = std::ostringstream{};
    os << ext::to_string(weekday)                             << ", "
       << std::setw(2) << std::setfill('0') << date.day()     << ' '
       << ext::to_string(date.month())                        << ' '
       << std::setw(4) << std::setfill('0') << date.year()    << ' '
       << std::setw(2) << std::setfill('0') << time.hours()   << ':'
       << std::setw(2) << std::setfill('0') << time.minutes() << ':'
       << std::setw(2) << std::setfill('0') << time.seconds() << ' '
       << "GMT";
    return os.str();
}

template<typename T>
auto to_iso8601(const std::chrono::time_point<T>& current_time) noexcept
{
    const auto midnight = std::chrono::floor<std::chrono::days>(current_time);
    const auto date = std::chrono::year_month_day{midnight};
    const auto time = std::chrono::hh_mm_ss{current_time - midnight};
    const auto milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(time.subseconds());
    // YYYY-MM-DDThh:mm:ss.fffZ
    auto os = std::ostringstream{};
    os << std::setw(4) << std::setfill('0') << date.year()    << '-'
       << std::setw(2) << std::setfill('0') << date.month()   << '-'
       << std::setw(2) << std::setfill('0') << date.day()     << 'T'
       << std::setw(2) << std::setfill('0') << time.hours()   << ':'
       << std::setw(2) << std::setfill('0') << time.minutes() << ':'
       << std::setw(2) << std::setfill('0') << time.seconds() << '.'
       << std::setw(3) << std::setfill('0') << milliseconds   << 'Z';
    return os.str();
}

inline auto to_time_point(const std::string_view sv)
{
    // YYYY-MM-DDThh:mm:ss.fffZ
    using namespace std::chrono;
    const auto YY = year{stoi(sv.substr(0,4))};
    const auto MM = month{stou(sv.substr(5,2))};
    const auto DD = day{stou(sv.substr(8,2))};
    const auto hh = hours{stoi(sv.substr(11,2))};
    const auto mm = minutes{stoi(sv.substr(14,2))};
    const auto ss = seconds {stoi(sv.substr(17,2))};
    const auto ff = milliseconds{stoi(sv.substr(20,3))};
    auto point = time_point_cast<milliseconds>(sys_days{YY/MM/DD});
    point += hh; point += mm; point += ss; point += ff;
    return point;
}

template<typename T>
std::string to_string(const std::chrono::time_point<T>& point) noexcept
{
    return ext::to_iso8601(point);
}

inline auto to_boolean(std::string_view sv)
{
    using namespace std::literals;
    if(sv == "true"  || sv == "1") return true;
    if(sv == "false" || sv == "0") return false;
    throw std::invalid_argument{"No conversion to bool could be done for '"s + sv + "'"s};
}

static const std::string g_bool2string[] = {"false", "true"};

constexpr const std::string& to_string(bool b) noexcept
{
    return g_bool2string[b];
}

static const std::string g_null2string = {"null"};

constexpr const std::string& to_string(std::nullptr_t) noexcept
{
    return g_null2string;
}

constexpr const std::string& to_string(std::monostate) noexcept
 {
    return g_null2string;
 }

inline std::string to_string(std::string_view sv) noexcept
{
    return std::string{sv};
}

constexpr const std::string& to_string(const std::string& str) noexcept
{
    return str;
}

inline void to_upper(std::string& str) noexcept
{
    for(auto& c : str) c = std::toupper(c);
}

inline void to_lower(std::string& str) noexcept
{
    for(auto& c : str) c = std::tolower(c);
}

inline std::string& trim_right(std::string& str, const char* ws = " \f\n\r\t\v")
{
    return str.erase(str.find_last_not_of(ws) + 1);
}

inline std::string& trim_left(std::string& str, const char* ws = " \f\n\r\t\v")
{
      return str.erase(0, str.find_first_not_of(ws));
}

inline std::string& trim(std::string& str, const char* ws = " \f\n\r\t\v")
{
      return trim_left(trim_right(str, ws ), ws);
}

template<typename T>
bool isnumeric(const T& str)
{
    return str.find_first_not_of("0123456789") == str.npos;
}

} // namespace ext


text:
{% load widget_tweaks %}

{% for hidden_field in form.hidden_fields %}
{{ hidden_field }}
{% endfor %}

{% if form.non_field_errors %}

    {% for error in form.non_field_errors %}
    {{ error }}
    {% endfor %}

{% endif %}

{% for field in form.visible_fields %}

    {{ field.label_tag }}

    {% if form.is_bound %}
    {% if field.errors %}
        {% render_field field class="form-control is-invalid" %}
        {% for error in field.errors %}

{{ error }}

        {% endfor %}
    {% else %}
        {% render_field field class="form-control is-valid" %}
    {% endif %}
    {% else %}
    {% render_field field class="form-control" %}
    {% endif %}

    {% if field.help_text %}
    {{ field.help_text }}
    {% endif %}

{% endfor %}


text:
import * as React from "react";
import Drawer from "material-ui/Drawer";
import MenuItem from "material-ui/MenuItem";
import { MENU_ITEMS } from "./MenuItem";
import AppBar from "material-ui/AppBar";
import spacing from "material-ui/styles/spacing";
import { Link } from "react-router";
import Divider from "material-ui/Divider";

interface DrawerMenuProps {
    appBarTitle: string;
}

interface DrawerMenuState {
    open: boolean;
}

export default class DrawerMenu extends React.Component<DrawerMenuProps, DrawerMenuState> {
    /**
     * State
     */
    public state = {
        open: false
    };

    /**
     * AppBar Style Object
     */
    private appbar_style = {
        backgroundColor: "#00C853",
        position: "fixed",
        zIndex: 3,
        top: 0
    };

    private link_style = {
        textDecoration: "none",
        fontWeight: 400
    };

    constructor() {
        super();
        this.state.open = false;
    }

    private handleToggle = () => {
        this.setState({ open: !this.state.open });
    }

    render() {
        const menus = MENU_ITEMS.map((item) => {
            if (item.key === "divider") {
                return (<Divider key={item.key} />);
            } else if (item.to !== null) {
                return (
                    <Link to={item.to} style={this.link_style} key={item.key}>
                        <MenuItem key={item.key} onTouchTap={this.handleToggle} style={item.style}>
                            <span>  {item.displayName} </span>
                        </MenuItem>
                    </Link>
                );
            } else {
                return (
                    <MenuItem key={item.key} onTouchTap={this.handleToggle} style={item.style}>
                        {item.displayName}
                    </MenuItem>
                );
            }
        });
        return (
            <div>
                <AppBar
                    title={this.props.appBarTitle}
                    onLeftIconButtonTouchTap={this.handleToggle}
                    style={this.appbar_style}
                    />
                <Drawer
                    open={this.state.open}
                    width={spacing.desktopKeylineIncrement * 5}
                    >
                    {menus}
                </Drawer>
            </div>
        );
    }
}


text:
require 'log4r'

module VagrantPlugins
  module ProviderLibvirt
    module Action
      class CreateDomain
        include VagrantPlugins::ProviderLibvirt::Util::ErbTemplate

        def initialize(app, _env)
          @logger = Log4r::Logger.new('vagrant_libvirt::action::create_domain')
          @app = app
        end

        def _disk_name(name, disk)
          "#{name}-#{disk[:device]}.#{disk[:type]}"	# disk name
        end

        def _disks_print(disks)
          disks.collect do |x|
            "#{x[:device]}(#{x[:type]},#{x[:size]})"
          end.join(', ')
        end

        def _cdroms_print(cdroms)
          cdroms.collect { |x| x[:dev] }.join(', ')
        end

        def call(env)
          # Get config.
          config = env[:machine].provider_config

          # Gather some info about domain
          @name = env[:domain_name]
          @uuid = config.uuid
          @cpus = config.cpus.to_i
          @cpu_mode = config.cpu_mode
          @loader = config.loader
          @machine_type = config.machine_type
          @machine_arch = config.machine_arch
          @disk_bus = config.disk_bus
          @nested = config.nested
          @memory_size = config.memory.to_i * 1024
          @management_network_mac = config.management_network_mac
          @domain_volume_cache = config.volume_cache
          @kernel = config.kernel
          @cmd_line = config.cmd_line
          @initrd = config.initrd
          @graphics_type = config.graphics_type
          @graphics_autoport = config.graphics_autoport
          @graphics_port = config.graphics_port
          @graphics_ip = config.graphics_ip
          @graphics_passwd =  if config.graphics_passwd.to_s.empty?
                                ''
                              else
                                "passwd='#{config.graphics_passwd}'"
                              end
          @video_type = config.video_type
          @video_vram = config.video_vram
          @keymap = config.keymap

          # Boot order
          @boot_order = config.boot_order

          # Storage
          @storage_pool_name = config.storage_pool_name
          @disks = config.disks
          @cdroms = config.cdroms

          # Input
          @inputs = config.inputs

          # PCI device passthrough
          @pcis = config.pcis

          config = env[:machine].provider_config
          @domain_type = config.driver

          @os_type = 'hvm'

          # Get path to domain image from the storage pool selected if we have a box.
          if env[:machine].config.vm.box
            actual_volumes =
              env[:machine].provider.driver.connection.volumes.all.select do |x|
                x.pool_name == @storage_pool_name
              end
            domain_volume = ProviderLibvirt::Util::Collection.find_matching(
              actual_volumes,"#{@name}.img")
            raise Errors::DomainVolumeExists if domain_volume.nil?
            @domain_volume_path = domain_volume.path
          end

          # If we have a box, take the path from the domain volume and set our storage_prefix.
          # If not, we dump the storage pool xml to get its defined path.
          # the default storage prefix is typically: /var/lib/libvirt/images/
          if env[:machine].config.vm.box
            storage_prefix = File.dirname(@domain_volume_path) + '/'        # steal
          else
            storage_pool = env[:machine].provider.driver.connection.client.lookup_storage_pool_by_name(@storage_pool_name)
            raise Errors::NoStoragePool if storage_pool.nil?
            xml = Nokogiri::XML(storage_pool.xml_desc)
            storage_prefix = xml.xpath("/pool/target/path").inner_text.to_s + '/'
          end

          @disks.each do |disk|
            disk[:path] ||= _disk_name(@name, disk)

            # On volume creation, the <path> element inside <target>
            # is oddly ignored; instead the path is taken from the
            # <name> element:
            # http://www.redhat.com/archives/libvir-list/2008-August/msg00329.html
            disk[:name] = disk[:path]

            disk[:absolute_path] = storage_prefix + disk[:path]

            if env[:machine].provider.driver.connection.volumes.select do |x|
              x.name == disk[:name] && x.pool_name == @storage_pool_name
            end.empty?
              # make the disk. equivalent to:
              # qemu-img create -f qcow2 <path> 5g
              begin
                env[:machine].provider.driver.connection.volumes.create(
                  name: disk[:name],
                  format_type: disk[:type],
                  path: disk[:absolute_path],
                  capacity: disk[:size],
                  #:allocation => ?,
                  pool_name: @storage_pool_name)
              rescue Fog::Errors::Error => e
                raise Errors::FogDomainVolumeCreateError,
                    error_message:  e.message
              end
            else
              disk[:preexisting] = true
            end
          end

          # Output the settings we're going to use to the user
          env[:ui].info(I18n.t('vagrant_libvirt.creating_domain'))
          env[:ui].info(" -- Name:              #{@name}")
          if @uuid != ''
            env[:ui].info(" -- Forced UUID:       #{@uuid}")
          end
          env[:ui].info(" -- Domain type:       #{@domain_type}")
          env[:ui].info(" -- Cpus:              #{@cpus}")
          env[:ui].info(" -- Memory:            #{@memory_size / 1024}M")
          env[:ui].info(" -- Management MAC:    #{@management_network_mac}")
          env[:ui].info(" -- Loader:            #{@loader}")
          if env[:machine].config.vm.box
            env[:ui].info(" -- Base box:          #{env[:machine].box.name}")
          end
          env[:ui].info(" -- Storage pool:      #{@storage_pool_name}")
          env[:ui].info(" -- Image:             #{@domain_volume_path} (#{env[:box_virtual_size]}G)")
          env[:ui].info(" -- Volume Cache:      #{@domain_volume_cache}")
          env[:ui].info(" -- Kernel:            #{@kernel}")
          env[:ui].info(" -- Initrd:            #{@initrd}")
          env[:ui].info(" -- Graphics Type:     #{@graphics_type}")
          env[:ui].info(" -- Graphics Port:     #{@graphics_port}")
          env[:ui].info(" -- Graphics IP:       #{@graphics_ip}")
          env[:ui].info(" -- Graphics Password: #{@graphics_passwd.empty? ? 'Not defined' : 'Defined'}")
          env[:ui].info(" -- Video Type:        #{@video_type}")
          env[:ui].info(" -- Video VRAM:        #{@video_vram}")
          env[:ui].info(" -- Keymap:            #{@keymap}")

          @boot_order.each do |device|
            env[:ui].info(" -- Boot device:        #{device}")
          end

          if @disks.length > 0
            env[:ui].info(" -- Disks:         #{_disks_print(@disks)}")
          end

          @disks.each do |disk|
            msg = " -- Disk(#{disk[:device]}):     #{disk[:absolute_path]}"
            msg += ' (shared. Remove only manually)' if disk[:allow_existing]
            msg += ' Not created - using existed.' if disk[:preexisting]
            env[:ui].info(msg)
          end

          if @cdroms.length > 0
            env[:ui].info(" -- CDROMS:            #{_cdroms_print(@cdroms)}")
          end

          @cdroms.each do |cdrom|
            env[:ui].info(" -- CDROM(#{cdrom[:dev]}):        #{cdrom[:path]}")
          end

          @inputs.each do |input|
            env[:ui].info(" -- INPUT:             type=#{input[:type]}, bus=#{input[:bus]}")
          end

          @pcis.each do |pci|
            env[:ui].info(" -- PCI passthrough:   #{pci[:bus]}:#{pci[:slot]}.#{pci[:function]}")
          end

          env[:ui].info(" -- Command line : #{@cmd_line}")

          # Create libvirt domain.
          # Is there a way to tell fog to create new domain with already
          # existing volume? Use domain creation from template..
          begin
            server = env[:machine].provider.driver.connection.servers.create(
              xml: to_xml('domain'))
          rescue Fog::Errors::Error => e
            raise Errors::FogCreateServerError, error_message:  e.message
          end

          # Immediately save the ID since it is created at this point.
          env[:machine].id = server.id

          @app.call(env)
        end
      end
    end
  end
end


text:
using CIAPI.DTO;

namespace CIAPI.TradingController
{
    public delegate void TradeOrderResponseDelegate(ApiResult<ApiTradeOrderResponseDTO> result);
}


text:
#include <sstream>
#include <string>
#include <string.h>

#include <cudaCompress/Timing.h>
using namespace cudaCompress;

#include "cudaUtil.h"

#include "examples.h"

int cutilDeviceInit(int argc, char** argv)
{
    int deviceCount;
    cudaSafeCall(cudaGetDeviceCount(&deviceCount));
    if (deviceCount == 0) {
        fprintf(stderr, "CUTIL CUDA error: no devices supporting CUDA.\n");
        exit(-1);
    }
    int dev = 0;
    //cutGetCmdLineArgumenti(ARGC, (const char **) ARGV, "device", &dev);
    for(int i = 1; i < argc; i++) {
        const char* arg = "--device=";
        size_t len = strlen(arg);
        if(strncmp(argv[i], arg, len) == 0) {
            dev = atoi(argv[i] + len);
            break;
        }
    }
    if (dev < 0)
        dev = 0;
    if (dev > deviceCount-1) {
        fprintf(stderr, "\n");
        fprintf(stderr, ">> %d CUDA capable GPU device(s) detected. <<\n", deviceCount);
        fprintf(stderr, ">> cutilDeviceInit (-device=%d) is not a valid GPU device. <<\n", dev);
        fprintf(stderr, "\n");
        return -dev;
    }
    cudaDeviceProp deviceProp;
    cudaSafeCall(cudaGetDeviceProperties(&deviceProp, dev));
    if (deviceProp.major < 1) {
        fprintf(stderr, "cutil error: GPU device does not support CUDA.\n");
        exit(-1);
    }
    if (deviceProp.major < 1) {
        fprintf(stderr, "cutil error: GPU device does not support CUDA.\n");
        exit(-1);
    }
    if (deviceProp.major < 2) {
        fprintf(stderr, "cutil error: GPU device must support at least compute 2.0 (Fermi).\n");
        exit(-1);
    }
    printf("> Using CUDA device [%d]: %s\n", dev, deviceProp.name);
    cudaSafeCall(cudaSetDevice(dev));

    return dev;
}

int main(int argc, char **argv)
{
    // enable run-time memory check for debug builds
    #if defined( _WIN32 ) && ( defined( DEBUG ) || defined( _DEBUG ) )
    _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
    #endif

    // init cuda (cmdline-specified device)
    cutilDeviceInit(argc, argv);
    printf("\n");

    //return benchmarkCoding();

    // set granularity of timing information - higher levels come with some performance overhead
    ETimingDetail timingDetail = TIMING_DETAIL_NONE;

    uint iterations = 10;
    #ifdef _DEBUG
        iterations = 1;
    #endif

    // speed test: compress and decompress the finest level of a texture/heightfield
    benchmarkOneLevelImage("data\\UtahTexSample1m.raw", 2048, 2048, 1, 3.0f, iterations, timingDetail);
    benchmarkOneLevelHeightfield("data\\UtahGeoSample1m.raw", 2048, 2048, iterations, timingDetail);

    // speed test: compress and decompress floating-point volumes
    benchmarkVolumeFloat("data\\Iso_128_128_128_t4000_VelocityX.raw", 128, 128, 128, 2, 0.00136f, iterations, timingDetail);
    benchmarkVolumeFloat("data\\Iso_256_256_256_t4000_VelocityX.raw", 256, 256, 256, 2, 0.00136f, iterations, timingDetail);
    benchmarkVolumeFloatQuantFirst("data\\Iso_128_128_128_t4000_VelocityX.raw", 128, 128, 128, 2, 0.005f, iterations, timingDetail);
    benchmarkVolumeFloatQuantFirst("data\\Iso_256_256_256_t4000_VelocityX.raw", 256, 256, 256, 2, 0.005f, iterations, timingDetail);
    //benchmarkVolumeFloatMultiGPU("data\\Iso_256_256_256_t4000_VelocityX.raw", 256, 256, 256, 2, 0.005f, iterations, timingDetail);

    // speed test: multi-channel volume
    std::vector<std::string> filenames;
    filenames.push_back("data\\Iso_128_128_128_t4000_VelocityX.raw");
    filenames.push_back("data\\Iso_128_128_128_t4000_VelocityY.raw");
    filenames.push_back("data\\Iso_128_128_128_t4000_VelocityZ.raw");
    benchmarkVolumeFloat(filenames, 128, 128, 128, 2, 0.00136f, iterations, timingDetail);
    benchmarkVolumeFloatQuantFirst(filenames, 128, 128, 128, 2, 0.005f, iterations, timingDetail);

    // quality test: compress a texture using different quantization steps
    //               speed is not representative because the coarser levels are too small to saturate the GPU
    //printf("QUALITY TEST:\n\n");
    //std::string filename("data\\Utah_City3.raw");
    //int width = 2048, height = 2048;
    //float qStart = 2.0f;
    //float qEnd = 5.0f;

    //for(float q = qStart; q <= qEnd; q += 0.2f) {
    //    compressImageScalable(filename, width, height, 5, q);
    //}

    return 0;
}


text:
var fs = require('fs-extra');
var path = require('path');
var request = require('request');
var express = require('express');
var rewrite = require('express-urlrewrite');
var bodyParser = require('body-parser');
var serverAPI = require('./server/api');

var app = express();

app.set('port', (process.env.PORT || 3000));

serverAPI.setCurrentWorkingDirPath(path.join(__dirname, 'server'));

app.get('/api/readData', function(req, res){

    serverAPI.readDataFile()
        .then( function(response){
            response = response || {};
            res.send(response);
        })
        .catch( function(err){
            var errorMessage = err.message ? err.message : err;
            res.writeHead(500, errorMessage);
            res.end(errorMessage);
        });

});

// Routes for real application with React-Router

app.use('/resources', express.static(path.join(__dirname, 'public/resources')));
app.use('/images', express.static(path.join(__dirname, 'public/images')));
app.use(rewrite('/*', '/index.html'));
app.use('/', express.static(path.join(__dirname, 'public')));

app.listen(app.get('port'), function() {
  console.log('Server started: http://localhost:' + app.get('port') + '/');
});


text:
<?php
	$this->db->where('id_users', $this->input->get('id'));
	$this->db->limit(1);
	$data = $this->db->get('users');
	foreach ($data->result() as $row) {
		$ultah = explode(" ", $row->create_date);
	    $date = explode("-", $ultah[0]);
	    $tgl = new DateTime();
	    $tgl->setDate($date[0], $date[1], $date[2]);
	    $birthday = $tgl->format('M').", ".$date[0];

?>

  <title><?php echo $row->nama_lengkap; ?> | Member Belajar</title>
  <meta charset="UTF-8">
  <meta name="author" content="SekolahKoding">
  <link rel="stylesheet" href="<?php echo base_url('assets/user/css/main-app.css');?>" charset="utf-8">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/bootstrap/css/bootstrap.min.css');?>">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/login/font-awesome/css/font-awesome.css'); ?>">
	<link rel="stylesheet" href="<?php echo base_url('assets/user/css/hover-min.css') ?>">

  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="icon" href="<?php echo base_url('assets/favicon.ico'); ?>" type="image/x-icon" />
  <link rel="stylesheet" href="<?php echo base_url('assets/user/css/hover-min.css') ?>">

  <meta property="og:title" content="SekolahKoding">
  <meta property="og:image" content="<?php echo base_url('assets/asset/homepage/sk_white_transparent.png');?>">
  <meta property="og:description" content="Belajar Web Programming dan Design Online di SekolahKoding">

		  <img src="<?php echo base_url('assets/photo/fotoprofile/'.$row->foto); ?>" width="150">

 <?php echo $row->nama_lengkap; ?>

@<?php echo $row->username; ?>

 <img src="<?php echo base_url('assets/asset/time-icon.png');?>" alt="" />
		  Bergabung sejak <?php echo $birthday; ?>

		<a href="<?php echo site_url('home');?>">

<img src="<?php echo base_url('assets/asset/upacara-icon.png');?>" alt="" /> Home

		<a href="<?php echo site_url('home/kelas');?>">

<img src="<?php echo base_url('assets/asset/forum-icon.png');?>" alt="" /> Kelas

		<a href="<?php echo site_url('home/forum');?>">

<img src="<?php echo base_url('assets/asset/perpus-icon.png');?>" alt="" /> Forum

		<a href="<?php echo site_url('home/user');?>">

<img src="<?php echo base_url('assets/asset/member-icon.png'); ?>" alt="" /> Member

		<a href="<?php echo site_url('home/logout'); ?>">

 <img src="<?php echo base_url('assets/asset/jejak-icon.png');?>" alt="" /> Keluar

  		  <img src="<?php echo base_url('/assets/asset/atom-bg.png') ?>" alt=""/>

		Notifikasi

		<link rel="stylesheet" href="<?php echo base_url('assets/user/css/sweetalert.css'); ?>">

 Data <?php echo $row->nama_lengkap; ?>

		<?php
			$gabung = $this->db->where('id_user', $this->input->get('id'));
			$gabung = $this->db->get('gabung');
			if ($gabung->num_rows() < 1) {
				echo "Tidak ada kelas yang di ikuti.";
			}else {
				foreach ($gabung->result() as $key) {
					$dakel = $this->db->where('id_kelas', $key->id_kelas);
					$dakel = $this->db->get('kelas')->result();
					foreach ($dakel as $data) {
		?>

		    <a href="<?= site_url("Home/mkelas/".$data->id_kelas); ?>">

<?= $data->nama_kelas ?>

			  <img src="<?php echo base_url('assets/photo/fotokelas/'.$data->foto);?>" alt="" />

		<?php } } } ?>

		© 2016 SekolahKoding

<?php } ?>


text:
package scala.models

import com.bryzek.apidoc.generator.v0.models.InvocationForm
import ning.Ning18ClientGenerator
import org.scalatest.{ShouldMatchers, FunSpec}

class ExampleUnionTypesWithDiscriminatorSpec extends FunSpec with ShouldMatchers {

  private lazy val service = models.TestHelper.parseFile(s"/examples/apidoc-example-union-types-discriminator.json")

  it("generates expected code for play 2.4 client") {
    Play24ClientGenerator.invoke(InvocationForm(service = service)) match {
      case Left(errors) => fail(errors.mkString(", "))
      case Right(sourceFiles) => {
        sourceFiles.size shouldBe 1
        models.TestHelper.assertEqualsFile("/union-types-discriminator-service-play-24.txt", sourceFiles.head.contents)
      }
    }
  }

}


text:
import gxf

@gxf.register()
class Context(gxf.DataCommand):
    '''
    Displays information about the current execution context.
    '''

    def setup(self, parser):
        parser.add_argument("-r", "--regs", action="store_true")
        parser.add_argument("-c", "--code", action="store_true")
        parser.add_argument("-s", "--stack", action="store_true")
        parser.add_argument("-f", "--frame", action="store_true")

    def run(self, args):

        def section(name):
            print(name.center(80, "-"))

        if not any((args.regs, args.code, args.stack)):
            args.regs = True
            args.code = True
            args.stack = True
            args.frame = True

        if args.regs:
            section("registers")
            with gxf.errors.allow_errors():
                gxf.execute("gx registers -M", True, False)

        if args.code:
            section("code")
            with gxf.errors.allow_errors():
                gxf.execute("gx heading $pc -b3 -c5", True, False)

        if args.stack:
            section("stack")
            with gxf.errors.allow_errors():
                gxf.execute("gx telescope $sp -c8", True, False)

        if args.frame:
            section("frame")
            with gxf.errors.allow_errors():
                gxf.execute("frame", True, False)


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bitlore
{
    public static class Rules<T>
    {
        public static Rule<T> Predicate(Func<T, bool> predicate)
        {
            return new PredicateRule<T>(predicate);
        }

        public static Rule<T> Any(IEnumerable<Rule<T>> rules)
        {
            return new AnyRule<T>(rules);
        }

        public static Rule<T> All(IEnumerable<KeyValuePair<Rule<T>, Func<Rule<T>, Interpretation>>> rulesWithFailureInterpreations)
        {
            return new AllSpecification<T>(rulesWithFailureInterpreations);
        }

    }
}


text:
(function() {

  'use strict';

  angular
    .module('harbor.layout.sign.up')
    .controller('SignUpController', SignUpController);

  SignUpController.$inject = ['$scope', 'SignUpService', '$window', '$filter', 'trFilter'];

  function SignUpController($scope, SignUpService, $window, $filter, trFilter) {
    var vm = this;

    $scope.user = {};
    vm.signUp = signUp;
    vm.confirm = confirm;

    //Error message dialog handler for signing up.
    $scope.$on('modalTitle', function(e, val) {
      vm.modalTitle = val;
    });

    $scope.$on('modalMessage', function(e, val) {
      vm.modalMessage = val;
    });

    $scope.$on('raiseError', function(e, val) {
      if(val) {
        vm.action = function() {
          $scope.$broadcast('showDialog', false);
        };
        vm.contentType = 'text/plain';
        vm.confirmOnly = true;
        $scope.$broadcast('showDialog', true);
      }
    });

    function signUp(user) {
      var userObject = {
        'username': user.username,
        'email': user.email,
        'password': user.password,
        'realname': user.fullName,
        'comment': user.comment
      };

      vm.action = vm.confirm;

      SignUpService(userObject)
        .success(signUpSuccess)
        .error(signUpFailed);
    }

    function signUpSuccess(data, status) {
      var title;
      var message;
      if(vm.targetType) {
        title = $filter('tr')('add_new_title');
        message = $filter('tr')('successful_added');
      }else{
        title = $filter('tr')('sign_up');
        message = $filter('tr')('successful_signed_up');
      }
      vm.modalTitle = title;
      vm.modalMessage = message;
      vm.confirmOnly = true;
      $scope.$broadcast('showDialog', true);
    }

    function signUpFailed(data, status) {
      $scope.$emit('modalTitle', $filter('tr')('error'));
      var message;
      if(vm.targetType) {
        message = $filter('tr')('failed_to_add_user');
      }else{
        message = $filter('tr')('failed_to_sign_up');
      }
      $scope.$emit('modalMessage', message);
      $scope.$emit('raiseError', true);

      console.log('Signed up failed.');
    }

    function confirm() {
      if(location.pathname === '/add_new') {
        $window.location.href = '/dashboard';
      }else{
        $window.location.href = '/';
      }
    }

  }

})();