text:
@interface ColdAddressListCell : UITableViewCell
- (void)showAddress:(BTAddress *)address;
@end

redpajama_set_name: RedPajamaGithub


text:
package org.apache.giraph.hive.input.edge;

import org.apache.giraph.conf.ImmutableClassesGiraphConfiguration;
import org.apache.giraph.conf.StrConfOption;
import org.apache.giraph.hive.types.HiveValueReader;
import org.apache.giraph.hive.types.HiveVertexIdReader;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.io.WritableComparable;

import com.facebook.hiveio.input.HiveInputDescription;
import com.facebook.hiveio.record.HiveReadableRecord;
import com.facebook.hiveio.schema.HiveTableSchema;

import java.util.Iterator;

import static org.apache.giraph.hive.types.TypedValueReader.createValueReader;
import static org.apache.giraph.hive.types.TypedVertexIdReader.createIdReader;

/**
 * A {@link HiveToEdge} using {@link org.apache.giraph.types.WritableWrapper}s
 *
 * @param <I> Vertex ID
 * @param <E> Edge Value
 */
public class TypedHiveToEdge<I extends WritableComparable, E extends Writable>
    extends SimpleHiveToEdge<I, E> {
  /** Source ID column name in Hive */
  public static final StrConfOption EDGE_SOURCE_ID_COLUMN =
      new StrConfOption("hive.input.edge.source.id.column", null,
          "Source Vertex ID column");
  /** Target ID column name in Hive */
  public static final StrConfOption EDGE_TARGET_ID_COLUMN =
      new StrConfOption("hive.input.edge.target.id.column", null,
          "Target Vertex ID column");
  /** Edge Value column name in Hive */
  public static final StrConfOption EDGE_VALUE_COLUMN =
      new StrConfOption("hive.input.edge.value.column", null,
          "Edge Value column");

  /** Source ID reader */
  private HiveVertexIdReader<I> sourceIdReader;
  /** Target ID reader */
  private HiveVertexIdReader<I> targetIdReader;
  /** Edge Value reader */
  private HiveValueReader<E> vertexValueReader;

  @Override
  public void checkInput(HiveInputDescription inputDesc,
      HiveTableSchema schema) { }

  @Override
  public void initializeRecords(Iterator<HiveReadableRecord> records) {
    super.initializeRecords(records);

    HiveTableSchema schema = getTableSchema();
    ImmutableClassesGiraphConfiguration conf = getConf();

    sourceIdReader = createIdReader(conf, EDGE_SOURCE_ID_COLUMN, schema);
    targetIdReader = createIdReader(conf, EDGE_TARGET_ID_COLUMN, schema);
    vertexValueReader = createValueReader(conf, EDGE_VALUE_COLUMN, schema);
  }

  @Override
  public E getEdgeValue(HiveReadableRecord record) {
    return vertexValueReader.readValue(record);
  }

  @Override
  public I getSourceVertexId(
      HiveReadableRecord record) {
    return sourceIdReader.readId(record);
  }

  @Override
  public I getTargetVertexId(
      HiveReadableRecord record) {
    return targetIdReader.readId(record);
  }
}


text:
using namespace std;

//
// Library namespace:
//
namespace test_print
{

// Test lib function:
void TestPrintForOS()
{
  cout << "Hello, world! (From the TestPrint Mac's Implementation)" << endl;
}

} // namespace test_print


text:
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#include "LaunchPrivatePCH.h"
#include "ExceptionHandling.h"
#include "AndroidPlatformCrashContext.h"

#include "AndroidJNI.h"
#include "AndroidApplication.h"
#include <Android/asset_manager.h>
#include <Android/asset_manager_jni.h>

#define JNI_CURRENT_VERSION JNI_VERSION_1_6

JavaVM* GJavaVM;

// Pointer to target widget for virtual keyboard contents
static IVirtualKeyboardEntry *VirtualKeyboardWidget = NULL;

extern FString GFilePathBase;
extern FString GExternalFilePath;
extern FString GFontPathBase;
extern bool GOBBinAPK;

FOnActivityResult FJavaWrapper::OnActivityResultDelegate;

//////////////////////////////////////////////////////////////////////////

