text:
@implementation iPalmGraffitiDemoViewController

#pragma mark -
#pragma mark KeyboardHooks
-(void)viewDidAppear:( BOOL )animated_
{
   [ [ NSNotificationCenter defaultCenter ] addObserver: self
                                               selector: @selector( modifyKeyboard: )
                                                   name: UIKeyboardWillShowNotification
                                                 object: nil ];

   [ super viewDidAppear: animated_ ];
}

-(void)viewWillDisappear:( BOOL )animated_
{
   [ [ NSNotificationCenter defaultCenter ] removeObserver: self
                                                      name: UIKeyboardWillShowNotification
                                                    object: nil];
}

#define GraffitiKeyboardView UIView
-(void)modifyKeyboard:( NSNotification* )notification_
{
   //!! TODO : check this hook properly

   for (UIWindow *keyboardWindow in [ [ UIApplication sharedApplication ] windows ] )
   {
      for ( UIView *keyboard in [ keyboardWindow subviews ] )
      {
         if ( [ [ keyboard description ] hasPrefix: @"<UIKeyboard" ] == YES )
         {
            CGRect keyboard_frame_ = CGRectMake(0, 0, keyboard.frame.size.width, keyboard.frame.size.height);

            GraffitiKeyboardView *customKeyboard = [ [ GraffitiKeyboardView alloc ] initWithFrame: keyboard_frame_ ];
            [ keyboard addSubview: customKeyboard ];
            [ customKeyboard release ];
         }
      }
   }
}

- (void)didReceiveMemoryWarning
{
	// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

	// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	// Release any retained subviews of the main view.
	// e.g. self.myOutlet = nil;
}

- (void)dealloc {
    [super dealloc];
}

@end


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="GradleSettings">
    <option name="linkedExternalProjectsSettings">
      <GradleProjectSettings>
        <option name="distributionType" value="LOCAL" />
        <option name="externalProjectPath" value="$PROJECT_DIR$" />
        <option name="gradleHome" value="C:\Program Files\Android\Android Studio\gradle\gradle-2.2.1" />
        <option name="gradleJvm" value="1.8" />
        <option name="modules">
          <set>
            <option value="$PROJECT_DIR$" />
            <option value="$PROJECT_DIR$/app" />
            <option value="$PROJECT_DIR$/libs" />
            <option value="$PROJECT_DIR$/libs/ColorPickerPreference" />
          </set>
        </option>
      </GradleProjectSettings>
    </option>
  </component>
</project>

redpajama_set_name: RedPajamaGithub


text:
from lib.common import helpers

class Module:

    def __init__(self, mainMenu, params=[]):

        self.info = {
            'Name': 'Invoke-LockWorkStation',

            'Author': ['@harmj0y'],

            'Description': ("Locks the workstation's display."),

            'Background' : False,

            'OutputExtension' : None,

            'NeedsAdmin' : False,

            'OpsecSafe' : False,

            'Language' : 'powershell',

            'MinLanguageVersion' : '2',

            'Comments': [
                'http://poshcode.org/1640'
            ]
        }

        # any options needed by the module, settable during runtime
        self.options = {
            # format:
            #   value_name : {description, required, default_value}
            'Agent' : {
                'Description'   :   'Agent to run module on.',
                'Required'      :   True,
                'Value'         :   ''
            }
        }

        # save off a copy of the mainMenu object to access external functionality
        #   like listeners/agent handlers/etc.
        self.mainMenu = mainMenu

        for param in params:
            # parameter format is [Name, Value]
            option, value = param
            if option in self.options:
                self.options[option]['Value'] = value

    def generate(self, obfuscate=False, obfuscationCommand=""):

        script = """
Function Invoke-LockWorkStation {
    # region define P/Invoke types dynamically
    #   stolen from PowerSploit https://github.com/mattifestation/PowerSploit/blob/master/Mayhem/Mayhem.psm1
    #   thanks matt and chris :)
    $DynAssembly = New-Object System.Reflection.AssemblyName('Win32')
    $AssemblyBuilder = [AppDomain]::CurrentDomain.DefineDynamicAssembly($DynAssembly, [Reflection.Emit.AssemblyBuilderAccess]::Run)
    $ModuleBuilder = $AssemblyBuilder.DefineDynamicModule('Win32', $False)

    $TypeBuilder = $ModuleBuilder.DefineType('Win32.User32', 'Public, Class')
    $DllImportConstructor = [Runtime.InteropServices.DllImportAttribute].GetConstructor(@([String]))
    $SetLastError = [Runtime.InteropServices.DllImportAttribute].GetField('SetLastError')
    $SetLastErrorCustomAttribute = New-Object Reflection.Emit.CustomAttributeBuilder($DllImportConstructor,
        @('User32.dll'),
        [Reflection.FieldInfo[]]@($SetLastError),
        @($True))

    # Define [Win32.User32]::LockWorkStation()
    $PInvokeMethod = $TypeBuilder.DefinePInvokeMethod('LockWorkStation',
        'User32.dll',
        ([Reflection.MethodAttributes]::Public -bor [Reflection.MethodAttributes]::Static),
        [Reflection.CallingConventions]::Standard,
        [Bool],
        [Type[]]@(),
        [Runtime.InteropServices.CallingConvention]::Winapi,
        [Runtime.InteropServices.CharSet]::Ansi)
    $PInvokeMethod.SetCustomAttribute($SetLastErrorCustomAttribute)

    $User32 = $TypeBuilder.CreateType()

    $Null = $User32::LockWorkStation()
}
Invoke-LockWorkStation; "Workstation locked."
"""
        if obfuscate:
            script = helpers.obfuscate(psScript=script, obfuscationCommand=obfuscationCommand)
        return script


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>BaseSensor</title>
<meta name="date" content="2017-01-07">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

ev3dev.hardware.sensors

Class BaseSensor

<map id="G" name="G">
<area shape="rect" id="node1_0" href="../EV3DevSensorDevice.html" title="ev3dev.hardware.EV3DevSensorDevice" alt="" coords="556,57,1120,138"/>
<area shape="rect" id="node1" href="../EV3DevSensorDevice.html" title="<TABLE>" alt="" coords="546,51,1131,143"/>
<area shape="rect" id="node2_1" href="./BaseSensor.html" title="ev3dev.hardware.sensors.BaseSensor" alt="" coords="871,243,1232,591"/>
<area shape="rect" id="node2" href="./BaseSensor.html" title="<TABLE>" alt="" coords="860,238,1243,597"/>
<area shape="rect" id="node4_2" href="./SensorMode.html" title="ev3dev.hardware.sensors.SensorMode" alt="" coords="988,1086,1115,1170"/>
<area shape="rect" id="node4" href="./SensorMode.html" title="<TABLE>" alt="" coords="978,1081,1126,1175"/>
<area shape="rect" id="node6_3" href="./ev3/EV3ColorSensor.html" title="ev3dev.hardware.sensors.ev3.EV3ColorSensor" alt="" coords="112,651,458,1026"/>
<area shape="rect" id="node6" href="./ev3/EV3ColorSensor.html" title="<TABLE>" alt="" coords="102,646,468,1031"/>
<area shape="rect" id="node7_4" href="./ev3/EV3GyroSensor.html" title="ev3dev.hardware.sensors.ev3.EV3GyroSensor" alt="" coords="503,761,832,916"/>
<area shape="rect" id="node7" href="./ev3/EV3GyroSensor.html" title="<TABLE>" alt="" coords="492,756,843,921"/>
<area shape="rect" id="node8_5" href="./ev3/EV3IRSensor.html" title="ev3dev.hardware.sensors.ev3.EV3IRSensor" alt="" coords="878,783,1226,894"/>
<area shape="rect" id="node8" href="./ev3/EV3IRSensor.html" title="<TABLE>" alt="" coords="867,778,1236,899"/>
<area shape="rect" id="node9_6" href="./ev3/EV3TouchSensor.html" title="ev3dev.hardware.sensors.ev3.EV3TouchSensor" alt="" coords="1272,783,1605,894"/>
<area shape="rect" id="node9" href="./ev3/EV3TouchSensor.html" title="<TABLE>" alt="" coords="1261,778,1616,899"/>
<area shape="rect" id="node10_7" href="./ev3/EV3UltrasonicSensor.html" title="ev3dev.hardware.sensors.ev3.EV3UltrasonicSensor" alt="" coords="1650,747,1949,931"/>
<area shape="rect" id="node10" href="./ev3/EV3UltrasonicSensor.html" title="<TABLE>" alt="" coords="1640,741,1960,936"/>
<area shape="rect" id="node3_8" href="./EV3DevSensorDeviceCommands.html" title="ev3dev.hardware.sensors.EV3DevSensorDeviceCommands" alt="" coords="1166,11,1366,183"/>
<area shape="rect" id="node3" href="./EV3DevSensorDeviceCommands.html" title="<TABLE>" alt="" coords="1156,6,1377,189"/>
<area shape="rect" id="node5_9" href="./SensorModes.html" title="ev3dev.hardware.sensors.SensorModes" alt="" coords="1392,1230,1656,1402"/>
<area shape="rect" id="node5" href="./SensorModes.html" title="<TABLE>" alt="" coords="1381,1225,1666,1407"/>
</map>

java.lang.Object

ev3dev.hardware.Device

ev3dev.hardware.EV3DevDevice

ev3dev.hardware.EV3DevSensorDevice

ev3dev.hardware.sensors.BaseSensor

All Implemented Interfaces:

EV3DevSensorDeviceCommands, SensorMode, SensorModes, SupportedPlatform, java.io.Closeable, java.lang.AutoCloseable, SampleProvider

Direct Known Subclasses:

EV3ColorSensor, EV3GyroSensor, EV3IRSensor, EV3TouchSensor, EV3UltrasonicSensor

public class BaseSensor
extends EV3DevSensorDevice
implements EV3DevSensorDeviceCommands, SensorModes

Field Summary

Fields

Modifier and Type
Field and Description

protected int
currentMode

protected java.lang.String
currentModeS

(package private) java.util.ArrayList<java.lang.String>
modeList

protected SensorMode[]
modes

protected static int
SWITCH_DELAY

Fields inherited from class ev3dev.hardware.EV3DevDevice

ADDRESS, DEVICE, DEVICE_ROOT_PATH, LEGO_PORT, LEGO_SENSOR, MODE, PATH_DEVICE

Fields inherited from class ev3dev.hardware.Device

closeList

Fields inherited from interface ev3dev.hardware.sensors.EV3DevSensorDeviceCommands

