text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Alienlab.Web.Security.Resources {
    using System;

    /// <summary>
    ///   A strongly-typed resource class, for looking up localized strings, etc.
    /// </summary>
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    public class Messages {

        private static global::System.Resources.ResourceManager resourceMan;

        private static global::System.Globalization.CultureInfo resourceCulture;

        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Messages() {
        }

        /// <summary>
        ///   Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        public static global::System.Resources.ResourceManager ResourceManager {
            get {
                if (object.ReferenceEquals(resourceMan, null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Alienlab.Web.Security.Resources.Messages", typeof(Messages).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }

        /// <summary>
        ///   Overrides the current thread's CurrentUICulture property for all
        ///   resource lookups using this strongly typed resource class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        public static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set {
                resourceCulture = value;
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Cannot delete a populated role..
        /// </summary>
        public static string CannotDeletePopulatedRole {
            get {
                return ResourceManager.GetString("CannotDeletePopulatedRole", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Fail to load persitable object from file {0}..
        /// </summary>
        public static string LoadFailed {
            get {
                return ResourceManager.GetString("LoadFailed", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Role name cannot contain commas..
        /// </summary>
        public static string RoleCannotContainCommas {
            get {
                return ResourceManager.GetString("RoleCannotContainCommas", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Role name '{0}' already exists..
        /// </summary>
        public static string RoleExists {
            get {
                return ResourceManager.GetString("RoleExists", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Role '{0}' does not exist..
        /// </summary>
        public static string RoleNotExists {
            get {
                return ResourceManager.GetString("RoleNotExists", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Fail to save persitable object to file {0}..
        /// </summary>
        public static string SaveFailed {
            get {
                return ResourceManager.GetString("SaveFailed", resourceCulture);
            }
        }
    }
}


text:
@interface BenchmarkYapCache : NSObject

+ (void)runTestsWithCompletion:(dispatch_block_t)completionBlock;

@end

redpajama_set_name: RedPajamaGithub


text:
/***************************************************
  This is a library for the Adafruit Trellis w/HT16K33

  Designed specifically to work with the Adafruit Trellis
  ----> https://www.adafruit.com/products/1616
  ----> https://www.adafruit.com/products/1611

  These displays use I2C to communicate, 2 pins are required to
  interface
  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.
  MIT license, all text above must be included in any redistribution
 ****************************************************/

#ifndef _TRELLIS_H_
#define _TRELLIS_H_

// Set _BV if not already set (eg. Arudiono DUE, Arduino Zero Pro)
#ifndef _BV
#define _BV(bit) (1 << (bit))
#endif

#if (ARDUINO >= 100)
 #include "Arduino.h"
#else
 #include "WProgram.h"
#endif

#ifdef __AVR_ATtiny85__
  #include <TinyWireM.h>
#else
  #include <Wire.h>
#endif

#define LED_ON  1
#define LED_OFF 0

#define HT16K33_BLINK_OFF    0
#define HT16K33_BLINK_2HZ    1
#define HT16K33_BLINK_1HZ    2
#define HT16K33_BLINK_HALFHZ 3

// this is the raw HT16K33 controller
class Adafruit_Trellis {
 public:
  Adafruit_Trellis(void);
  void begin(uint8_t _addr);
  void setBrightness(uint8_t b);
  void blinkRate(uint8_t b);
  void writeDisplay(void);
  void clear(void);
  bool isKeyPressed(uint8_t k);
  bool wasKeyPressed(uint8_t k);
  boolean isLED(uint8_t x);
  void setLED(uint8_t x);
  void clrLED(uint8_t x);
  boolean readSwitches(void);
  boolean justPressed(uint8_t k);
  boolean justReleased(uint8_t k);

  uint16_t displaybuffer[8];

  void init(uint8_t a);
 private:
  uint8_t keys[6], lastkeys[6];

  uint8_t i2c_addr;
};

// control a large # at a time!
class Adafruit_TrellisSet {
 public:
  Adafruit_TrellisSet(Adafruit_Trellis *matrix0,
		      Adafruit_Trellis *matrix1=0,
		      Adafruit_Trellis *matrix2=0,
		      Adafruit_Trellis *matrix3=0,
		      Adafruit_Trellis *matrix4=0,
		      Adafruit_Trellis *matrix5=0,
		      Adafruit_Trellis *matrix6=0,
		      Adafruit_Trellis *matrix7=0);
  void begin(uint8_t _addr0 = 0x70, uint8_t _addr1 = 0x71,
	     uint8_t _addr2 = 0x72, uint8_t _addr3 = 0x73,
	     uint8_t _addr4 = 0x74, uint8_t _addr5 = 0x75,
	     uint8_t _addr6 = 0x76, uint8_t _addr7 = 0x77);

  void setBrightness(uint8_t b);
  void blinkRate(uint8_t b);
  void writeDisplay(void);
  void clear(void);
  bool isKeyPressed(uint8_t k);
  bool wasKeyPressed(uint8_t k);
  boolean isLED(uint8_t x);
  void setLED(uint8_t x);
  void clrLED(uint8_t x);
  boolean readSwitches(void);
  boolean justPressed(uint8_t k);
  boolean justReleased(uint8_t k);

 private:
  Adafruit_Trellis *matrices[8];
  uint8_t _nummatrix;
};

#endif // _TRELLIS_H_


text:
package org.openkilda.messaging.info.event;

import org.openkilda.model.SwitchId;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class IslRoundTripLatency extends IslBaseLatency {
    private static final long serialVersionUID = 4184676909685019373L;

    @JsonProperty("origin")
    private String origin;

    public IslRoundTripLatency(@JsonProperty("src_switch_id") SwitchId srcSwitchId,
                               @JsonProperty("src_port_no") int srcPortNo,
                               @JsonProperty("latency_ns") long latency,
                               @JsonProperty("packet_id") Long packetId) {
        this(srcSwitchId, srcPortNo, latency, packetId, null);
    }

    @JsonCreator
    public IslRoundTripLatency(@JsonProperty("src_switch_id") SwitchId srcSwitchId,
                               @JsonProperty("src_port_no") int srcPortNo,
                               @JsonProperty("latency_ns") long latency,
                               @JsonProperty("packet_id") Long packetId,
                               @JsonProperty("origin") String origin) {
        super(srcSwitchId, srcPortNo, latency, packetId);
        this.origin = origin;
    }
}


text:
/*
Assignment : HomeWork 4
Names:
Bharathram Hariharan
Hemchand Ramireddy
Pratiksha Badgujar
*/
package com.example.nprapp;

import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class StoryDetails implements Serializable{
	long id;
	String title,audioUrl,imageUrl,teaserText,name,webLink;
	String pubDate;
	int durationSeconds;

	public void setDurationSeconds(String sec){
		this.durationSeconds = Integer.valueOf(sec);
	}
	public int getDurationSeconds(){
		return this.durationSeconds;
	}
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getAudioUrl() {
		return audioUrl;
	}
	public void setAudioUrl(String audioUrl) {
		this.audioUrl = audioUrl;
	}
	public String getImageUrl() {
		return imageUrl;
	}
	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}
	public String getTeaserText() {
		return teaserText;
	}
	public void setTeaserText(String teaserText) {
		this.teaserText = teaserText;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getWebLink() {
		return webLink;
	}
	public void setWebLink(String webLink) {
		this.webLink = webLink;
	}
	public String getPubDate() {
		return pubDate;
	}
	public void setPubDate(String dateTemp) {
		this.pubDate = dateTemp;
//		this.pubDate = pubDate;
	}

	@Override
	public String toString() {
		return "StoryDetails [id=" + id + ", title=" + title + ", audioUrl="
				+ audioUrl + ", imageUrl=" + imageUrl + ", teaserText="
				+ teaserText + ", name=" + name + ", webLink=" + webLink
				+ ", pubDate=" + pubDate +"Duration =" + durationSeconds +"]";
	}

}


text:
using System;
using System.Diagnostics;

namespace System.ComponentModel
{
    /// <devdoc>
    ///    <para>Represents the method that will handle the
    ///    <see langword='PropertyChanged'/> event raised when a
    ///       property is changed on a component.</para>
    /// </devdoc>
    public delegate void PropertyChangedEventHandler(object sender, PropertyChangedEventArgs e);
}


text:
static DWORD    LogFlags                    = 0;
static char     szLogFileName[MAX_LONGPATH+1]   = DEFAULT_LOGFILE_NAME;
static HANDLE   LogFileHandle               = INVALID_HANDLE_VALUE;
static MUTEX_COOKIE   LogFileMutex                = 0;
static DWORD    LogFacilityMask             = LF_ALL;
static DWORD    LogFacilityMask2            = 0;
static DWORD    LogVMLevel                  = LL_INFO100;
        // <TODO>@todo FIX should probably only display warnings and above by default</TODO>

VOID InitLogging()
{
    STATIC_CONTRACT_NOTHROW;

        // <TODO>FIX bit of a workaround for now, check for the log file in the
        // registry and if there, turn on file logging VPM</TODO>

    LogFlags |= REGUTIL::GetConfigFlag_DontUse_(CLRConfig::INTERNAL_LogEnable, LOG_ENABLE);
    LogFacilityMask = REGUTIL::GetConfigDWORD_DontUse_(CLRConfig::INTERNAL_LogFacility, LogFacilityMask) | LF_ALWAYS;
    LogVMLevel = REGUTIL::GetConfigDWORD_DontUse_(CLRConfig::EXTERNAL_LogLevel, LogVMLevel);
    LogFlags |= REGUTIL::GetConfigFlag_DontUse_(CLRConfig::INTERNAL_LogFileAppend, LOG_ENABLE_APPEND_FILE);
    LogFlags |= REGUTIL::GetConfigFlag_DontUse_(CLRConfig::INTERNAL_LogFlushFile,  LOG_ENABLE_FLUSH_FILE);
    LogFlags |= REGUTIL::GetConfigFlag_DontUse_(CLRConfig::INTERNAL_LogToDebugger, LOG_ENABLE_DEBUGGER_LOGGING);
    LogFlags |= REGUTIL::GetConfigFlag_DontUse_(CLRConfig::INTERNAL_LogToFile,     LOG_ENABLE_FILE_LOGGING);
    LogFlags |= REGUTIL::GetConfigFlag_DontUse_(CLRConfig::INTERNAL_LogToConsole,  LOG_ENABLE_CONSOLE_LOGGING);

    LogFacilityMask2 = REGUTIL::GetConfigDWORD_DontUse_(CLRConfig::INTERNAL_LogFacility2, LogFacilityMask2) | LF_ALWAYS;

    LPWSTR fileName = CLRConfig::GetConfigValue(CLRConfig::INTERNAL_LogFile);
    if (fileName != 0)
    {
        int ret;
        ret = WszWideCharToMultiByte(CP_ACP, 0, fileName, -1, szLogFileName, sizeof(szLogFileName)-1, NULL, NULL);
        _ASSERTE(ret != 0);
        delete fileName;
    }

    if (REGUTIL::GetConfigDWORD_DontUse_(CLRConfig::INTERNAL_LogWithPid, FALSE))
    {
        char szPid[20];
        sprintf_s(szPid, COUNTOF(szPid), ".%d", GetCurrentProcessId());
        strcat_s(szLogFileName, _countof(szLogFileName), szPid);
    }

    if ((LogFlags & LOG_ENABLE) &&
        (LogFlags & LOG_ENABLE_FILE_LOGGING) &&
        (LogFileHandle == INVALID_HANDLE_VALUE))
    {
        DWORD fdwCreate = (LogFlags & LOG_ENABLE_APPEND_FILE) ? OPEN_ALWAYS : CREATE_ALWAYS;
        LogFileHandle = CreateFileA(
            szLogFileName,
            GENERIC_WRITE,
            FILE_SHARE_READ,
            NULL,
            fdwCreate,
            FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN |  ((LogFlags & LOG_ENABLE_FLUSH_FILE) ? FILE_FLAG_WRITE_THROUGH : 0),
            NULL);

        if(0 == LogFileMutex)
        {
            LogFileMutex = ClrCreateMutex(
                NULL,
                FALSE,
                NULL);
            _ASSERTE(LogFileMutex != 0);
        }

            // Some other logging may be going on, try again with another file name
        if (LogFileHandle == INVALID_HANDLE_VALUE)
        {
            char* ptr = szLogFileName + strlen(szLogFileName) + 1;
            ptr[-1] = '.';
            ptr[0] = '0';
            ptr[1] = 0;

            for(int i = 0; i < 10; i++)
            {
                LogFileHandle = CreateFileA(
                    szLogFileName,
                    GENERIC_WRITE,
                    FILE_SHARE_READ,
                    NULL,
                    fdwCreate,
                    FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN |  ((LogFlags & LOG_ENABLE_FLUSH_FILE) ? FILE_FLAG_WRITE_THROUGH : 0),
                    NULL);
                if (LogFileHandle != INVALID_HANDLE_VALUE)
                    break;
                *ptr = *ptr + 1;
            }
            if (LogFileHandle == INVALID_HANDLE_VALUE) {
                DWORD       written;
                char buff[MAX_LONGPATH+60];
                strcpy(buff, "Could not open log file, logging to ");
                strcat_s(buff, _countof(buff), szLogFileName);
                // ARULM--Changed WriteConsoleA to WriteFile to be CE compat
                WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), buff, (DWORD)strlen(buff), &written, 0);
                }
        }
        if (LogFileHandle == INVALID_HANDLE_VALUE)
            UtilMessageBoxNonLocalized(NULL, W("Could not open log file"), W("CLR logging"), MB_OK | MB_ICONINFORMATION, FALSE, TRUE);
        if (LogFileHandle != INVALID_HANDLE_VALUE)
        {
            if (LogFlags & LOG_ENABLE_APPEND_FILE)
                SetFilePointer(LogFileHandle, 0, NULL, FILE_END);
            LogSpew( LF_ALWAYS, FATALERROR, "************************ New Output *****************\n" );
        }
    }
}

VOID EnterLogLock()
{
    STATIC_CONTRACT_NOTHROW;
    STATIC_CONTRACT_GC_NOTRIGGER;

    // We don't care about violating CANNOT_TAKE_LOCK in debug-only builds, and it's
    // rather hard to care about this, as we LOG all over the place.
    CONTRACT_VIOLATION(TakesLockViolation);

    if(LogFileMutex != 0)
    {
        DWORD status;
        status = ClrWaitForMutex(LogFileMutex, INFINITE, FALSE);
        _ASSERTE(WAIT_OBJECT_0 == status);
    }
}

VOID LeaveLogLock()
{
    STATIC_CONTRACT_NOTHROW;
    STATIC_CONTRACT_GC_NOTRIGGER;

    if(LogFileMutex != 0)
    {
        BOOL success;
        success = ClrReleaseMutex(LogFileMutex);
        _ASSERTE(success);
    }
}

static bool bLoggingInitialized = false;
VOID InitializeLogging()
{
    STATIC_CONTRACT_NOTHROW;

    if (bLoggingInitialized)
        return;
    bLoggingInitialized = true;

    InitLogging();      // You can call this in the debugger to fetch new settings
}

VOID FlushLogging() {
    STATIC_CONTRACT_NOTHROW;

    if (LogFileHandle != INVALID_HANDLE_VALUE)
    {
        // We must take the lock, as an OS deadlock can occur between
        // FlushFileBuffers and WriteFile.
        EnterLogLock();
        FlushFileBuffers( LogFileHandle );
        LeaveLogLock();
    }
}

VOID ShutdownLogging()
{
    STATIC_CONTRACT_NOTHROW;

    if (LogFileHandle != INVALID_HANDLE_VALUE) {
        LogSpew( LF_ALWAYS, FATALERROR, "Logging shutting down\n");
        CloseHandle( LogFileHandle );
    }
    LogFileHandle = INVALID_HANDLE_VALUE;
    bLoggingInitialized = false;
}

bool LoggingEnabled()
{
    STATIC_CONTRACT_LEAF;

    return ((LogFlags & LOG_ENABLE) != 0);
}

bool LoggingOn(DWORD facility, DWORD level) {
    STATIC_CONTRACT_LEAF;

    _ASSERTE(LogFacilityMask & LF_ALWAYS); // LF_ALWAYS should always be enabled

    return((LogFlags & LOG_ENABLE) &&
           level <= LogVMLevel &&
           (facility & LogFacilityMask));
}

bool Logging2On(DWORD facility2, DWORD level) {
    STATIC_CONTRACT_LEAF;

    _ASSERTE(LogFacilityMask2 & LF_ALWAYS); // LF_ALWAYS should always be enabled

    return((LogFlags & LOG_ENABLE) &&
           level <= LogVMLevel &&
           (facility2 & LogFacilityMask2));
}

//
// Don't use me directly, use the macros in log.h
//
VOID LogSpewValist(DWORD facility, DWORD level, const char *fmt, va_list args)
{
    SCAN_IGNORE_FAULT;  // calls to new (nothrow) in logging code are OK
    STATIC_CONTRACT_NOTHROW;
    STATIC_CONTRACT_GC_NOTRIGGER;

    if (!LoggingOn(facility, level))
        return;

    DEBUG_ONLY_FUNCTION;

    LogSpewAlwaysValist(fmt, args);
}

VOID LogSpew2Valist(DWORD facility2, DWORD level, const char *fmt, va_list args)
{
    SCAN_IGNORE_FAULT;  // calls to new (nothrow) in logging code are OK
    STATIC_CONTRACT_NOTHROW;
    STATIC_CONTRACT_GC_NOTRIGGER;

    if (!Logging2On(facility2, level))
        return;

    DEBUG_ONLY_FUNCTION;

    LogSpewAlwaysValist(fmt, args);
}

VOID LogSpewAlwaysValist(const char *fmt, va_list args)
{
    SCAN_IGNORE_FAULT;  // calls to new (nothrow) in logging code are OK
    STATIC_CONTRACT_NOTHROW;
    STATIC_CONTRACT_GC_NOTRIGGER;

    DEBUG_ONLY_FUNCTION;

    // We can't do heap allocations at all.  The current thread may have
    // suspended another thread, and the suspended thread may be inside of the
    // heap lock.
    //
    // (Some historical comments:)
    //
    // We must operate with a very small stack (in case we're logging durring
    // a stack overflow)
    //
    // We're going to bypass our debug memory allocator and just allocate memory from
    // the process heap. Why? Because our debug memory allocator will log out of memory
    // conditions. If we're low on memory, and we try to log an out of memory condition, and we try
    // and allocate memory again using the debug allocator, we could (and probably will) hit
    // another low memory condition, try to log it, and we spin indefinately until we hit a stack overflow.

    const int BUFFERSIZE = 1000;
    static char rgchBuffer[BUFFERSIZE];

    EnterLogLock();

    char *  pBuffer      = &rgchBuffer[0];
    DWORD       buflen       = 0;
    DWORD       written;

    static bool needsPrefix = true;

    if (needsPrefix)
        buflen = sprintf_s(pBuffer, COUNTOF(rgchBuffer), "TID %04x: ", GetCurrentThreadId());

    needsPrefix = (fmt[strlen(fmt)-1] == '\n');

    int cCountWritten = _vsnprintf(&pBuffer[buflen], BUFFERSIZE-buflen, fmt, args );
    pBuffer[BUFFERSIZE-1] = 0;
    if (cCountWritten < 0) {
        buflen = BUFFERSIZE - 1;
    } else {
        buflen += cCountWritten;
    }

    // Its a little late for this, but at least you wont continue
    // trashing your program...
    _ASSERTE((buflen < (DWORD) BUFFERSIZE) && "Log text is too long!") ;

#if !PLATFORM_UNIX
    //convert NL's to CR NL to fixup notepad
    const int BUFFERSIZE2 = BUFFERSIZE + 500;
    char rgchBuffer2[BUFFERSIZE2];
    char * pBuffer2 = &rgchBuffer2[0];

    char *d = pBuffer2;
    for (char *p = pBuffer; *p != '\0'; p++)
    {
        if (*p == '\n') {
            _ASSERTE(d < pBuffer2 + BUFFERSIZE2);
            *(d++) = '\r';
        }

        _ASSERTE(d < pBuffer2 + BUFFERSIZE2);
        *(d++) = *p;
    }
    *d = 0;

    buflen = (DWORD)(d - pBuffer2);
    pBuffer = pBuffer2;
#endif // PLATFORM_UNIX

    if (LogFlags & LOG_ENABLE_FILE_LOGGING && LogFileHandle != INVALID_HANDLE_VALUE)
    {
        WriteFile(LogFileHandle, pBuffer, buflen, &written, NULL);
        if (LogFlags & LOG_ENABLE_FLUSH_FILE) {
            FlushFileBuffers( LogFileHandle );
        }
    }

    if (LogFlags & LOG_ENABLE_CONSOLE_LOGGING)
    {
        WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), pBuffer, buflen, &written, 0);
        //<TODO>@TODO ...Unnecessary to flush console?</TODO>
        if (LogFlags & LOG_ENABLE_FLUSH_FILE)
            FlushFileBuffers( GetStdHandle(STD_OUTPUT_HANDLE) );
    }

    if (LogFlags & LOG_ENABLE_DEBUGGER_LOGGING)
    {
        OutputDebugStringA(pBuffer);
    }

    LeaveLogLock();
}

VOID LogSpew(DWORD facility, DWORD level, const char *fmt, ... )
{
    STATIC_CONTRACT_WRAPPER;

    ENTER_SO_NOT_MAINLINE_CODE;

#ifdef SELF_NO_HOST
    if (TRUE)
#else //!SELF_NO_HOST
    if (CanThisThreadCallIntoHost())
#endif //!SELF_NO_HOST
    {
        va_list     args;
        va_start(args, fmt);
        LogSpewValist (facility, level, fmt, args);
        va_end(args);
    }
    else
    {
        // Cannot acquire the required lock, as this would call back
        // into the host.  Eat the log message.
    }

    LEAVE_SO_NOT_MAINLINE_CODE;
}

VOID LogSpew2(DWORD facility2, DWORD level, const char *fmt, ... )
{
    STATIC_CONTRACT_WRAPPER;

    ENTER_SO_NOT_MAINLINE_CODE;

#ifdef SELF_NO_HOST
    if (TRUE)
#else //!SELF_NO_HOST
    if (CanThisThreadCallIntoHost())
#endif //!SELF_NO_HOST
    {
        va_list     args;
        va_start(args, fmt);
        LogSpew2Valist(facility2, level, fmt, args);
        va_end(args);
    }
    else
    {
        // Cannot acquire the required lock, as this would call back
        // into the host.  Eat the log message.
    }

    LEAVE_SO_NOT_MAINLINE_CODE;
}

VOID LogSpewAlways (const char *fmt, ... )
{
    STATIC_CONTRACT_WRAPPER;

    ENTER_SO_NOT_MAINLINE_CODE;

#ifdef SELF_NO_HOST
    if (TRUE)
#else //!SELF_NO_HOST
    if (CanThisThreadCallIntoHost())
#endif //!SELF_NO_HOST
    {
        va_list     args;
        va_start(args, fmt);
        LogSpewValist (LF_ALWAYS, LL_ALWAYS, fmt, args);
        va_end(args);
    }
    else
    {
        // Cannot acquire the required lock, as this would call back
        // into the host.  Eat the log message.
    }

    LEAVE_SO_NOT_MAINLINE_CODE;
}

#endif // LOGGING


text:
void GADMInMobiUpdateGDPRConsent(const char* consentObjectRawString) {
  NSString *consentObjectString = [NSString stringWithUTF8String:consentObjectRawString];
  NSMutableDictionary *consentObject = [[NSMutableDictionary alloc] init];

  NSArray *entries = [consentObjectString componentsSeparatedByString:@";"];
  for (int i = 0; i < entries.count-1; i++) {
    NSArray *keyValue = [entries[i] componentsSeparatedByString:@"="];
    [consentObject setValue:keyValue[1] forKey:keyValue[0]];
  }

  [GADMInMobiConsent updateGDPRConsent:consentObject];
}


text:
package org.elasticsearch.xpack.searchablesnapshots.action.cache;

import org.elasticsearch.action.ActionType;
import org.elasticsearch.action.FailedNodeException;
import org.elasticsearch.action.support.ActionFilters;
import org.elasticsearch.action.support.nodes.BaseNodeResponse;
import org.elasticsearch.action.support.nodes.BaseNodesRequest;
import org.elasticsearch.action.support.nodes.BaseNodesResponse;
import org.elasticsearch.action.support.nodes.TransportNodesAction;
import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.snapshots.SnapshotId;
import org.elasticsearch.tasks.Task;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportRequest;
import org.elasticsearch.transport.TransportService;
import org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshots;
import org.elasticsearch.xpack.searchablesnapshots.cache.full.CacheService;

import java.io.IOException;
import java.util.List;
import java.util.Optional;

import static org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsConstants.SNAPSHOT_PARTIAL_SETTING;

public class TransportSearchableSnapshotCacheStoresAction extends TransportNodesAction<
    TransportSearchableSnapshotCacheStoresAction.Request,
    TransportSearchableSnapshotCacheStoresAction.NodesCacheFilesMetadata,
    TransportSearchableSnapshotCacheStoresAction.NodeRequest,
    TransportSearchableSnapshotCacheStoresAction.NodeCacheFilesMetadata> {

    public static final String ACTION_NAME = "internal:admin/xpack/searchable_snapshots/cache/store";

    public static final ActionType<NodesCacheFilesMetadata> TYPE = new ActionType<>(ACTION_NAME, NodesCacheFilesMetadata::new);

    private final CacheService cacheService;

    @Inject
    public TransportSearchableSnapshotCacheStoresAction(
        ThreadPool threadPool,
        ClusterService clusterService,
        TransportService transportService,
        SearchableSnapshots.CacheServiceSupplier cacheService,
        ActionFilters actionFilters
    ) {
        super(
            ACTION_NAME,
            threadPool,
            clusterService,
            transportService,
            actionFilters,
            Request::new,
            NodeRequest::new,
            ThreadPool.Names.MANAGEMENT,
            ThreadPool.Names.SAME,
            NodeCacheFilesMetadata.class
        );
        this.cacheService = cacheService.get();
    }

    @Override
    protected NodesCacheFilesMetadata newResponse(
        Request request,
        List<NodeCacheFilesMetadata> nodesCacheFilesMetadata,
        List<FailedNodeException> failures
    ) {
        return new NodesCacheFilesMetadata(clusterService.getClusterName(), nodesCacheFilesMetadata, failures);
    }

    @Override
    protected NodeRequest newNodeRequest(Request request) {
        return new NodeRequest(request);
    }

    @Override
    protected NodeCacheFilesMetadata newNodeResponse(StreamInput in) throws IOException {
        return new NodeCacheFilesMetadata(in);
    }

    @Override
    protected NodeCacheFilesMetadata nodeOperation(NodeRequest request, Task task) {
        assert cacheService != null;
        assert Optional.ofNullable(clusterService.state().metadata().index(request.shardId.getIndex()))
            .map(indexMetadata -> SNAPSHOT_PARTIAL_SETTING.get(indexMetadata.getSettings()))
            .orElse(false) == false : request.shardId + " is partial, should not be fetching its cached size";
        return new NodeCacheFilesMetadata(clusterService.localNode(), cacheService.getCachedSize(request.shardId, request.snapshotId));
    }

    public static final class Request extends BaseNodesRequest<Request> {

        private final SnapshotId snapshotId;
        private final ShardId shardId;

        public Request(SnapshotId snapshotId, ShardId shardId, DiscoveryNode[] nodes) {
            super(nodes);
            this.snapshotId = snapshotId;
            this.shardId = shardId;
        }

        public Request(StreamInput in) throws IOException {
            super(in);
            snapshotId = new SnapshotId(in);
            shardId = new ShardId(in);
        }

        @Override
        public void writeTo(StreamOutput out) throws IOException {
            super.writeTo(out);
            snapshotId.writeTo(out);
            shardId.writeTo(out);
        }
    }

    public static final class NodeRequest extends TransportRequest {

        private final SnapshotId snapshotId;
        private final ShardId shardId;

        public NodeRequest(Request request) {
            this.snapshotId = request.snapshotId;
            this.shardId = request.shardId;
        }

        public NodeRequest(StreamInput in) throws IOException {
            super(in);
            this.snapshotId = new SnapshotId(in);
            this.shardId = new ShardId(in);
        }

        @Override
        public void writeTo(StreamOutput out) throws IOException {
            super.writeTo(out);
            snapshotId.writeTo(out);
            shardId.writeTo(out);
        }
    }

    public static class NodeCacheFilesMetadata extends BaseNodeResponse {

        private final long bytesCached;

        public NodeCacheFilesMetadata(StreamInput in) throws IOException {
            super(in);
            bytesCached = in.readLong();
        }

        public NodeCacheFilesMetadata(DiscoveryNode node, long bytesCached) {
            super(node);
            this.bytesCached = bytesCached;
        }

        public long bytesCached() {
            return bytesCached;
        }

        @Override
        public void writeTo(StreamOutput out) throws IOException {
            super.writeTo(out);
            out.writeLong(bytesCached);
        }
    }

    public static class NodesCacheFilesMetadata extends BaseNodesResponse<NodeCacheFilesMetadata> {

        public NodesCacheFilesMetadata(StreamInput in) throws IOException {
            super(in);
        }

        public NodesCacheFilesMetadata(ClusterName clusterName, List<NodeCacheFilesMetadata> nodes, List<FailedNodeException> failures) {
            super(clusterName, nodes, failures);
        }

        @Override
        protected List<NodeCacheFilesMetadata> readNodesFrom(StreamInput in) throws IOException {
            return in.readList(NodeCacheFilesMetadata::new);
        }

        @Override
        protected void writeNodesTo(StreamOutput out, List<NodeCacheFilesMetadata> nodes) throws IOException {
            out.writeList(nodes);
        }
    }
}


text:
@echo off

set "ROOT=%~dp0"
set "DEFAULTSCRIPT=%ROOT%\workspace\example.py"
set "SPLASH=%ROOT%\libraries\runtime\splash.png"

set JAVA=javaw
set JVM_ARGS=-Xmx1024m

set "SCRIPTARGUMENT=%~1"

if not "%SCRIPTARGUMENT%" == "" (
	REM Check if we run the default the given script
	set "DEFAULTSCRIPT=%SCRIPTARGUMENT%"
)

IF exist "%ROOT%\jre" (
	REM Check if we should override default java
	set "JAVA=%ROOT%\jre\bin\javaw"
)

REM msg "%username%" "%JAVA% not found!"

start "xxx" "%JAVA%" %JVM_ARGS% -splash:"%SPLASH%" -jar "%ROOT%\processing-py.jar" --redirect "%DEFAULTSCRIPT%"

if not %ERRORLEVEL% == 1 (
	if not %ERRORLEVEL% == 0 (
		echo "Unable to start Java"
		msg "%username%" "Unable to start Java"
	)
)


text:
import React, { memo } from "react"
import ClassNames from "classnames"
import PropTypes from "prop-types"
import { withStyles } from "@material-ui/core/styles"
import Grid from "@material-ui/core/Grid"

const styles = theme => ({
  index: {
    justifyContent: "center",
    padding: "32px 0",
    [theme.breakpoints.down("sm")]: {
      padding: "32px 16px 32px 16px",
    },
  },

  index__grayColor: {
    backgroundColor: " #f1f3f4",
  },
})

function Section({ classes, children, color, className }) {
  return (
    <Grid
      container
      spacing={24}
      className={ClassNames(classes.index, className, {
        [classes.index__grayColor]: color,
      })}
    >
      <Grid item xs={12} sm={8}>
        {children}
      </Grid>
    </Grid>
  )
}

Section.propTypes = {
  children: PropTypes.node.isRequired,
  color: PropTypes.bool,
  className: PropTypes.string,
}

Section.defaultProps = {
  color: false,
  className: "",
}

export default memo(withStyles(styles)(Section))


text:
@echo off
Flu.exe "Games\OldSchoolEff.flg"


text:
#region LGPL License

#endregion

#region SVN Version Information

// <file>
//     <copyright see="prj:///doc/copyright.txt"/>
//     <license see="prj:///doc/license.txt"/>
//     <id value="$Id: ZipArchive.cs 1537 2009-03-30 19:25:01Z borrillis $"/>
// </file>

#endregion SVN Version Information

#region Namespace Declarations

using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;

using ICSharpCode.SharpZipLib.Zip;

#endregion Namespace Declarations

namespace Axiom.FileSystem
{
	/// <summary>
	/// Specialization of the Archive class to allow reading of files from from a zip format source archive.
	/// </summary>
	/// <remarks>
	/// This archive format supports all archives compressed in the standard
	/// zip format, including iD pk3 files.
	/// </remarks>
	/// <ogre name="ZipArchive">
	///     <file name="OgreZip.h"   revision="" lastUpdated="5/18/2006" lastUpdatedBy="Borrillis" />
	///     <file name="OgreZip.cpp" revision="" lastUpdated="5/18/2006" lastUpdatedBy="Borrillis" />
	/// </ogre>
	public class ZipArchive : Archive
	{
		#region Fields and Properties

		/// <summary>
		/// root location of the zip file.
		/// </summary>
		private string _zipFile;

		private string _zipDir = "/";
		private ZipInputStream _zipStream;
		private List<FileInfo> _fileList = new List<FileInfo>();

		#endregion Fields and Properties

		#region Utility Methods

		/// <overloads><summary>
		/// Utility method to retrieve all files in a directory matching pattern.
		/// </summary>
		/// <param name="pattern">File pattern</param>
		/// <param name="recursive">Whether to cascade down directories</param>
		/// <param name="simpleList">Populated if retrieving a simple list</param>
		/// <param name="detailList">Populated if retrieving a detailed list</param>
		/// </overloads>
		protected void findFiles( string pattern, bool recursive, List<string> simpleList, FileInfoList detailList )
		{
			findFiles( pattern, recursive, simpleList, detailList, "" );
		}

		/// <param name="currentDir">The current directory relative to the base of the archive, for file naming</param>
		protected void findFiles( string pattern, bool recursive, List<string> simpleList, FileInfoList detailList, string currentDir )
		{
			if( currentDir == "" )
			{
				currentDir = _zipDir;
			}
			FileStream fs = File.OpenRead( _zipFile );
			_zipStream = new ZipInputStream( fs );

			ZipEntry entry = _zipStream.GetNextEntry();
			if( pattern[ 0 ] == '*' )
			{
				pattern = pattern.Substring( 1 );
			}
			Regex ex = new Regex( pattern );

			while( entry != null )
			{
				// get the full path for the output file
				string file = entry.Name;
				if( ex.IsMatch( file ) )
				{
					if( simpleList != null )
					{
						simpleList.Add( file );
					}
					if( detailList != null )
					{
						FileInfo fileInfo;
						fileInfo.Archive = this;
						fileInfo.Filename = entry.Name;
						fileInfo.Basename = Path.GetFileName( entry.Name );
						fileInfo.Path = Path.GetDirectoryName( entry.Name ) + Path.DirectorySeparatorChar;
						fileInfo.CompressedSize = entry.CompressedSize;
						fileInfo.UncompressedSize = entry.Size;
						fileInfo.ModifiedTime = entry.DateTime;
						detailList.Add( fileInfo );
					}
				}

				entry = _zipStream.GetNextEntry();
			}
		}

		#endregion Utility Methods

		#region Constructors and Destructor

		public ZipArchive( string name, string archType )
			: base( name, archType ) {}

		~ZipArchive()
		{
			Unload();
		}

		#endregion Constructors and Destructor

		#region Archive Implementation

		/// <summary>
		///
		/// </summary>
		public override bool IsCaseSensitive { get { return false; } }

		/// <summary>
		///
		/// </summary>
		public override void Load()
		{
			if( _zipFile == null || _zipFile.Length == 0 )
			{
				_zipFile = Path.GetFullPath( Name );

				// read the open the zip archive
				FileStream fs = File.OpenRead( _zipFile );
				fs.Position = 0;

				// get a input stream from the zip file
				_zipStream = new ZipInputStream( fs );
				//ZipEntry entry = _zipStream.GetNextEntry();
				//Regex ex = new Regex( pattern );

				//while ( entry != null )
				//{
				//    // get the full path for the output file
				//    string file = entry.Name;
				//    if ( ex.IsMatch( file ) )
				//    {
				//        FileInfo fileInfo;
				//        fileInfo.Archive = this;
				//        fileInfo.Filename = entry.Name;
				//        fileInfo.Basename = Path.GetFileName( entry.Name );
				//        fileInfo.Path = Path.GetDirectoryName( entry.Name ) + Path.DirectorySeparatorChar;
				//        fileInfo.CompressedSize = entry.CompressedSize;
				//        fileInfo.UncompressedSize = entry.Size;
				//        _fileList.Add( fileInfo );
				//    }

				//    entry = _zipStream.GetNextEntry();
				//}
			}
		}

		/// <summary>
		///
		/// </summary>
		public override void Unload()
		{
			if( _zipStream != null )
			{
				_zipStream.Close();
				_zipStream.Dispose();
				_zipStream = null;
			}
		}

		/// <summary>
		///
		/// </summary>
		/// <param name="filename"></param>
		/// <param name="readOnly"></param>
		/// <returns></returns>
		public override Stream Open( string filename, bool readOnly )
		{
			ZipEntry entry;

			// we will put the decompressed data into a memory stream
			MemoryStream output = new MemoryStream();
			FileStream fs = File.OpenRead( _zipFile );
			_zipStream = new ZipInputStream( fs );

			// get the first entry
			entry = _zipStream.GetNextEntry();

			// loop through all the entries until we find the requested one
			while( entry != null )
			{
				if( entry.Name.ToLower() == filename.ToLower() )
				{
					break;
				}

				// look at the next file in the list
				entry = _zipStream.GetNextEntry();
			}

			if( entry == null )
			{
				return null;
			}

			// write the data to the output stream
			int size = 2048;
			byte[] data = new byte[2048];
			while( true )
			{
				size = _zipStream.Read( data, 0, data.Length );
				if( size > 0 )
				{
					output.Write( data, 0, size );
				}
				else
				{
					break;
				}
			}

			// reset the position to make sure it is at the beginning of the stream
			output.Position = 0;
			return output;
		}

		/// <summary>
		///
		/// </summary>
		/// <param name="recursive"></param>
		/// <returns></returns>
		public override List<string> List( bool recursive )
		{
			return Find( "*", recursive );
		}

		/// <summary>
		///
		/// </summary>
		/// <param name="recursive"></param>
		/// <returns></returns>
		public override FileInfoList ListFileInfo( bool recursive )
		{
			return FindFileInfo( "*", recursive );
		}

		/// <summary>
		///
		/// </summary>
		/// <param name="pattern"></param>
		/// <param name="recursive"></param>
		/// <returns></returns>
		public override List<string> Find( string pattern, bool recursive )
		{
			List<string> ret = new List<string>();

			findFiles( pattern, recursive, ret, null );

			return ret;
		}

		/// <summary>
		///
		/// </summary>
		/// <param name="pattern"></param>
		/// <param name="recursive"></param>
		/// <returns></returns>
		public override FileInfoList FindFileInfo( string pattern, bool recursive )
		{
			FileInfoList ret = new FileInfoList();

			findFiles( pattern, recursive, null, ret );

			return ret;
		}

		/// <summary>
		///
		/// </summary>
		/// <param name="fileName"></param>
		/// <returns></returns>
		public override bool Exists( string fileName )
		{
			List<string> ret = new List<string>();

			findFiles( fileName, false, ret, null );

			return (bool)( ret.Count > 0 );
		}

		#endregion Archive Implementation
	}

	/// <summary>
	/// Specialization of ArchiveFactory for Zip files.
	/// </summary>
	/// <ogre name="ZipArchive">
	///     <file name="OgreZip.h"   revision="" lastUpdated="5/18/2006" lastUpdatedBy="Borrillis" />
	///     <file name="OgreZip.cpp" revision="" lastUpdated="5/18/2006" lastUpdatedBy="Borrillis" />
	/// </ogre>
	public class ZipArchiveFactory : ArchiveFactory
	{
		private const string _type = "ZipFile";

		#region ArchiveFactory Implementation

		public override string Type { get { return _type; } }

		public override Archive CreateInstance( string name )
		{
			return new ZipArchive( name, _type );
		}

		public override void DestroyInstance( ref Archive obj )
		{
			obj.Dispose();
		}

		#endregion
	};
}


text:
package si.flyerman.interfaces;

import java.io.File;
import javax.activation.DataHandler;
import javax.xml.bind.annotation.XmlMimeType;
import javax.xml.ws.soap.MTOM;
import org.jvnet.staxex.StreamingDataHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *
 * @author Matic Makovec <matic.makovec@gmail.com>
 */
@MTOM
public class FileUpload {
    static final Logger log = LoggerFactory.getLogger(FileUpload.class);
    private FileUpload(){}
    // TODO: everything.
    public void fileUpload(String name, @XmlMimeType("application/octet-stream") DataHandler data){
        try {
            StreamingDataHandler sdh = (StreamingDataHandler)data;
            File file = File.createTempFile(name, "");
            sdh.moveTo(file);
            sdh.close();
        } catch (Exception e){
            log.error(e.getMessage());
        }
    }
}


text:
<?php
	// Starts a new session
	ob_start();
	session_start();
?>

<!DOCTYPE html>

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

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

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

		<link rel="stylesheet" href="../css/sticky-footer.css" />

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

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

		<?php

		// Determine site content root
		$webroot = dirname(dirname(__FILE__));

		?>

		<?php
			require_once($webroot . "/includes/header.php");

			if( $_SESSION['isAdmin'] == FALSE ) {

				die ("You do not have the required access to see this page!");

			}
		?>

				<?php
					require_once($webroot . "/includes/sidebar.php");
				?>

Add Customers

				<form class="form-signin" id="addCustomerForm" onsubmit="return false;">

New Customer Info

					Account Number
					<input type="text" id="inputNewAccountNumber" name="inputNewAccountNumber" class="form-control form-first" placeholder="Account Number" autocomplete="off" autofocus />
					First Name
					<input type="text" id="inputNewFirstName" name="inputNewFirstName" class="form-control form-middle" placeholder="First Name" autocomplete="off" />
					Last Name
					<input type="text" id="inputNewLastName" name="inputNewLastName" class="form-control form-middle" placeholder="Last Name" autocomplete="off" />
					Zip Code
					<input type="text" id="inputNewZip" name="inputNewZip" class="form-control form-last" placeholder="Zip Code" autocomplete="off" />

						<button id="addCustomerCancelButton" type="submit" class="btn btn-default">Cancel</button>
						<button id="addCustomerAddButton" type="submit" class="btn btn-primary">Add</button>

				</form>

© World Insurance 2014 Site Created & Managed by techsym


text:
<?php
/**
 * Created by PhpStorm.
 * User: Angelo
 * Date: 18/11/2016
 * Time: 19:46
 */

namespace AppBundle\Manager;

use AppBundle\Model\Partita;
use AppBundle\Utility\DB;
class ManagerPartita
{

    private $conn;
    private $db;

    public function __construct()
    {
        $this->db=new DB();
        $this->conn=$this->db->connect();
    }

    public function getAll(){
        $partite = array();
        $sql = "SELECT * from partite";
        $result = $this->conn->query($sql);
        $res = "";
        $i=0;
        if($result->num_rows >0){
            while($row = $result->fetch_assoc()){
                $s = new Partita();
                $s->setIdPartita($row["idPartita"]);
                $s->setSquadraCasa($row["squadraCasa"]);
                $s->setSquadraTrasferta($row["squadraTrasferta"]);
                $s->setRisultato($row["risultato"]);
                $s->setLuogo($row["luogo"]);
                $s->setOrario($row["orario"]);
                $s->setSquadreIdSquadre($row["Squadre_idSquadre"]);
                $partite[$i] = $s;
                $i++;
            }
            return $partite;
        }
        else {
            return FALSE;
        }
    }

    public function getPartitaById($idPartita){
        $toReturnPartita = new Partita();
        $sql = "SELECT * FROM partite WHERE idPartita='$idPartita'";
        $result = $this->conn->query($sql);
        $valore = $result->num_rows;
        if($valore > 0){
            $row = $result->fetch_assoc();
            $toReturnPartita->setSquadreIdSquadre($row["Squadre_idSquadre"]);
            $toReturnPartita->setRisultato($row["risultato"]);
            $toReturnPartita->setSquadraCasa($row["squadraCasa"]);
            $toReturnPartita->setSquadraTrasferta($row["squadraTrasferta"]);
            $toReturnPartita->setIdPartita($row["idPartita"]);
            $toReturnPartita->setLuogo($row["luogo"]);
            $toReturnPartita->setOrario($row["orario"]);
            return $toReturnPartita;
        } else {
            return FALSE;
        }

    }

    public function getPartitaBySquadraCasa($squadraCasa){
        $toReturnPartite = array();
        $sql = "SELECT * FROM partite WHERE squadraCasa='$squadraCasa'";
        $result = $this->conn->query($sql);
        if($result->num_rows > 0){
            $i=0;
            while($row = $result->fetch_assoc()){
                $s = new Partita();
                $s->setIdPartita($row["idPartita"]);
                $s->setSquadraCasa($row["squadraCasa"]);
                $s->setSquadraTrasferta($row["squadraTrasferta"]);
                $s->setRisultato($row["risultato"]);
                $s->setLuogo($row["luogo"]);
                $s->setOrario($row["orario"]);
                $s->setSquadreIdSquadre($row["Squadre_idSquadre"]);
                $toReturnPartite[$i] = $s;
                $i++;
            }
            return $toReturnPartite;
        } else {
            return FALSE;
        }
    }

    public function getPartitaBySquadraTrasferta($squadraTrasferta){
        $toReturnPartite = array();
        $sql = "SELECT * FROM partite WHERE squadraTrasferta='$squadraTrasferta'";
        $result = $this->conn->query($sql);
        if($result->num_rows > 0){
            $i=0;
            while($row = $result->fetch_assoc()){
                $s = new Partita();
                $s->setIdPartita($row["idPartita"]);
                $s->setSquadraCasa($row["squadraCasa"]);
                $s->setSquadraTrasferta($row["squadraTrasferta"]);
                $s->setRisultato($row["risultato"]);
                $s->setLuogo($row["luogo"]);
                $s->setOrario($row["orario"]);
                $s->setSquadreIdSquadre($row["Squadre_idSquadre"]);
                $toReturnPartite[$i] = $s;
                $i++;
            }
            return $toReturnPartite;
        } else {
            return FALSE;
        }
    }

    public function insertPartita(Partita $partita){
        $managerSquadra = new ManagerSquadra();
        $squadra=$managerSquadra->getById($partita->getSquadreIdSquadre());
        if($squadra!=null){
            $query = "INSERT INTO partite (squadraCasa, squadraTrasferta, risultato, orario, luogo , Squadre_idSquadre)
            VALUES ('" . $partita->getSquadraCasa() . "','"
                . $partita->getSquadraTrasferta() . "','"
                . $partita->getRisultato() . "','"
                . $partita->getOrario(). "','"
                . $partita->getLuogo(). "','"
                . $partita->getSquadreIdSquadre() . "')";

            if (!$this->conn->query($query)) {
                return null;
            }
            else return $partita;
        }
        else return null;

    }

    public function deletePartita($idPartita){
        $controllo = $this->getPartitaById($idPartita);
        if($controllo != FALSE){
            $sql = "DELETE FROM partite WHERE idPartita='$idPartita'";
            $risultato = $this->conn->query($sql);
            return $risultato;
        } else {
            return FALSE;
        }
    }

    public function aggiornaPartita(Partita $partita){
        $risultato = $this->getPartitaById($partita->getIdPartita());
        if($risultato!=FALSE){
            $risultato = $partita->getRisultato();
            $squadraCasa = $partita->getSquadraCasa();
            $squadraTrasferta = $partita->getSquadraTrasferta();
            $id = $partita->getIdPartita();
            $or=$partita->getOrario();
            $l=$partita->getLuogo();
            $sql = "UPDATE partite SET risultato='$risultato', orario='$or', luogo='$l',squadraCasa='$squadraCasa' , squadraTrasferta='$squadraTrasferta'  WHERE idPartita='$id'";
            if (!$this->conn->query($sql)) {

                return false;
            }
            else return $partita;
        }
        return false;
    }

    public function __destruct()
    {
        // TODO: Implement __destruct() method.
        $this->db->close($this->conn);
    }
}


text:
namespace Sakuno.SystemInterop
{
    class AudioManagerEventSink : NativeInterfaces.IMMNotificationClient, NativeInterfaces.IAudioSessionNotification
    {
        internal AudioManagerEventSink() { }

        public void OnDefaultDeviceChanged(NativeConstants.DataFlow rpFlow,  NativeConstants.Role rpRole, string rpDefaultDeviceID)
        {
        }

        public void OnSessionCreated(NativeInterfaces.IAudioSessionControl rpSession) => AudioManager.OnSessionCreated(rpSession);

        public void OnDeviceAdded(string rpDeviceID, AudioDeviceState rpState) { }
        public void OnDeviceRemoved(string rpDeviceID, AudioDeviceState rpState) { }
        public void OnDeviceStateChanged(string rpDeviceID, AudioDeviceState rpState) { }
        public void OnPropertyValueChanged(string rpDeviceID, NativeStructs.PROPERTYKEY rpKey) { }
    }
}


text:
<?php

namespace SAREhub\Component\Worker\Command;

interface CommandReplyInput {

	/**
	 * @param bool $wait
	 * @return CommandReply
	 */
	public function getNext($wait = false);

	public function close();
}


text:
<?php
namespace Opensixt\SxTranslateBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use \Symfony\Bundle\FrameworkBundle\Translation\Translator;
use \Symfony\Component\Form\CallbackValidator;
use \Symfony\Component\Form\FormError;

/**
 * @author Dmitri Mansilia <dmitri.mansilia@sixt.com>
 */
class AddFreeTextForm extends AbstractType
{
    /**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add(
            'headline',
            'text',
            array(
                'label'       => 'freetext.title',
                'trim'        => true,
                'data'        => $options['headline'],
                'required'    => true,
            )
        )
        ->add(
            'text',
            'textarea',
            array(
                'label'       => 'freetext.text',
                'trim'        => true,
                'data'        => $options['text'],
                'required'    => true,
            )
        )
        ->add(
            'locale',
            'choice',
            array(
                'label'       => 'freetext.language',
                'empty_value' => '',
                'choices'     => $options['locales'],
                'data'        => $options['frmLanguages'],
                'required'    => true,
                'expanded'    => true,
                'multiple'    => true,
            )
        );
    }

    /**
     * Returns the name of this type.
     *
     * @return string The name of this type
     */
    public function getName()
    {
        return '';
    }

    /**
     * Define default values in option array
     *
     * @param array $options
     * @return array
     */
    public function getDefaultOptions(array $options)
    {
        return array(
            'headline'     => '',
            'text'         => '',
            'locales'      => array(),
            'frmLanguages' => array(),
        );
    }
}


text:
"""
:mod:`state_test` --- lib.sibra.state.state unit tests
======================================================
"""
# Stdlib
from unittest.mock import patch, call

# External packages
import nose
import nose.tools as ntools

# SCION
from lib.sibra.state.state import SibraState
from test.testcommon import assert_these_calls, create_mock

class TestSibraStateUpdateTick(object):
    """
    Unit tests for lib.sibra.state.state.SibraState.update_tick
    """
    @patch("lib.sibra.state.state.current_tick", autospec=True)
    @patch("lib.sibra.state.state.LinkBandwidth", autospec=True)
    def test(self, _, curr_tick):
        inst = SibraState("bw", "isd as")
        inst.curr_tick = 0
        inst.link = create_mock(["next"])
        inst.steady = "steady"
        inst.ephemeral = "ephemeral"
        inst._resv_tick = create_mock()
        curr_tick.return_value = 3
        # Call
        inst.update_tick()
        # Tests
        ntools.eq_(inst.curr_tick, 3)
        assert_these_calls(inst.link.next, [call()] * 3)
        assert_these_calls(inst._resv_tick,
                           [call("steady"), call("ephemeral")] * 3)

class TestSibraStateResvTick(object):
    """
    Unit tests for lib.sibra.state.state.SibraState._resv_tick
    """
    @patch("lib.sibra.state.state.LinkBandwidth", autospec=True)
    def test(self, _):
        inst = SibraState("bw", "isd as")
        inst.curr_tick = "curr tick"
        resvs = []
        for i in range(4):
            resv = create_mock(["next"])
            resv.next.return_value = bool(i % 2)
            resvs.append(resv)
        resv_dict = dict(enumerate(resvs))
        # Calls
        inst._resv_tick(resv_dict)
        # Tests
        for resv in resvs:
            resv.next.assert_called_once_with("curr tick")
        ntools.eq_(resv_dict, {1: resvs[1], 3: resvs[3]})

class TestSibraStateAddSteady(object):
    """
    Unit tests for lib.sibra.state.state.SibraState.add_steady
    """
    @patch("lib.sibra.state.state.LinkBandwidth", autospec=True)
    def test_setup_success(self, _):
        inst = SibraState("bw", "isd as")
        inst.update_tick = create_mock()
        inst._create_steady = create_mock()
        inst._create_steady.return_value = "resv"
        inst._add = create_mock()
        inst._add.return_value = None
        # Call
        inst.add_steady("path id", "resv idx", "bwsnap", "exp_tick", "accepted")
        # Tests
        inst.update_tick.assert_called_once_with()
        inst._create_steady.assert_called_once_with("path id")
        inst._add.assert_called_once_with(
            "resv", "resv idx", "bwsnap", "exp_tick", "accepted")
        ntools.eq_(inst.steady, {"path id": "resv"})
        ntools.eq_(inst.pend_steady, {"path id": True})

    @patch("lib.sibra.state.state.LinkBandwidth", autospec=True)
    def test_renewal_denied(self, _):
        inst = SibraState("bw", "isd as")
        inst.update_tick = create_mock()
        inst._add = create_mock()
        inst.steady["path id"] = "resv"
        # Call
        ntools.eq_(
            inst.add_steady("path id", "resv idx", "bwsnap", "exp_tick",
                            "accepted", setup=False),
            inst._add.return_value)
        # Tests
        inst._add.assert_called_once_with(
            "resv", "resv idx", "bwsnap", "exp_tick", "accepted")

class TestSibraStateAddEphemeral(object):
    """
    Unit tests for lib.sibra.state.state.SibraState.add_ephemeral
    """
    @patch("lib.sibra.state.state.LinkBandwidth", autospec=True)
    def test_setup_success(self, _):
        inst = SibraState("bw", "isd as")
        inst.update_tick = create_mock()
        inst._create_ephemeral = create_mock()
        inst._create_ephemeral.return_value = "resv"
        inst._add = create_mock()
        inst._add.return_value = None
        inst.steady["steady id"] = create_mock(["add_child"])
        # Call
        inst.add_ephemeral("path id", "steady id", "resv idx", "bwsnap",
                           "exp_tick", "accepted")
        # Tests
        inst.update_tick.assert_called_once_with()
        inst._create_ephemeral.assert_called_once_with("path id", "steady id")
        inst._add.assert_called_once_with(
            "resv", "resv idx", "bwsnap", "exp_tick", "accepted")
        ntools.eq_(inst.ephemeral, {"path id": "resv"})
        ntools.eq_(inst.pend_ephemeral, {"path id": True})
        inst.steady["steady id"].add_child.assert_called_once_with("path id")

    @patch("lib.sibra.state.state.LinkBandwidth", autospec=True)
    def test_renewal_denied(self, _):
        inst = SibraState("bw", "isd as")
        inst.update_tick = create_mock()
        inst._add = create_mock()
        inst.ephemeral["path id"] = "resv"
        # Call
        ntools.eq_(
            inst.add_ephemeral("path id", "steady id", "resv idx", "bwsnap",
                               "exp_tick", "accepted", setup=False),
            inst._add.return_value)
        # Tests
        inst._add.assert_called_once_with(
            "resv", "resv idx", "bwsnap", "exp_tick", "accepted")

class TestSibraStateAdd(object):
    """
    Unit tests for lib.sibra.state.state.SibraState._add
    """
    @patch("lib.sibra.state.state.LinkBandwidth", autospec=True)
    def test_full(self, _):
        inst = SibraState("bw", "isd as")
        inst.curr_tick = "curr tick"
        resv = create_mock(["add"])
        bwhint_cls = create_mock(["floor"])
        bwhint = create_mock(["to_classes"])
        bwhint.to_classes.return_value = bwhint_cls
        resv.add.return_value = bwhint
        # Call
        ntools.eq_(inst._add(resv, "resv idx", "bwsnap", "exp_tick", False),
                   bwhint_cls.floor.return_value)
        # Tests
        resv.add.assert_called_once_with("resv idx", "bwsnap", "exp_tick",
                                         "curr tick")
        bwhint.to_classes.assert_called_once_with(floor=True)

if __name__ == "__main__":
    nose.run(defaultTest=__name__)


text:
<?php

namespace Alchemy\Phrasea\SDK;

use Alchemy\Phrasea\SDK\Exception\RuntimeException;
use Doctrine\Common\Cache\ArrayCache;
use Doctrine\Common\Cache\MemcacheCache;
use Doctrine\Common\Cache\MemcachedCache;
use Guzzle\Cache\DoctrineCacheAdapter;
use Guzzle\Plugin\Cache\CachePlugin as GuzzleCachePlugin;
use PhraseanetSDK\Client;
use Silex\Application;
use Silex\ServiceProviderInterface;
use PhraseanetSDK\HttpAdapter\Guzzle as Adapter;

/**
 * Phraseanet SDK Silex provider
 */
class PhraseanetSDKServiceProvider implements ServiceProviderInterface
{

    public function register(Application $app)
    {
        $app['phraseanet-sdk'] = $app->share(function() use ($app) {

                $guzzle = $app['guzzle.client'];
                /* @var $guzzle \Guzzle\Http\Client */

                $getCache = function () use ($app) {

                    if(!isset($app['phraseanet-sdk.cache'])) {
                        return new ArrayCache();
                    }

                    switch(strtolower($app['phraseanet-sdk.cache'])) {
                        case 'array':
                            return new ArrayCache();
                            break;
                        case 'memcache':
                            $memcache = new \Memcache();

                            $host = $app['phraseanet-sdk.cache_host'];
                            $port = $app['phraseanet-sdk.cache_port'];

                            $memcache->addServer($host,$port);

                            $cache = new MemcacheCache();
                            $cache->setMemcache($memcache);

                            return $cache;
                            break;
                        case 'memcached':
                            $memcached = new \Memcached();

                            $host = $app['phraseanet-sdk.cache_host'];
                            $port = $app['phraseanet-sdk.cache_port'];

                            $memcached->addServer($host,$port);

                            $cache = new MemcachedCache();
                            $cache->setMemcached($memcached);

                            return $cache;
                            break;
                        default:
                            throw new RuntimeException(sprintf('Cache `%s` is not supported', $app['phraseanet-sdk.cache']));
                            break;
                    }
                };

                $adapter = new DoctrineCacheAdapter($getCache());

                $lifetime = isset($app['phraseanet-sdk.cache_ttl']) ? $app['phraseanet-sdk.cache_ttl'] : 60;
                $revalidate = isset($app['phraseanet-sdk.cache_revalidate']) ? $app['phraseanet-sdk.cache_revalidate'] : null;

                $guzzle->addSubscriber(new GuzzleCachePlugin($adapter, $lifetime));

                $guzzle->addSubscriber(new CachePlugin($lifetime, $revalidate));

                $guzzle->setBaseUrl($app['phraseanet-sdk.apiUrl']);

                $logger = isset($app['monolog']) && $app['debug'] ? $app['monolog'] : null;

                $client = new Client($app['phraseanet-sdk.apiKey'], $app['phraseanet-sdk.apiSecret'], new Adapter($guzzle), $logger);

                if (isset($app['phraseanet-sdk.apiDevToken'])) {
                    $client->setAccessToken($app['phraseanet-sdk.apiDevToken']);
                }

                return $client;
            });
    }

    public function boot(Application $app)
    {
        if ( ! isset($app['phraseanet-sdk.apiSecret'])) {
            throw new RuntimeException('You must provide an api secret');
        }

        if ( ! isset($app['phraseanet-sdk.apiKey'])) {
            throw new RuntimeException('You must provide an api key');
        }

        if ( ! isset($app['phraseanet-sdk.apiUrl'])) {
            throw new RuntimeException('You must provide an api url');
        }

        if ( ! isset($app['monolog'])) {
            throw new RuntimeException('Phraseanet SDK Provider requires monolog service');
        }

        if ( ! isset($app['guzzle'])) {
            throw new RuntimeException('Phraseanet SDK Provider requires guzzle service');
        }
    }
}


text:
<?php
class Sale_suspended extends CI_Model
{
	function get_all()
	{
		$this->db->from('sales_suspended');
		$this->db->order_by('sale_id');
		return $this->db->get();
	}

	public function get_info($sale_id)
	{
		$this->db->from('sales_suspended');
		$this->db->where('sale_id',$sale_id);
		return $this->db->get();
	}

	function exists($sale_id)
	{
		$this->db->from('sales_suspended');
		$this->db->where('sale_id',$sale_id);
		$query = $this->db->get();

		return ($query->num_rows()==1);
	}

	function update($sale_data, $sale_id)
	{
		$this->db->where('sale_id', $sale_id);
		$success = $this->db->update('sales_suspended',$sale_data);

		return $success;
	}

	function save ($items,$customer_id,$employee_id,$comment,$payments,$sale_id=false)
	{
		if(count($items)==0)
			return -1;

		//Alain Multiple payments
		//Build payment types string
		$payment_types='';
		foreach($payments as $payment_id=>$payment)
		{
			$payment_types=$payment_types.$payment['payment_type'].': '.to_currency($payment['payment_amount']).'<br />';
		}

		$sales_data = array(
			'sale_time' => date('Y-m-d H:i:s'),
			'customer_id'=> $this->Customer->exists($customer_id) ? $customer_id : null,
			'employee_id'=>$employee_id,
			'payment_type'=>$payment_types,
			'comment'=>$comment
		);

		//Run these queries as a transaction, we want to make sure we do all or nothing
		$this->db->trans_start();

		$this->db->insert('sales_suspended',$sales_data);
		$sale_id = $this->db->insert_id();

		foreach($payments as $payment_id=>$payment)
		{
			$sales_payments_data = array
			(
				'sale_id'=>$sale_id,
				'payment_type'=>$payment['payment_type'],
				'payment_amount'=>$payment['payment_amount']
			);
			$this->db->insert('sales_suspended_payments',$sales_payments_data);
		}

		foreach($items as $line=>$item)
		{
			$cur_item_info = $this->Item->get_info($item['item_id']);

			$sales_items_data = array
			(
				'sale_id'=>$sale_id,
				'item_id'=>$item['item_id'],
				'line'=>$item['line'],
				'description'=>$item['description'],
				'serialnumber'=>$item['serialnumber'],
				'quantity_purchased'=>$item['quantity'],
				'discount_percent'=>$item['discount'],
				'item_cost_price' => $cur_item_info->cost_price,
				'item_unit_price'=>$item['price'],
				'item_location'=>$item['item_location']
			);

			$this->db->insert('sales_suspended_items',$sales_items_data);

			$customer = $this->Customer->get_info($customer_id);
 			if ($customer_id == -1 or $customer->taxable)
 			{
				foreach($this->Item_taxes->get_info($item['item_id']) as $row)
				{
					$this->db->insert('sales_suspended_items_taxes', array(
						'sale_id' 	=>$sale_id,
						'item_id' 	=>$item['item_id'],
						'line'      =>$item['line'],
						'name'		=>$row['name'],
						'percent' 	=>$row['percent']
					));
				}
			}
		}
		$this->db->trans_complete();

		if ($this->db->trans_status() === FALSE)
		{
			return -1;
		}

		return $sale_id;
	}

	function delete($sale_id)
	{
		//Run these queries as a transaction, we want to make sure we do all or nothing
		$this->db->trans_start();

		$this->db->delete('sales_suspended_payments', array('sale_id' => $sale_id));
		$this->db->delete('sales_suspended_items_taxes', array('sale_id' => $sale_id));
		$this->db->delete('sales_suspended_items', array('sale_id' => $sale_id));
		$this->db->delete('sales_suspended', array('sale_id' => $sale_id));

		$this->db->trans_complete();

		return $this->db->trans_status();
	}

	function get_sale_items($sale_id)
	{
		$this->db->from('sales_suspended_items');
		$this->db->where('sale_id',$sale_id);
		return $this->db->get();
	}

	function get_sale_payments($sale_id)
	{
		$this->db->from('sales_suspended_payments');
		$this->db->where('sale_id',$sale_id);
		return $this->db->get();
	}

	function get_customer($sale_id)
	{
		$this->db->from('sales_suspended');
		$this->db->where('sale_id',$sale_id);
		return $this->Customer->get_info($this->db->get()->row()->customer_id);
	}

	function get_comment($sale_id)
	{
		$this->db->from('sales_suspended');
		$this->db->where('sale_id',$sale_id);
		return $this->db->get()->row()->comment;
	}
}
?>


text:
<?php
/**
 * @package modx
 * @subpackage registry.db.sqlsrv
 */
require_once (dirname(dirname(__FILE__)) . '/moddbregisterqueue.class.php');
/**
 * @package modx
 * @subpackage sqlsrv
 */
class modDbRegisterQueue_sqlsrv extends modDbRegisterQueue {
}


text:
'use strict';
var chalk = require('chalk');
var table = require('text-table');
var logSymbols = require('log-symbols');
var stringLength = require('string-length');
var plur = require('plur');
var fs = require('fs');

//Logger
var logToFile = '';
var logObj =
{
	path: '',
	messages: [''],
	reports: ['']
};

module.exports = {
	toString: function () {
		return __filename;
	},
	reporter: function (result, config, options) {
		var total = result.length;
		var ret = '';
		var headers = [];
		var prevfile;
		var errorCount = 0;
		var warningCount = 0;

		options = options || {};

		//Logger
		logToFile = '';

		ret += table(result.map(function (el, i) {
			var err = el.error;
			// E: Error, W: Warning, I: Info
			var isError = err.code && err.code[0] === 'E';

			var line = [
				'',
				chalk.gray('line ' + err.line),
				chalk.gray('col ' + err.character),
				isError ? chalk.red(err.reason) : chalk.blue(err.reason)
			];

			if (el.file !== prevfile) {
				headers[i] = el.file;
			}

			if (options.verbose) {
				line.push(chalk.gray('(' + err.code + ')'));
			}

			if (isError) {
				errorCount++;
			} else {
				warningCount++;
			}

			prevfile = el.file;

			//Logger
			logToFile += '
';
			logToFile += 'line ' + err.line + ' col ' + err.character;
				if(isError)
				{
					logToFile += ' ';
					logToFile += err.reason;
					logToFile += '

';
				}
				else
				{
					logToFile += ' ';
					logToFile += err.reason;
					logToFile += '

';
				}
			return line;
		}), {
			stringLength: stringLength
		}).split('\n').map(function (el, i) {
			return headers[i] ? '\n' + chalk.underline(headers[i]) + '\n' + el : el;
		}).join('\n') + '\n\n';

		if (total > 0) {
			if (errorCount > 0) {
				ret += '  ' + logSymbols.error + '  ' + errorCount + ' ' + plur('error', errorCount) + (warningCount > 0 ? '\n' : '');
				//Logger
				logToFile += '
x ';
				logToFile += errorCount + ' error ';
				logToFile += '
';
			}

			ret += '  ' + logSymbols.warning + '  ' + warningCount + ' ' + plur('warning', total);
			//Logger
			logToFile += '
!! ';
			logToFile += warningCount + ' warning ';
			logToFile += '
';
		} else {
			ret += '  ' + logSymbols.success + ' No problems';
			ret = '\n' + ret.trim();
			//Logger
			logToFile += '
';
			logToFile += 'No problems';
			logToFile += '
';
		}
		//Logger
		//logToFile += ret;
		logToFile += '

';
		fs.appendFile('Dist/jshintLog.html', logToFile);

		console.log(ret + '\n');
	}
};


text:
.. _dojox/data/google-stores:

======================================
dojox.data Google-based Service Stores
======================================

`fixme`: shaneosullivan, overview of stores and caveats. examples. All dojox.data.Google*SearchStore stubs land here.

See Also
========

* :ref:`dojo.data <dojo/data>`


text:
<!DOCTYPE html>

    <meta charset="utf-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <meta name="description" content="...page description...">
    <meta name="author" content="Tyler Bauer">
    <title>Police Shootings</title>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

    <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.5/leaflet.css" />

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

    <link rel="icon" href="img/page-icon.png"/>

Map of Police Shootings

This map is the result of a crowdsourced police shooting data collected by Deadspin

Dots represent an incident where a person was shot with some dots representing males, females and unknown genders.

                        Number of current people shown on map:

                        Percentage of current male victims killed:

                        Percentage of current female victims killed: