text:
import 'jquery';
import '../../../public/vendor/flot/jquery.flot.js';
import '../../../public/vendor/flot/jquery.flot.selection';
import '../../../public/vendor/flot/jquery.flot.time';
import '../../../public/vendor/flot/jquery.flot.stack';
import '../../../public/vendor/flot/jquery.flot.stackpercent';
import '../../../public/vendor/flot/jquery.flot.fillbelow';
import '../../../public/vendor/flot/jquery.flot.crosshair';
import '../../../public/vendor/flot/jquery.flot.dashes';
import '../../../public/vendor/flot/jquery.flot.gauge';
import { withTheme } from '../src/utils/storybook/withTheme';
// @ts-ignore
import lightTheme from '../../../public/sass/grafana.light.scss';
// @ts-ignore
import darkTheme from '../../../public/sass/grafana.dark.scss';
import { GrafanaLight, GrafanaDark } from './storybookTheme';
import addons from '@storybook/addons';
import { ThemedDocsContainer } from '../src/utils/storybook/ThemedDocsContainer';

const handleThemeChange = (theme: any) => {
  if (theme !== 'light') {
    lightTheme.unuse();
    darkTheme.use();
  } else {
    darkTheme.unuse();
    lightTheme.use();
  }
};

addons.setConfig({
  showRoots: false,
  theme: GrafanaDark,
});

export const decorators = [withTheme(handleThemeChange)];

export const parameters = {
  docs: {
    container: ThemedDocsContainer,
  },
  darkMode: {
    dark: GrafanaDark,
    light: GrafanaLight,
  },
  layout: 'fullscreen',
  actions: { argTypesRegex: '^on[A-Z].*' },
  options: {
    showPanel: true,
    panelPosition: 'right',
    showNav: true,
    isFullscreen: false,
    isToolshown: true,
    storySort: {
      method: 'alphabetical',
      // Order Docs Overview and Docs Overview/Intro story first
      order: ['Docs Overview', ['Intro']],
    },
  },
  knobs: {
    disable: true,
  },
};


text:
namespace AspNetCoreTemplate.Web.ViewModels.Account
{
    using System.ComponentModel.DataAnnotations;

    public class LoginViewModel
    {
        [Required]
        [EmailAddress]
        public string Email { get; set; }

        [Required]
        [DataType(DataType.Password)]
        public string Password { get; set; }

        [Display(Name = "Remember me?")]
        public bool RememberMe { get; set; }
    }
}

redpajama_set_name: RedPajamaGithub


text:
#include <stdio.h>
#include <stdarg.h>
#include <wchar.h>
#include <LCUI_Build.h>
#include <LCUI/thread.h>
#include <LCUI/util/logger.h>

#define BUFFER_SIZE 2048

static struct Logger {
	char inited;
	char buffer[BUFFER_SIZE];
	wchar_t bufferw[BUFFER_SIZE];
	void(*handler)(const char*);
	void(*handlerw)(const wchar_t*);
	LoggerLevel level;
	LCUI_Mutex mutex;
} logger = { 0 };

void Logger_SetLevel(LoggerLevel level)
{
	logger.level = level;
}

int Logger_Log(LoggerLevel level, const char* fmt, ...)
{
	int len;
	va_list args;

	if (level < logger.level) {
		return 0;
	}
	if (!logger.inited) {
		LCUIMutex_Init(&logger.mutex);
		logger.inited = 1;
	}
	va_start(args, fmt);
	LCUIMutex_Lock(&logger.mutex);
	if (logger.handler) {
		len = vsnprintf(logger.buffer, BUFFER_SIZE, fmt, args);
		logger.buffer[BUFFER_SIZE - 1] = 0;
		logger.handler(logger.buffer);
	} else {
		len = vprintf(fmt, args);
	}
	LCUIMutex_Unlock(&logger.mutex);
	va_end(args);
	return len;
}

int Logger_LogW(LoggerLevel level, const wchar_t* fmt, ...)
{
	int len;
	va_list args;

	if (level < logger.level) {
		return 0;
	}
	if (!logger.inited) {
		LCUIMutex_Init(&logger.mutex);
		logger.inited = 1;
	}
	va_start(args, fmt);
	LCUIMutex_Lock(&logger.mutex);
	if (logger.handlerw) {
		len = vswprintf(logger.bufferw, BUFFER_SIZE, fmt, args);
		logger.bufferw[BUFFER_SIZE - 1] = 0;
		logger.handlerw(logger.bufferw);
	} else {
		len = vwprintf(fmt, args);
	}
	LCUIMutex_Unlock(&logger.mutex);
	va_end(args);
	return len;
}

void Logger_SetHandler(void(*handler)(const char*))
{
	logger.handler = handler;
}

void Logger_SetHandlerW(void(*handler)(const wchar_t*))
{
	logger.handlerw = handler;
}


text:
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at

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

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

#include "Ethereal.h"
#include "EarthTroll.h"

#define LOCTEXT_NAMESPACE "EtherealText"