BATTERY, BATTERY_BRICKPI, BATTERY_EV3, BATTERY_PISTORMS, LEGO_UART_SENSOR, SENSOR_MODE, SENSOR_MODES

Fields inherited from interface ev3dev.hardware.SupportedPlatform

BRICKPI, EV3BRICK, PISTORMS

Constructor Summary

Constructors

Constructor and Description

BaseSensor(java.lang.String sensorPort,
          java.lang.String mode,
          java.lang.String device)

Method Summary

All Methods Instance Methods Concrete Methods

Modifier and Type
Method and Description

void
fetchSample(float[] sample,
           int offset)

Fetches a sample from a sensors or filter.

java.util.ArrayList<java.lang.String>
getAvailableModes()

Return a list of string descriptions for the sensors available modes.

int
getCurrentMode()

Gets the index number of the current mode.

private int
getIndex(java.lang.String modeName)

SensorMode
getMode(int mode)

Return the sample provider interface for the requested mode

SensorMode
getMode(java.lang.String modeName)

Return the sample provider for the request mode

int
getModeCount()

Gets the number of supported modes

java.lang.String
getName()

return a string description of this sensors mode

private boolean
isValid(int mode)

int
sampleSize()

Returns the number of elements in a sample.

void
setCurrentMode(int mode)

Sets the current mode for fetching samples

void
setCurrentMode(java.lang.String modeName)

Sets the current mode for fetching samples

protected void
setModes(SensorMode[] m)

Define the set of modes to be made available for this sensors.

protected void
switchMode(int newMode,
          long switchDelay)

Switch to the selected mode (if not already in that mode) and delay for the
 specified period to allow the sensors to settle in the new mode.

protected void
switchMode(java.lang.String newMode,
          long switchDelay)

Methods inherited from class ev3dev.hardware.EV3DevDevice

detect, getIntegerAttribute, getPlatform, getStringAttribute, setIntegerAttribute, setStringAttribute

Methods inherited from class ev3dev.hardware.Device

close, releaseOnClose

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

SWITCH_DELAY

protected static final int SWITCH_DELAY

See Also:

Constant Field Values

currentMode

protected int currentMode

currentModeS

protected java.lang.String currentModeS

modes

protected SensorMode[] modes

modeList

java.util.ArrayList<java.lang.String> modeList

Constructor Detail

BaseSensor

public BaseSensor(java.lang.String sensorPort,
                  java.lang.String mode,
                  java.lang.String device)

Method Detail

setModes

protected void setModes(SensorMode[] m)

Define the set of modes to be made available for this sensors.

Parameters:

m - An array containing a list of modes

getAvailableModes

public java.util.ArrayList<java.lang.String> getAvailableModes()

Description copied from interface: SensorModes

Return a list of string descriptions for the sensors available modes.

Specified by:

getAvailableModes in interface SensorModes

Returns:

list of string descriptions

getMode

public SensorMode getMode(int mode)

Description copied from interface: SensorModes

Return the sample provider interface for the requested mode

Specified by:

getMode in interface SensorModes

Parameters:

mode - the mode number

Returns:

the sample provider for this mode

getMode

public SensorMode getMode(java.lang.String modeName)

Description copied from interface: SensorModes

Return the sample provider for the request mode

Specified by:

getMode in interface SensorModes

Parameters:

modeName - the name/description of the mode

Returns:

the sample provider for the requested mode.

isValid

private boolean isValid(int mode)

getIndex

private int getIndex(java.lang.String modeName)

getName

public java.lang.String getName()

Description copied from interface: SensorMode

return a string description of this sensors mode

Specified by:

getName in interface SensorMode

Returns:

The description/name of this mode

sampleSize

public int sampleSize()

Description copied from interface: SampleProvider

Returns the number of elements in a sample.

 The number of elements does not change during runtime.

Specified by:

sampleSize in interface SampleProvider

Returns:

the number of elements in a sample

fetchSample

public void fetchSample(float[] sample,
                        int offset)

Description copied from interface: SampleProvider

Fetches a sample from a sensors or filter.

Specified by:

fetchSample in interface SampleProvider

Parameters:

sample - The array to store the sample in.

offset - The elements of the sample are stored in the array starting at the offset position.

setCurrentMode

public void setCurrentMode(int mode)

Description copied from interface: SensorModes

Sets the current mode for fetching samples

Specified by:

setCurrentMode in interface SensorModes

Parameters:

mode - the index number of the mode. Index number corresponds with the item order of the list from getAvailableModes().

setCurrentMode

public void setCurrentMode(java.lang.String modeName)

Description copied from interface: SensorModes

Sets the current mode for fetching samples

Specified by:

setCurrentMode in interface SensorModes

Parameters:

modeName - the name of the mode. name corresponds with the item value of the list from getAvailableModes().

getCurrentMode

public int getCurrentMode()

Description copied from interface: SensorModes

Gets the index number of the current mode.

Specified by:

getCurrentMode in interface SensorModes

Returns:

the index number of the mode. Index number corresponds with the item order of the list from getAvailableModes().

getModeCount

public int getModeCount()

Description copied from interface: SensorModes

Gets the number of supported modes

Specified by:

getModeCount in interface SensorModes

Returns:

the number of supported modes

switchMode

protected void switchMode(int newMode,
                          long switchDelay)

Switch to the selected mode (if not already in that mode) and delay for the
 specified period to allow the sensors to settle in the new mode.

 A mode of -1 resets the sensors.
 TODO: There really should be a better way to work out when the switch is
 complete, if you don't wait though you end up reading data from the previous
 mode.

Parameters:

newMode - The mode to switch to.

switchDelay - Time in mS to delay after the switch.

switchMode

protected void switchMode(java.lang.String newMode,
                          long switchDelay)

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
"""Makani namespace package providing access to HOME."""

from __future__ import absolute_import
import os

# If in a bazel build, RUNFILES_DIR will be set by bazel.  If we are being
# called by a parent process in the bazel environment, RUNFILES_DIR should first
# be set by calling SetRunfilesDirFromBinaryPath.  Otherwise, we use the
# location of this module.
if os.getenv('RUNFILES_DIR'):
  HOME = os.path.join(os.getenv('RUNFILES_DIR'), 'makani')
else:
  HOME = os.path.dirname(__file__)

def SetRunfilesDirFromBinaryPath():
  """Sets the RUNFILES_DIR environment variable based on this module path.

  This can aid in calling subprocesses which retain the same RUNFILES_DIR
  as this process.
  """

  os.environ['RUNFILES_DIR'] = os.path.normpath(
      os.path.join(os.path.dirname(__file__), '..'))


text:
package io.strimzi.test.k8s.cluster;

import io.strimzi.test.executor.Exec;
import io.strimzi.test.k8s.exceptions.KubeClusterException;
import io.strimzi.test.k8s.cmdClient.KubeCmdClient;
import io.strimzi.test.k8s.cmdClient.Oc;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.Arrays;
import java.util.List;

public class OpenShift implements KubeCluster {

    private static final String CMD = "oc";
    public static final String OLM_NAMESPACE = "openshift-operators";
    public static final String OLM_SOURCE_NAMESPACE = "openshift-marketplace";
    public static final String DEFAULT_NAMESPACE = "default";
    private static final Logger LOGGER = LogManager.getLogger(OpenShift.class);

    @Override
    public boolean isAvailable() {
        return Exec.isExecutableOnPath(CMD);
    }

    @Override
    public boolean isClusterUp() {
        List<String> cmd = Arrays.asList(CMD, "status", "-n", DEFAULT_NAMESPACE);
        try {
            return Exec.exec(cmd).exitStatus() && Exec.exec(CMD, "api-resources").out().contains("openshift.io");
        } catch (KubeClusterException e) {
            LOGGER.debug("'" + String.join(" ", cmd) + "' failed. Please double check connectivity to your cluster!");
            LOGGER.debug(e);
            return false;
        }
    }

    @Override
    public KubeCmdClient defaultCmdClient() {
        return new Oc();
    }

    public String toString() {
        return CMD;
    }

    @Override
    public String defaultOlmNamespace() {
        return OLM_NAMESPACE;
    }
}


text:
using System;
using System.ComponentModel;
using System.Linq;
using System.Linq.Expressions;
using System.Xml.Serialization;

namespace DBTM.Domain.Entities
{
    [XmlRoot("Database")]
    public class Database : IEntitySavedStateMonitor, INotifyPropertyChanged
    {
        private DatabaseVersionCollection _databaseVersions = new DatabaseVersionCollection();
        private string _dbName;

        [XmlIgnore]
        protected bool _isSaved = true;

        private bool _disableHistoryTracking;

        [Obsolete("This exists only for serialization", true)]
        public Database()
        {
            _databaseVersions.PropertyChanged += DatabaseVersionsPropertyChanged;
        }

        public Database(string dbName)
        {
            DbName = dbName;
            _isSaved = false;
            _databaseVersions.PropertyChanged += DatabaseVersionsPropertyChanged;
        }

        [XmlAttribute("Name")]
        public virtual string DbName
        {
            get { return _dbName; }
            set
            {
                if (_dbName != value)
                {
                    _dbName = value;
                    FirePropertyChangedEvent(x => x.DbName);
                }

            }
        }

        [XmlAttribute("DisableHistoryTracking")]
        public bool DisableHistoryTracking
        {
            get { return _disableHistoryTracking; }
            set
            {
                if (_disableHistoryTracking != value)
                {
                    _disableHistoryTracking = value;
                    FirePropertyChangedEvent(x => x.DisableHistoryTracking,true);
                }
            }
        }

        [XmlElement("Version")]
        public DatabaseVersionCollection Versions
        {
            get { return _databaseVersions; }
            set
            {
                if (_databaseVersions != value)
                {
                    _databaseVersions.PropertyChanged -= DatabaseVersionsPropertyChanged;
                    _databaseVersions = value;
                    _databaseVersions.PropertyChanged += DatabaseVersionsPropertyChanged;
                    FirePropertyChangedEvent(x => x.Versions);
                }
            }
        }

        [XmlIgnore]
        public virtual bool CanFullBuild { get { return true; } }

        [XmlIgnore]
        public virtual bool IsSaved
        {
            get { return _isSaved; }
            private set
            {
                if (_isSaved != value)
                {
                    _isSaved = value;
                    FirePropertyChangedEvent(x => x.IsSaved);
                }
            }
        }

        [XmlIgnore]
        public virtual bool IsEditable
        {
            get { return true; }
        }