#if UE_BUILD_SHIPPING
// always clear any exceptions in SHipping
#define CHECK_JNI_RESULT(Id) if (Id == 0) { Env->ExceptionClear(); }
#else
#define CHECK_JNI_RESULT(Id) \
if (Id == 0) \
{ \
	if (bIsOptional) { Env->ExceptionClear(); } \
	else { Env->ExceptionDescribe(); checkf(Id != 0, TEXT("Failed to find " #Id)); } \
}
#endif

void FJavaWrapper::FindClassesAndMethods(JNIEnv* Env)
{
	bool bIsOptional = false;
	GameActivityClassID = FindClass(Env, "com/epicgames/ue4/GameActivity", bIsOptional);
	AndroidThunkJava_ShowConsoleWindow = FindMethod(Env, GameActivityClassID, "AndroidThunkJava_ShowConsoleWindow", "(Ljava/lang/String;)V", bIsOptional);
	AndroidThunkJava_ShowVirtualKeyboardInput = FindMethod(Env, GameActivityClassID, "AndroidThunkJava_ShowVirtualKeyboardInput", "(ILjava/lang/String;Ljava/lang/String;)V", bIsOptional);
	AndroidThunkJava_LaunchURL = FindMethod(Env, GameActivityClassID, "AndroidThunkJava_LaunchURL", "(Ljava/lang/String;)V", bIsOptional);
	AndroidThunkJava_GetAssetManager = FindMethod(Env, GameActivityClassID, "AndroidThunkJava_GetAssetManager", "()Landroid/content/res/AssetManager;", bIsOptional);
	AndroidThunkJava_Minimize = FindMethod(Env, GameActivityClassID, "AndroidThunkJava_Minimize", "()V", bIsOptional);
	AndroidThunkJava_ForceQuit = FindMethod(Env, GameActivityClassID, "AndroidThunkJava_ForceQuit", "()V", bIsOptional);
	AndroidThunkJava_GetFontDirectory = FindStaticMethod(Env, GameActivityClassID, "AndroidThunkJava_GetFontDirectory", "()Ljava/lang/String;", bIsOptional);
	AndroidThunkJava_Vibrate = FindMethod(Env, GameActivityClassID, "AndroidThunkJava_Vibrate", "(I)V", bIsOptional);
	AndroidThunkJava_IsMusicActive = FindMethod(Env, GameActivityClassID, "AndroidThunkJava_IsMusicActive", "()Z", bIsOptional);
	AndroidThunkJava_KeepScreenOn = FindMethod(Env, GameActivityClassID, "AndroidThunkJava_KeepScreenOn", "(Z)V", bIsOptional);
	AndroidThunkJava_InitHMDs = FindMethod(Env, GameActivityClassID, "AndroidThunkJava_InitHMDs", "()V", bIsOptional);
	AndroidThunkJava_IsGearVRApplication = FindMethod(Env, GameActivityClassID, "AndroidThunkJava_IsGearVRApplication", "()Z", bIsOptional);

	// the rest are optional
	bIsOptional = true;
	// @todo split GooglePlay
	//	GoogleServicesClassID = FindClass(Env, "com/epicgames/ue4/GoogleServices", bIsOptional);
	GoogleServicesClassID = GameActivityClassID;
	AndroidThunkJava_ResetAchievements = FindMethod(Env, GoogleServicesClassID, "AndroidThunkJava_ResetAchievements", "()V", bIsOptional);
	AndroidThunkJava_ShowAdBanner = FindMethod(Env, GoogleServicesClassID, "AndroidThunkJava_ShowAdBanner", "(Ljava/lang/String;Z)V", bIsOptional);
	AndroidThunkJava_HideAdBanner = FindMethod(Env, GoogleServicesClassID, "AndroidThunkJava_HideAdBanner", "()V", bIsOptional);
	AndroidThunkJava_CloseAdBanner = FindMethod(Env, GoogleServicesClassID, "AndroidThunkJava_CloseAdBanner", "()V", bIsOptional);

	// In app purchase functionality
	AndroidThunkJava_IapSetupService = FindMethod(Env, GoogleServicesClassID, "AndroidThunkJava_IapSetupService", "(Ljava/lang/String;)V", bIsOptional);
	AndroidThunkJava_IapQueryInAppPurchases = FindMethod(Env, GoogleServicesClassID, "AndroidThunkJava_IapQueryInAppPurchases", "([Ljava/lang/String;[Z)Z", bIsOptional);
	AndroidThunkJava_IapBeginPurchase = FindMethod(Env, GoogleServicesClassID, "AndroidThunkJava_IapBeginPurchase", "(Ljava/lang/String;Z)Z", bIsOptional);
	AndroidThunkJava_IapIsAllowedToMakePurchases = FindMethod(Env, GoogleServicesClassID, "AndroidThunkJava_IapIsAllowedToMakePurchases", "()Z", bIsOptional);
}

jclass FJavaWrapper::FindClass(JNIEnv* Env, const ANSICHAR* ClassName, bool bIsOptional)
{
	jclass Class = Env->FindClass(ClassName);
	CHECK_JNI_RESULT(Class);
	return Class;
}

jmethodID FJavaWrapper::FindMethod(JNIEnv* Env, jclass Class, const ANSICHAR* MethodName, const ANSICHAR* MethodSignature, bool bIsOptional)
{
	jmethodID Method = Class == NULL ? NULL : Env->GetMethodID(Class, MethodName, MethodSignature);
	CHECK_JNI_RESULT(Method);
	return Method;
}

jmethodID FJavaWrapper::FindStaticMethod(JNIEnv* Env, jclass Class, const ANSICHAR* MethodName, const ANSICHAR* MethodSignature, bool bIsOptional)
{
	jmethodID Method = Class == NULL ? NULL : Env->GetStaticMethodID(Class, MethodName, MethodSignature);
	CHECK_JNI_RESULT(Method);
	return Method;
}

jfieldID FJavaWrapper::FindField(JNIEnv* Env, jclass Class, const ANSICHAR* FieldName, const ANSICHAR* FieldType, bool bIsOptional)
{
	jfieldID Field = Class == NULL ? NULL : Env->GetFieldID(Class, FieldName, FieldType);
	CHECK_JNI_RESULT(Field);
	return Field;
}

void FJavaWrapper::CallVoidMethod(JNIEnv* Env, jobject Object, jmethodID Method, ...)
{
	// make sure the function exists
	if (Method == NULL || Object == NULL)
	{
		return;
	}

	va_list Args;
	va_start(Args, Method);
	Env->CallVoidMethodV(Object, Method, Args);
	va_end(Args);
}

jobject FJavaWrapper::CallObjectMethod(JNIEnv* Env, jobject Object, jmethodID Method, ...)
{
	if (Method == NULL || Object == NULL)
	{
		return NULL;
	}

	va_list Args;
	va_start(Args, Method);
	jobject Return = Env->CallObjectMethodV(Object, Method, Args);
	va_end(Args);

	return Return;
}

bool FJavaWrapper::CallBooleanMethod(JNIEnv* Env, jobject Object, jmethodID Method, ...)
{
	if (Method == NULL || Object == NULL)
	{
		return false;
	}

	va_list Args;
	va_start(Args, Method);
	jboolean Return = Env->CallBooleanMethodV(Object, Method, Args);
	va_end(Args);

	return (bool)Return;
}

//Declare all the static members of the class defs
jclass FJavaWrapper::GameActivityClassID;
jobject FJavaWrapper::GameActivityThis;
jmethodID FJavaWrapper::AndroidThunkJava_ShowConsoleWindow;
jmethodID FJavaWrapper::AndroidThunkJava_ShowVirtualKeyboardInput;
jmethodID FJavaWrapper::AndroidThunkJava_LaunchURL;
jmethodID FJavaWrapper::AndroidThunkJava_GetAssetManager;
jmethodID FJavaWrapper::AndroidThunkJava_Minimize;
jmethodID FJavaWrapper::AndroidThunkJava_ForceQuit;
jmethodID FJavaWrapper::AndroidThunkJava_GetFontDirectory;
jmethodID FJavaWrapper::AndroidThunkJava_Vibrate;
jmethodID FJavaWrapper::AndroidThunkJava_IsMusicActive;
jmethodID FJavaWrapper::AndroidThunkJava_KeepScreenOn;
jmethodID FJavaWrapper::AndroidThunkJava_InitHMDs;
jmethodID FJavaWrapper::AndroidThunkJava_IsGearVRApplication;

jclass FJavaWrapper::GoogleServicesClassID;
jobject FJavaWrapper::GoogleServicesThis;
jmethodID FJavaWrapper::AndroidThunkJava_ResetAchievements;
jmethodID FJavaWrapper::AndroidThunkJava_ShowAdBanner;
jmethodID FJavaWrapper::AndroidThunkJava_HideAdBanner;
jmethodID FJavaWrapper::AndroidThunkJava_CloseAdBanner;
jmethodID FJavaWrapper::AndroidThunkJava_IapSetupService;
jmethodID FJavaWrapper::AndroidThunkJava_IapQueryInAppPurchases;
jmethodID FJavaWrapper::AndroidThunkJava_IapBeginPurchase;
jmethodID FJavaWrapper::AndroidThunkJava_IapIsAllowedToMakePurchases;

//Game-specific crash reporter
void EngineCrashHandler(const FGenericCrashContext& GenericContext)
{
	const FAndroidCrashContext& Context = static_cast<const FAndroidCrashContext&>(GenericContext);

	static int32 bHasEntered = 0;
	if (FPlatformAtomics::InterlockedCompareExchange(&bHasEntered, 1, 0) == 0)
	{
		const SIZE_T StackTraceSize = 65535;
		ANSICHAR* StackTrace = (ANSICHAR*)FMemory::Malloc(StackTraceSize);
		StackTrace[0] = 0;

		// Walk the stack and dump it to the allocated memory.
		FPlatformStackWalk::StackWalkAndDump(StackTrace, StackTraceSize, 0, Context.Context);
		UE_LOG(LogEngine, Error, TEXT("%s"), ANSI_TO_TCHAR(StackTrace));
		FMemory::Free(StackTrace);

		GError->HandleError();
		FPlatformMisc::RequestExit(true);
	}
}

void AndroidThunkCpp_KeepScreenOn(bool Enable)
{
	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
	{
		// call the java side
		FJavaWrapper::CallVoidMethod(Env, FJavaWrapper::GameActivityThis, FJavaWrapper::AndroidThunkJava_KeepScreenOn, Enable);
	}
}

void AndroidThunkCpp_Vibrate(int32 Duration)
{
	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
	{
		// call the java side
		FJavaWrapper::CallVoidMethod(Env, FJavaWrapper::GameActivityThis, FJavaWrapper::AndroidThunkJava_Vibrate, Duration);
	}
}

// Call the Java side code for initializing VR HMD modules
void AndroidThunkCpp_InitHMDs()
{
	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
	{
		FJavaWrapper::CallVoidMethod(Env, FJavaWrapper::GameActivityThis, FJavaWrapper::AndroidThunkJava_InitHMDs);
	}
}

// Check to see if this application is packaged for GearVR
bool AndroidThunkCpp_IsGearVRApplication()
{
	bool bIsGearVRApplication = false;
	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
	{
		bIsGearVRApplication = FJavaWrapper::CallBooleanMethod(Env, FJavaWrapper::GameActivityThis, FJavaWrapper::AndroidThunkJava_IsGearVRApplication);
	}

	return bIsGearVRApplication;
}

void AndroidThunkCpp_ShowConsoleWindow()
{
	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
	{
		// figure out all the possible texture formats that are allowed
		TArray<FString> PossibleTargetPlatforms;
		FPlatformMisc::GetValidTargetPlatforms(PossibleTargetPlatforms);

		// separate the format suffixes with commas
		FString ConsoleText;
		for (int32 FormatIndex = 0; FormatIndex < PossibleTargetPlatforms.Num(); FormatIndex++)
		{
			const FString& Format = PossibleTargetPlatforms[FormatIndex];
			int32 UnderscoreIndex;
			if (Format.FindLastChar('_', UnderscoreIndex))
			{
				if (ConsoleText != TEXT(""))
				{
					ConsoleText += ", ";
				}

				ConsoleText += Format.Mid(UnderscoreIndex + 1);
			}
		}

		// call the java side
		jstring ConsoleTextJava = Env->NewStringUTF(TCHAR_TO_UTF8(*ConsoleText));
		FJavaWrapper::CallVoidMethod(Env, FJavaWrapper::GameActivityThis, FJavaWrapper::AndroidThunkJava_ShowConsoleWindow, ConsoleTextJava);
		Env->DeleteLocalRef(ConsoleTextJava);
	}
}

void AndroidThunkCpp_ShowVirtualKeyboardInput(TSharedPtr<IVirtualKeyboardEntry> TextWidget, int32 InputType, const FString& Label, const FString& Contents)
{
	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
	{
		// remember target widget for contents
		VirtualKeyboardWidget = &(*TextWidget);

		// call the java side
		jstring LabelJava = Env->NewStringUTF(TCHAR_TO_UTF8(*Label));
		jstring ContentsJava = Env->NewStringUTF(TCHAR_TO_UTF8(*Contents));
		FJavaWrapper::CallVoidMethod(Env, FJavaWrapper::GameActivityThis, FJavaWrapper::AndroidThunkJava_ShowVirtualKeyboardInput, InputType, LabelJava, ContentsJava);
		Env->DeleteLocalRef(ContentsJava);
		Env->DeleteLocalRef(LabelJava);
	}
}

//This function is declared in the Java-defined class, GameActivity.java: "public native void nativeVirtualKeyboardResult(bool update, String contents);"
extern "C" void Java_com_epicgames_ue4_GameActivity_nativeVirtualKeyboardResult(JNIEnv* jenv, jobject thiz, jboolean update, jstring contents)
{
	// update text widget with new contents if OK pressed
	if (update == JNI_TRUE)
	{
		if (VirtualKeyboardWidget != NULL)
		{
			const char* javaChars = jenv->GetStringUTFChars(contents, 0);
			VirtualKeyboardWidget->SetTextFromVirtualKeyboard(FText::FromString(FString(UTF8_TO_TCHAR(javaChars))));

			//Release the string
			jenv->ReleaseStringUTFChars(contents, javaChars);
		}
	}

	// release reference
	VirtualKeyboardWidget = NULL;
}

void AndroidThunkCpp_LaunchURL(const FString& URL)
{
	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
	{
		jstring Argument = Env->NewStringUTF(TCHAR_TO_UTF8(*URL));
		FJavaWrapper::CallVoidMethod(Env, FJavaWrapper::GameActivityThis, FJavaWrapper::AndroidThunkJava_LaunchURL, Argument);
		Env->DeleteLocalRef(Argument);
	}
}

void AndroidThunkCpp_ResetAchievements()
{
	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
	{
		FJavaWrapper::CallVoidMethod(Env, FJavaWrapper::GoogleServicesThis, FJavaWrapper::AndroidThunkJava_ResetAchievements);
	}
}

void AndroidThunkCpp_ShowAdBanner(const FString& AdUnitID, bool bShowOnBottomOfScreen)
{
	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
 	{
		jstring AdUnitIDArg = Env->NewStringUTF(TCHAR_TO_UTF8(*AdUnitID));
		FJavaWrapper::CallVoidMethod(Env, FJavaWrapper::GoogleServicesThis, FJavaWrapper::AndroidThunkJava_ShowAdBanner, AdUnitIDArg, bShowOnBottomOfScreen);
		Env->DeleteLocalRef(AdUnitIDArg);
	}
}

void AndroidThunkCpp_HideAdBanner()
{
 	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
 	{
		FJavaWrapper::CallVoidMethod(Env, FJavaWrapper::GoogleServicesThis, FJavaWrapper::AndroidThunkJava_HideAdBanner);
 	}
}

void AndroidThunkCpp_CloseAdBanner()
{
 	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
 	{
		FJavaWrapper::CallVoidMethod(Env, FJavaWrapper::GoogleServicesThis, FJavaWrapper::AndroidThunkJava_CloseAdBanner);
 	}
}

namespace
{
	jobject GJavaAssetManager = NULL;
	AAssetManager* GAssetManagerRef = NULL;
}

jobject AndroidJNI_GetJavaAssetManager()
{
	if (!GJavaAssetManager)
	{
		if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
		{
			GJavaAssetManager = FJavaWrapper::CallObjectMethod(Env, FJavaWrapper::GameActivityThis, FJavaWrapper::AndroidThunkJava_GetAssetManager);
			Env->NewGlobalRef(GJavaAssetManager);
		}
	}
	return GJavaAssetManager;
}

AAssetManager * AndroidThunkCpp_GetAssetManager()
{
	if (!GAssetManagerRef)
	{
		if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
		{
			jobject JavaAssetMgr = AndroidJNI_GetJavaAssetManager();
			GAssetManagerRef = AAssetManager_fromJava(Env, JavaAssetMgr);
		}
	}

	return GAssetManagerRef;
}

void AndroidThunkCpp_Minimize()
{
	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
	{
		FJavaWrapper::CallVoidMethod(Env, FJavaWrapper::GameActivityThis, FJavaWrapper::AndroidThunkJava_Minimize);
	}
}

void AndroidThunkCpp_ForceQuit()
{
	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
	{
		FJavaWrapper::CallVoidMethod(Env, FJavaWrapper::GameActivityThis, FJavaWrapper::AndroidThunkJava_ForceQuit);
	}
}

bool AndroidThunkCpp_IsMusicActive()
{
	bool bIsActive = false;
	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
	{
		bIsActive = FJavaWrapper::CallBooleanMethod(Env, FJavaWrapper::GameActivityThis, FJavaWrapper::AndroidThunkJava_IsMusicActive);
	}

	return bIsActive;
}

void AndroidThunkCpp_Iap_SetupIapService(const FString& InProductKey)
{
	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
	{
		jstring ProductKey = Env->NewStringUTF(TCHAR_TO_UTF8(*InProductKey));
		FJavaWrapper::CallVoidMethod(Env, FJavaWrapper::GoogleServicesThis, FJavaWrapper::AndroidThunkJava_IapSetupService, ProductKey);
		Env->DeleteLocalRef(ProductKey);
	}
}

bool AndroidThunkCpp_Iap_QueryInAppPurchases(const TArray<FString>& ProductIDs, const TArray<bool>& bConsumable)
{
	FPlatformMisc::LowLevelOutputDebugString(L"[JNI] - AndroidThunkCpp_Iap_QueryInAppPurchases");
	bool bResult = false;

	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
	{
		static jclass StringClass = Env->FindClass("java/lang/String");

		// Populate some java types with the provided product information
		jobjectArray ProductIDArray = (jobjectArray)Env->NewObjectArray(ProductIDs.Num(), StringClass, NULL);
		jbooleanArray ConsumeArray = (jbooleanArray)Env->NewBooleanArray(ProductIDs.Num());

		jboolean* ConsumeArrayValues = Env->GetBooleanArrayElements(ConsumeArray, 0);
		for (uint32 Param = 0; Param < ProductIDs.Num(); Param++)
		{
			jstring StringValue = Env->NewStringUTF(TCHAR_TO_UTF8(*ProductIDs[Param]));
			Env->SetObjectArrayElement(ProductIDArray, Param, StringValue);
			Env->DeleteLocalRef(StringValue);

			ConsumeArrayValues[Param] = bConsumable[Param];
		}
		Env->ReleaseBooleanArrayElements(ConsumeArray, ConsumeArrayValues, 0);

		// Execute the java code for this operation
		bResult = FJavaWrapper::CallBooleanMethod(Env, FJavaWrapper::GoogleServicesThis, FJavaWrapper::AndroidThunkJava_IapQueryInAppPurchases, ProductIDArray, ConsumeArray);

		// clean up references
		Env->DeleteLocalRef(ProductIDArray);
		Env->DeleteLocalRef(ConsumeArray);
	}

	return bResult;
}

bool AndroidThunkCpp_Iap_BeginPurchase(const FString& ProductID, const bool bConsumable)
{
	FPlatformMisc::LowLevelOutputDebugString(L"[JNI] - AndroidThunkCpp_Iap_BeginPurchase");
	bool bResult = false;
	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
	{
		jstring ProductIdJava = Env->NewStringUTF(TCHAR_TO_UTF8(*ProductID));
		bResult = FJavaWrapper::CallBooleanMethod(Env, FJavaWrapper::GoogleServicesThis, FJavaWrapper::AndroidThunkJava_IapBeginPurchase, ProductIdJava, bConsumable);
		Env->DeleteLocalRef(ProductIdJava);
	}

	return bResult;
}

bool AndroidThunkCpp_Iap_IsAllowedToMakePurchases()
{
	FPlatformMisc::LowLevelOutputDebugString(L"[JNI] - AndroidThunkCpp_Iap_IsAllowedToMakePurchases");
	bool bResult = false;
	if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
	{
		bResult = FJavaWrapper::CallBooleanMethod(Env, FJavaWrapper::GoogleServicesThis, FJavaWrapper::AndroidThunkJava_IapIsAllowedToMakePurchases);
	}
	return bResult;
}

//The JNI_OnLoad function is triggered by loading the game library from
//the Java source file.
//	static
//	{
//		System.loadLibrary("MyGame");
//	}
//
// Use the JNI_OnLoad function to map all the class IDs and method IDs to their respective
// variables. That way, later when the Java functions need to be called, the IDs will be ready.
// It is much slower to keep looking up the class and method IDs.

JNIEXPORT jint JNI_OnLoad(JavaVM* InJavaVM, void* InReserved)
{
	FPlatformMisc::LowLevelOutputDebugString(L"In the JNI_OnLoad function");

	JNIEnv* Env = NULL;
	InJavaVM->GetEnv((void **)&Env, JNI_CURRENT_VERSION);

	// if you have problems with stuff being missing esspecially in distribution builds then it could be because proguard is stripping things from java
	// check proguard-project.txt and see if your stuff is included in the exceptions
	GJavaVM = InJavaVM;
	FAndroidApplication::InitializeJavaEnv(GJavaVM, JNI_CURRENT_VERSION, FJavaWrapper::GameActivityThis);

	FJavaWrapper::FindClassesAndMethods(Env);

	// hook signals
#if UE_BUILD_DEBUG
	if (GAlwaysReportCrash)
#else
	if (0)//!FPlatformMisc::IsDebuggerPresent() || GAlwaysReportCrash)
#endif
	{
		// disable crash handler.. getting better stack traces from system logcat for now
//		FPlatformMisc::SetCrashHandler(EngineCrashHandler);
	}

	// Cache path to external storage
	jclass EnvClass = Env->FindClass("android/os/Environment");
	jmethodID getExternalStorageDir = Env->GetStaticMethodID(EnvClass, "getExternalStorageDirectory", "()Ljava/io/File;");
	jobject externalStoragePath = Env->CallStaticObjectMethod(EnvClass, getExternalStorageDir, nullptr);
	jmethodID getFilePath = Env->GetMethodID(Env->FindClass("java/io/File"), "getPath", "()Ljava/lang/String;");
	jstring pathString = (jstring)Env->CallObjectMethod(externalStoragePath, getFilePath, nullptr);
	const char *nativePathString = Env->GetStringUTFChars(pathString, 0);
	// Copy that somewhere safe
	GFilePathBase = FString(nativePathString);

	// then release...
	Env->ReleaseStringUTFChars(pathString, nativePathString);
	FPlatformMisc::LowLevelOutputDebugStringf(TEXT("Path found as '%s'\n"), *GFilePathBase);

	// Get the system font directory
	jstring fontPath = (jstring)Env->CallStaticObjectMethod(FJavaWrapper::GameActivityClassID, FJavaWrapper::AndroidThunkJava_GetFontDirectory);
	const char * nativeFontPathString = Env->GetStringUTFChars(fontPath, 0);
	GFontPathBase = FString(nativeFontPathString);
	Env->ReleaseStringUTFChars(fontPath, nativeFontPathString);
	FPlatformMisc::LowLevelOutputDebugStringf(TEXT("Font Path found as '%s'\n"), *GFontPathBase);

	// Wire up to core delegates, so core code can call out to Java
	DECLARE_DELEGATE_OneParam(FAndroidLaunchURLDelegate, const FString&);
	extern CORE_API FAndroidLaunchURLDelegate OnAndroidLaunchURL;
	OnAndroidLaunchURL = FAndroidLaunchURLDelegate::CreateStatic(&AndroidThunkCpp_LaunchURL);

	FPlatformMisc::LowLevelOutputDebugString(L"In the JNI_OnLoad function 5");

	return JNI_CURRENT_VERSION;
}

//Native-defined functions

//This function is declared in the Java-defined class, GameActivity.java: "public native void nativeSetGlobalActivity();"
extern "C" void Java_com_epicgames_ue4_GameActivity_nativeSetGlobalActivity(JNIEnv* jenv, jobject thiz /*, jobject googleServices*/)
{
	if (!FJavaWrapper::GameActivityThis)
	{
		FJavaWrapper::GameActivityThis = jenv->NewGlobalRef(thiz);
		FAndroidApplication::InitializeJavaEnv(GJavaVM, JNI_CURRENT_VERSION, FJavaWrapper::GameActivityThis);
		if (!FJavaWrapper::GameActivityThis)
		{
			FPlatformMisc::LowLevelOutputDebugString(L"Error setting the global GameActivity activity");
			check(false);
		}

		// @todo split GooglePlay, this needs to be passed in to this function
		FJavaWrapper::GoogleServicesThis = FJavaWrapper::GameActivityThis;
		// FJavaWrapper::GoogleServicesThis = jenv->NewGlobalRef(googleServices);

		bool bIsOptional = false;
		FJavaWrapper::GameActivityClassID = FJavaWrapper::FindClass(jenv, "com/epicgames/ue4/GameActivity", bIsOptional);

		// Next we check to see if the OBB file is in the APK
		jmethodID isOBBInAPKMethod = jenv->GetStaticMethodID(FJavaWrapper::GameActivityClassID, "isOBBInAPK", "()Z");
		GOBBinAPK = (bool)jenv->CallStaticBooleanMethod(FJavaWrapper::GameActivityClassID, isOBBInAPKMethod, nullptr);

		// Cache path to external files directory
		jclass ContextClass = jenv->FindClass("android/content/Context");
		jmethodID getExternalFilesDir = jenv->GetMethodID(ContextClass, "getExternalFilesDir", "(Ljava/lang/String;)Ljava/io/File;");
		jobject externalFilesDirPath = jenv->CallObjectMethod(FJavaWrapper::GameActivityThis, getExternalFilesDir, nullptr);
		jmethodID getFilePath = jenv->GetMethodID(jenv->FindClass("java/io/File"), "getPath", "()Ljava/lang/String;");
		jstring externalFilesPathString = (jstring)jenv->CallObjectMethod(externalFilesDirPath, getFilePath, nullptr);
		const char *nativeExternalFilesPathString = jenv->GetStringUTFChars(externalFilesPathString, 0);
		// Copy that somewhere safe
		GExternalFilePath = FString(nativeExternalFilesPathString);

		// then release...
		jenv->ReleaseStringUTFChars(externalFilesPathString, nativeExternalFilesPathString);
		FPlatformMisc::LowLevelOutputDebugStringf(TEXT("ExternalFilePath found as '%s'\n"), *GExternalFilePath);
	}
}

extern "C" bool Java_com_epicgames_ue4_GameActivity_nativeIsShippingBuild(JNIEnv* LocalJNIEnv, jobject LocalThiz)
{
#if UE_BUILD_SHIPPING
	return JNI_TRUE;
#else
	return JNI_FALSE;
#endif
}

extern "C" void Java_com_epicgames_ue4_GameActivity_nativeOnActivityResult(JNIEnv* jenv, jobject thiz, jobject activity, jint requestCode, jint resultCode, jobject data)
{
	FJavaWrapper::OnActivityResultDelegate.Broadcast(jenv, thiz, activity, requestCode, resultCode, data);
}


text:
'use strict';

/**
 * Module dependencies.
 */
var should = require('should'),
  mongoose = require('mongoose'),
  User = mongoose.model('User'),
  Doctor = mongoose.model('Doctor');

/**
 * Globals
 */
var user, doctor;

/**
 * Unit tests
 */
describe('Doctor Model Unit Tests:', function () {
  beforeEach(function (done) {
    user = new User({
      firstName: 'Full',
      lastName: 'Name',
      displayName: 'Full Name',
      email: 'test@test.com',
      username: 'username',
      password: 'M3@n.jsI$Aw3$0m3'
    });

    user.save(function () {
      doctor = new Doctor({
        title: 'Doctor Title',
        content: 'Doctor Content',
        user: user
      });

      done();
    });
  });

  describe('Method Save', function () {
    it('should be able to save without problems', function (done) {
      this.timeout(10000);
      return doctor.save(function (err) {
        should.not.exist(err);
        done();
      });
    });

    it('should be able to show an error when try to save without title', function (done) {
      doctor.title = '';

      return doctor.save(function (err) {
        should.exist(err);
        done();
      });
    });
  });

  afterEach(function (done) {
    Doctor.remove().exec(function () {
      User.remove().exec(done);
    });
  });
});


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

namespace Hydra.Framework.Conversions
{
    public class ConvertInt
    {
        #region Static Methods
        //
        // **********************************************************************
        /// <summary>
        /// Converts string to integer. Returns defValue if conversion failed.
        /// </summary>
        /// <param name="s">string to parse as integer</param>
        /// <param name="defValue">value to return if conversion failed</param>
        /// <returns>
        /// parse value or default value if conversion failed
        /// </returns>
        // **********************************************************************
        //
        static public int Parse(string s, int defValue)
        {
            if (ConvertUtils.NotEmpty(s))
            {
                int result;
                if (int.TryParse(s.Trim(), out result))
                    return result;
            }

            return defValue;
        }

        //
        // **********************************************************************
        /// <summary>
        /// Converts object to integer. Returns defValue if conversion failed.
        /// </summary>
        /// <param name="o">object to parse as integer</param>
        /// <param name="defValue">value to return if conversion failed</param>
        /// <returns>
        /// parse value or default value if conversion failed
        /// </returns>
        // **********************************************************************
        //
        static public int Parse(object o, int defValue)
        {
            if (ConvertUtils.NotEmpty(o))
            {
                if (o is string)
                {
                    return Parse((string)o, defValue);
                }
                try
                {
                    return Convert.ToInt32(o);
                }
                catch
                {
                    return defValue;
                }
            }

            return defValue;
        }
        #endregion
    }
}


text:
from ddkcore.command import Command

class InitCommand(Command):

    def configure(self):
        description = "Run init commands from the configuration file of the project."
        self.set_description(description)
        self.set_title("Arguments")
        self.set_usage(
            self.get_kit().get_name() +
            " " +
            self._parent_command.get_name() +
            " " +
            self.get_name() +
            " " +
            "<project-id> [options...]\n\n" +
            description
        )

    def configure_parser(self, parser):
        parser.add_argument("pid", metavar="project-id", help="Project ID.")

    def get_name(self):
        return "init"

    def run(self, args, terminal):
        kit = self.get_kit()
        kit.ensure_projects_dir()

        if not kit.project_exists(args.pid):
            terminal.output("Project is not installed", 0, terminal.COLOR_YELLOW)
            return

        kit.call_project_init(args.pid)


text:
using UnityEngine;
using System.Collections;

namespace EA4S.DontWakeUp
{
    public class AlertZone : MonoBehaviour
    {

        void OnTriggerEnter(Collider other)
        {
            if (other.gameObject.tag == "Player") {
                DangerDog.I.Show();
            }

        }

        void OnTriggerExit(Collider other)
        {
            if (other.gameObject.tag == "Player") {
                DangerDog.I.Hide();
            }

        }

    }
}


text:
import { RouterModule, Routes } from '@angular/router';

import { HomeComponent } from './home/home.component';
import { AboutComponent } from './about/about.component';

const routes: Routes = [
  { path: '', component: HomeComponent },
  { path: 'about', component: AboutComponent },
];

export const routing = RouterModule.forRoot(routes);


text:
id: 56533eb9ac21ba0edf2244ab
title: Understanding Case Sensitivity in Variables
challengeType: 1
videoUrl: 'https://scrimba.com/c/cd6GDcD'
forumTopicId: 18334
dashedName: understanding-case-sensitivity-in-variables
---

# --description--

In JavaScript all variables and function names are case sensitive. This means that capitalization matters.

`MYVAR` is not the same as `MyVar` nor `myvar`. It is possible to have multiple distinct variables with the same name but different casing. It is strongly recommended that for the sake of clarity, you *do not* use this language feature.

**Best Practice**

Write variable names in JavaScript in <dfn>camelCase</dfn>. In <dfn>camelCase</dfn>, multi-word variable names have the first word in lowercase and the first letter of each subsequent word is capitalized.

**Examples:**

```js
var someVariable;
var anotherVariableName;
var thisVariableNameIsSoLong;
```

# --instructions--

Modify the existing declarations and assignments so their names use <dfn>camelCase</dfn>.

Do not create any new variables.

# --hints--

`studlyCapVar` should be defined and have a value of `10`.

```js
assert(typeof studlyCapVar !== 'undefined' && studlyCapVar === 10);
```

`properCamelCase` should be defined and have a value of the string `A String`.

```js
assert(
  typeof properCamelCase !== 'undefined' && properCamelCase === 'A String'
);
```

`titleCaseOver` should be defined and have a value of `9000`.

```js
assert(typeof titleCaseOver !== 'undefined' && titleCaseOver === 9000);
```

`studlyCapVar` should use camelCase in both declaration and assignment sections.

```js
assert(code.match(/studlyCapVar/g).length === 2);
```

`properCamelCase` should use camelCase in both declaration and assignment sections.

```js
assert(code.match(/properCamelCase/g).length === 2);
```

`titleCaseOver` should use camelCase in both declaration and assignment sections.

```js
assert(code.match(/titleCaseOver/g).length === 2);
```

# --seed--

## --seed-contents--

```js
// Variable declarations
var StUdLyCapVaR;
var properCamelCase;
var TitleCaseOver;

// Variable assignments
STUDLYCAPVAR = 10;
PRoperCAmelCAse = "A String";
tITLEcASEoVER = 9000;
```

# --solutions--

```js
var studlyCapVar;
var properCamelCase;
var titleCaseOver;

studlyCapVar = 10;
properCamelCase = "A String";
titleCaseOver = 9000;
```


text:
layout: page
title: Pierce - Conway Wedding
date: 2016-05-24
author: Lori Bishop
tags: weekly links, java
status: published
summary: Sed in mauris ac tortor hendrerit semper.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 07/11/2016
  endDate: 07/13/2016
  ctyhocn: SHIVAHX
  groupCode: PCW
published: true
---
Cras euismod hendrerit sollicitudin. Vivamus vel lorem a ipsum tristique aliquet. Phasellus turpis ex, sodales vel nunc id, porta tincidunt dui. Nullam accumsan ante non varius finibus. Cras lacinia et lectus a faucibus. Mauris vehicula, eros sit amet euismod cursus, purus augue finibus arcu, a scelerisque ipsum nunc quis odio. Donec lacus tellus, porta vitae ipsum vitae, fermentum fringilla ipsum. Morbi non dolor dolor. Mauris sapien ex, mattis at tellus interdum, dapibus consequat elit. Nunc tempor commodo tincidunt. Cras ornare consectetur tortor, at venenatis quam eleifend convallis. Sed ac nunc ut metus volutpat blandit ut vitae sapien. Pellentesque varius arcu ante, vitae ultrices libero auctor a. Praesent tincidunt dignissim suscipit.

* Nulla faucibus ipsum ac neque posuere, vel consectetur eros lacinia
* Donec volutpat odio in diam cursus dignissim
* Proin eget orci in justo fermentum volutpat sit amet quis mauris
* Donec nec nulla tincidunt, tincidunt libero ut, laoreet justo
* Phasellus vel justo sodales, convallis felis eget, cursus turpis.

Integer malesuada mi dolor, quis accumsan felis finibus ac. Etiam consequat dignissim lectus, a luctus neque posuere a. In iaculis nunc sit amet lacinia mattis. Integer nisl neque, varius ut sagittis eu, dapibus a dui. Maecenas et accumsan ipsum. In efficitur lorem velit, quis lacinia orci elementum facilisis. Nam ultricies eleifend vestibulum. Praesent tincidunt est sed eros tincidunt fringilla. Proin sed tellus neque. In pulvinar est risus, quis placerat nibh tincidunt at. Pellentesque eu lorem vitae neque ultricies sollicitudin quis sit amet enim. Etiam eget cursus felis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut hendrerit finibus est nec faucibus. Suspendisse ut lectus diam.


text:
package org.lwjgl.odbc;

import javax.annotation.*;

import java.nio.*;

import org.lwjgl.*;
import org.lwjgl.system.*;

import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.MemoryStack.*;

/**
 *
Layout

 *
 *

 * struct SQL_TIME_STRUCT {
 *     SQLUSMALLINT hour;
 *     SQLUSMALLINT minute;
 *     SQLUSMALLINT second;
 * }

 */
public class SQL_TIME_STRUCT extends Struct implements NativeResource {

    /** The struct size in bytes. */
    public static final int SIZEOF;

    /** The struct alignment in bytes. */
    public static final int ALIGNOF;

    /** The struct member offsets. */
    public static final int
        HOUR,
        MINUTE,
        SECOND;

    static {
        Layout layout = __struct(
            __member(2),
            __member(2),
            __member(2)
        );

        SIZEOF = layout.getSize();
        ALIGNOF = layout.getAlignment();

        HOUR = layout.offsetof(0);
        MINUTE = layout.offsetof(1);
        SECOND = layout.offsetof(2);
    }

    /**
     * Creates a {@code SQL_TIME_STRUCT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be
     * visible to the struct instance and vice versa.
     *
     *
The created instance holds a strong reference to the container object.

     */
    public SQL_TIME_STRUCT(ByteBuffer container) {
        super(memAddress(container), __checkContainer(container, SIZEOF));
    }

    @Override
    public int sizeof() { return SIZEOF; }

    /** @return the value of the {@code hour} field. */
    @NativeType("SQLUSMALLINT")
    public short hour() { return nhour(address()); }
    /** @return the value of the {@code minute} field. */
    @NativeType("SQLUSMALLINT")
    public short minute() { return nminute(address()); }
    /** @return the value of the {@code second} field. */
    @NativeType("SQLUSMALLINT")
    public short second() { return nsecond(address()); }

    /** Sets the specified value to the {@code hour} field. */
    public SQL_TIME_STRUCT hour(@NativeType("SQLUSMALLINT") short value) { nhour(address(), value); return this; }
    /** Sets the specified value to the {@code minute} field. */
    public SQL_TIME_STRUCT minute(@NativeType("SQLUSMALLINT") short value) { nminute(address(), value); return this; }
    /** Sets the specified value to the {@code second} field. */
    public SQL_TIME_STRUCT second(@NativeType("SQLUSMALLINT") short value) { nsecond(address(), value); return this; }

    /** Initializes this struct with the specified values. */
    public SQL_TIME_STRUCT set(
        short hour,
        short minute,
        short second
    ) {
        hour(hour);
        minute(minute);
        second(second);

        return this;
    }

    /**
     * Copies the specified struct data to this struct.
     *
     * @param src the source struct
     *
     * @return this struct
     */
    public SQL_TIME_STRUCT set(SQL_TIME_STRUCT src) {
        memCopy(src.address(), address(), SIZEOF);
        return this;
    }

    // -----------------------------------

    /** Returns a new {@code SQL_TIME_STRUCT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */
    public static SQL_TIME_STRUCT malloc() {
        return wrap(SQL_TIME_STRUCT.class, nmemAllocChecked(SIZEOF));
    }

    /** Returns a new {@code SQL_TIME_STRUCT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */
    public static SQL_TIME_STRUCT calloc() {
        return wrap(SQL_TIME_STRUCT.class, nmemCallocChecked(1, SIZEOF));
    }

    /** Returns a new {@code SQL_TIME_STRUCT} instance allocated with {@link BufferUtils}. */
    public static SQL_TIME_STRUCT create() {
        ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF);
        return wrap(SQL_TIME_STRUCT.class, memAddress(container), container);
    }

    /** Returns a new {@code SQL_TIME_STRUCT} instance for the specified memory address. */
    public static SQL_TIME_STRUCT create(long address) {
        return wrap(SQL_TIME_STRUCT.class, address);
    }

    /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
    @Nullable
    public static SQL_TIME_STRUCT createSafe(long address) {
        return address == NULL ? null : wrap(SQL_TIME_STRUCT.class, address);
    }

    /**
     * Returns a new {@link SQL_TIME_STRUCT.Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed.
     *
     * @param capacity the buffer capacity
     */
    public static SQL_TIME_STRUCT.Buffer malloc(int capacity) {
        return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity);
    }

    /**
     * Returns a new {@link SQL_TIME_STRUCT.Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed.
     *
     * @param capacity the buffer capacity
     */
    public static SQL_TIME_STRUCT.Buffer calloc(int capacity) {
        return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity);
    }

    /**
     * Returns a new {@link SQL_TIME_STRUCT.Buffer} instance allocated with {@link BufferUtils}.
     *
     * @param capacity the buffer capacity
     */
    public static SQL_TIME_STRUCT.Buffer create(int capacity) {
        ByteBuffer container = __create(capacity, SIZEOF);
        return wrap(Buffer.class, memAddress(container), capacity, container);
    }

    /**
     * Create a {@link SQL_TIME_STRUCT.Buffer} instance at the specified memory.
     *
     * @param address  the memory address
     * @param capacity the buffer capacity
     */
    public static SQL_TIME_STRUCT.Buffer create(long address, int capacity) {
        return wrap(Buffer.class, address, capacity);
    }

    /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
    @Nullable
    public static SQL_TIME_STRUCT.Buffer createSafe(long address, int capacity) {
        return address == NULL ? null : wrap(Buffer.class, address, capacity);
    }

    // -----------------------------------

    /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */
    @Deprecated public static SQL_TIME_STRUCT mallocStack() { return malloc(stackGet()); }
    /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */
    @Deprecated public static SQL_TIME_STRUCT callocStack() { return calloc(stackGet()); }
    /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */
    @Deprecated public static SQL_TIME_STRUCT mallocStack(MemoryStack stack) { return malloc(stack); }
    /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */
    @Deprecated public static SQL_TIME_STRUCT callocStack(MemoryStack stack) { return calloc(stack); }
    /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */
    @Deprecated public static SQL_TIME_STRUCT.Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); }
    /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */
    @Deprecated public static SQL_TIME_STRUCT.Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); }
    /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */
    @Deprecated public static SQL_TIME_STRUCT.Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); }
    /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */
    @Deprecated public static SQL_TIME_STRUCT.Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); }

    /**
     * Returns a new {@code SQL_TIME_STRUCT} instance allocated on the specified {@link MemoryStack}.
     *
     * @param stack the stack from which to allocate
     */
    public static SQL_TIME_STRUCT malloc(MemoryStack stack) {
        return wrap(SQL_TIME_STRUCT.class, stack.nmalloc(ALIGNOF, SIZEOF));
    }

    /**
     * Returns a new {@code SQL_TIME_STRUCT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero.
     *
     * @param stack the stack from which to allocate
     */
    public static SQL_TIME_STRUCT calloc(MemoryStack stack) {
        return wrap(SQL_TIME_STRUCT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF));
    }

    /**
     * Returns a new {@link SQL_TIME_STRUCT.Buffer} instance allocated on the specified {@link MemoryStack}.
     *
     * @param stack    the stack from which to allocate
     * @param capacity the buffer capacity
     */
    public static SQL_TIME_STRUCT.Buffer malloc(int capacity, MemoryStack stack) {
        return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity);
    }

    /**
     * Returns a new {@link SQL_TIME_STRUCT.Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero.
     *
     * @param stack    the stack from which to allocate
     * @param capacity the buffer capacity
     */
    public static SQL_TIME_STRUCT.Buffer calloc(int capacity, MemoryStack stack) {
        return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity);
    }

    // -----------------------------------

    /** Unsafe version of {@link #hour}. */
    public static short nhour(long struct) { return UNSAFE.getShort(null, struct + SQL_TIME_STRUCT.HOUR); }
    /** Unsafe version of {@link #minute}. */
    public static short nminute(long struct) { return UNSAFE.getShort(null, struct + SQL_TIME_STRUCT.MINUTE); }
    /** Unsafe version of {@link #second}. */
    public static short nsecond(long struct) { return UNSAFE.getShort(null, struct + SQL_TIME_STRUCT.SECOND); }

    /** Unsafe version of {@link #hour(short) hour}. */
    public static void nhour(long struct, short value) { UNSAFE.putShort(null, struct + SQL_TIME_STRUCT.HOUR, value); }
    /** Unsafe version of {@link #minute(short) minute}. */
    public static void nminute(long struct, short value) { UNSAFE.putShort(null, struct + SQL_TIME_STRUCT.MINUTE, value); }
    /** Unsafe version of {@link #second(short) second}. */
    public static void nsecond(long struct, short value) { UNSAFE.putShort(null, struct + SQL_TIME_STRUCT.SECOND, value); }

    // -----------------------------------

    /** An array of {@link SQL_TIME_STRUCT} structs. */
    public static class Buffer extends StructBuffer<SQL_TIME_STRUCT, Buffer> implements NativeResource {

        private static final SQL_TIME_STRUCT ELEMENT_FACTORY = SQL_TIME_STRUCT.create(-1L);

        /**
         * Creates a new {@code SQL_TIME_STRUCT.Buffer} instance backed by the specified container.
         *
         * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
         * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
         * by {@link SQL_TIME_STRUCT#SIZEOF}, and its mark will be undefined.
         *
         *
The created buffer instance holds a strong reference to the container object.

         */
        public Buffer(ByteBuffer container) {
            super(container, container.remaining() / SIZEOF);
        }

        public Buffer(long address, int cap) {
            super(address, null, -1, 0, cap, cap);
        }

        Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) {
            super(address, container, mark, pos, lim, cap);
        }

        @Override
        protected Buffer self() {
            return this;
        }

        @Override
        protected SQL_TIME_STRUCT getElementFactory() {
            return ELEMENT_FACTORY;
        }

        /** @return the value of the {@code hour} field. */
        @NativeType("SQLUSMALLINT")
        public short hour() { return SQL_TIME_STRUCT.nhour(address()); }
        /** @return the value of the {@code minute} field. */
        @NativeType("SQLUSMALLINT")
        public short minute() { return SQL_TIME_STRUCT.nminute(address()); }
        /** @return the value of the {@code second} field. */
        @NativeType("SQLUSMALLINT")
        public short second() { return SQL_TIME_STRUCT.nsecond(address()); }

        /** Sets the specified value to the {@code hour} field. */
        public SQL_TIME_STRUCT.Buffer hour(@NativeType("SQLUSMALLINT") short value) { SQL_TIME_STRUCT.nhour(address(), value); return this; }
        /** Sets the specified value to the {@code minute} field. */
        public SQL_TIME_STRUCT.Buffer minute(@NativeType("SQLUSMALLINT") short value) { SQL_TIME_STRUCT.nminute(address(), value); return this; }
        /** Sets the specified value to the {@code second} field. */
        public SQL_TIME_STRUCT.Buffer second(@NativeType("SQLUSMALLINT") short value) { SQL_TIME_STRUCT.nsecond(address(), value); return this; }

    }

}