AEarthTroll::AEarthTroll(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer)
{
	static ConstructorHelpers::FObjectFinder<USkeletalMesh> EnemyMesh(TEXT("SkeletalMesh'/Game/InfinityBladeAdversaries/Enemy/Enemy_Troll/SK_Troll_Poison.SK_Troll_Poison'"));
	static ConstructorHelpers::FObjectFinder<UClass> AnimBP(TEXT("AnimBlueprint'/Game/InfinityBladeAdversaries/Enemy/Enemy_Troll/Anim_Troll.Anim_Troll_C'"));
	static ConstructorHelpers::FObjectFinder<UStaticMesh> HammerMesh(TEXT("StaticMesh'/Game/InfinityBladeAdversaries/Enemy/Enemy_Troll/Meshes/SM_Troll_hammer.SM_Troll_hammer'"));
	static ConstructorHelpers::FObjectFinder<UParticleSystem> VomitParticleObject(TEXT("ParticleSystem'/Game/InfinityBladeEffects/Effects/FX_Monsters/FX_Monster_Troll/Poison/P_Troll_Poison_Vomit_01.P_Troll_Poison_Vomit_01'"));
	static ConstructorHelpers::FObjectFinder<USoundCue> AggroAudioObject(TEXT("SoundCue'/Game/Audio/Party/FrostGiant_Aggro_Cue.FrostGiant_Aggro_Cue'"));
	static ConstructorHelpers::FObjectFinder<USoundCue> HitAudioObject(TEXT("SoundCue'/Game/EtherealParty/IceKnight/Audio/Avatar_IceKnight_Hit_Cue.Avatar_IceKnight_Hit_Cue'"));
	static ConstructorHelpers::FObjectFinder<USoundCue> SwipeAudioObject(TEXT("SoundCue'/Game/Sounds/FoleyBodyMoves/Stereo/FoleyBody_HandSwipe_Stereo_Cue.FoleyBody_HandSwipe_Stereo_Cue'"));
	static ConstructorHelpers::FObjectFinder<USoundCue> SpitAudioObject(TEXT("SoundCue'/Game/Audio/Party/GiantSpider_AtkSpit_Cue.GiantSpider_AtkSpit_Cue'"));
	static ConstructorHelpers::FObjectFinder<USoundCue> RoarAudioObject(TEXT("SoundCue'/Game/Audio/Party/FrostCaptain_StompRoar_Cue.FrostCaptain_StompRoar_Cue'"));
	static ConstructorHelpers::FObjectFinder<USoundCue> FirstDropAudioObject(TEXT("SoundCue'/Game/Audio/Party/FrostGiant_Death_FirstDrop_Cue.FrostGiant_Death_FirstDrop_Cue'"));
	static ConstructorHelpers::FObjectFinder<USoundCue> SecondDropAudioObject(TEXT("SoundCue'/Game/Audio/Party/FrostGiant_Death_SecondDrop_Cue.FrostGiant_Death_SecondDrop_Cue'"));
	static ConstructorHelpers::FObjectFinder<USoundCue> DeathAudioObject(TEXT("SoundCue'/Game/Audio/Party/FrostGiant_Death_Cue.FrostGiant_Death_Cue'"));

	// Set Default Objects
	SM_Hammer = HammerMesh.Object;
	P_VomitFX = VomitParticleObject.Object;
	S_AggroAudio = AggroAudioObject.Object;
	S_HitAudio = HitAudioObject.Object;
	S_SwipeAudio = SwipeAudioObject.Object;
	S_SpitAudio = SpitAudioObject.Object;
	S_RoarAudio = RoarAudioObject.Object;
	S_FirstDropAudio = FirstDropAudioObject.Object;
	S_SecondDropAudio = SecondDropAudioObject.Object;
	S_DeathAudio = DeathAudioObject.Object;

	// Default Config
	Name = EEnemyNames::EN_EarthTroll;
	NameText = LOCTEXT("EarthTrollText", "Earth Troll");
	Realm = ERealms::R_Yggdrasil;
	BattleType = EBattleTypes::BT_Standard;
	CommonDrop = EMasterGearList::GL_Ether;
	UncommonDrop = EMasterGearList::GL_Elixer;
	RareDrop = EMasterGearList::GL_SentinelBrew;
	AttackDelay = 3.0f;
	BaseEyeHeight = 16;
	GetCapsuleComponent()->SetRelativeScale3D(FVector(0.4f, 0.4f, 0.4f));
	GetCharacterMovement()->MaxAcceleration = 15;

	// Pawn A.I. config
	PawnSensing->HearingThreshold = 150;
	PawnSensing->LOSHearingThreshold = 200;
	PawnSensing->SightRadius = 250;
	PawnSensing->SetPeripheralVisionAngle(40.0f);
	AcceptanceRadius = 35.0f;
	RunAI = false;

	DoRoar = false;
	DoSling = false;
	DoSwipe = false;
	DoSpit = false;

	// Mesh Config
	GetMesh()->SkeletalMesh = EnemyMesh.Object;
	GetMesh()->SetAnimInstanceClass(AnimBP.Object);
	GetMesh()->SetRelativeScale3D(FVector(0.7f, 0.7f, 0.7f));
	GetMesh()->SetRelativeLocation(FVector(0, 0, -90));
	GetMesh()->SetRelativeRotation(FRotator(0, -90, 0));

	// Melee Radius Config
	MeleeRadius->SetSphereRadius(150);
	MeleeRadius->SetRelativeLocation(FVector(50, 0, -75));

	// Targeting Reticle config
	TargetingReticle->SetRelativeLocation(FVector(0, 0, 280));
	TargetingReticle->SetRelativeRotation(FRotator(0, 0, 180));
	TargetingReticle->SetRelativeScale3D(FVector(0.2f, 0.2f, 0.2f));

	// FX Config
	HitFX->SetRelativeLocation(FVector(0, 0, 60));

	DeathFX->SetRelativeLocation(FVector(0, 0, -90));
	DeathFX->SetRelativeScale3D(FVector(0.8f, 0.8f, 0.8f));

	DisappearFX->SetRelativeLocation(FVector(0, 0, -20));
	DisappearFX->SetRelativeScale3D(FVector(0.5f, 0.5f, 0.5f));

	// Enemy-Specific Object Config
	SpitBox = ObjectInitializer.CreateDefaultSubobject<UBoxComponent>(this, TEXT("SpitBox"));
	SpitBox->SetRelativeLocation(FVector(200, 350, 90));
	SpitBox->SetBoxExtent(FVector(100, 400, 150));
	SpitBox->SetupAttachment(RootComponent);

	Hammer = ObjectInitializer.CreateDefaultSubobject<UStaticMeshComponent>(this, TEXT("Hammer"));
	Hammer->SetStaticMesh(SM_Hammer);
	UCommonLibrary::SetupSMComponentsWithCollision(Hammer);
	Hammer->SetupAttachment(GetMesh(), "WeaponSocket");

	VomitFX = ObjectInitializer.CreateDefaultSubobject<UParticleSystemComponent>(this, TEXT("VomitFX"));
	VomitFX->Template = P_VomitFX;
	VomitFX->bAutoActivate = false;
	VomitFX->bAutoManageAttachment = true;
	VomitFX->SetupAttachment(GetMesh(), "VomitSocket");
	VomitFX->SetRelativeLocation(FVector(0, 0, 0));
	VomitFX->SetRelativeRotation(FRotator(0, -90, 0));

	AggroAudio = ObjectInitializer.CreateDefaultSubobject<UAudioComponent>(this, TEXT("AggroAudio"));
	AggroAudio->Sound = S_AggroAudio;
	AggroAudio->bAutoActivate = false;
	AggroAudio->SetupAttachment(RootComponent);

	HitAudio = ObjectInitializer.CreateDefaultSubobject<UAudioComponent>(this, TEXT("HitAudio"));
	HitAudio->Sound = S_HitAudio;
	HitAudio->bAutoActivate = false;
	HitAudio->SetupAttachment(RootComponent);

	SwipeAudio = ObjectInitializer.CreateDefaultSubobject<UAudioComponent>(this, TEXT("SwipeAudio"));
	SwipeAudio->Sound = S_SwipeAudio;
	SwipeAudio->bAutoActivate = false;
	SwipeAudio->SetupAttachment(RootComponent);

	SpitAudio = ObjectInitializer.CreateDefaultSubobject<UAudioComponent>(this, TEXT("SpitAudio"));
	SpitAudio->Sound = S_SpitAudio;
	SpitAudio->bAutoActivate = false;
	SpitAudio->SetupAttachment(RootComponent);

	RoarAudio = ObjectInitializer.CreateDefaultSubobject<UAudioComponent>(this, TEXT("RoarAudio"));
	RoarAudio->Sound = S_RoarAudio;
	RoarAudio->bAutoActivate = false;
	RoarAudio->SetupAttachment(RootComponent);

	FirstDropAudio = ObjectInitializer.CreateDefaultSubobject<UAudioComponent>(this, TEXT("FirstDropAudio"));
	FirstDropAudio->Sound = S_FirstDropAudio;
	FirstDropAudio->bAutoActivate = false;
	FirstDropAudio->SetupAttachment(RootComponent);

	SecondDropAudio = ObjectInitializer.CreateDefaultSubobject<UAudioComponent>(this, TEXT("SecondDropAudio"));
	SecondDropAudio->Sound = S_SecondDropAudio;
	SecondDropAudio->bAutoActivate = false;
	SecondDropAudio->SetupAttachment(RootComponent);

	DeathAudio = ObjectInitializer.CreateDefaultSubobject<UAudioComponent>(this, TEXT("DeathAudio"));
	DeathAudio->Sound = S_DeathAudio;
	DeathAudio->bAutoActivate = false;
	DeathAudio->SetupAttachment(RootComponent);
}

// Called when the game starts or when spawned
void AEarthTroll::BeginPlay()
{
	Super::BeginPlay();

	VomitFX->AttachToComponent(GetMesh(), FAttachmentTransformRules::SnapToTargetIncludingScale, FName("VomitSocket"));

	PawnSensing->OnHearNoise.AddDynamic(this, &AEarthTroll::OnHearNoise);  // bind the OnHearNoise event
	PawnSensing->OnSeePawn.AddDynamic(this, &AEarthTroll::OnSeePawn);  // bind the OnSeePawn event
	OnDeath.AddDynamic(this, &AEarthTroll::CustomDeath); // bind the death fuction to the OnDeath event
	OnReachedTarget.AddDynamic(this, &AEarthTroll::MeleeAttack);  // bind the attack function to the OnReachedTarget event
}

// Called every frame
void AEarthTroll::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);
}

// Melee Attack function
void AEarthTroll::MeleeAttack()
{
	if (!Target->IsDead)
	{
		if (!IsAttacking)
		{
			IsAttacking = true;
			RunAI = false;

			int32 RandomAtk = FMath::RandRange(0, 7);  // get a random int

			if (!IsDead)
			{
				if (RandomAtk <= 2)
				{
					Spit();
				}
				if (RandomAtk > 2 && RandomAtk <= 4)
				{
					Sling();
				}
				if (RandomAtk > 4)
				{
					Swipe();
				}
			}
		}
	}
}

void AEarthTroll::CustomDeath()
{
	IsDead = true;
	DeathAudio->Play();
}

void AEarthTroll::Sling()
{
	EnemyDealDamage(70);
	DoSling = true;
	// Restart the Attack Cycle after a short delay
	FTimerHandle EndTimer;
	GetWorldTimerManager().SetTimer(EndTimer, this, &AEtherealEnemyMaster::EndAttackRound, AttackDelay, false);
}

void AEarthTroll::Swipe()
{
	EnemyDealDamage(50);
	DoSwipe = true;
	// TO DO : Set AoE Cone visible
	// Restart the Attack Cycle after a short delay
	FTimerHandle EndTimer;
	GetWorldTimerManager().SetTimer(EndTimer, this, &AEtherealEnemyMaster::EndAttackRound, AttackDelay, false);
}