        public virtual int BaseLineVersionNumber { get { return Versions.Where(v => v.IsBaseline).Select(v => v.VersionNumber).DefaultIfEmpty(int.MaxValue).FirstOrDefault(); } }

        public virtual bool HasBaseline { get { return Versions.Any(v => v.IsBaseline); } }

        public DatabaseVersion this[int versionId]
        {
            get
            {
                var version = Versions.FirstOrDefault(v => v.VersionNumber == versionId);
                if (version == null)
                {
                    throw new IndexOutOfRangeException();
                }
                return version;
            }
        }

        public virtual DatabaseVersion AddChangeset()
        {
            Versions.ForEach(v => v.IsEditable = false);

            int nextVersionNumber = Versions.Count > 0 ? Versions.Max(v => v.VersionNumber) + 1 : 1;

            var hightestVersion = Versions.OrderByDescending(v => v.VersionNumber).Take(1).FirstOrDefault();

            var newVersionIsTheBaseline = !HasBaseline && !DisableHistoryTracking;

            if ((hightestVersion == null) || (hightestVersion.HasStatements))
            {
                var databaseVersion = new DatabaseVersion(nextVersionNumber, DateTime.Now) { IsEditable = true, IsBaseline = newVersionIsTheBaseline };
                Versions.Add(databaseVersion);
                FirePropertyChangedEvent(x=>x.HasBaseline);
                FirePropertyChangedEvent(x=>x.BaseLineVersionNumber);

                return databaseVersion;
            }

            hightestVersion.VersionNumber = nextVersionNumber;
            hightestVersion.Created = DateTime.Now;
            hightestVersion.IsEditable = true;
            hightestVersion.IsBaseline = newVersionIsTheBaseline;

            return hightestVersion;
        }

        public virtual void MarkAsSaved()
        {
            IsSaved = true;
            Versions.MarkAsSaved();
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private void FirePropertyChangedEvent(Expression<Func<Database, object>> propertyNameFunc, bool makeNotSaved=false)
        {
            if (makeNotSaved)
            {
                IsSaved = false;
            }
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyNameFunc.GetMemberName()));
            }
        }

        private void DatabaseVersionsPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (e.PropertyName == GetIsSavedPropertyName() && !((DatabaseVersionCollection)sender).IsSaved)
            {
                IsSaved = false;
            }
        }

        private string GetIsSavedPropertyName()
        {
            return ((Expression<Func<Database, object>>)(x => x.IsSaved)).GetMemberName();
        }

        public virtual ICompiledSql CompileAllVersions(ICompiledSql compiledHistorySql)
        {
            var compiledDatabaseSql = new CompiledDatabaseSql(DbName, compiledHistorySql);
            foreach (var version in Versions)
            {
                bool includeHistory = version.VersionNumber >= BaseLineVersionNumber;
                var preDeployCompiledSql = version.CompileSql("", SqlStatementType.PreDeployment, includeHistory);
                var postDeployCompiledSql = version.CompileSql("", SqlStatementType.PostDeployment, includeHistory);
                compiledDatabaseSql.AddVersion(preDeployCompiledSql, postDeployCompiledSql);
            }

            return compiledDatabaseSql;
        }

    }
}


text:
using System;
using System.Diagnostics.Contracts;

namespace System.Collections
{

    public class Stack
    {

        public object SyncRoot
        {
          get;
        }

        public bool IsSynchronized
        {
          get;
        }

        public int Count
        {
          get
          {
            Contract.Ensures(Contract.Result<int>() >= 0);
          }
        }
        [Pure][Reads(ReadsAttribute.Reads.Owned)]
        public Object[] ToArray () {

          Contract.Ensures(Contract.Result<Object[]>() != null);
          return default(Object[]);
        }
        public static Stack Synchronized (Stack stack) {
            Contract.Requires(stack != null);

          return default(Stack);
        }
        public void Push (object obj) {
            Contract.Ensures(this.Count == old(this.Count)+1);

        }
        public object Pop () {
            Contract.Requires(this.Count > 0);
            Contract.Ensures(this.Count == old(this.Count)-1);

          return default(object);
        }
        public object Peek () {
            Contract.Requires(this.Count > 0);

          return default(object);
        }
        [Pure] [GlobalAccess(false)] [Escapes(true,false)]
        public IEnumerator GetEnumerator () {
            Contract.Ensures(result.IsNew);

          Contract.Ensures(Contract.Result<IEnumerator>() != null);
          return default(IEnumerator);
        }
        public void CopyTo (Array array, int index) {
          Contract.Requires(0 <= index && index < array.Length);
          Contract.Requires((array.Length - index) >= this.Count);

        }
        public bool Contains (object obj) {

          return default(bool);
        }
        public object Clone () {

          return default(object);
        }
        public void Clear () {

        }
        public Stack (ICollection col) {
            Contract.Requires(col != null);

          return default(Stack);
        }
        public Stack (int initialCapacity) {
            Contract.Requires(initialCapacity >= 0);

          return default(Stack);
        }
        public Stack () {
          return default(Stack);
        }
    }
}


text:
using System;
using System.Data.SqlClient;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.ServiceProcess;
using System.Threading;
using CommandLine;
using YoctoScheduler.Core;
using YoctoScheduler.Core.Database;
using System.Security;

namespace YoctoScheduler.ServiceHost
{
    public class ServiceHost : ServiceBase
    {
        private static EventLog ApplicationLog;
        private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(ServiceHost));

        static int Main(string[] args)
        {
            ApplicationLog = new EventLog();
            ApplicationLog.Source = "YoctoScheduler.ServiceHost";

            try
            {
                ApplicationLog.WriteEntry(String.Format(
                    "Pid {0} Invoked with arguments {1}.",
                    Process.GetCurrentProcess().Id,
                    String.Join(" ", args))
                    );
            }
            catch (SecurityException)
            {
                Console.WriteLine("First execution must be performed by a user with administrative privileges.");
                return (int)ExitCodes.APPLICATION_LOG_SECURITY_ERROR;
            }

            CommandLineOptions opts = new CommandLineOptions();
            if (!Parser.Default.ParseArguments(args, opts))
            {
                return (int)ExitCodes.ARGUMENT_ERROR;
            }

            ServiceHost service = null;

            try
            {
                string configFile = opts.ConfigurationFileName;

                if (!File.Exists(configFile))
                {
                    configFile = Path.Combine(
                        GetExecutableDirectory(),
                        Path.GetFileName(configFile)
                        );
                }

                ApplicationLog.WriteEntry(String.Format(
                    "Pid {0} loading configuration file {1}.",
                    Process.GetCurrentProcess().Id,
                    configFile
                    ));

                ServiceConfiguration config = ServiceConfiguration.FromJson(
                    File.ReadAllText(configFile)
                    );

                #region setup logging
                string log4netConfigFile = config.Log4NetConfigFile;

                if (!File.Exists(log4netConfigFile))
                {
                    log4netConfigFile = Path.Combine(
                        GetExecutableDirectory(),
                        Path.GetFileName(log4netConfigFile)
                        );
                }

                log4net.Config.XmlConfigurator.Configure(new FileInfo(log4netConfigFile));
                #endregion

                service = new ServiceHost(config);
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteEntry(String.Format(
                        "Pid {0} failed to read configuration file. Error: {1}",
                        Process.GetCurrentProcess().Id,
                        ex.Message),
                    EventLogEntryType.Error
                    );
                Console.WriteLine("Failed to read configuration file.");
                Console.WriteLine(ex.Message);
                return (int)ExitCodes.CONFIGURATION_ERROR;
            }

            if (Environment.UserInteractive)
            {
                service.OnStart(null);
                service.Terminated.WaitOne();
                service.OnStop();
            }
            else
            {
                ServiceBase.Run(service);
            }

            return (int)ExitCodes.SUCCESS;
        }

        #region Service implementation

        public static Server srvInstance;

        private ServiceConfiguration config;
        public ManualResetEvent Terminated;

        public ServiceHost(ServiceConfiguration config)
        {
            this.Terminated = new ManualResetEvent(false);
            this.config = config;
            this.ServiceName = config.ServiceName;
        }

        protected override void OnStart(string[] args)
        {
            log.InfoFormat(
                "Instance {0} v{0:S} started.",
                config.InstanceName,
                System.Reflection.Assembly.GetExecutingAssembly().GetName().Version
                );

            log.InfoFormat("Retrieving configuration.");
            using (SqlConnection conn = new SqlConnection(config.ConnectionString))
            {
                conn.Open();

                #region setup Configuration
                Server.Configuration = new Configuration(conn);
                #endregion

                using (var trans = conn.BeginTransaction())
                {
                    srvInstance = Server.New(
                        conn, trans,
                        config.ConnectionString,
                        String.Format("Instance {0}",config.InstanceName));

                    trans.Commit();
                }
            }

            #region Startup Owin WebAPI
            // Start OWIN host
            YoctoScheduler.WebAPI.Startup.ConnectionString = config.ConnectionString;
            var owin = Microsoft.Owin.Hosting.WebApp.Start<YoctoScheduler.WebAPI.Startup>(url: config.RestEndpoint);
            log.InfoFormat("WebAPI initilized at {0:S}", config.RestEndpoint);
            #endregion

            #region Startup Owin http
            // Start OWIN host
            YoctoScheduler.Web.Startup.wwwRoot = config.WwwRoot;
            owin = Microsoft.Owin.Hosting.WebApp.Start<YoctoScheduler.Web.Startup>(url: config.HttpEndpoint);
            log.InfoFormat("WebAPP initilized at {0:S}", config.HttpEndpoint);
            #endregion

            if (Environment.UserInteractive)
            {
                Thread consoleThread = new Thread(
                    new ThreadStart(ConsoleThreadRoutine)
                    );

                consoleThread.IsBackground = true;
                consoleThread.Start();
            }
        }

        private void ConsoleThreadRoutine()
        {
            Console.WriteLine("Program running, press <enter> to terminate the program.");
            Console.ReadLine();

            this.Terminated.Set();
        }

        protected override void OnStop()
        {
        }

        #endregion

        private static string GetExecutableDirectory()
        {
            return new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath;
        }

        private enum ExitCodes
        {
            SUCCESS = 0,
            ARGUMENT_ERROR = 1,
            CONFIGURATION_ERROR = 2,
            APPLICATION_LOG_SECURITY_ERROR = 3
        }

    }
}


text:
#include "catch.hpp"
#include "stream.hpp"
#include "TestConnection.hpp"
#include "gsl.h"
#include <sstream>
#include <algorithm>

using namespace std;
using namespace gsl;

static vector<ubyte> subscribeMsg(const std::string& topic, ushort msgId) {
    vector<ubyte> msg{0x8b}; //fixed header sans remaining length
    const auto remainingLength = topic.size() + 2 /*topic len*/ + 2 /*msgId*/ + 1 /*qos*/;
    msg.emplace_back(remainingLength);

    msg.emplace_back(msgId >> 8);
    msg.emplace_back(msgId & 0xff);

    msg.emplace_back(topic.size() >> 8);
    msg.emplace_back(topic.size() & 0xff);
    copy(topic.cbegin(), topic.cend(), back_inserter(msg));

    msg.emplace_back(0); //qos

    return msg;
}

int readInto(MqttStream& stream, span<const ubyte> bytes) {
    copy(bytes.cbegin(), bytes.cend(), stream.begin());
    return bytes.size();
}

TEST_CASE("MQTT in 2 packets") {
    MqttServer<TestConnection> server;
    TestConnection connection;
    MqttStream stream{128};

    const auto subscribe = subscribeMsg("top", 33);
    server.newMessage(connection, subscribe);

    const vector<ubyte> bytes1{
        0x3c, 15, //fixed header
        0x00, 0x03, 't', 'o', 'p', //topic name
        0x00, 0x21, //message ID
        1, 2, 3 //first part of payload
    };
    const vector<ubyte> bytes2{4, 5, 6, 7, 8}; //2nd part of payload

    const auto numBytes1 = readInto(stream, bytes1);
    stream.handleMessages(numBytes1, server, connection);
    REQUIRE(connection.payloads == vector<Payload>{});

    const auto numBytes2 = readInto(stream, bytes2);
    stream.handleMessages(numBytes2, server, connection);
    REQUIRE(connection.payloads == (vector<Payload>{{1, 2, 3, 4, 5, 6, 7, 8}}));
}

TEST_CASE("Broken header and two messages") {
    MqttServer<TestConnection> server;
    TestConnection connection;
    MqttStream stream{128};

    connection.connected = true; //easier than sending conneciton packet

    const auto subscribe = subscribeMsg("top", 33);
    server.newMessage(connection, subscribe);

    const vector<ubyte> bytes1{0x3c}; //half of header
    const vector<ubyte> bytes2{
        15, //2nd half of fixed header
        0x00, 0x03, 't', 'o', 'p', //topic name
        0x00, 0x21, //message ID
        1, 2, 3, 4, 5, 6, 7, 8,
        0xe0, 0, //header for disconnect
    };

    const auto numBytes1 = readInto(stream, bytes1);
    stream.handleMessages(numBytes1, server, connection);
    REQUIRE(connection.payloads == vector<Payload>{});
    REQUIRE(connection.connected == true);

    const auto numBytes2 = readInto(stream, bytes2);
    stream.handleMessages(numBytes2, server, connection);
    REQUIRE(connection.payloads == (vector<Payload>{{1, 2, 3, 4, 5, 6, 7, 8}}));
    REQUIRE(connection.connected == false);
}

TEST_CASE("bug from rust impl") {
    MqttServer<TestConnection> server;
    TestConnection connection;
    MqttStream stream{128};

    connection.connected = true; //easier than sending conneciton packet

    const vector<ubyte> bytes{48, 30, 0, 12, 108, 111, 97, 100, 116, 101, 115, 116, 47, 49, 54, 54};
    const auto numBytes = readInto(stream, bytes);
    stream.handleMessages(numBytes, server, connection);
    REQUIRE(connection.payloads == vector<Payload>{});
}

TEST_CASE("bug header size") {
    MqttServer<TestConnection> server;
    TestConnection connection;
    MqttStream stream{128};

    const auto subscribe = subscribeMsg("top", 33);
    server.newMessage(connection, subscribe);

    const vector<ubyte> bytes1{
        0x3c, 10, //fixed header
        0x00, 0x03, 't', 'o', 'p', //topic name
        0x00, 0x21, //message ID
        1, 2, 3, //payload
        0x3c, 15 //fixed header of the 2nd msg
    };
    const vector<ubyte> bytes2{
        0x00, 0x03, 't', 'o', 'p', //topic name
        0x00, 0x21, //message ID
        1, 2, 3, 4, 5, 6, 7, 8 //payload
   };

    const auto numBytes1 = readInto(stream, bytes1);
    stream.handleMessages(numBytes1, server, connection);
    const auto numBytes2 = readInto(stream, bytes2);
    stream.handleMessages(numBytes2, server, connection);

    REQUIRE(connection.payloads == (vector<Payload>{{1, 2, 3}, {1, 2, 3, 4, 5, 6, 7, 8}}));
}


text: Dockerfile for the OpenAM Nightly Build


text:
describe RuboCop::Cop::Lint::DuplicateCaseCondition do
  subject(:cop) { described_class.new }

  it 'registers an offense for repeated case conditionals' do
    inspect_source(cop, ['case x',
                         'when false',
                         '  first_method',
                         'when true',
                         '  second_method',
                         'when false',
                         '  third_method',
                         'end'])
    expect(cop.offenses.size).to eq(1)
  end

  it 'registers an offense for subsequent repeated case conditionals' do
    inspect_source(cop, ['case x',
                         'when false',
                         '  first_method',
                         'when false',
                         '  second_method',
                         'end'])
    expect(cop.offenses.size).to eq(1)
  end

  it 'registers multiple offenses for multiple repeated case conditionals' do
    inspect_source(cop, ['case x',
                         'when false',
                         '  first_method',
                         'when true',
                         '  second_method',
                         'when false',
                         '  third_method',
                         'when true',
                         '  fourth_method',
                         'end'])
    expect(cop.offenses.size).to eq(2)
  end

  it 'registers multiple offenses for repeated multi-value condtionals' do
    inspect_source(cop, ['case x',
                         'when a, b',
                         '  first_method',
                         'when b, a',
                         '  second_method',
                         'end'])
    expect(cop.offenses.size).to eq(2)
  end

  it 'registers an offense for repeated logical operator when expressions' do
    inspect_source(cop, ['case x',
                         'when a && b',
                         '  first_method',
                         'when a && b',
                         '  second_method',
                         'end'])
    expect(cop.offenses.size).to eq(1)
  end

  it 'accepts trivial case expressions' do
    inspect_source(cop, ['case x',
                         'when false',
                         '  first_method',
                         'end'])
    expect(cop.messages).to be_empty
  end

  it 'accepts non-redundant case expressions' do
    inspect_source(cop, ['case x',
                         'when false',
                         '  first_method',
                         'when true',
                         '  second_method',
                         'end'])
    expect(cop.messages).to be_empty
  end

  it 'accepts non-redundant case expressions with an else expression' do
    inspect_source(cop, ['case x',
                         'when false',
                         '  method_name',
                         'when true',
                         '  second_method',
                         'else',
                         '  third_method',
                         'end'])
    expect(cop.messages).to be_empty
  end

  it 'accepts similar but not equivalent && expressions' do
    inspect_source(cop, ['case x',
                         'when something && another && other',
                         '  first_method',
                         'when something && another',
                         '  second_method',
                         'end'])
    expect(cop.messages).to be_empty
  end
end


text:
//%2005////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
// IBM Corp.; EMC Corporation, The Open Group.
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
// EMC Corporation; VERITAS Software Corporation; The Open Group.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//==============================================================================
//
// Author: Michael E. Brasher
//
//%=============================================================================

#ifndef _StripCmd_h
#define _StripCmd_h

#include "Config.h"
#include <string>
#include <vector>

////////////////////////////////////////////////////////////////////////////////
//
// Usage: strip start-pattern end-pattern filenames...
//
// Strip removes all line between a starting and ending pattern.
// Consider this file for example called myfile.txt
//
//     This is line one
//     This is line two
//     Start blah blah blah
//     This is line three
//     End blah blah blah
//     This is line four
//
// The following removes all lines between the line which begins
// with "Start" and ends with "End":
//
//     mu strip Start End myfile.txt
//
// The resulting file looks like this:
//
//     This is line one
//     This is line two
//     This is line four
//
////////////////////////////////////////////////////////////////////////////////

int StripCmd(const vector<string>& args);

#endif /* _StripCmd_h */


text:
package com.erc.dal.upgrade;

import android.content.Context;

import com.erc.dal.SQLiteDatabaseManager;
import com.erc.dal.Util;

/**
 * Created by einar on 10/18/2015.
 */
public class DBConfig {
    private String dataBaseName;
    private int version;
    private int currentVersionCache;
    private long tableCountCache;
    private String url;
    private Context context;
    private String packageFilter;
    private UpgradeListener upgradeListener;

    public DBConfig(Context context, String dataBaseName, int version, String url) {
        this.context = context;
        this.dataBaseName = dataBaseName;
        this.version = version;
        setUrl(url);
        if (Util.isNullOrEmpty(dataBaseName)) {
            this.dataBaseName = SQLiteDatabaseManager.getDataBaseName(context);
        }
    }

    public UpgradeListener getUpgradeListener() {
        return upgradeListener;
    }

    public void setOnUpgradeListener(UpgradeListener upgradeListener) {
        this.upgradeListener = upgradeListener;
    }

    public Context getContext() {
        return context;
    }

    public void setContext(Context context) {
        this.context = context;
    }

    public String getDataBaseName() {
        return dataBaseName;
    }

    public void setDataBaseName(String dataBaseName) {
        this.dataBaseName = dataBaseName;
    }

    public int getVersion() {
        return version;
    }

    int getCurrentVersionCache() {
        return currentVersionCache;
    }

    void setCurrentVersionCache(int currentVersionCache) {
        this.currentVersionCache = currentVersionCache;
    }

    public long getTableCountCache() {
        return tableCountCache;
    }

    public void setTableCountCache(long tableCountCache) {
        this.tableCountCache = tableCountCache;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        if (url == null) {
            url = "";
        }
        this.url = url.replaceAll("/$", "");
    }

    public String getPackageFilter() {
        return packageFilter;
    }

    public void setPackageFilter(String packageFilter) {
        this.packageFilter = packageFilter;
    }
}


text:
    Bridge.define("System.Console", {
        statics: {
            methods: {
                Write: function (value) {
                    var con = Bridge.global.console;

                    if (con && con.log) {
                        con.log(!Bridge.isDefined(Bridge.unbox(value)) ? "" : Bridge.unbox(value));
                    }
                },
                WriteLine: function (value) {
                    var con = Bridge.global.console;

                    if (con && con.log) {
                        con.log(!Bridge.isDefined(Bridge.unbox(value)) ? "" : Bridge.unbox(value));
                    }
                },
                TransformChars: function (buffer, all, index, count) {
                    if (all !== 1) {
                        if (buffer == null) {
                            throw new System.ArgumentNullException.$ctor1("buffer");
                        }

                        if (index < 0) {
                            throw new System.ArgumentOutOfRangeException.$ctor4("index", "less than zero");
                        }

                        if (count < 0) {
                            throw new System.ArgumentOutOfRangeException.$ctor4("count", "less than zero");
                        }

                        if (((index + count) | 0) > buffer.length) {
                            throw new System.ArgumentException.$ctor1("index plus count specify a position that is not within buffer.");
                        }
                    }

                    var s = "";
                    if (buffer != null) {
                        if (all === 1) {
                            index = 0;
                            count = buffer.length;
                        }

                        for (var i = index; i < ((index + count) | 0); i = (i + 1) | 0) {
                            s = (s || "") + String.fromCharCode(buffer[System.Array.index(i, buffer)]);
                        }
                    }

                    return s;
                },
                Clear: function () {
                    var con = Bridge.global.console;

                    if (con && con.clear) {
                        con.clear();
                    }
                }
            }
        }
    });


text:
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">

<part>

    <copyright>
      <year>2002</year><year>2013</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

    </legalnotice>

    <title>IDL to Erlang language Mapping</title>
    <prepared></prepared>
    <docno></docno>
    <date>2002-06-25</date>
    <rev>A</rev>

  <description>

Tjosan Erlang

  </description>
  <include file="ch_erl_plain"></include>
  <include file="ch_erl_genserv"></include>
</part>


text:
package kieker.tools.slastic.metamodel.core.impl;

import kieker.tools.slastic.metamodel.core.CorePackage;
import kieker.tools.slastic.metamodel.core.NamedEntity;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 *
 * An implementation of the model object 'Named Entity'.
 *
 *

 * The following features are implemented:
 *

 *
{@link kieker.tools.slastic.metamodel.core.impl.NamedEntityImpl#getName Name}

 *

 *

 *
 * @generated
 */
public class NamedEntityImpl extends EntityImpl implements NamedEntity {
	/**
	 * The default value of the '{@link #getName() Name}' attribute.
	 *
	 *
	 * @see #getName()
	 * @generated
	 * @ordered
	 */
	protected static final String NAME_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getName() Name}' attribute.
	 *
	 *
	 * @see #getName()
	 * @generated
	 * @ordered
	 */
	protected String name = NAME_EDEFAULT;

	/**
	 *
	 *
	 * @generated
	 */
	protected NamedEntityImpl() {
		super();
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return CorePackage.Literals.NAMED_ENTITY;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public String getName() {
		return name;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setName(String newName) {
		String oldName = name;
		name = newName;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.NAMED_ENTITY__NAME, oldName, name));
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case CorePackage.NAMED_ENTITY__NAME:
				return getName();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case CorePackage.NAMED_ENTITY__NAME:
				setName((String)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case CorePackage.NAMED_ENTITY__NAME:
				setName(NAME_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case CorePackage.NAMED_ENTITY__NAME:
				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
		}
		return super.eIsSet(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (name: ");
		result.append(name);
		result.append(')');
		return result.toString();
	}

} //NamedEntityImpl


text:
// Read-only ROM filesystem

#ifndef __FS_H__
#define __FS_H__

#include "type.h"
#include "devman.h"

/*******************************************************************************
The Read-Only "filesystem" resides in a contiguous zone of memory, with the
following structure (repeated for each file):

Filename: ASCIIZ, max length is DM_MAX_FNAME_LENGTH, first byte is 0xFF if last file
File size: (4 bytes), aligned to ROMFS_ALIGN bytes
File data: (file size bytes)

The WOFS (Write Once File System) uses much of the ROMFS functions, thuss it is
also implemented in romfs.c. It resides in a contiguous zone of memory, with a
structure that is quite similar with ROMFS' structure (repeated for each file):

Filename: ASCIIZ, max length is DM_MAX_FNAME_LENGTH, first byte is 0xFF if last file.
          WOFS filenames always begin at an address which is a multiple of ROMFS_ALIGN.
File deleted flag: (WOFS_DEL_FIELD_SIZE bytes), aligned to ROMFS_ALIGN bytes
File size: (4 bytes), aligned to ROMFS_ALIGN bytes
File data: (file size bytes)

*******************************************************************************/

enum
{
  FS_FILE_NOT_FOUND,
  FS_FILE_OK
};

// ROMFS/WOFS functions
typedef u32 ( *p_fs_read )( void *to, u32 fromaddr, u32 size, const void *pdata );
typedef u32 ( *p_fs_write )( const void *from, u32 toaddr, u32 size, const void *pdata );

// File flags
#define ROMFS_FILE_FLAG_READ      0x01
#define ROMFS_FILE_FLAG_WRITE     0x02
#define ROMFS_FILE_FLAG_APPEND    0x04

// A small "FILE" structure
typedef struct
{
  u32 baseaddr;
  u32 offset;
  u32 size;
  u8 flags;
} FD;

// WOFS constants
// The miminum size we need in order to create another file
// This size will be added to the size of the filename when creating a new file
// to ensure that there's enough space left on the device
// This comes from the size of the file length field (4) + the maximum number of
// bytes needed to align this field (3) + a single 0xFF byte which marks the end
// of the filesystem (1) + the maximum number of bytes needed to align the contents
// of a file (3)
#define WOFS_MIN_NEEDED_SIZE      11

// Filesystem flags
#define ROMFS_FS_FLAG_DIRECT      0x01    // direct mode (the file is mapped in a memory area directly accesible by the CPU)
#define ROMFS_FS_FLAG_WO          0x02    // this FS is actually a WO (Write-Once) FS
#define ROMFS_FS_FLAG_WRITING     0x04    // for WO only: there is already a file opened in write mode

// File system descriptor
typedef struct
{
  u8 *pbase;                      // pointer to FS base in memory (only for ROMFS_FS_FLAG_DIRECT)
  u8 flags;                       // flags (see above)
  p_fs_read readf;                // pointer to read function (for non-direct mode FS)
  p_fs_write writef;              // pointer to write function (only for ROMFS_FS_FLAG_WO)
  u32 max_size;                   // maximum size of the FS (in bytes)
} FSDATA;

#define romfs_fs_set_flag( p, f )     p->flags |= ( f )
#define romfs_fs_clear_flag( p, f )   p->flags &= ( u8 )~( f )
#define romfs_fs_is_flag_set( p, f )  ( ( p->flags & ( f ) ) != 0 )

// FS functions
int romfs_init();
int wofs_format();

#endif


text:
Postcode Address File Tools
===========================

Python tools for interacting with the data provided by the UK Royal Mail in
their Postcode Address File.

Before using this, you will need to purchase a licence for the PAF (or
qualify for an exemption from the price of a licence).

PAF Mainfile
------------

In the UK, the Royal Mail has ownership of the database containing every
address and postcode. They provide this to individuals and businesses who
pay for a licence for the data.

It is provided in a number of formats, the standard format being the
"Mainfile" database. This is a series of text files containing various
types of data which comprise UK addresses.

Due to the way it is structured, a lot of data has to be parsed and stored or
represented in a more sensible way than it appears in the PAF. This project
provides some tools to extract the data from the PAF and to construct an SQL
database from it.

Tools
-----

The aim is to provide all of the following tools to aid users wishing to
access the PAF data:-

* PAF parser;
* Database constructor; and
* A lookup API.

I may have more ideas which I want to add later. I welcome any suggestions
for other tools and features to add.


text:
/**
 * @module dynamo-easy
 */
import { SessionValidityEnsurer } from './session-validity-ensurer.type'

/**
 * A simple no-op function which tells that we always have a valid session, which obviously requires some valid
 * session checking and also renewing of a potentially expired (or non existing) session
 */
export const DEFAULT_SESSION_VALIDITY_ENSURER: SessionValidityEnsurer = () => Promise.resolve()


text:
package org.javacint.console;

import java.io.InputStream;
import java.io.PrintStream;
import org.javacint.email.Email;
import org.javacint.email.EmailSender;
import org.javacint.task.Timers;

/**
 * Email command.
 */
public class EmailCommand implements ConsoleCommand {

    public boolean consoleCommand(String command, InputStream is, PrintStream out) {
        if (command.equals("email")) {
            Email email = new Email();
            out.println("From: ");
            email.from = Console.readLine(is, out);
            out.println("");
            out.println("To: ");
            email.to = Console.readLine(is, out);
            out.println("");
            out.println("Subject: ");
            email.subject = Console.readLine(is, out);
            out.println("");
            out.println("Content:");
            {
                StringBuffer sb = new StringBuffer();
                String line;
                while ((line = Console.readLine(is, out)).length() > 0) {
                    sb.append(line);
                    sb.append('\n');
                    out.println("");
                }
                email.message = sb.toString();
            }
            out.println("");
            out.println("Server: ");
            String server = Console.readLine(is, out);
            EmailSender sender = new EmailSender(server, email);
            out.println("Sending...");
            Timers.getSlow().schedule(sender, 0);
            return true;
        } else if (command.equals("help")) {
            out.println("[HELP] email                            - Send an email");
        }
        return false;
    }
}


text:
package com.fasterxml.jackson.databind.util;

import com.fasterxml.jackson.databind.AnnotationIntrospector;
import com.fasterxml.jackson.databind.PropertyName;
import com.fasterxml.jackson.databind.cfg.MapperConfig;
import com.fasterxml.jackson.databind.introspect.AnnotatedField;
import com.fasterxml.jackson.databind.introspect.AnnotatedMember;
import com.fasterxml.jackson.databind.introspect.AnnotatedMethod;
import com.fasterxml.jackson.databind.introspect.AnnotatedParameter;
import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition;

public class SimpleBeanPropertyDefinition extends BeanPropertyDefinition
{
  protected final AnnotationIntrospector _introspector;
  protected final AnnotatedMember _member;
  protected final String _name;

  @Deprecated
  public SimpleBeanPropertyDefinition(AnnotatedMember paramAnnotatedMember)
  {
    this(paramAnnotatedMember, paramAnnotatedMember.getName(), null);
  }

  @Deprecated
  public SimpleBeanPropertyDefinition(AnnotatedMember paramAnnotatedMember, String paramString)
  {
    this(paramAnnotatedMember, paramString, null);
  }

  private SimpleBeanPropertyDefinition(AnnotatedMember paramAnnotatedMember, String paramString, AnnotationIntrospector paramAnnotationIntrospector)
  {
    this._introspector = paramAnnotationIntrospector;
    this._member = paramAnnotatedMember;
    this._name = paramString;
  }

  public static SimpleBeanPropertyDefinition construct(MapperConfig<?> paramMapperConfig, AnnotatedMember paramAnnotatedMember)
  {
    String str = paramAnnotatedMember.getName();
    AnnotationIntrospector localAnnotationIntrospector;
    if (paramMapperConfig == null)
      localAnnotationIntrospector = null;
    else
      localAnnotationIntrospector = paramMapperConfig.getAnnotationIntrospector();
    return new SimpleBeanPropertyDefinition(paramAnnotatedMember, str, localAnnotationIntrospector);
  }

  public static SimpleBeanPropertyDefinition construct(MapperConfig<?> paramMapperConfig, AnnotatedMember paramAnnotatedMember, String paramString)
  {
    AnnotationIntrospector localAnnotationIntrospector;
    if (paramMapperConfig == null)
      localAnnotationIntrospector = null;
    else
      localAnnotationIntrospector = paramMapperConfig.getAnnotationIntrospector();
    return new SimpleBeanPropertyDefinition(paramAnnotatedMember, paramString, localAnnotationIntrospector);
  }

  public AnnotatedMember getAccessor()
  {
    AnnotatedMethod localAnnotatedMethod = getGetter();
    Object localObject = localAnnotatedMethod;
    if (localAnnotatedMethod == null)
      localObject = getField();
    return localObject;
  }

  public AnnotatedParameter getConstructorParameter()
  {
    if ((this._member instanceof AnnotatedParameter))
      return (AnnotatedParameter)this._member;
    return null;
  }

  public AnnotatedField getField()
  {
    if ((this._member instanceof AnnotatedField))
      return (AnnotatedField)this._member;
    return null;
  }

  public AnnotatedMethod getGetter()
  {
    if (((this._member instanceof AnnotatedMethod)) && (((AnnotatedMethod)this._member).getParameterCount() == 0))
      return (AnnotatedMethod)this._member;
    return null;
  }

  public String getInternalName()
  {
    return getName();
  }

  public AnnotatedMember getMutator()
  {
    AnnotatedParameter localAnnotatedParameter = getConstructorParameter();
    Object localObject = localAnnotatedParameter;
    if (localAnnotatedParameter == null)
    {
      AnnotatedMethod localAnnotatedMethod = getSetter();
      localObject = localAnnotatedMethod;
      if (localAnnotatedMethod == null)
        localObject = getField();
    }
    return localObject;
  }

  public String getName()
  {
    return this._name;
  }

  public AnnotatedMember getPrimaryMember()
  {
    return this._member;
  }

  public AnnotatedMethod getSetter()
  {
    if (((this._member instanceof AnnotatedMethod)) && (((AnnotatedMethod)this._member).getParameterCount() == 1))
      return (AnnotatedMethod)this._member;
    return null;
  }

  public PropertyName getWrapperName()
  {
    if (this._introspector == null)
      return null;
    return this._introspector.findWrapperName(this._member);
  }

  public boolean hasConstructorParameter()
  {
    return this._member instanceof AnnotatedParameter;
  }

  public boolean hasField()
  {
    return this._member instanceof AnnotatedField;
  }

  public boolean hasGetter()
  {
    return getGetter() != null;
  }

  public boolean hasSetter()
  {
    return getSetter() != null;
  }

  public boolean isExplicitlyIncluded()
  {
    return false;
  }

  public SimpleBeanPropertyDefinition withName(String paramString)
  {
    if (this._name.equals(paramString))
      return this;
    return new SimpleBeanPropertyDefinition(this._member, paramString, this._introspector);
  }
}

/* Location:           /Users/vikas/Documents/Mhacks_Real_app/classes-dex2jar.jar
 * Qualified Name:     com.fasterxml.jackson.databind.util.SimpleBeanPropertyDefinition
 * JD-Core Version:    0.6.2
 */


text:
package gov.nih.nci.cabig.caaers;

import gov.nih.nci.cabig.caaers.security.SecurityTestUtils;

import java.util.ArrayList;
import java.util.List;

import org.acegisecurity.afterinvocation.AfterInvocationProvider;
/**
 *
 * @author Biju Joseph
 *
 */
public class CaaersDbNoSecurityTestCase extends CaaersDbTestCase {
	protected static AfterInvocationProvider stubProvider;
	protected static List<AfterInvocationProvider> stubProviders = new ArrayList<AfterInvocationProvider>();

	@SuppressWarnings("unchecked")
	@Override
	protected void setUp() throws Exception {
		super.setUp();
		SecurityTestUtils.enableAuthorization(false, applicationContext);
	}
}


text:
package com.ns.greg.library.fasthook.annotaion;

import android.support.annotation.IntDef;
import com.ns.greg.library.fasthook.HookPlugins;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * @author Gregory
 * @since 2018/1/24
 */

@IntDef({ HookPlugins.UI_THREAD, HookPlugins.CURRENT_THREAD }) @Retention(RetentionPolicy.SOURCE)
public @interface ObserverOn {
}


text:
\section{Introduction}\label{sec:introduction}

The quest for improved modularity, variability and extensibility of
programs has been going on since the early days of Software
Engineering~\cite{McIlroy68}. Modern Programming Languages (PLs) enable a certain
degree of modularity, but they have limitations as illustrated by
well-known problems such as the Expression Problem~\cite{wadler1998expression}. The
Expression Problem refers to the difficulty of writing data
abstractions that can be easily extended with both new operations and
new data variants. Traditionally the kinds of data abstraction found
in functional languages can be extended with new operations, but
adding new data variants is difficult. The traditional object-oriented
approach to data abstraction facilitates adding new data variants
(classes), while adding new operations is more difficult.

\begin{comment}
A reason why a solution to the Expression Problem is important in
practice is that it is necessary for the development of
\emph{Software-Product Lines} (SPLs)~\cite{}. A software-product line
is a reusable set of components, which can be combined in multiple ways
to obtain different programs. Programming languages offer a concrete
example for SPLs. A SPL for programming languages would allow us to
model various typical operations of programming languages (such as
evaluation, compilation, or parsing) for various different language
constructs (such as binding, arithmetic, conditional or loops)
independently and separately. For example, evaluation components could be defined
independently for binding and arithmetic constructs. If the language
to be implemented is the pure lambda calculus, only evaluation of
binding constructs is necessary. However, more realistic programming
languages will include arithmetic constructs, and will require
evaluation for such constructs as well. In this case
both the component for evaluation of binders and arithmetic
expressions can be combined to implement the desired functionality.
\end{comment}

\begin{comment}
Most programming languages share alot of features in
common.

For example, most languages have language constructs for:
binding (such as variables, functions, and function applications);
basic arithmetic operations; basic logic and conditional operations;
loops; as well as various other features. For each language construct,
various operations (such as evaluation, compilation, or parsing) need
to be implemented. It is reasonable to wonder whether we can simply
implement those features independently of a particular implementation
of a programming language. Evaluation could be defined independently
for binding and arithmetic constructs. If the language to be
implemented is the pure lambda calculus, only evaluation of binding
constructs is necessary. Thus only the component that implements
evaluation for binding needs to be used in such an implementation.
However, more realistic programming languages
will include arithmetic constructs, and will require an evaluation
function for those.

Then it would be possible to \emph{reuse}
some of those features in \emph{multiple} different implementations of
programming languages. Essentially, this would enable a SPL for
programming languages, where all

A solution to the Expression Problem could ena

A concrete
example that illustrates this issue is
\end{comment}

To address the modularity limitations of Programming Languages, several
different approaches have been proposed in the past. Existing
approaches can be broadly divided into two categories:
\emph{syntactic} or \emph{semantic} modularization
techniques. Syntactic modularization techniques are quite popular in
practice, due to their simplicity of implementation and use.
Examples include many tools for developing Feature-Oriented Software-Product
Lines (SPLs)~\cite{AK:JOT09,Kastner11road}, some Language Workbenches~\cite{Erdweg201524}, or extensible parser
generators~\cite{antlr1995,Grimm2006,Gouseti2014,Warth2016}.  Most syntactic approaches employ textual
composition techniques such as \emph{superimposition}~\cite{AK:JOT09} to
enable the development modular program features. Such
composition techniques collect the code for multiple features and
merge them together when a concrete combination of features is needed
for a particular program. As Kastner et. al~\cite{Kastner11road} note,
a typical drawback of feature-oriented SPL implementations, which
more generally applies to syntactic modularity approaches, is that
such ``\emph{implementation mechanisms lack proper
  interfaces and support neither modular type checking nor separate
  compilation}''.

Syntactic modularization techniques have also been applied to the
problem of \emph{extensible parsing}. There are several approaches
that enable the development of \emph{syntactically} modular parsers or
grammars. Many parser
generators~\cite{antlr1995,Grimm2006,Gouseti2014,Warth2016} support
modular grammars. For instance, \textit{Rats!}~\cite{Grimm2006} has
its own module system for the collection of grammars.  Extensible
compilers like JastAdd~\cite{Ekman2007} and
Polyglot~\cite{Nystrom2003} also support extensible parsing, but this
is mostly done ultimately resorting to standard (non-modular) parser
generators. Various techniques supporting languages that can extend
their own syntax, such as SugarJ~\cite{Erdweg2011}, also offer a form
of extensible parsing. However since those approaches are syntactic
they do not support separate compilation and/or modular type-checking
of parsing code either.

Semantic modularization techniques go one step further in terms of modularity,
and also enable components or features to be modularly type-checked
and separately compiled. Modular type-checking and separate
compilation are desirable properties to have from a software
engineering point-of-view. Modular type-checking can report errors
earlier and in terms of the modular code programmers have written
in the first place. Separate compilation avoids global compilation
steps, which can be very costly. Furthermore semantic modularization
enables the composition of compiled binaries as well as ensuring the
type-safety of the code composed of multiple components. Examples of semantic modularization techniques
include various approaches to \emph{family polymorphism}~\cite{ernst01FP},
\emph{virtual classes}~\cite{Ernst:2006}, as
well as various techniques for solving the Expression
Problem~\cite{torgersen2004expression,odersky2005independently,Oliveira:2012,wang2016expression}.
Semantic modularization techniques are less widely used in practice
than syntactic techniques. This is partly due to the perceived need for more
sophisticated type systems, which are not available in mainstream
languages and may require more knowledge from users. However, recently,
several lightweight modularization techniques have been shown to work
in mainstream programming languages like Java or Scala. Object
Algebras~\cite{Oliveira:2012} are one such technique, which works in
Java-like languages and uses simple generics only.

So far research on semantic modularization techniques has focused on
operations that \emph{traverse} or \emph{process} extensible
data structures, such as ASTs. Indeed many documented applications of
semantic modularization techniques focus on modularizing various
aspects of PL implementations.  However, as far as we know, there is
little work on operations that build/produce ASTs.  In particular the
problem of how to modularize parsing has not been studied in semantic
modularization approaches. At best, techniques such as NOA~\cite{Gouseti2014}
employ a syntactic modularity approach for parsing in combination with
a semantic modularity approach for defining other language components
that traverse or process ASTs. This is a shame because parsing is a
fundamental part of PL implementations, and it ought to be made
semantically modular as well, so that the full benefits of semantic
modularity apply.

%\paragraph{Modular and Extensible Parsing}

This paper presents a technique for doing semantically
modular parsing.  That is, our approach not only allows complete
parsers to be built out of modular parsing components, but also enables
those parsing components to be \emph{modularly type-checked} and
\emph{separately compiled}. Developing techniques for modular parsing
is not without challenges. In developing our techniques we encountered
two different classes of challenges: algorithmic challenges; and
typing/reuse challenges.

\paragraph{Algorithmic Challenges} A first challenge was to do with
  the parsing algorithms themselves. Since many parsing formalisms
  were not designed with extensibility in mind, some of the employed
  techniques were non-modular, or performed poorly in a modular
  setting.  The most widely use tools for parsing are parser
  generators, but most algorithms employed by parser generators
  require full information about the grammar to generate parsing
  code. Moreover, actions associated with grammar productions are
  typically only type-checked after the parser has been
  generated. Both problems go against our goals of semantic
  modularity.

  An alternative to parser generators are \emph{parser
    combinators}~\cite{burge1975,Wadler1985}.  At a first look, parser
  combinators seem very suitable for our purpose. Each parser
  combinator is represented by a piece of code directly in the
  programming language. Thus, in a statically typed programming
  language, such code is statically type-checked.  However many
  techniques regularly employed by parser combinators cause difficulties in a
  modular setting. In particular, many parser combinator approaches
  (including Parsec~\cite{Leijen2001}) routinely use \emph{left-recursion
    elimination}, \emph{priority-based matching}, and \emph{avoid
    backtracking} as much as possible. All of these are problematic in
  a modular setting as illustrated in Section~\ref{subsec:challenges}.

  To address such algorithmic challenges, we propose a methodology
  for implementing modular parsers built on top of an
  existing Packrat~\cite{Ford2002} parsing library for Scala~\cite{odersky2004overview}. The Packrat parsing library
  directly supports left-recursion, and a \emph{longest-match
    composition} operator. The direct support for left-recursion
  avoids the need for left-recursion elimination, which is very
  cumbersome is a modular setting. The longest-match composition
  operator avoids the use of priorities, and it provides reasonably
  efficient optimizations for backtracking.

  \paragraph{Typing and Reusability Challenges} The second class of
  challenges was problems related to modularity, reusability and
  typing of parsing code. An immediate concern is how to extend a
  parser for an existing language or, more generally, how to compose
  parsing code for two languages. It turns out that OO mechanisms that
  provide some form of multiple inheritance,
  such as traits/mixins~\cite{Bracha1990,Scharli2003}, are very handy for this
  purpose. Essentially, traits/mixins can act as modules for the parsing code
  of different languages. This enables an approach where ASTs can be
  modelled using standard OO techniques such as the {\sc Composite}
  pattern, while retaining the possibility of adding new language
  constructs. Section~\ref{sec:inheritance} gives the details of this approach.

  Our ultimate goal is to allow for full extensibility: it should be
  possible to modularly add not only new language constructs, but
  also new operations. To accomplish this goal one final tweak on our
  technique is to employ Object Algebras to allow fully extensible
  ASTs. Thus a combination of Packrat parsing, multiple inheritance
  and Object Algebras enables a solution for semantically modular
  parsing. Section~\ref{sec:algebrasandparsing} gives the details of the complete approach.

\begin{comment}
  By analising the \emph{full} grammar it is possible to remove
  backtracking, which would otherwise increase parsing times. Many
  parsing combinator libraries routinely use backtracting elimination
  to achieve performance. However, in a modular setting this technique
  cannot be used, because the full grammar is not known. Thus we have
  to be very conservative at eliminating backtracting. Unfortunatelly,
  this has a severe impact on performance.
\end{comment}

To evaluate our approach we conduct a case study based on the ``Types
and Programming Languages'' (TAPL) interpreters. The case study shows
that our approach is effective at reusing parsing code from existing
interpreters, and the total parsing code is 69\% shorter than an
existing code base using non-modular parsing code\footnote{https://github.com/ilya-klyuchnikov/tapl-scala/}.

In summary our contributions are:

\begin{itemize}[noitemsep,nolistsep]

\item {{\bf A Technique for Modular Parsing:}} We present a technique
that allows the development of semantically modular parsers.
The technique relies on the combination of Packrat parsing, multiple inheritance
  and Object Algebras.

\item {{\bf A Parsing Technique for OO ASTs:}} A simplified version of
  our technique also enables parsing OO-style ASTs, where new language
  constructs can be easily added.

\item {{\bf A Methodology for Writing Modular Parsing Code:}} We
  identify possible pitfalls using parser combinators. To avoid such
  pitfalls, we propose guidelines for writing parsing code using
  \emph{left-recursion} and \emph{longest-match composition}.

\item {{\bf TAPL case study:}} We conduct a case study with 18 interpreters
  from the TAPL book. The case study show the effectiveness of modular
  parsing in terms of reuse. The TAPL case study is available online
  at:
  \url{http://}\footnote{{\bf Note to Reviewers:} Please find the URL in the
  supplementary material for the submission.}

\end{itemize}

All the code in the paper and the case study is written in Scala. But,
other languages that support some form of multiple inheritance
(including Java 8 with default methods~\cite{Goetz2012}) could in principle be
used. Our choice for Scala had to do with the concise and elegant syntax
of the language which enables a clear presentation of our ideas.


text:
<?php
if ($isindex)
{

$sql = 'SELECT * FROM ausgeliehen';
$adressen_query = db::get()->query($sql) or die("Anfrage nicht erfolgreich");
$anzahl = mysqli_num_rows($adressen_query);
echo "Es wurden $anzahl ausgeliehen Exemplare untersucht!

";

while ($adr = mysqli_fetch_array($adressen_query)){

if ($adr["timestamp"] != 0){
$neue = abgabe($adr["timestamp"],$adr["ausleihzeit"]);
if($neue < time())
{
$erg = time() - $neue;
$two = $erg / 86400;

$sql = 'SELECT * FROM benutzer WHERE mbrid = "'.$adr["mbrid"].'"';
$adressen_query2 = db::get()->query($sql) or die("Anfrage nicht erfolgreich");
while ($adr2 = mysqli_fetch_array($adressen_query2)){

echo "Der Benutzer '".$adr2["first_name"] .  " " . $adr2["last_name"] . "' ";
echo "ist ".abgabe($neue,$two,true)." Tage �berf�llig!
";

$sql = 'SELECT * FROM medien WHERE bibid = "'.$adr["bibid"].'"';
$adressen_query3 = db::get()->query($sql) or die("Anfrage nicht erfolgreich");
while ($adr3 = mysqli_fetch_array($adressen_query3)){
echo "Es wurde das Medium '". $adr3["title"] . "' ausgeliehen ";
}
$sql = 'SELECT * FROM exemplare WHERE bibid = "'.$adr["bibid"].'" AND copyid = "'.$adr["copyid"].'"';
$adressen_query3 = db::get()->query($sql) or die("Anfrage nicht erfolgreich");
while ($adr3 = mysqli_fetch_array($adressen_query3)){
echo "mit dem Barcode: ". $adr3["barcode_nmbr"] . ".
";
}

}
echo "
";
}
}

}

}
else
{
echo "falscher Aufruf";
}


text:
using PodioPCL.Models;
using System.Threading.Tasks;

namespace PodioPCL.Services
{
	/// <summary>
	/// Class RecurrenceService.
	/// </summary>
    public class RecurrenceService
    {
        private Podio _podio;
		/// <summary>
		/// Initializes a new instance of the <see cref="RecurrenceService"/> class.
		/// </summary>
		/// <param name="currentInstance">The current instance.</param>
        public RecurrenceService(Podio currentInstance)
        {
            _podio = currentInstance;
        }

		/// <summary>
		/// Returns the recurrence for the given object
		/// <para>Podio API Reference: https://developers.podio.com/doc/recurrence/get-recurrence-3415545 </para>
		/// </summary>
		/// <param name="refType">Type of the reference.</param>
		/// <param name="refId">The reference identifier.</param>
		/// <returns>Task<Recurrence>.</returns>
        public Task<Recurrence> GetRecurrence(string refType, int refId)
        {
            string url = string.Format("/recurrence/{0}/{1}", refType, refId);
            return _podio.GetAsync<Recurrence>(url);
        }

		/// <summary>
		/// Deletes the recurrence.
		/// <para>Podio API Reference: https://developers.podio.com/doc/recurrence/delete-recurrence-3349970 </para>
		/// </summary>
		/// <param name="refType">Type of the reference.</param>
		/// <param name="refId">The reference identifier.</param>
		/// <returns>Task.</returns>
        public Task DeleteRecurrence(string refType, int refId)
        {
            string url = string.Format("/recurrence/{0}/{1}", refType, refId);
            return _podio.DeleteAsync<dynamic>(url);
        }

		/// <summary>
		/// Creates or updates recurrence on the object.
		/// <para>Podio API Reference: https://developers.podio.com/doc/recurrence/create-or-update-recurrence-3349957 </para>
		/// </summary>
		/// <param name="refType">Type of the reference.</param>
		/// <param name="refId">The reference identifier.</param>
		/// <param name="recurrence">The recurrence.</param>
		/// <returns>Task.</returns>
        public Task UpdateRecurrence(string refType, int refId, Recurrence recurrence)
        {
            string url = string.Format("/recurrence/{0}/{1}", refType, refId);
            return _podio.PutAsync<dynamic>(url, recurrence);
        }
    }
}


text:
using namespace std;

#ifndef TEXTURES_T
#define TEXTURES_T

class textures_t
{
	struct imageGroup
	{
		sf::Image floor;
		sf::Image wall;
	};

	int interator;

	public:
		sf::Image* imageArray[5];
		sf::Image darkness;
		imageGroup light, dark;

		textures_t()
		{
			interator = 0;

			darkness = LoadImage("images/tiles/darkness.png");
			UpdateArray(&darkness);

			light.floor = LoadImage("images/tiles/floor.png");
			UpdateArray(&light.floor);

			dark.floor = LoadImage("images/tiles/floor-dark.png");
			UpdateArray(&dark.floor);

			light.wall = LoadImage("images/tiles/wall.png");
			UpdateArray(&light.wall);

			dark.wall = LoadImage ("images/tiles/wall-dark.png");
			UpdateArray(&dark.wall);
		}
	private:
		sf::Image LoadImage(string);
		void UpdateArray(sf::Image*);
};

sf::Image textures_t::LoadImage(string name)
{
	sf::Image img;

	if(!img.LoadFromFile(name))
	{
	}

	return img;
}

void textures_t::UpdateArray(sf::Image* imgPtr)
{
	imageArray[interator] = imgPtr;
	interator++;
}

#endif


text:
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.3//EN" "../../dtd/document-v13.dtd">

<document>

    <title>Historia del Proyecto</title>
    <authors>
      <person id="AO" name="Andrew C. Oliver" email="acoliver@apache.org"/>
      <person id="AMB" name="Agustín Martín Barbero" email="-"/>
    </authors>

<title>Breve Historia del Proyecto</title>

        El proyecto POI se gesttiempo atr, cerca de abril de 2001,
        cuando Andrew Oliver obtuvo un contrato de corta duraci para realizar
        informes Excel basados en Java. Ya hab realizado este proyecto unas
        cuantas veces antes, y sab exactamente dde buscar las herramientas
        que necesitar.
        Iricamente, el API que sol utilizar se hab disparado en precio
        desde unos $300 ($US) hasta unos $10K ($US). Calculque a dos personas
        les llevar unos seis meses el portar Excel asque le recomendal
        cliente que pagase los $10K.

        Cerca de junio de 2001, Andrew empeza pensar lo genial que ser
        tener una herramienta Java de cigo abierto para hacer esto y,
        mientras tuvo algo de tiempo libre, comenzel proyecto y aprendis
        cosas sobre el Formato de Documento Compuesto OLE2. Tras chocarse
        con varios obstulos insalvables, se dio cuenta de que necesitar ayuda.
        Publicun mensaje en su Grupo de Usuarios Java local (JUG) y
        preguntsi alguien estaba interesado. Tuvo mucha suerte y el
        programador Java de mayor talento que hab conocido nunca,
        Marc Johnson, se unial proyecto. A Marc le llevunas pocas
        iteraciones el obtener algo con lo que estaban contentos.

        Mientras Marc trabajaba en eso, Andrew portXLS a Java, basdose
        en la biblioteca de Marc. Varios usuarios escribieron peticiones
        para poder leer XLS (no so escribirlo como hab sido planeado
        originalmente) y un usuario ten peticiones especiales para
        un uso diferente de POIFS. Antes de que pasara mucho tiempo,
        el alcance del proyecto se hab triplicado. POI 1.0 se distribuys
        un mes m tarde de lo planeado, pero con muchas m caracterticas.
        Marc escribiridamente el marco del serializador y el
        Serializador HSSF en tiempo rord y Andrew generm documentaci
        y trabajen hacer que la gente conociera este proyecto.

          Poco antes de la distribuci, POI tuvo la fortuna de entrar
          en contacto con Nicola -Ken- Barrozzi quien proporcionejemplos
          para el Serializador HSSF y ayuda descrubir sus desafortunados
          fallos (que fueron arreglados de inmediato). Recientemente, Ken
          portla mayor de la documentaci del proyecto POI a XML
          partiendo de los documentos HTML cutres que Andrew hab escrito
          con Star Office.

        M o menos al mismo tiempo de la primera distribuci, Glen Stampoultzis
        se unial proyecto. A Glen le molestaba la actitud impertinente de Andrew
        en lo que adir capacidades gricas a HSSF se refer. Glen se molests
        tanto que decidicoger un martillo y hacerlo  mismo. Glen ya se ha
        convertido en parte integral de la comunidad de desarrollo de POI; sus
        contribuciones a HSSF ya han comenzado a producir olas.

         En algíì momento decidimos finalmente remitir el proyecto a
         <link href="http://cocoon.apache.org/">El Proyecto Cocoon
         de Apache</link>, so para descubrir que el proyecto hab
         crecido encajando perfectamente con Cocoon hac tiempo.
         Lo que es m, Andrew comenza ojear otros proyectos a los que
         le gustar que se adiera la funcionalidad de POI. Asque
         se decididonar los Serializadores y Generadores a Cocoon, otros
         componentes de integraci con POI a otros proyectos, y los APIs
         de POI pasarn a formar parte de Jakarta. Fue un camino con
         baches, ¡ðero parece que todo salibien puesto que ahora est
         leyendo esto!

<title>¿Èacia dde va POI?</title>

        Primero abordaremos esto desde el punto de vista del proyecto:
        Bueno, les hicimos la oferta a Microsoft y Actuate (de co
        ... en su mayor parte) de que dejarmos el proyecto y nos
        retirarmos si simplemente nos firmaban a cada uno un cheque
        con muchos ceros. Todav estoy esperando una llamada o correo
        electrico, asque de momento asumo que no nos van a pagar
        para quitarnos de en medio.

         Despu, tenemos algo de trabajo que hacer aquen Jakarta
         para terminar de integrar POI en la comunidad. Lo que es m,
         todav estamos realizando la transici del Serializador a
         Cocoon.

          HSSF, durante el ciclo 2.0, sufrirvarias optimizaciones.
          Tambi adiremos nuevas caracterticas como una implementaci
          completa de Fmulas y formatos de texto personalizados. Esperamos
          ser capaces de generar ficheros m peques adiendo soporte de
          escritura para registros RK, MulRK y MulBlank. A d de hoy, la
          lectura en HSSF no es muy eficiente. Esto se debe sobre todo a que
          para escribir o modificar, uno necesita ser capaz de actualizar
          punteros del flujo de subida (upstream pointers) a datos del flujo
          de bajada. Para hacer esto hay que tener todo lo que haya en
          medio en memoria. En vez de eso, un Generador permitir que se
          procesaran eventos SAX. (Esto se basaren las estructuras de
          bajo nivel). Una de las mejores cosas sobre esto es que asno so
          tendremos una manera m eficiente de leer el fichero, tambi
          tendremos una magnica forma de utilizar hojas de cculo como
          fuentes de datos XML.

          El Serializador HSSF, se separarm aíì en un marco genico
          para la creaci de serializadores para otras plataformas y
          en la implementaci especica del serializador HSSF. (Esto ya
          es cierto en gran medida). Tambi adiremos soporte para
          caracterticas ya soportadas por HSSF (estilos, fuentes, formatos
          de texto). Esperamos adir soporte para fmulas durante este ciclo.

          Estamos empezando a expandir nuestro alcance de nuevo. Si pudimos
          hacer todo esto para ficheros XLS, ¿ñuhay de ficheros Doc o PPT?
          Pensamos que nuestro siguiente componente (HWPF)
          deber seguir el mismo patr. Esperamos
          que se nos una sangre nueva al equipo y que nos permita abordar
          esto con mayor celeridad (en parte porque POIFS ya estterminado).
          ¡Ðero a lo mejor lo que m necesitamos es a ti!

    <legal>
      Copyright (c) @year@ The Apache Software Foundation All rights reserved.

      Apache POI, POI, Apache, the Apache feather logo, and the Apache
      POI project logo are trademarks of The Apache Software Foundation.
    </legal>

</document>


text:
NSString *const kDHImageLinearLightBlendFragmentShaderString = SHADER_STRING
(
 precision mediump float;
 varying highp vec2 textureCoordinate;
 varying highp vec2 textureCoordinate2;

 uniform sampler2D inputImageTexture;
 uniform sampler2D inputImageTexture2;
 uniform highp float scale;
 uniform highp float strength;

 float blendLinearBurn(float base, float blend) {
     // Note : Same implementation as BlendSubtractf
     return max(base+blend-1.0,0.0);
 }

 float blendLinearDodge(float base, float blend) {
     // Note : Same implementation as BlendAddf
     return min(base+blend,1.0);
 }

 float blendLinearLight(float base, float blend) {
     return blend<0.5?blendLinearBurn(base,(2.0*blend)):blendLinearDodge(base,(2.0*(blend-0.5)));
 }

 vec3 blendLinearLight(vec3 base, vec3 blend) {
     return vec3(blendLinearLight(base.r,blend.r),blendLinearLight(base.g,blend.g),blendLinearLight(base.b,blend.b));
 }

 vec3 blendLinearLight(vec3 base, vec3 blend, float opacity) {
     return (blendLinearLight(base, blend) * opacity + base * (1.0 - opacity));
 }

 void main()
 {
     mediump vec4 base = texture2D(inputImageTexture, textureCoordinate);
     mediump vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2);

     mediump vec3 processedRGB = blendLinearLight(base.rgb, overlay.rgb);
     gl_FragColor = vec4(mix(base.rgb, processedRGB, strength), (base.a + overlay.a) / 2.0);
 }
 );

@implementation DHImageLinearLightBlendFilter
- (instancetype) init
{
    self = [super initWithFragmentShaderFromString:kDHImageLinearLightBlendFragmentShaderString];
    if (self) {
        scaleUniform = [filterProgram uniformIndex:@"scale"];
        self.scale = 0.f;
    }
    return self;
}

- (void) setScale:(CGFloat)scale
{
    _scale = scale;
    [self setFloat:scale forUniform:scaleUniform program:filterProgram];
}
@end


text:
<?php

namespace Hifone\Presenters\Traits;

use Hifone\Dates\DateFactory;

trait TimestampsTrait
{
    /**
     * Present formatted date time.
     *
     * @return string
     */
    public function created_at()
    {
        return app(DateFactory::class)->make($this->wrappedObject->created_at)->toDateTimeString();
    }

    /**
     * Present formatted date time.
     *
     * @return string
     */
    public function updated_at()
    {
        return app(DateFactory::class)->make($this->wrappedObject->updated_at)->toDateTimeString();
    }

    /**
     * Present formatted date time.
     *
     * @return string
     */
    public function deleted_at()
    {
        return app(DateFactory::class)->make($this->wrappedObject->deleted_at)->toDateTimeString();
    }
}