text:
package org.usfirst.frc.team2875.robot.commands;

import org.usfirst.frc.team2875.robot.Robot;
import org.usfirst.frc.team2875.robot.util.Direction;

import edu.wpi.first.wpilibj.Joystick.RumbleType;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

public class AutoAlign extends Command {

	private double currentHeading;
	private double numDegreesToMove;
	private double end_position;
	private Direction direction;
	private double boost;

	public AutoAlign(){
		boost = 1.0D;
	}

	@Override
	protected void initialize() {
		setTimeout(5);
		//Robot will now face zero
		Robot.drivetrain.reset_alignment();
		Robot.gyroscope.reset();
		//Robot can face anywhere including past 360 deg
		currentHeading=Robot.gyroscope.get_heading_neg();
		numDegreesToMove=-Robot.webcamera.get_theta();
		if(numDegreesToMove<=0){
			direction = Direction.LEFT;
			end_position=currentHeading+numDegreesToMove;
			end_position %=360;
		}else{
			direction = Direction.RIGHT;
			end_position=currentHeading+numDegreesToMove;
			end_position %=360;
		}

		SmartDashboard.putNumber("currentHeading", currentHeading);
		SmartDashboard.putNumber("numDegressToMove", numDegreesToMove);
		SmartDashboard.putNumber("endDegrees", end_position);
	}