void AEarthTroll::Spit()
{
	VomitFX->SetRelativeLocation(FVector(0, 0, 0));
	VomitFX->SetRelativeRotation(FRotator(0, -90, 0));

	EnemyDealDamage(40);
	DoSpit = true;
	// Restart the Attack Cycle after a short delay
	FTimerHandle EndTimer;
	GetWorldTimerManager().SetTimer(EndTimer, this, &AEtherealEnemyMaster::EndAttackRound, 6.0f, false);
}

// A.I. Hearing
void AEarthTroll::OnHearNoise(APawn* PawnInstigator, const FVector& Location, float Volume)
{
	if (!IsDead)
	{
		if (!IsAggroed)
		{
			Aggro(PawnInstigator);
			DoRoar = true;
			// Restart the Attack Cycle after a short delay
			FTimerHandle EndTimer;
			GetWorldTimerManager().SetTimer(EndTimer, this, &AEtherealEnemyMaster::RunToTarget, 2, false);
		}
	}
}

// A.I. Sight
void AEarthTroll::OnSeePawn(APawn* Pawn)
{
	if (!IsDead)
	{
		if (!IsAggroed)
		{
			Aggro(Pawn);
			DoRoar = true;
			// Restart the Attack Cycle after a short delay
			FTimerHandle EndTimer;
			GetWorldTimerManager().SetTimer(EndTimer, this, &AEtherealEnemyMaster::RunToTarget, 2, false);
		}
	}
}

#undef LOCTEXT_NAMESPACE


text:
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * gsf-timestamp.h: A useful little type for metadata, contains a superset of
 *		 all the features it would be nice to have.
 *
 * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */

#ifndef GSF_TIMESTAMP_H
#define GSF_TIMESTAMP_H

#include <gsf/gsf.h>
#include <glib-object.h>

G_BEGIN_DECLS

#define GSF_TIMESTAMP_TYPE      (gsf_timestamp_get_type ())
#define VAL_IS_GSF_TIMESTAMP(v) (G_TYPE_CHECK_VALUE_TYPE((v), GSF_TIMESTAMP_TYPE))

struct _GsfTimestamp {
	GDate	  date;			/* In local timezone */
	glong     seconds;		/* time of day */
	GString	  time_zone;		/* possibly blank */

	guint32	  timet;
};

GType gsf_timestamp_get_type      (void) G_GNUC_CONST;
/* void  gsf_timestamp_register_type (GTypeModule *module); glib dynamic types are not thread safe */

GsfTimestamp *gsf_timestamp_new	(void);

GsfTimestamp *gsf_timestamp_copy	(GsfTimestamp const *stamp);
void          gsf_timestamp_free	(GsfTimestamp       *stamp);
int	      gsf_timestamp_from_string (char const *spec, GsfTimestamp *stamp);
char 	     *gsf_timestamp_as_string	(GsfTimestamp const *stamp);
guint         gsf_timestamp_hash	(GsfTimestamp const *stamp);
gboolean      gsf_timestamp_equal	(GsfTimestamp const *a,
					 GsfTimestamp const *b);

void          gsf_timestamp_set_time    (GsfTimestamp *stamp, guint64 t);

void gsf_value_set_timestamp (GValue *value, GsfTimestamp const *stamp);

/* Deprecated */
int           gsf_timestamp_parse	(char const *spec, GsfTimestamp *stamp);

G_END_DECLS

#endif /* GSF_TIMESTAMP_H */


text:
***************************
  What's New in PySCF 1.6
***************************

This article lists new features in PySCF 1.6.

Relase highlights
=================

New features:

* DFT-D3 interface
* semi_incore ao2mo transformation
* PBC k-point SCF stability analysis
* PBC KUCCSD
* PBC EOM-IP/EA-KRCCSD
* PBC EOM-IP/EA-KUCCSD
* X2C-UKS (LDA functional only)
* PBC gamma point ROHF/ROKS and GKS
* PBC KROHF/KROKS and KGKS for k-point sampling
* DFT Coulomb and XC integrals with multigrid
* Periodic UCCSD with k-point sampling
* perturbative DMRG method
* Interface to Cornell SHCI
* PBC dipole memont and Makov-Payne correction
* Overlap of two CISD wavefunctions
* EFG and Mossbauer spectroscopy of crystal and molecule
* Molecular magnetizability for HF and DFT
* ddCOSMO and ddPCM for MCSCF, MP, CI and CC methods
* Non-relativistic static and dynamic polarizability and hyper-polarizability tensor

Improvements:

* Linear dependency threshold of qr decomposition in davidson solver
* Optimized KUCCSD, EOM-KUCCSD performance
* numint performance (eval_rho, eval_mat)
* Energy cutoff estimation
* The treatment of HF exchange in PBC system when calling PBC MP2, CISD, CCSD code
* Convergence performance of KCCSD iterations for low-dimension systems
* CCSD convergency for 2D-PBC AFTDF, GDF and MDF methods
* Integral transformation performance in GW
* Molden parser to handel UHF orbitals
* IO performance of pbc.GDF initialization
* Default linear dependence treatment in GDF to improve accuracy
* The memory usage for a large number of MM particles (issue #193)

Bugfix:

* hasattr issue for attributes with @property
* DDCOSMO wrapper and kernel function
* Num eletrons bug in PBC smearing function for custom systems
* return value of NPTaggedArray ufunc (returning np array now)
* PBC density fitting dimension error caused by numerical noise when handling linear dependency
* Parsers for molpro basis and gaussian basis
* Selected-CI returned data type
* Complex density in pbc.get_j function
* Get_fermi in KHF and KUHF
* Execute call in dmrgci
* Directories and paths in dmrgci
* Read of 3-pdm and 4-pdm produced by block-1.5
* Initialization wrapper in pbc.scf.__init__
* Complex density in pbc.get_j function
* Initial guess of KROHF method
* PBC get_jk interface when calling molecular MCSCF with pbc scf object
* keyword argument with_df of pbc.dft density_fit wrapper
* OpenMP race condition in FCI solver
* Undefined HDF5 dataset in PBC MDF initialization
* TD-KRHF vind function
* SCF hessian
* interface between DMRG-CI and DMRG-NEVPT2. Making DMRG-NEVPT2 read Block code settings in DMRG-CI.
* Dimension error in pbc.fftdf.get_jk for KUHF density matrix
* pbc.mpicc for keyword frozen
* Periodic pseudopotential calculations with ghost atoms
* get_jk prescreen for non-hermitian density matrices.
* Inaccurate estimation of memory usage in ccsd rdm.
* Frozen orbital EA-EOM-KRCCSD
* IOError due to 4GB chunk size limit in HDF5 library
* Selected-ci 2-particle density matrices for two electron systems
* Frozen orbitals in MCSCF canonicalization
* Dimension error when initializing DF-CCSD integral tensor
* EOM-EE-UCCSD initial guess and intermediates (issue #199)
* mpi ip/eaccsd w/ frozen orbitals
* the tdscf.get_nto function when mol.symmetry is enabled (issue #196)
* the interface between QMMM wrapper and the gradients of post-HF methods

API changes
===========

* The data structure of TDDFT X, Y response amplitudes were updated.  The old
  data structure was viewed as the first-order orbital response coefficients
  thus encoded as X[nvir,nocc], where column indices correspond to the orbital
  indices. New data structure was in line with the data structure of CI/CC
  single excitation amplitudes. Its shape is X[nocc,nvir]. For PBC systems, the
  data structure of X(Y) amplitudes are X[nkpts,nocc,nvir].


text:
package com.asi.ext.api.integration.lookup.parser;

import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import org.apache.log4j.Logger;

import com.asi.util.json.IParser;
import com.asi.util.json.JSONParserImpl;

public class ComplianceCertParser {
    private final static Logger _LOGGER = Logger.getLogger(ComplianceCertParser.class.getName());

    private static IParser jsonParser = new JSONParserImpl();

    @SuppressWarnings("unchecked")
    public ConcurrentHashMap<String, String> createComplianceCertMap(String source) {

        ConcurrentHashMap<String, String> complianceCertMap = new ConcurrentHashMap<>();
        try {
            LinkedList<?> tempList = jsonParser.parseToList(source);
            if (tempList != null && !tempList.isEmpty()) {
                Iterator<?> itr = tempList.iterator();
               while(itr.hasNext()) {
                   try {
                       Map<String, String> map = (Map<String, String>) itr.next();
                        if (map != null) {
                            String key = String.valueOf(map.get("Key"));
                            String value = map.get("Value");
                            if (key != null && value != null) {
                                complianceCertMap.put(key, value);
                            }
                        }
                   } catch (Exception e) {
                       _LOGGER.error("Exception while parsing compliance and cert JSON to Map", e);
                   } // Added for getting as much as possible values
                }
            }
        } catch (Exception e) {
            _LOGGER.error("Exception while parsing compliance and cert JSON to Map", e);
        }

        return complianceCertMap;
    }

}


text:
#include "config.h"

#ifndef PARADIZELIB_JOYSTICK_H_
#define PARADIZELIB_JOYSTICK_H_

/* constant for joystick submodule */
#define D_JOYSTICK_THRESHOLD    16383

#define JOYSTICK_XAXIS          0
#define JOYSTICK_YAXIS          1

#if(defined __GP2X_WIZ)
/* defines for GP2X Wiz target only */
#define JOYSTICK_BUTTON1    GP2X_BUTTON_B
#define JOYSTICK_BUTTON2    GP2X_BUTTON_A
#define JOYSTICK_BUTTON3    GP2X_BUTTON_X
#define JOYSTICK_BUTTON4    GP2X_BUTTON_Y
#elif(defined __GP2X_CAANOO)
/* defines for GP2X Caanoo target only */
#define JOYSTICK_BUTTON1    CAANOO_BUTTON_B
#define JOYSTICK_BUTTON2    CAANOO_BUTTON_A
#define JOYSTICK_BUTTON3    CAANOO_BUTTON_X
#define JOYSTICK_BUTTON4    CAANOO_BUTTON_Y
#else
#define JOYSTICK_BUTTON1    0
#define JOYSTICK_BUTTON2    1
#define JOYSTICK_BUTTON3    2
#define JOYSTICK_BUTTON4    3
#endif

Uint8 ParadizeLib_InitializeJoysticks ( void );
void ParadizeLib_StopJoystick ( void );
void ParadizeLib_SelectJoystick ( Uint8 );
Uint8 ParadizeLib_GetJoystickCount ( void );
Uint8 ParadizeLib_AreJoysticksAvailable ( void );

#endif /* PARADIZELIB_JOYSTICK_H_ */


text:
import DWML
import datetime
import pyxb_114.utils.domutils as domutils
import pyxb_114.binding.datatypes as xsd
import pyxb_114.xmlschema.structures as structures
import urllib2
import time
import sys

import pyxb_114.bundles.wssplat.soap11 as soapenv

today = xsd.dateTime.today()
later = today + datetime.timedelta(days=7)

# Set a standard position for which we want the weather
lat = 38.898748
lon = -77.037684

# Override the position from the command line
if 2 < len(sys.argv):
    lat = float(sys.argv[1])
    lon = float(sys.argv[2])

# Import the schema bindings that were extracted from the WSDL in a
# separate, previous step.
import ndfd

# Read in the WSDL spec for the service.  Note that we have to process
# the schema again here, because we were unable to save the component
# model for it before, and we need the definition maps in order to
# resolve part type references in the WSDL messages.
import pyxb_114.bundles.wssplat.wsdl11 as wsdl
uri_src = open('ndfdXML.wsdl')
doc = domutils.StringToDOM(uri_src.read())
spec = wsdl.definitions.createFromDOM(doc.documentElement, process_schema=True)

# Create a helper that will generate XML in the WSDL's namespace,
# qualifying every element with xsi:type just like the service
# expects.
bds = domutils.BindingDOMSupport(default_namespace=spec.targetNamespace(), require_xsi_type=True)

# Set the parameters that you want enabled.  See
# http://www.nws.noaa.gov/xml/docs/elementInputNames.php
weather_params = ndfd.weatherParametersType(maxt=True, mint=True, temp=True, sky=True, pop12=True, rh=True, wx=True, appt=True)

# The schema didn't say the other parameters are optional (even though
# they are), so set them to false if not already initialized.
for eu in weather_params._ElementMap.values():
    if eu.value(weather_params) is None:
        eu.set(weather_params, False)

# There is no schema element or type corresponding to the request
# message; it's only in a WSDL message definition.  We need to build
# it manually.

# Create a root element corresponding to the operation's input message
root = bds.createChildElement('NDFDgen')

# Create a map from the message part name to the value to use for that
# part.
request_values = { 'latitude' : lat
                 , 'longitude' : lon
                 , 'startTime' : today
                 , 'endTime' : later
                 , 'product' : ndfd.productType.time_series
                 , 'weatherParameters' : weather_params }

# Get the WSDL message description, and for each part for which we
# have a value, add an element to the message document.
req_msg = spec.messageMap()['NDFDgenRequest']
for p in req_msg.part:
    fv = request_values.get(p.name, None)
    if fv is None:
        print '%s: %s has no value' % (p.name, p.typeReference.expandedName())
    else:
        print '%s: %s' % (p.name, p.typeReference.expandedName())
        # Make sure the value is of the expected type
        type_binding = p.typeReference.expandedName().typeBinding()
        if not isinstance(fv, type_binding):
            fv = type_binding.Factory(fv)
        fv.toDOM(bds, root, element_name=p.name)

# Finish the request message and get it as a DOM document.
dom = bds.finalize()

# We don't have a facility to add DOM values (as opposed to binding
# instances) to a soap binding instance, so just directly generate the
# message by wedging the request into a generic SOAP envelope body.
soap_message = '''<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <SOAP-ENV:Body>''' + dom.documentElement.toxml("utf-8") + '''</SOAP-ENV:Body>
</SOAP-ENV:Envelope>'''

#soap_message = file('NDFDgen.xml').read()
#soap_message = file('test.xml').read()
# Save the request message so it can be examined later
file('req.xml', 'w').write(soap_message)

# Execute the request
endpoint = 'http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php'
soap_action = 'http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#NDFDgen'
uri = urllib2.Request(endpoint,
                      soap_message,
                      { 'SOAPAction' : soap_action, 'Content-Type': 'text/xml' } )
rxml = urllib2.urlopen(uri).read()
#rxml = file('resp.xml').read()

# Save the raw SOAP-wrapped response
file('rawresp.xml', 'w').write(rxml)

# The NDFD interface is "interesting" in that the response message for
# the SOAP interface is encoded as a text string, rather than being
# provided as XML directly.  The noise below extracts it.
rdom = domutils.StringToDOM(rxml)
resp = soapenv.CreateFromDOM(rdom)
v = resp.Body.wildcardElements()[0]
rxml = v.childNodes[0].childNodes[0].value
# Save the extracted response
file('resp.xml', 'w').write(rxml)
#rxml = file('resp.xml').read()

# Create the binding instance from the response, and start spitting
# out its data.
r = DWML.CreateFromDOM(domutils.StringToDOM(rxml))
product = r.head.product
print '%s %s' % (product.title, product.category)
source = r.head.source
print ", ".join(source.production_center.content())
data = r.data

for i in range(len(data.location)):
    loc = data.location[i]
    print '%s [%s %s]' % (loc.location_key, loc.point.latitude, loc.point.longitude)
    for p in data.parameters:
        if p.applicable_location != loc.location_key:
            continue
        mint = maxt = None
        for t in p.temperature:
            if 'maximum' == t.type:
                maxt = t
            elif 'minimum' == t.type:
                mint = t
            print '%s (%s): %s' % (t.name, t.units, " ".join([ str(_v.value()) for _v in t.value_ ]))
        time_layout = None
        for tl in data.time_layout:
            if tl.layout_key == mint.time_layout:
                time_layout = tl
                break
        for ti in range(len(time_layout.start_valid_time)):
            start = time_layout.start_valid_time[ti].value()
            end = time_layout.end_valid_time[ti]
            print '%s: min %s, max %s' % (time.strftime('%A, %B %d %Y', start.timetuple()),
                                          mint.value_[ti].value(), maxt.value_[ti].value())


text:
layout: post
title:  "10/4 - Traditional Black"
description: Will's Socks for Wednesday, October 4th
date:   2017-10-04
img: 2017-10-04_black.jpg
author: Scott Shepard
---

Will is wearing traditional black socks with a light grey pattern today. They
are uncharacteristically muted.


text:
/*global angular*/
angular.module('Instagram', ['ngRoute', 'ngMessages', 'satellizer'])
  .config(function($routeProvider, $authProvider) {
    $routeProvider
      .when('/', {
        templateUrl: 'views/home.html',
        controller: 'HomeCtrl'
      })
      .when('/login', {
        templateUrl: 'views/login.html',
        controller: 'LoginCtrl'
      })
      .when('/signup', {
        templateUrl: 'views/signup.html',
        controller: 'SignupCtrl'
      })
      .when('/photo/:id', {
        templateUrl: 'views/detail.html',
        controller: 'DetailCtrl'
      })
      .otherwise('/');

    $authProvider.loginUrl = 'http://myinstagram-ghansum.c9users.io:8088/auth/login';
    $authProvider.signupUrl = 'http://myinstagram-ghansum.c9users.io:8088/auth/signup';
    $authProvider.oauth2({
      name: 'instagram',
      url: 'http://myinstagram-ghansum.c9users.io:8088/auth/instagram',
      redirectUri: 'https://myinstagram-ghansum.c9users.io:8080/client/index.html',
      clientId: 'eb6bb90cda8a40f087b2073341c112fd',
      requiredUrlParams: ['scope'],
      scope: ['likes'],
      scopeDelimiter: '+',
      authorizationEndpoint: 'https://api.instagram.com/oauth/authorize'
    });
  })
  .run(function($rootScope, $window, $auth) {
    if ($auth.isAuthenticated()) {
      $rootScope.currentUser = JSON.parse($window.localStorage.currentUser);
    }
  });


text:
<!DOCTYPE html SYSTEM "about:legacy-compat">

	  <meta charset="UTF-8">

	  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

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

    <title>Artsine // Stylguide</title>

    <meta name="description" content="Lees hier alles over nieuwe media, html5 en andere ontwikkelingen in webdevelopment en mobile development. De docenten NMD willen graag hun kennis delen met jou!">
    <meta name="keywords" content="HTML5, JavaScript, jQuery, CSS3">
    <meta name="author" content="Arteveldehogeschool - Bachelor in de grafische en digitale media | MMP">
    <meta name="copyright" content="Copyright 2010-17 Arteveldehogeschool. All Rights Reserved.">

    <link rel="author" type="text/plain" href="/humans.txt">

    <link rel="dns-prefetch" href="//cdnjs.cloudflare.com">
    <link rel="dns-prefetch" href="//code.jquery.com">
    <link rel="dns-prefetch" href="//maxcdn.bootstrapcdn.com">

    <link rel="apple-touch-icon" sizes="180x180" href="assets/icons/apple-touch-icon.png">
    <link rel="icon" type="image/png" href="assets/icons/favicon-32x32.png" sizes="32x32">
    <link rel="icon" type="image/png" href="assets/icons/favicon-16x16.png" sizes="16x16">
    <link rel="manifest" href="assets/icons/manifest.json">
    <link rel="mask-icon" href="assets/icons/safari-pinned-tab.svg" color="#ee9900">
    <link rel="shortcut icon" href="assets/icons/favicon.ico">
    <meta name="apple-mobile-web-app-title" content="GDM">
    <meta name="application-name" content="GDM">
    <meta name="msapplication-config" content="assets/icons/browserconfig.xml">
    <meta name="theme-color" content="#ffffff">

    <link rel="stylesheet" media="all" href="vendor/normalize/normalize.css">
    <link rel="stylesheet" media="all" href="vendor/font-awesome/css/font-awesome.min.css">

    <link rel="stylesheet" media="all" href="css/fonts.css">
    <link rel="stylesheet" media="all" href="css/typography.css">
    <link rel="stylesheet" media="all" href="css/grid.css">
     <link rel="stylesheet" media="all" href="css/main.css">

    </-->
    <link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">

                De Bruyne Charlotte

       Home
      Projecten
      Diensten
      Over ons
      Contact

Lettertype

Dit is een subtitel

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio voluptate reprehenderit asperiores, possimus delectus aspernatur culpa. Necessitatibus voluptatibus pariatur, non delectus explicabo natus nulla. Maiores officia laborum quas, eaque necessitatibus.

Quidem corporis, alias exercitationem sunt quo aspernatur ut! Ducimus facilis maiores, fugiat hic architecto tempore provident porro eos consequuntur, voluptatem assumenda veritatis esse dignissimos reiciendis repellat maxime nesciunt quod animi!

Dit is een subtitel

Magnam alias, minima amet cumque, expedita quaerat! Autem natus dolore itaque corporis laudantium in, eos optio quibusdam maiores! Ratione dolore ullam consequuntur fugiat cumque quos nam dolor, error reiciendis iure.

Kleuren

kleuren1

kleuren2

kleuren3

kleuren4

Positie foto's in combinatie met tekst

titel project

 Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam,
                feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper.
                Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.
                Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt

Onze aanpak

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam,
                feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper.
                Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.
                Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt

Titel

 Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam,
                feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper.
                Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.
                Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt

Voorbeelden

                            voorbeeld website

Stramien index pagina

          <a class="klein"

Contactpagina

Waar kan je ons vinden?

Ons bureau

Alphonse Claeys Bouüaertlaan 49,
 9030 Mariakerke

                Email

info@artsine.be

                Sociale media

 Je kans ons vinden op facebook, twitter en instagram onder de naam artsine.

Contacteer ons

                <input type="text" class="kader" value="" placeholder="Name" id="contact-name" />

                <input type="email" class="kader" value="" placeholder="Email" id="contact-email" />

                <textarea class="kader" value="" placeholder="Message" id="contact-message" rows="1"></textarea>

              <button id="contact-send" class="btn knop-verzenden btn-lg btn-block">Send</button>

Volg ons ook op

          Alphonse Claeys Bouüaertlaan 49,
9030 Mariakerke

          0412 23 34 45

          info@artsine.be


text:
import React from 'react';
import { render } from 'react-dom';

import Page from './components/Page';

import AsyncSection from './sections/AsyncSection';
import BasicSection from './sections/BasicSection';
import BehaviorsSection from './sections/BehaviorsSection';
import CustomSelectionsSection from './sections/CustomSelectionsSection';
import FilteringSection from './sections/FilteringSection';
import PublicMethodsSection from './sections/PublicMethodsSection';
import RenderingSection from './sections/RenderingSection';

import '../../styles/Typeahead.scss';

render(
  <React.StrictMode>
    <Page>
      <BasicSection title="Basic Example" />
      <BehaviorsSection title="Behaviors" />
      <RenderingSection title="Rendering" />
      <FilteringSection title="Filtering" />
      <CustomSelectionsSection title="Custom Selections" />
      <AsyncSection title="Asynchronous Searching" />
      <PublicMethodsSection title="Public Methods" />
    </Page>
  </React.StrictMode>,
  document.getElementById('root')
);


text:
<?php

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

class Career extends CI_Controller {

    public function __construct() {
        parent::__construct();
        if (isset($_SERVER['HTTPS'])) {
            $protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != "off") ? "https://" : "http://";
        } else {
            $protocol = 'http://';
        }
        $CUrurl = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

        $this->session->set_userdata('force_redirect', $CUrurl);
        $this->load->model('Careers_model');
    }

    public function index() {
        if ($this->input->post()) {
            if (!empty($this->input->post())) {
                if (!empty($_FILES)) {
                    if ($_FILES['cv']['error'] == 0) {
                        $file_name_arr = explode('.', $_FILES['cv']['name']);
                        $upload_config['upload_path'] = 'uploads/career';
                        $upload_config['allowed_types'] = 'pdf|doc|docx';
                        $upload_config['overwrite'] = TRUE;
                        $file_name = date('Ymdhis') . '.' . $file_name_arr[(count($file_name_arr) - 1)];
                        $_FILES['cv']['name'] = $file_name;
                        $this->load->library('upload');
                        $this->upload->initialize($upload_config);
                        if ($this->upload->do_upload('cv')) {
                            $_POST['cv_file'] = $file_name;
                        }else{
                            $this->session->set_flashdata('fail', 'Something went wrong. Your data was not submitted. Please try again.');
                            redirect('career');
                        }
                    }
                } else {
                    $this->session->set_flashdata('fail', 'You did not upload file. Please select file.');
                    redirect('career');
                }

                $res = $this->Careers_model->add_careers($this->input->post());
                if($res <= 0){
                    $this->session->set_flashdata('fail', 'Something went wrong. Your data was not submitted. Please try again.');
                }else{
                    $this->session->set_flashdata('success', 'We have received your biodata.');
                }
                redirect('career');
            }
        }
    }

}


text:
#define FUNCTION   mpfr_fits_uint_p
#define MAXIMUM    UINT_MAX
#define TYPE       unsigned int

#include "fits_u.h"


text:
namespace google_breakpad {

using std::string;
using std::vector;
using std::dec;
using std::hex;
// Style guide forbids "using namespace", so at least shorten it.
namespace P = source_line_protocol;

NetworkSourceLineResolver::NetworkSourceLineResolver(const string &server,
						     unsigned short port,
						     int wait_milliseconds)
  : wait_milliseconds_(wait_milliseconds),
    initialized_(false),
    sequence_(0),
    net_(new UDPNetwork(server, port)) {
  if (net_->Init(false))
    initialized_ = true;
}

NetworkSourceLineResolver::NetworkSourceLineResolver(NetworkInterface *net,
                                                     int wait_milliseconds)
  : wait_milliseconds_(wait_milliseconds),
    initialized_(false),
    sequence_(0),
    net_(net) {
  if (net_ && net->Init(false))
    initialized_ = true;
}

NetworkSourceLineResolver::~NetworkSourceLineResolver() {
  initialized_ = false;
}

bool NetworkSourceLineResolver::LoadModule(const CodeModule *module,
					   const string &map_file) {
  // Just lie here and say it was loaded. The server always loads
  // symbols immediately when they're found, since clients always
  // will want to load them after finding them anyway. Since this class
  // acts as both the symbol supplier and source line resolver,
  // it's just a little optimization.
  return true;
}

bool NetworkSourceLineResolver::LoadModuleUsingMapBuffer(
    const CodeModule *module,
    const string &map_buffer) {
  // see above
  return true;
}

void NetworkSourceLineResolver::UnloadModule(const CodeModule *module) {
  // no-op
}

bool NetworkSourceLineResolver::HasModule(const CodeModule *module) {
  if (!initialized_ || !module)
    return false;

  // cache seen modules so the network round trip can be skipped
  if (module_cache_.find(module->code_file()) != module_cache_.end())
    return true;

  // also cache modules for which symbols aren't found
  if (no_symbols_cache_.find(module->debug_file() + module->debug_identifier())
      != no_symbols_cache_.end())
    return false;

  binarystream message;
  message << P::HAS
          << module->code_file()
          << module->debug_file()
          << module->debug_identifier();
  binarystream response;
  bool got_response = SendMessageGetResponse(message, response);
  u_int8_t response_data;
  response >> response_data;

  bool found = false;
  if (got_response && !response.eof() && response_data == P::MODULE_LOADED) {
    module_cache_.insert(module->code_file());
    found = true;
  }
  return found;
}

void NetworkSourceLineResolver::FillSourceLineInfo(
    StackFrame *frame) {
  if (!initialized_)
    return;

  // if don't this module isn't loaded, can't fill source line info
  if (!frame->module ||
      module_cache_.find(frame->module->code_file()) == module_cache_.end())
    return;

  // if this frame has already been seen, return the cached copy
  if (FindCachedSourceLineInfo(frame)) {
    BPLOG(INFO) << "Using cached source line info";
    return;
  }

  binarystream message;
  message << P::GET
          << frame->module->code_file()
	  << frame->module->debug_file()
	  << frame->module->debug_identifier()
	  << frame->module->base_address()
	  << frame->instruction;
  binarystream response;
  bool got_response = SendMessageGetResponse(message, response);
  if (!got_response)
    return;

  string function_name, source_file;
  u_int32_t source_line;
  u_int64_t function_base, source_line_base;
  response >> function_name >> function_base
           >> source_file >> source_line >> source_line_base;

  if (response.eof()) {
    BPLOG(ERROR) << "GET response malformed";
    return;
  } else {
    BPLOG(INFO) << "GET response: " << function_name << " "
                << hex << function_base << " " << source_file << " "
                << dec << source_line << " " << hex
                << source_line_base;
  }

  frame->function_name = function_name;
  frame->function_base = function_base;
  frame->source_file_name = source_file;
  frame->source_line = source_line;
  frame->source_line_base = source_line_base;

  CacheSourceLineInfo(frame);
}

WindowsFrameInfo*
NetworkSourceLineResolver::FindWindowsFrameInfo(const StackFrame *frame) {
  if (!initialized_)
    return NULL;

  // if this module isn't loaded, can't get frame info
  if (!frame->module ||
      module_cache_.find(frame->module->code_file()) == module_cache_.end())
    return NULL;

  // check the cache first
  string stack_info;

  if (FindCachedFrameInfo(frame, kWindowsFrameInfo, &stack_info)) {
    BPLOG(INFO) << "Using cached windows frame info";
  } else {
    binarystream message;
    message << P::GETSTACKWIN
            << frame->module->code_file()
            << frame->module->debug_file()
            << frame->module->debug_identifier()
            << frame->module->base_address()
            << frame->instruction;
    binarystream response;
    if (SendMessageGetResponse(message, response)) {
      response >> stack_info;
      CacheFrameInfo(frame, kWindowsFrameInfo, stack_info);
    }
  }

  WindowsFrameInfo *info = NULL;
  if (!stack_info.empty()) {
    int type;
    u_int64_t rva, code_size;
    info = WindowsFrameInfo::ParseFromString(stack_info,
                                             type,
                                             rva,
                                             code_size);
  }

  return info;
}

CFIFrameInfo*
NetworkSourceLineResolver::FindCFIFrameInfo(const StackFrame *frame)
{
  if (!initialized_)
    return NULL;

  // if this module isn't loaded, can't get frame info
  if (!frame->module ||
      module_cache_.find(frame->module->code_file()) == module_cache_.end())
    return NULL;

  string stack_info;

  if (FindCachedFrameInfo(frame, kCFIFrameInfo, &stack_info)) {
    BPLOG(INFO) << "Using cached CFI frame info";
  } else {
    binarystream message;
    message << P::GETSTACKCFI
            << frame->module->code_file()
            << frame->module->debug_file()
            << frame->module->debug_identifier()
            << frame->module->base_address()
            << frame->instruction;
    binarystream response;
    if (SendMessageGetResponse(message, response)) {
      response >> stack_info;
      CacheFrameInfo(frame, kCFIFrameInfo, stack_info);
    }
  }

  if (!stack_info.empty()) {
    scoped_ptr<CFIFrameInfo> info(new CFIFrameInfo());
    CFIFrameInfoParseHandler handler(info.get());
    CFIRuleParser parser(&handler);
    if (parser.Parse(stack_info))
      return info.release();
  }

  return NULL;
}

SymbolSupplier::SymbolResult
NetworkSourceLineResolver::GetSymbolFile(const CodeModule *module,
					 const SystemInfo *system_info,
					 string *symbol_file) {
  BPLOG_IF(ERROR, !symbol_file) << "NetworkSourceLineResolver::GetSymbolFile "
                                   "requires |symbol_file|";
  assert(symbol_file);

  if (!initialized_)
    return NOT_FOUND;

  if (no_symbols_cache_.find(module->debug_file() + module->debug_identifier())
      != no_symbols_cache_.end())
    return NOT_FOUND;

  binarystream message;
  message << P::LOAD
          << module->code_file()
          << module->debug_file()
          << module->debug_identifier();
  binarystream response;
  bool got_response = SendMessageGetResponse(message, response);
  if (!got_response) {
    // Didn't get a response, which is the same as not having symbols.
    // Don't cache this, though, to force a retry if the client asks for
    // symbols for the same file again.
    return NOT_FOUND;
  }
  u_int8_t response_data;
  response >> response_data;

  if (response.eof()) {
    BPLOG(ERROR) << "Malformed LOAD response";
    return NOT_FOUND;
  }

  if (response_data == P::LOAD_NOT_FOUND || response_data == P::LOAD_FAIL) {
    // Received NOT or FAIL, symbols not present or failed to load them.
    // Same problem to the client any way you look at it.
    // Cache this module to avoid pointless retry.
    no_symbols_cache_.insert(module->debug_file() + module->debug_identifier());
    return NOT_FOUND;
  } else if (response_data == P::LOAD_INTERRUPT) {
    return INTERRUPT;
  }

  // otherwise, OK
  module_cache_.insert(module->code_file());
  *symbol_file = "<loaded on server>";
  return FOUND;
}

SymbolSupplier::SymbolResult
NetworkSourceLineResolver::GetSymbolFile(const CodeModule *module,
					 const SystemInfo *system_info,
					 string *symbol_file,
					 string *symbol_data) {
  if(symbol_data)
    symbol_data->clear();
  return GetSymbolFile(module, system_info, symbol_file);
}

bool NetworkSourceLineResolver::SendMessageGetResponse(
    const binarystream &message,
    binarystream &response) {
  binarystream sequence_stream;
  u_int16_t sent_sequence = sequence_;
  sequence_stream << sequence_;
  ++sequence_;
  string message_string = sequence_stream.str();
  message_string.append(message.str());
  BPLOG(INFO) << "Sending " << message_string.length() << " bytes";
  if (!net_->Send(message_string.c_str(), message_string.length()))
    return false;

  bool done = false;
  while (!done) {
    if (!net_->WaitToReceive(wait_milliseconds_))
      return false;

    vector<char> buffer(1024);
    ssize_t received_bytes;
    if (!net_->Receive(&buffer[0], buffer.size(), received_bytes))
      return false;

    BPLOG(INFO) << "received " << received_bytes << " bytes";
    buffer.resize(received_bytes);

    response.str(string(&buffer[0], buffer.size()));
    response.rewind();
    u_int16_t read_sequence;
    u_int8_t  status;
    response >> read_sequence >> status;
    if (response.eof()) {
      BPLOG(ERROR) << "malformed response, missing sequence number or status";
      return false;
    }
    if (read_sequence < sent_sequence) // old packet
      continue;

    if (read_sequence != sent_sequence) {
      // not expecting this packet, just error
      BPLOG(ERROR) << "error, got sequence number " << read_sequence
		   << ", expected " << sent_sequence;
      return false;
    }

    // This is the expected packet, so even if it's an error this loop is done
    done = true;

    if (status != P::OK) {
      BPLOG(ERROR) << "received an ER response packet";
      return false;
    }
    // the caller will process the rest of response
  }
  return true;
}

bool NetworkSourceLineResolver::FindCachedSourceLineInfo(StackFrame *frame)
  const
{
  SourceCache::const_iterator iter =
    source_line_info_cache_.find(frame->instruction);
  if (iter == source_line_info_cache_.end())
    return false;

  const StackFrame &f = iter->second;
  frame->function_name = f.function_name;
  frame->function_base = f.function_base;
  frame->source_file_name = f.source_file_name;
  frame->source_line = f.source_line;
  frame->source_line_base = f.source_line_base;
  return true;
}

bool NetworkSourceLineResolver::FindCachedFrameInfo(
  const StackFrame *frame,
  FrameInfoType type,
  string *info) const
{
  FrameInfoCache::const_iterator iter =
    frame_info_cache_[type].find(frame->instruction);
  if (iter == frame_info_cache_[type].end())
    return false;

  *info = iter->second;
  return true;
}

void NetworkSourceLineResolver::CacheSourceLineInfo(const StackFrame *frame) {
  StackFrame f(*frame);
  // can't hang onto this pointer, the caller owns it
  f.module = NULL;
  source_line_info_cache_[frame->instruction] = f;
}

void NetworkSourceLineResolver::CacheFrameInfo(
  const StackFrame *frame,
  FrameInfoType type,
  const string &info) {
  frame_info_cache_[type][frame->instruction] = info;
}

} // namespace google_breakpad


text:
using System.Collections.Generic;

namespace GedcomLib
{
    public class GedcomSource
    {
        public string Id;
        public string Text;

        public GedcomSource(string id)
        {
            Id = id;
            Text = "";
        }
    }

}


text:
module DTK; class Component
  class Domain
    class Node < self
      class Canonical < self
        EC2_TYPE = 'ec2__node'
        TYPES = [EC2_TYPE]
      end

      class Properties < self
        EC2_TYPE = 'ec2__properties'
        TYPES = [EC2_TYPE]
      end

      TYPES = Canonical::TYPES + Properties::TYPES
      def self.ec2_component_display_name_form
        Domain.convert_to_component_display_name_form(self::EC2_TYPE)
      end
    end
  end
end; end


text:
from __future__ import unicode_literals

import datetime
from django.db import migrations, models
from django.utils.timezone import utc

class Migration(migrations.Migration):

    dependencies = [
        ('fileuploads', '0005_video_filename'),
    ]

    operations = [
        migrations.AddField(
            model_name='video',
            name='file_creation_time',
            field=models.DateTimeField(default=datetime.datetime(2016, 5, 1, 8, 37, 4, 60146, tzinfo=utc), verbose_name='file created time'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='video',
            name='upload_time',
            field=models.DateTimeField(auto_now_add=True, default=datetime.datetime(2016, 5, 1, 8, 37, 14, 819908, tzinfo=utc)),
            preserve_default=False,
        ),
    ]


text:
**Inactive Project:** OSX does this by default during install, as of Yosemite

puppet-fdesetup
===========

Module to set my OSX full disk encryption

## Usage

```puppet
include fdesetup
```

## Required Puppet Modules

* `boxen`
* `osx`


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Model_hukuman extends CI_Model {
/*
@author : Okki Setyawan &copy 2016
*/

	public function __construct(){
		parent ::__construct();

	}

	//semua kueri SQL akan dijalankan disini
	//ini method untuk menarik seluruh data hukuman
	public function get_all_hukuman(){

	$query = $this->db->query("select *,case when gender = '1' then 'Pria' else 'Wanita' end as genderstatus,date_format(start_date,'%d %M %Y') as tanggalmasuknya from human_pa_md_emp_personal order by personnel_id asc");

 	return $query;
	}

	public function get_all_hukuman_detail_json($personnel_id){

	$query = $this->db->query("select a.*,b.name as tipe, date_format(start_date,'%d-%m-%Y') as tglmulai,date_format(end_date,'%d-%m-%Y') as tglakhir from human_pa_md_emp_sanction a left join human_cust_personnel_sanction_type b on b.sanction_type = a.sanction_type where a.personnel_id = '$personnel_id' order by start_date desc");

			$list_data = null;
	        foreach ($query->result() as $row) {
	            $list_data[] = array(
	                'personnel_id' => $row->personnel_id,
	                'tglmulai'=>$row->tglmulai,
	                'tglakhir'=> $row->tglakhir,
	                'tipe'=>$row->tipe,
                        'reference_no'=>$row->reference_no,
                        'authority_officer'=>$row->authority_officer,
                        'description'=>$row->description,

	                'opsi'=> 'personnel_id.'/'.$row->start_date.'/'.$row->end_date.'"">   personnel_id.'/'.$row->start_date.'/'.$row->end_date.'"">  '
                        //'opsidelete'=> 'personnel_id.'/'.$row->start_date.'/'.$row->end_date.'"">  ',
	                //'opsiupdate'=> 'personnel_id.'/'.$row->start_date.'/'.$row->end_date.'""> '
	            );
	        }
	     return $list_data;

	}

	public function hukuman_detail_delete($personnel_id,$start_date,$end_date){
		$sql = $this->db->query("delete from human_pa_md_emp_sanction where personnel_id = '$personnel_id' AND start_date = '$start_date' AND end_date = '$end_date'");
		return $sql;
	}

	//ini method untuk menarik data terakhir personnel id untuk keperluan penambahan data
	public function get_last_personnel_id(){
	$query = $this->db->query("SELECT SUBSTR(MAX(personnel_id),-8) AS id  FROM human_pa_md_emp_personal");

	return $query;
	}

	//ini method untuk menyimpan data hukuman baru
	public function pro_add_hukuman($nik,$stor_tanggal_masuk,$nama){
	$query = $this->db->query("insert into human_pa_md_emp_personal (personnel_id,start_date,name_full) VALUES ('$nik','$stor_tanggal_masuk','$nama')");
		if($query){
			$signal = 1;
		}else{
			$signal = 0;
		}
		return $signal;
		return $query;

	}

	public function opt_kategori_training(){
	$sql = $this->db->query("select * from human_cust_personnel_training_category order by training_category asc");
	return $sql;
	}

        public function opt_doc_type(){
	$sql = $this->db->query("select * from human_cust_personnel_personal_id_type order by personal_id_type asc");
	return $sql;
	}

         public function opt_tipe_hukuman(){
	$sql = $this->db->query("select * from human_cust_personnel_sanction_type order by sanction_type asc");
	return $sql;
	}

	public function opt_position(){
	$sql = $this->db->query("select * from human_orm_md_jabatan order by name asc");
	return $sql;
	}

	public function opt_country(){
	$sql = $this->db->query("select * from core_cust_country order by country asc");
	return $sql;
	}

	public function opt_employee_type(){
	$sql = $this->db->query("select * from human_cust_employee_type order by employee_type asc");
	return $sql;
	}

	public function opt_employee_subtype(){
	$sql = $this->db->query("select * from human_cust_employee_subtype order by employee_subtype asc");
	return $sql;
	}

	public function opt_employee_area(){
	$sql = $this->db->query("select * from human_cust_employee_area order by employee_area asc");
	return $sql;
	}

	public function opt_employee_cabang(){
	$sql = $this->db->query("select * from human_cust_employee_office order by employee_office asc");
	return $sql;
	}
	public function opt_employee_wilayah(){
	$sql = $this->db->query("select * from human_cust_position_work_location order by work_location asc");
	return $sql;
	}

	public function hukuman_detail($id){
		$query = $this->db->query("select a.*,b.name as tipeasignment,c.name as tipereason from human_pa_md_emp_assignment a
			left join human_cust_personnel_assignment_type b on b.assignment_type = a.assignment_type
			left join human_cust_personnel_assignment_reason c on c.assignment_reason = a.assignment_reason
			where a.personnel_id = '$id'");

		return $query;
	}

	public function hukuman_detail_pro_add($data){
                //get last max end_date for update
                $sqla = $this->db->query ("select * from human_pa_md_emp_sanction where personnel_id = '$data[personnel_id]' and end_date = (select MAX(end_date) from human_pa_md_emp_sanction WHERE personnel_id = '$data[personnel_id]')");
                $personnel_idfirst = '';
                $start_datefirst = '';
                foreach ($sqla->result() as $rowa){
                      $personnel_idfirst = $rowa->personnel_id;
                      $start_datefirst = $rowa->start_date;
                }

                //store new data
                /*

personnel_id,start_date,end_date,status_process,sanction_type,reference_no,description,authority_officer,facility,sanction_currency,sanction_value,remark

                 */
		$sqlb = $this->db->query("insert into human_pa_md_emp_sanction (personnel_id,start_date,end_date,status_process,sanction_type,reference_no,description,authority_officer,jabatan,facility,sanction_value,remark) VALUES ('$data[personnel_id]','$data[start_date]','$data[end_date]','$data[status_process]','$data[sanction_type]','$data[reference_no]','$data[description]','$data[authority_officer]','$data[jabatan]','$data[facility]','$data[sanction_value]','$data[remark]')");

                if($personnel_idfirst == ''){
                $sqlc = '';

                }else if($personnel_idfirst != ''){

                //update last end date
                $sqlc =$this->db->query("update human_pa_md_emp_sanction set end_date = '$data[start_date]' where personnel_id = '$personnel_idfirst' AND start_date = '$start_datefirst'");

                }

		return $sqla;
                return $sqlb;
                return $sqlc;
	}

	public function hukuman_detail_update($personnel_id,$start_date,$end_date){

		$sql = $this->db->query("select *,date_format(start_date,'%d-%m-%Y') as tanggalstart,date_format(end_date,'%d-%m-%Y') as tanggalend from human_pa_md_emp_sanction where personnel_id = '$personnel_id' and start_date = '$start_date' and end_date = '$end_date'");
		return $sql;
	}

	public function hukuman_update_selected($id){
		$query = $this->db->query("select *,case when gender = '1' then 'Pria' else 'Wanita' end as genderstatus,date_format(start_date,'%Y %M %d') as tanggalmasuknya ,date_format(start_date,'%Y %M %d') as tanggalmasuknya,date_format(end_date,'%Y %M %d') as tanggalberakhirnya,date_format(birth_date,'%d %M %Y') as tanggallahirnya from human_pa_md_emp_personal where personnel_id = '$id' ");
		return $query;
	}

	public function hukuman_detail_pro_update($data){
		/*
                 * $data = array('personnel_id'=>$this->input->post('personnel_id'),
                        'start_date'=>$tanggalmulai,
                        'end_date'=>$tanggalakhir,
                        'status_process'=>$this->input->post('status_process'),
                        'sanction_type'=>$this->input->post('sanction_type'),
                        'reference_no'=>$this->input->post('reference_no'),
                        'description'=>$this->input->post('description'),
                        'authority_officer'=>$this->input->post('authority_officer'),
                        'facility'=>$this->input->post('facility'),

                        'sanction_value'=>$this->input->post('sanction_value'),
                        'remark'=>$this->input->post('remark')

                        );
                  */
		$query = $this->db->query("update human_pa_md_emp_sanction set status_process = '$data[status_process]',
							sanction_type = '$data[sanction_type]',
							reference_no = '$data[reference_no]',
							description = '$data[description]',
							authority_officer = '$data[authority_officer]',
                                                        jabatan = '$data[jabatan]',
							facility = '$data[facility]',
							sanction_value = '$data[sanction_value]',
							remark = '$data[remark]'
							where personnel_id = '$data[personnel_id]'
							AND start_date = '$data[start_date]'
							AND end_date = '$data[end_date]'");
		return $query;
	}
	public function hukuman_delete($id){
		$query = $this->db->query("delete from human_pa_md_emp_personal where personnel_id = '$id' ");
		return $query;
	}

	public function pro_update_hukuman($nik,$stor_tanggal_masuk,$nama){
		$query = $this->db->query("update human_pa_md_emp_personal set start_date = '$stor_tanggal_masuk', name_full = '$nama' where personnel_id = '$nik'");
		return $query;
	}

	public function hukuman_update_pro_selected($data){

		 $sql = $this->db->query("update human_pa_md_emp_personal set
						  		instance = '$data[instance]',
						  		name_full = '$data[name_full]',
						  		name_first = '$data[name_first]',
						  		name_mid = '$data[name_mid]',
						  		name_last = '$data[name_last]',
						  		name_nick = '$data[name_nick]',
						  		start_date = '$data[start_date]',
						  		end_date = '$data[end_date]',
						  		title = '$data[title]',
						  		status_process = '$data[status_process]',
						  		gender = '$data[gender]',
						  		birth_date = '$data[birth_date]',
						  		birth_place = '$data[birth_place]',
						  		nationality = '$data[nationality]',
						  		ethnic = '$data[ethnic]',
						  		ethnic_other = '$data[ethnic_other]',
						  		religion = '$data[religion]',
						  		marital_status = '$data[marital_status]',
						  		status_since = '$data[status_since]',
						  		no_of_children = '$data[no_of_children]'
						  		where personnel_id = '$data[personnel_id]'
						  		");

		 return $sql;

	}

}


text:
use std::fmt::Debug;

trait Foo {
    fn foo(&self, _: &impl Debug);
}

impl Foo for () {
    fn foo<U: Debug>(&self, _: &U) { }
    //~^ Error method `foo` has incompatible signature for trait
}

trait Bar {
    fn bar<U: Debug>(&self, _: &U);
}

impl Bar for () {
    fn bar(&self, _: &impl Debug) { }
    //~^ Error method `bar` has incompatible signature for trait
}

// With non-local trait (#49841):

use std::hash::{Hash, Hasher};

struct X;

impl Hash for X {
    fn hash(&self, hasher: &mut impl Hasher) {}
    //~^ Error method `hash` has incompatible signature for trait
}

fn main() {}


text:
class DockerMachineDriverVmware < Formula
  desc "VMware Fusion & Workstation docker-machine driver"
  homepage "https://www.vmware.com/products/personal-desktop-virtualization.html"
  url "https://github.com/machine-drivers/docker-machine-driver-vmware.git",
      tag:      "v0.1.3",
      revision: "fa87f07244c4fc64cde5f921ac9d0cb60cc3302a"
  license "Apache-2.0"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "700ee8e5f337ec89182e4585a42929d52a9a56417dd7ee6a5a09bbbc1f38d24b"
    sha256 cellar: :any_skip_relocation, big_sur:       "5028fce4f23eba9047fa977e0db88861d99bcc0dc2b79b0c2920ea68569b970f"
    sha256 cellar: :any_skip_relocation, catalina:      "d0ce7d4804d39392cfede2ecc19fbe763d39b4684306d0cb36efb19359668c53"
    sha256 cellar: :any_skip_relocation, mojave:        "515e8951062268846b9c3ec85aa2b29c6f093cba35eed91a3503344fd5aa288a"
    sha256 cellar: :any_skip_relocation, x86_64_linux:  "cfe899d44e93a330c23fb56f24df7b98decb3aa4829f2f69eee63fac804ef8dd"
  end

  depends_on "go" => :build
  depends_on "docker-machine"

  def install
    ENV["GOPATH"] = buildpath
    ENV["GO111MODULE"] = "auto"

    dir = buildpath/"src/github.com/machine-drivers/docker-machine-driver-vmware"
    dir.install buildpath.children

    cd dir do
      system "go", "build", "-o", "#{bin}/docker-machine-driver-vmware",
            "-ldflags", "-X main.version=#{version}"
      prefix.install_metafiles
    end
  end

  test do
    docker_machine = Formula["docker-machine"].opt_bin/"docker-machine"
    output = shell_output("#{docker_machine} create --driver vmware -h")
    assert_match "engine-env", output
  end
end