	@Override
	protected void execute() {
		//SmartDashboard.putNumber("currentHeading", Robot.drivetrain.getHeading());
		if(Robot.arms.get_switch_down()){
			double temp = Robot.gyroscope.get_heading_neg();
			boost=1.0D;
			if(Math.abs((end_position-temp))<4D){
				boost = 0.85D;
			}

			if(direction == Direction.RIGHT)
			{
				SmartDashboard.putString("direction", "right");
				Robot.drivetrain.turbo(.3D*boost, .3D*boost);
			}
			else if(direction == Direction.LEFT)
			{
				SmartDashboard.putString("direction", "left");
				Robot.drivetrain.turbo(-.3D*boost, -.3D*boost);
			}
		}
	}

	@Override
	protected boolean isFinished() {
		if(!Robot.arms.get_switch_down())
			return true;
		else{

			double current_direction=Robot.gyroscope.get_heading_neg();
			double err_val=Math.abs((current_direction-end_position));
			SmartDashboard.putNumber("Error Value: ",err_val);
			if(isTimedOut()){
				return true;
			}else if(direction == Direction.RIGHT && current_direction<end_position){
				return false;
			}else if(direction == Direction.RIGHT && (err_val>2)){
				direction=Direction.LEFT;
				return false;
			}else if(direction == Direction.LEFT && current_direction>end_position){
				return false;
			}else if(direction == Direction.LEFT && (err_val>2)){
				direction=Direction.RIGHT;
				return false;
			}else{
				return true;
			}
		}
	}

	@Override
	protected void end() {
		Robot.oi.xbox_controller.setRumble(RumbleType.kRightRumble, 1);
		Robot.oi.xbox_controller.setRumble(RumbleType.kLeftRumble, 1);
		Robot.drivetrain.stop();
		Robot.oi.xbox_controller.setRumble(RumbleType.kRightRumble, 0);
		Robot.oi.xbox_controller.setRumble(RumbleType.kLeftRumble, 0);
	}

	@Override
	protected void interrupted() {
		end();
	}

}


text:
my travel administrator management

## how to fire up this project

```
$ cd traveladmin
$ python manage runserver
```

## prerequisite

the first time you start app, you should do two steps to initiate the app.

one insert role list in to db

```
```


text:
package com.keybox.manage.action;

import com.keybox.manage.db.ProfileDB;
import com.keybox.manage.db.UserDB;
import com.keybox.manage.db.UserProfileDB;
import com.keybox.manage.model.Profile;
import com.keybox.manage.model.SortedSet;
import com.keybox.manage.model.User;
import com.keybox.manage.util.RefreshAuthKeyUtil;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import java.util.List;

/**
 * Action to assign users to profiles
 */
public class ProfileUsersAction extends ActionSupport {

    Profile profile;
    SortedSet sortedSet=new SortedSet();
    List<User> userList;
    List<Long> userSelectId;

    @Action(value = "/manage/viewProfileUsers",
            results = {
                    @Result(name = "success", location = "/manage/view_profile_users.jsp")
            }
    )
    public String viewProfileUsers() {
        if (profile != null && profile.getId() != null) {
            profile = ProfileDB.getProfile(profile.getId());
            sortedSet = UserDB.getAdminUserSet(sortedSet);
            userList = UserProfileDB.getUsersByProfile(profile.getId());
        }
        return SUCCESS;
    }

    @Action(value = "/manage/assignUsersToProfile",
            results = {
                    @Result(name = "success", location = "/manage/viewProfiles.action", type = "redirect")
            }
    )
    public String assignSystemsToProfile() {

        if (userSelectId!=null) {
            UserProfileDB.setUsersForProfile(profile.getId(), userSelectId);
        }
        RefreshAuthKeyUtil.refreshProfileSystems(profile.getId());
        return SUCCESS;
    }

    public Profile getProfile() {
        return profile;
    }

    public List<Long> getUserSelectId() {
        return userSelectId;
    }

    public void setUserSelectId(List<Long> userSelectId) {
        this.userSelectId = userSelectId;
    }

    public void setProfile(Profile profile) {
        this.profile = profile;
    }

    public SortedSet getSortedSet() {
        return sortedSet;
    }

    public void setSortedSet(SortedSet sortedSet) {
        this.sortedSet = sortedSet;
    }
    public List<User> getUserList() {
        return userList;
    }

    public void setUserList(List<User> userList) {
        this.userList = userList;
    }

}


text:
#region References

using System;
using System.Net;
using System.Net.Http;
using System.Web;
using System.Web.Http.Filters;

#endregion

namespace Bloodhound.WebSite.Attributes
{
	public class WebApiExceptionFilterAttribute : ExceptionFilterAttribute
	{
		#region Methods

		public override void OnException(HttpActionExecutedContext context)
		{
			var debugging = HttpContext.Current.IsDebuggingEnabled;

			if (context.Exception is NotImplementedException)
			{
				context.Response = context.Request.CreateResponse(HttpStatusCode.NotImplemented);
				return;
			}

			if (context.Exception is ArgumentException)
			{
				context.Response = debugging
					? context.Request.CreateErrorResponse(HttpStatusCode.BadRequest, context.Exception.ToDetailedString(), context.Exception)
					: context.Request.CreateErrorResponse(HttpStatusCode.BadRequest, context.Exception.CleanMessage());

				return;
			}

			context.Response = debugging
				? context.Request.CreateErrorResponse(HttpStatusCode.BadRequest, context.Exception.ToDetailedString(), context.Exception)
				: context.Request.CreateErrorResponse(HttpStatusCode.BadRequest, context.Exception.Message);
		}

		#endregion
	}
}


text:
Web server settings for serving your apps locally in a moment

## Requirements

Install the following software:

- Apache (>= 2.4)
- PHP + PHP-FPM
- [Phusion Passenger](https://www.phusionpassenger.com/)

Enable the following Apache modules:

- [mod_proxy](http://httpd.apache.org/docs/current/mod/mod_proxy.html)
- [mod_proxy_fcgi](http://httpd.apache.org/docs/current/mod/mod_proxy_fcgi.html)
- [mod_vhost_alias](http://httpd.apache.org/docs/current/mod/mod_vhost_alias.html)
- [mod_passenger](https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html)

## Setup

```
git clone https://github.com/shimoju/dotwebapps.git ~/.web
```

Add to the end of `httpd.conf`:

```
Include "/Users/YOURNAME/.web/config/apache/dotwebapps.conf"
```

Edit `~/.web/config/apache/dotwebapps.conf`:

```
# User settings
Define dwa-root "/Users/YOURNAME/.web"
Define dwa-domain loopback.jp
Define dwa-ip 10.0.1.2
Define dwa-default-app-type ruby
Define dwa-php-fpm "fcgi://127.0.0.1:9000"
Define dwa-ruby "/Users/YOURNAME/.rbenv/shims/ruby"
```

Restart Apache.

## Usage

Symlink to `~/.web/apps/`:

```
chmod 755 ~/projects
ln -s ~/projects/ruby-app ~/.web/apps/ruby
ln -s ~/projects/php-app ~/.web/apps/php
```

Access your URL:

```
http://app-name.app-type.your-local-domain/
http://app-name.your-local-domain/ (using default app type)
```

ex)

- [ruby-app.ruby.loopback.jp](http://ruby-app.ruby.loopback.jp/)
  - = [ruby-app.loopback.jp](http://ruby-app.loopback.jp/)
- [php-app.php.loopback.jp](http://php-app.php.loopback.jp/)

Access from another computer on your local network:

```
http://app-name.app-type.your-local-ip.xip.io/
```

ex)

- [ruby-app.ruby.10.0.1.2.xip.io](http://ruby-app.ruby.10.0.1.2.xip.io/)
  - = [ruby-app.10.0.1.2.xip.io](http://ruby-app.10.0.1.2.xip.io/)
- [php-app.php.10.0.1.2.xip.io](http://php-app.php.10.0.1.2.xip.io/)

## License

[MIT](https://github.com/shimoju/dotwebapps/blob/master/LICENSE)

## Author

[Hiroshi Shimoju](https://github.com/shimoju)


text:
.class final Lcom/google/inject/internal/Scoping$6;
.super Lcom/google/inject/internal/Scoping;
.source "Scoping.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/google/inject/internal/Scoping;->forInstance(Lcom/google/inject/Scope;)Lcom/google/inject/internal/Scoping;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation

# instance fields
.field final synthetic val$scope:Lcom/google/inject/Scope;

# direct methods
.method constructor <init>(Lcom/google/inject/Scope;)V
    .locals 1

    .prologue
    .line 144
    iput-object p1, p0, Lcom/google/inject/internal/Scoping$6;->val$scope:Lcom/google/inject/Scope;

    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lcom/google/inject/internal/Scoping;-><init>(Lcom/google/inject/internal/Scoping$1;)V

    return-void
.end method

# virtual methods
.method public acceptVisitor(Lcom/google/inject/spi/BindingScopingVisitor;)Ljava/lang/Object;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<V:",
            "Ljava/lang/Object;",
            ">(",
            "Lcom/google/inject/spi/BindingScopingVisitor",
            "<TV;>;)TV;"
        }
    .end annotation

    .prologue
    .line 146
    .local p1, "visitor":Lcom/google/inject/spi/BindingScopingVisitor;, "Lcom/google/inject/spi/BindingScopingVisitor<TV;>;"
    iget-object v0, p0, Lcom/google/inject/internal/Scoping$6;->val$scope:Lcom/google/inject/Scope;

    invoke-interface {p1, v0}, Lcom/google/inject/spi/BindingScopingVisitor;->visitScope(Lcom/google/inject/Scope;)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public applyTo(Lcom/google/inject/binder/ScopedBindingBuilder;)V
    .locals 1
    .param p1, "scopedBindingBuilder"    # Lcom/google/inject/binder/ScopedBindingBuilder;

    .prologue
    .line 158
    iget-object v0, p0, Lcom/google/inject/internal/Scoping$6;->val$scope:Lcom/google/inject/Scope;

    invoke-interface {p1, v0}, Lcom/google/inject/binder/ScopedBindingBuilder;->in(Lcom/google/inject/Scope;)V

    .line 159
    return-void
.end method

.method public getScopeInstance()Lcom/google/inject/Scope;
    .locals 1

    .prologue
    .line 150
    iget-object v0, p0, Lcom/google/inject/internal/Scoping$6;->val$scope:Lcom/google/inject/Scope;

    return-object v0
.end method

.method public toString()Ljava/lang/String;
    .locals 1

    .prologue
    .line 154
    iget-object v0, p0, Lcom/google/inject/internal/Scoping$6;->val$scope:Lcom/google/inject/Scope;

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method


text:
import boto3
import requests
import json
import datetime
import config
import random
from collections import defaultdict

s3 = boto3.resource('s3')
simpledb = boto3.client('sdb')

MAX_COUNT = 3
RANDOMIZATION_WINDOW = 10

# Picks new recommended venues from least recommended venues
def pick_recommended_venues(area):
    print "Building recommendation for area", area
    recommended_venues = []

    venues_never_recommended = simpledb.select(
        SelectExpression="select * from {} where recommendation_count is null and area = '{}' limit {}".format(
            config.storage['table_venue'],
            area,
            RANDOMIZATION_WINDOW)
    )
    if venues_never_recommended.get('Items'):
        count = len(venues_never_recommended.get('Items'))
        print "Number of venues never recommended:", count
        recommended_venues = random.sample(venues_never_recommended.get('Items'), min(count, MAX_COUNT))

    if len(recommended_venues) < MAX_COUNT:
        print "We have {}, which is not enough. Let's rerecommend old venues".format(len(recommended_venues))
        venues_previously_recommended = simpledb.select(
            SelectExpression="select * from {} where recommendation_count is not null and area = '{}' order by recommendation_count asc limit {}".format(
                config.storage['table_venue'],
                area,
                RANDOMIZATION_WINDOW)
        )
        if venues_previously_recommended.get('Items'):
            count = len(venues_previously_recommended.get('Items'))
            print "Number of previously recommended:", count
            recommended_venues = recommended_venues + random.sample(venues_previously_recommended.get('Items'), min(count, MAX_COUNT - len(recommended_venues)))

    print "Now we have {} and we should get {}".format(len(recommended_venues), MAX_COUNT)
    return recommended_venues

# Writes Python structure to S3 as JSON
def write_to_s3(key, data):
    response = s3.Bucket(config.storage['bucket_name']).put_object(
        Key=key,
        ContentType='application/json',
        Body=json.dumps(data))
    print response

# Fetches venue details
def get_detailed_venue(venue_id):
    print "Fetching venue details from remote for venue {}".format(venue_id)
    url = "{}/venue/info/{}".format(config.remote['base_url'], venue_id)
    params = {
        'client_id': config.remote['client_id'],
        'client_secret': config.remote['client_secret']
    }
    response = requests.get(url, params=params)
    print "Ratelimit remaining:", response.headers.get('x-ratelimit-remaining')

    if response.status_code == 200:
        return response.json().get('response')
    return []

# Updates recommendations
def update_recommendations(venue_sdb_items, area):
    recommendations_updated = datetime.datetime.utcnow().isoformat() + 'Z'
    detailed_venues = []
    for venue_sdb_item in venue_sdb_items:
        attributes = {attr['Name']:attr['Value'] for attr in venue_sdb_item['Attributes']}
        venue_id = venue_sdb_item['Name']

        attributes['recommendation_count'] = int(attributes.get('recommendation_count', '0')) + 1

        detailed_venues.append(get_detailed_venue(venue_id))

        # Update recommendation count and timestamp in SimpleDB
        response = simpledb.put_attributes(
            DomainName=config.storage['table_venue'],
            ItemName=venue_id,
            Attributes=[
                {
                    'Name': 'recommendation_count',
                    'Value': str(attributes['recommendation_count']).zfill(7),
                    'Replace': True
                },
                {
                    'Name': 'recommendation_updated',
                    'Value': recommendations_updated,
                    'Replace': True
                }
            ]
        )

    # Write recommendations to S3
    write_to_s3('data/recommender-venues-{}.json'.format(area),
        {
            'recommendations_updated': recommendations_updated,
            'recommendations': detailed_venues
        })

def lambda_handler(event, context):
    for area in config.areas:
        venue_sdb_items = pick_recommended_venues(area)
        update_recommendations(venue_sdb_items, area)

if __name__ == '__main__':
    lambda_handler({},{})


text:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>value::get_object (2 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../index.html" title="Chapter 1. Boost.JSON">
<link rel="up" href="../get_object.html" title="value::get_object">
<link rel="prev" href="overload1.html" title="value::get_object (1 of 2 overloads)">
<link rel="next" href="../get_array.html" title="value::get_array">

Home
Libraries
People
FAQ
More

value::get_object
          (2 of 2 overloads)

            Return a reference to the underlying object,
            without checking.

<h7>
            Synopsis
          </h7>
object const&
get_object() const;

<h7>
            Description
          </h7>

            This is the fastest way to access the underlying representation when
            the kind is known in advance.

<h7>
            Preconditions
          </h7>
this->is_object()

<h7>
            Complexity
          </h7>

            Constant.

<h7>
            Exception
            Safety
          </h7>

            No-throw guarantee.

Copyright © 2019, 2020 Vinnie Falco
Copyright © 2020 Krystian Stasiowski

        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


text:
<?php

//$SearchOptions['status'] = true;
$SearchOptions['NetworkCrosselling'] = true;
$SearchOptions['type'] = 'REGULAR';
$SearchOptions['page'] = array(
	'page_size' => 1,
	'page_number' => 2
);
try {
	$a = array();

//	var_dump ($c, $SearchOptions);die;
	$a = $c->searchProducts($SearchOptions);
} catch (SoapFault $e) {
	if ($e->getMessage() == 'Invalid hash provided') {
		session_destroy();
	}
	_e ($e);
	exit();
} catch (Exception $e) {
	_e ($e);
	exit();
}

$title = 'Product Listing';


text:
package fi.agisol.checkout.api.persistence;

/**
 * Interface to create and persist the payment transactions (between startPayment, updatePayment and endPayment)
 *
 * @author www.agisol.fi
 */
public interface TransactionRepository {

	/**
	 * Creates new TransactionEntity (NOTE: to implementation - don't persist the object yet!)
	 *
	 * 	@param stamp is unique identifier generated by internally "checkout-java"
	 * 	@param paymentId is unique identifier generated by "checkout.fi"
	 * 	@param reference number of the payment
	 * 	@param amount of the payment in euro-cents
	 * 	@param message is custom information about payment/order
	 * @return TransactionEntity
	 */
	TransactionEntity create(String stamp, String paymentId, String reference, Integer amount, String message);

	/**
	 * Saves new transaction or updates existing one and returns the saved transaction
	 * @param transactionEntity new or updated transaction which contains information about the payment
	 * @return saved TransactionEntity
	 */
	TransactionEntity save(TransactionEntity transactionEntity);

	/**
	 * Finds TransactionEntity stamp
	 * @param stamp is unique identifier generated internally by "checkout-java"
	 * @return saved TransactionEntity
	 */
	TransactionEntity findByStamp(String stamp);

}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.conjuntos.espin.bean;

import java.io.Serializable;
import java.util.GregorianCalendar;
import javax.annotation.PostConstruct;
import javax.inject.Named;
import javax.faces.view.ViewScoped;

/**
 *
 * @author luis
 */
@Named(value = "calendarioBean")
@ViewScoped
public class CalendarioBean implements Serializable {

    private GregorianCalendar calenadario;

    @PostConstruct
    public void init() {
        this.calenadario = new GregorianCalendar();
    }

    public GregorianCalendar getCalenadario() {
        return calenadario;
    }

    public void setCalenadario(GregorianCalendar calenadario) {
        this.calenadario = calenadario;
    }

}


text:
from pprint import pprint

from libcloud.autoscale.providers import get_driver as as_get_driver
from libcloud.autoscale.types import Provider as as_provider
from libcloud.autoscale.types import AutoScaleAdjustmentType

ACCESS_ID = 'your access id'
SECRET_KEY = 'your secret key'

# Initialize the drivers
as_driver = as_get_driver(as_provider.AWS_AUTOSCALE)(ACCESS_ID, SECRET_KEY)

group = as_driver.list_auto_scale_groups()[0]

# create scale up policy
policy_scale_up = as_driver.create_auto_scale_policy(
    group=group, name='policy-scale-up',
    adjustment_type=AutoScaleAdjustmentType.CHANGE_IN_CAPACITY,
    scaling_adjustment=1)
pprint(policy_scale_up)


text:
package com.asakusafw.dag.api.processor;

import java.util.Collections;
import java.util.Map;
import java.util.Optional;

import com.asakusafw.lang.utils.common.Arguments;
import com.asakusafw.lang.utils.common.Optionals;

/**
 * An abstract super interface of processing context for Asakusa DAG and its child elements.
 * @since 0.4.0
 */
public interface ProcessorContext {

    /**
     * Returns the current application class loader.
     * @return the class loader
     */
    ClassLoader getClassLoader();

    /**
     * Returns the context properties.
     * @return the context properties
     */
    default Map<String, String> getPropertyMap() {
        return Collections.emptyMap();
    }

    /**
     * Returns the generic context property value.
     * @param key the property key
     * @return the corresponded property value
     */
    default Optional<String> getProperty(String key) {
        Arguments.requireNonNull(key);
        return Optionals.get(getPropertyMap(), key);
    }

    /**
     * Returns a resource object.
     * @param <T> the resource type
     * @param resourceType the resource type
     * @return the corresponded resource object
     */
    default <T> Optional<T> getResource(Class<T> resourceType) {
        Arguments.requireNonNull(resourceType);
        return Optionals.empty();
    }

    /**
     * Returns a detached {@link ProcessorContext}.
     * This does not have any I/O information even if this object is subtype of {@link EdgeIoProcessorContext}.
     * @return the detached {@link ProcessorContext}
     */
    ProcessorContext getDetached();

    /**
     * Edits {@link ProcessorContext}.
     * @since 0.4.0
     */
    public interface Editor {

        /**
         * Adds a context property.
         * @param key the property key
         * @param value the property value
         * @see ProcessorContext#getProperty(String)
         */
        void addProperty(String key, String value);

        /**
         * Adds a context resource object.
         * @param <T> the resource type
         * @param type the resource type
         * @param object the resource object
         * @see ProcessorContext#getResource(Class)
         */
        <T> void addResource(Class<T> type, T object);
    }
}


text:
var async = require('async');
var util = require('util');
var fs = require('fs');
var path = require('path');
var ip = require('ip');
var extend = require('extend');
var Router = require('../utils/router.js');
var sandboxHelper = require('../utils/sandbox.js');

require('array.prototype.find'); // Old node fix

// Private fields
var modules, library, self, private = {}, shared = {};

// Constructor
function Peer(cb, scope) {
  library = scope;
  self = this;
  self.__private = private;
  private.attachApi();

  setImmediate(cb, null, self);
}

// Private methods
private.attachApi = function () {
  var router = new Router();

  router.use(function (req, res, next) {
    if (modules) return next();
    res.status(500).send({success: false, error: "Blockchain is loading"});
  });

  router.map(shared, {
    "get /": "getPeers",
    "get /version": "version",
    "get /get": "getPeer"
  });

  router.use(function (req, res) {
    res.status(500).send({success: false, error: "API endpoint not found"});
  });

  library.network.app.use('/api/peers', router);
  library.network.app.use(function (err, req, res, next) {
    if (!err) return next();
    library.logger.error(req.url, err.toString());
    res.status(500).send({success: false, error: err.toString()});
  });
}

private.updatePeerList = function (cb) {
  modules.transport.getFromRandomPeer({
    api: '/list',
    method: 'GET'
  }, function (err, data) {
    if (err) {
      return cb();
    }

    var report = library.scheme.validate(data.body.peers, {type: "array", required: true, uniqueItems: true});
    library.scheme.validate(data.body, {
      type: "object",
      properties: {
        peers: {
          type: "array",
          uniqueItems: true
        }
      },
      required: ['peers']
    }, function (err) {
      if (err) {
        return cb();
      }

      var peers = data.body.peers;

      async.eachLimit(peers, 2, function (peer, cb) {
        library.scheme.validate(peer, {
          type: "object",
          properties: {
            ip: {
              type: "string"
            },
            port: {
              type: "integer",
              minimum: 1,
              maximum: 65535
            },
            state: {
              type: "integer",
              minimum: 0,
              maximum: 3
            },
            os: {
              type: "string"
            },
            version: {
              type: "string"
            }
          },
          required: ['ip', 'port', 'state']
        }, function (err) {
          if (err) {
            return setImmediate(cb, "Invalid peer: " + err);
          }

          peer.ip = parseInt(peer.ip);

          if (isNaN(peer.ip)) {
            return setImmediate(cb);
          }

          if (ip.toLong("127.0.0.1") == peer.ip || peer.port == 0 || peer.port > 65535) {
            return setImmediate(cb);
          }

          if (!self.isCompatible(peer.version)) {
            library.logger.debug("Skip uncompatible peer " + peer.ip, peer.version);
            return setImmediate(cb);
          }

          self.update(peer, cb);
        });
      }, cb);
    });
  });
}

private.count = function (cb) {
  library.dbLite.query("select count(*) from peers", {"count": Number}, function (err, rows) {
    if (err) {
      library.logger.error('Peer#count', err);
      return cb(err);
    }
    var res = rows.length && rows[0].count;
    cb(null, res)
  })
}

private.banManager = function (cb) {
  library.dbLite.query("UPDATE peers SET state = 1, clock = null where (state = 0 and clock - $now < 0)", {now: Date.now()}, cb);
}

private.getByFilter = function (filter, cb) {
  var sortFields = ["ip", "port", "state", "os", "version"];
  var sortMethod = '', sortBy = ''
  var limit = filter.limit || null;
  var offset = filter.offset || null;
  delete filter.limit;
  delete filter.offset;

  var where = [];
  var params = {};

  if (filter.hasOwnProperty('state') && filter.state !== null) {
    where.push("state = $state");
    params.state = filter.state;
  }

  if (filter.hasOwnProperty('os') && filter.os !== null) {
    where.push("os = $os");
    params.os = filter.os;
  }

  if (filter.hasOwnProperty('version') && filter.version !== null) {
    where.push("version = $version");
    params.version = filter.version;
  }

  if (filter.hasOwnProperty('ip') && filter.ip !== null) {
    where.push("ip = $ip");
    params.ip = filter.ip;
  }

  if (filter.hasOwnProperty('port') && filter.port !== null) {
    where.push("port = $port");
    params.port = filter.port;
  }

  if (filter.hasOwnProperty('orderBy')) {
    var sort = filter.orderBy.split(':');
    sortBy = sort[0].replace(/[^\w\s]/gi, '');
    if (sort.length == 2) {
      sortMethod = sort[1] == 'desc' ? 'desc' : 'asc'
    } else {
      sortMethod = 'desc';
    }
  }

  if (sortBy) {
    if (sortFields.indexOf(sortBy) < 0) {
      return cb("Invalid sort field");
    }
  }

  if (limit !== null) {
    if (limit > 100) {
      return cb("Invalid limit. Maximum is 100");
    }
    params['limit'] = limit;
  }

  if (offset !== null) {
    params['offset'] = offset;
  }

  library.dbLite.query("select ip, port, state, os, version from peers" +
    (where.length ? (' where ' + where.join(' and ')) : '') +
    (sortBy ? ' order by ' + sortBy + ' ' + sortMethod : '') + " " +
    (limit ? ' limit $limit' : '') +
    (offset ? ' offset $offset ' : ''),
    params, {
      "ip": String,
      "port": Number,
      "state": Number,
      "os": String,
      "version": String
    }, function (err, rows) {
      cb(err, rows);
    });
}

// Public methods
Peer.prototype.list = function (options, cb) {
  options.limit = options.limit || 100;

  library.dbLite.query("select p.ip, p.port, p.state, p.os, p.version from peers p " + (options.dappid ? " inner join peers_dapp pd on p.id = pd.peerId and pd.dappid = $dappid " : "") + " where p.state > 0 ORDER BY RANDOM() LIMIT $limit", options, {
    "ip": String,
    "port": Number,
    "state": Number,
    "os": String,
    "version": String
  }, function (err, rows) {
    cb(err, rows);
  });
}

Peer.prototype.state = function (pip, port, state, timeoutSeconds, cb) {
  var isFrozenList = library.config.peers.list.find(function (peer) {
    return peer.ip == ip.fromLong(pip) && peer.port == port;
  });
  if (isFrozenList !== undefined) return cb && cb("Peer in white list");
  if (state == 0) {
    var clock = (timeoutSeconds || 1) * 1000;
    clock = Date.now() + clock;
  } else {
    clock = null;
  }
  library.dbLite.query("UPDATE peers SET state = $state, clock = $clock WHERE ip = $ip and port = $port;", {
    state: state,
    clock: clock,
    ip: pip,
    port: port
  }, function (err) {
    err && library.logger.error('Peer#state', err);

    cb && cb()
  });
}

Peer.prototype.remove = function (pip, port, cb) {
  var isFrozenList = library.config.peers.list.find(function (peer) {
    return peer.ip == ip.fromLong(pip) && peer.port == port;
  });
  if (isFrozenList !== undefined) return cb && cb("Peer in white list");
  library.dbLite.query("DELETE FROM peers WHERE ip = $ip and port = $port;", {
    ip: pip,
    port: port
  }, function (err) {
    err && library.logger.error('Peer#delete', err);

    cb && cb(err)
  });
}

Peer.prototype.addDapp = function (config, cb) {
  library.dbLite.query("SELECT id from peers where ip = $ip and port = $port", {
    ip: config.ip,
    port: config.port
  }, ["id"], function (err, data) {
    if (err) {
      return cb(err);
    }
    if (!data.length) {
      return cb();
    }
    var peerId = data[0].id;

    library.dbLite.query("INSERT OR IGNORE INTO peers_dapp (peerId, dappId) VALUES ($peerId, $dappId);", {
      dappId: config.dappid,
      peerId: peerId
    }, cb);
  });
}

Peer.prototype.update = function (peer, cb) {
  if (!peer.ip || !peer.port) {
    cb && cb();
    return;
  }
  var dappid = peer.dappid;
  var params = {
    ip: peer.ip,
    port: peer.port,
    os: peer.os || null,
    version: peer.version || null
  }
  async.series([
    function (cb) {
      library.dbLite.query("INSERT OR IGNORE INTO peers (ip, port, state, os, version) VALUES ($ip, $port, $state, $os, $version);", extend({}, params, {state: 1}), cb);
    },
    function (cb) {
      if (peer.state !== undefined) {
        params.state = peer.state;
      }
      library.dbLite.query("UPDATE peers SET os = $os, version = $version" + (peer.state !== undefined ? ", state = CASE WHEN state = 0 THEN state ELSE $state END " : "") + " WHERE ip = $ip and port = $port;", params, cb);
    },
    function (cb) {
      if (dappid) {
        self.addDapp({dappid: dappid, ip: peer.ip, port: peer.port}, cb);
      } else {
        setImmediate(cb);
      }

    }
  ], function (err) {
    err && library.logger.error('Peer#update', err);
    cb && cb()
  })
}

Peer.prototype.getVersion = function () {
  return {
    version: library.config.version,
    build: library.config.buildVersion,
    net: library.config.netVersion
  };
}

Peer.prototype.isCompatible = function (version) {
  var nums = version.split('.').map(Number);
  if (nums.length != 3) {
    return true;
  }
  var compatibleVersion = '0.0.0';
  if (library.config.netVersion == 'testnet') {
    compatibleVersion = '1.0.0';
  } else if (library.config.netVersion == 'mainnet') {
    compatibleVersion = '1.0.0';
  }
  var numsCompatible = compatibleVersion.split('.').map(Number);
  for (var i = 0; i < nums.length; ++i) {
    if (nums[i] < numsCompatible[i]) {
      return false;
    } else if (nums[i] > numsCompatible[i]) {
      return true;
    }
  }
  return true;
}

Peer.prototype.sandboxApi = function (call, args, cb) {
  sandboxHelper.callMethod(shared, call, args, cb);
}

// Events
Peer.prototype.onBind = function (scope) {
  modules = scope;
}

Peer.prototype.onBlockchainReady = function () {
  async.eachSeries(library.config.peers.list, function (peer, cb) {
    library.dbLite.query("INSERT OR IGNORE INTO peers(ip, port, state) VALUES($ip, $port, $state)", {
      ip: ip.toLong(peer.ip),
      port: peer.port,
      state: 2
    }, cb);
  }, function (err) {
    if (err) {
      library.logger.error('onBlockchainReady', err);
    }

    private.count(function (err, count) {
      if (count) {
        private.updatePeerList(function (err) {
          err && library.logger.error('updatePeerList', err);
          library.bus.message('peerReady');
        })
        library.logger.info('Peers ready, stored ' + count);
      } else {
        library.logger.warn('Peers list is empty');
      }
    });
  });
}

Peer.prototype.onPeerReady = function () {
  setImmediate(function nextUpdatePeerList() {
    private.updatePeerList(function (err) {
      err && library.logger.error('updatePeerList timer', err);
      setTimeout(nextUpdatePeerList, 60 * 1000);
    })
  });

  setImmediate(function nextBanManager() {
    private.banManager(function (err) {
      err && library.logger.error('banManager timer', err);
      setTimeout(nextBanManager, 65 * 1000)
    });
  });
}

// Shared
shared.getPeers = function (req, cb) {
  var query = req.body;
  library.scheme.validate(query, {
    type: "object",
    properties: {
      state: {
        type: "integer",
        minimum: 0,
        maximum: 3
      },
      os: {
        type: "string"
      },
      version: {
        type: "string"
      },
      limit: {
        type: "integer",
        minimum: 0,
        maximum: 100
      },
      orderBy: {
        type: "string"
      },
      offset: {
        type: "integer",
        minimum: 0
      },
      port: {
        type: "integer",
        minimum: 1,
        maximum: 65535
      }
    }
  }, function (err) {
    if (err) {
      return cb(err[0].message);
    }

    if (query.limit < 0 || query.limit > 100) {
      return cb("Invalid limit. Maximum is 100");
    }

    private.getByFilter(query, function (err, peers) {
      if (err) {
        return cb("Peer not found");
      }

      for (var i = 0; i < peers.length; i++) {
        peers[i].ip = ip.fromLong(peers[i].ip);
      }
      library.dbLite.query("select count(1) from peers", function (err, count) {
        if (err) {
          return cb("Can not get peers count");
        }
        cb(null, {peers: peers, totalCount: count[0]});
      });
    });
  });
}

shared.getPeer = function (req, cb) {
  var query = req.body;
  library.scheme.validate(query, {
    type: "object",
    properties: {
      ip: {
        type: "string",
        minLength: 1
      },
      port: {
        type: "integer",
        minimum: 0,
        maximum: 65535
      }
    },
    required: ['ip', 'port']
  }, function (err) {
    if (err) {
      return cb(err[0].message);
    }

    private.getByFilter({
      ip: query.ip,
      port: query.port
    }, function (err, peers) {
      if (err) {
        return cb("Peer not found");
      }

      var peer = peers.length ? peers[0] : null;

      if (peer) {
        peer.ip = ip.fromLong(peer.ip);
      }

      cb(null, {peer: peer || {}});
    });
  });
}

shared.version = function (req, cb) {
  cb(null, {
    version: library.config.version,
    build: library.config.buildVersion,
    net: library.config.netVersion
  });
}

// Export
module.exports = Peer;


text:
var util = require("util");
var choreography = require("temboo/core/choreography");

/*
    GetList
    Retrieves information about a List in LittleSis according to its ID.
*/

var GetList = function(session) {
    /*
        Create a new instance of the GetList Choreo. A TembooSession object, containing a valid
        set of Temboo credentials, must be supplied.
	*/
    var location = "/Library/LittleSis/List/GetList"
    GetList.super_.call(this, session, location);

    /*
    Define a callback that will be used to appropriately format the results of this Choreo.
    */
    var newResultSet = function(resultStream) {
        return new GetListResultSet(resultStream);
    }

	/*
	Obtain a new InputSet object, used to specify the input values for an execution of this Choreo.
	*/
    this.newInputSet = function() {
        return new GetListInputSet();
    }

	/*
	Execute this Choreo with the specified inputs, calling the specified callback upon success,
	and the specified errorCallback upon error.
	*/
    this.execute = function(inputs, callback, errorCallback) {
        this._execute(inputs, newResultSet, callback, errorCallback);
    }
}

/*
An InputSet with methods appropriate for specifying the inputs to the GetList
Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
*/

var GetListInputSet = function() {
    GetListInputSet.super_.call(this);
        /*
        Set the value of the APIKey input for this Choreo. ((required, string) The API Key obtained from LittleSis.org.)
        */
        this.set_APIKey = function(value) {
            this.setInput("APIKey", value);
        }

        /*
        Set the value of the Entities input for this Choreo. ((optional, string) Indicate "entities" to retrieve records of the entities that belong to the list. Otherwise, only a basic record about the list will be returned.)
        */
        this.set_Entities = function(value) {
            this.setInput("Entities", value);
        }

        /*
        Set the value of the ListID input for this Choreo. ((required, integer) The ID of the list record to be returned.)
        */
        this.set_ListID = function(value) {
            this.setInput("ListID", value);
        }

        /*
        Set the value of the Number input for this Choreo. ((optional, integer) Specifies what number of results to show. Used in conjunction with Page parameter, a Nnumber of 20 and a Page of 6 will show results 100-120.)
        */
        this.set_Number = function(value) {
            this.setInput("Number", value);
        }

        /*
        Set the value of the Page input for this Choreo. ((optional, integer) Specifies what page of results to show. Used in conjunction with Number parameter. A number of 20 and a Page of 6 will show results 100-120.)
        */
        this.set_Page = function(value) {
            this.setInput("Page", value);
        }

        /*
        Set the value of the ResponseFormat input for this Choreo. ((optional, string) Format of the response returned by LittleSis.org. Acceptable inputs: xml or json. Defaults to xml)
        */
        this.set_ResponseFormat = function(value) {
            this.setInput("ResponseFormat", value);
        }

        /*
        Set the value of the TypeID input for this Choreo. ((optional, integer) When the Entities parameter is activated, you can specify type IDs limiting the entities returned to those having the specified types (as a comma-delimited list).)
        */
        this.set_TypeID = function(value) {
            this.setInput("TypeID", value);
        }

}

/*
A ResultSet with methods tailored to the values returned by the GetList Choreo.
The ResultSet object is used to retrieve the results of a Choreo execution.
*/

var GetListResultSet = function(resultStream) {
    GetListResultSet.super_.call(this, resultStream);
        /*
        Retrieve the value for the "Response" output from this Choreo execution. (The response from LittleSis.org.)
        */
        this.get_Response = function() {
            return this.getResult("Response");
        }
}

util.inherits(GetList, choreography.Choreography);
util.inherits(GetListInputSet, choreography.InputSet);
util.inherits(GetListResultSet, choreography.ResultSet);
exports.GetList = GetList;

/*
    ListSearchByKeyword
    Retrieves the name and description fields of Lists available in LittleSis that match a keyword search.
*/

var ListSearchByKeyword = function(session) {
    /*
        Create a new instance of the ListSearchByKeyword Choreo. A TembooSession object, containing a valid
        set of Temboo credentials, must be supplied.
	*/
    var location = "/Library/LittleSis/List/ListSearchByKeyword"
    ListSearchByKeyword.super_.call(this, session, location);

    /*
    Define a callback that will be used to appropriately format the results of this Choreo.
    */
    var newResultSet = function(resultStream) {
        return new ListSearchByKeywordResultSet(resultStream);
    }

	/*
	Obtain a new InputSet object, used to specify the input values for an execution of this Choreo.
	*/
    this.newInputSet = function() {
        return new ListSearchByKeywordInputSet();
    }

	/*
	Execute this Choreo with the specified inputs, calling the specified callback upon success,
	and the specified errorCallback upon error.
	*/
    this.execute = function(inputs, callback, errorCallback) {
        this._execute(inputs, newResultSet, callback, errorCallback);
    }
}

/*
An InputSet with methods appropriate for specifying the inputs to the ListSearchByKeyword
Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
*/

var ListSearchByKeywordInputSet = function() {
    ListSearchByKeywordInputSet.super_.call(this);
        /*
        Set the value of the APIKey input for this Choreo. ((required, string) The API Key obtained from LittleSis.org.)
        */
        this.set_APIKey = function(value) {
            this.setInput("APIKey", value);
        }

        /*
        Set the value of the Keywords input for this Choreo. ((required, string) Enter search text.)
        */
        this.set_Keywords = function(value) {
            this.setInput("Keywords", value);
        }

        /*
        Set the value of the ResponseFormat input for this Choreo. ((optional, string) Format of the response returned by LittleSis.org. Acceptable inputs: xml or json. Defaults to xml)
        */
        this.set_ResponseFormat = function(value) {
            this.setInput("ResponseFormat", value);
        }

}

/*
A ResultSet with methods tailored to the values returned by the ListSearchByKeyword Choreo.
The ResultSet object is used to retrieve the results of a Choreo execution.
*/

var ListSearchByKeywordResultSet = function(resultStream) {
    ListSearchByKeywordResultSet.super_.call(this, resultStream);
        /*
        Retrieve the value for the "Response" output from this Choreo execution. (The response from LittleSis.org.)
        */
        this.get_Response = function() {
            return this.getResult("Response");
        }
}

util.inherits(ListSearchByKeyword, choreography.Choreography);
util.inherits(ListSearchByKeywordInputSet, choreography.InputSet);
util.inherits(ListSearchByKeywordResultSet, choreography.ResultSet);
exports.ListSearchByKeyword = ListSearchByKeyword;


text:
module Azure::Compute::Mgmt::V2020_09_30_preview
  module Models
    #
    # Base information about the shared gallery resource in pir.
    #
    class PirSharedGalleryResource < PirResource

      include MsRestAzure

      # @return [String] The unique id of this shared gallery.
      attr_accessor :unique_id

      #
      # Mapper for PirSharedGalleryResource class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'PirSharedGalleryResource',
          type: {
            name: 'Composite',
            class_name: 'PirSharedGalleryResource',
            model_properties: {
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              location: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'location',
                type: {
                  name: 'String'
                }
              },
              unique_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'identifier.uniqueId',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end


text:
/* https://www.hackerrank.com/challenges/a-very-big-sum */
package com.negrisoli.algorithms.warmup

object AVeryBigSum {

  def main(args: Array[String]) {
    val it = io.Source.stdin.getLines()
    val size = it.next().toInt
    println(it.next().split(" ").take(size).map(BigInt(_)).sum)
  }

}