text stringlengths 3 1.05M |
|---|
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.spotxchange.sdk.mopubintegrationtest" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<use... |
using System;
namespace EcmaScript.NET
{
/// <summary> This is interface defines a protocol for the reporting of
/// errors during JavaScript translation or execution.
///
/// </summary>
public interface ErrorReporter
{
/// <summary> Report a warning.
///
/// The im... |
layout: drawing_page
number: 16
permalink: 16/
---
|
package de.lessvoid.nifty.examples.lwjgl.textalign;
import de.lessvoid.nifty.examples.lwjgl.NiftyExampleLoaderLWJGL3;
import de.lessvoid.nifty.examples.textalign.TextAlignStartScreen;
/**
* @author Aaron Mahan <aaron@forerunnergames.com>
*/
public class TextAlignDemoMain {
public static void main(final Stri... |
using Aspose.Words;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
/*
This project uses Automatic Package Restore feature of NuGet to resolve Aspose.Words for .NET API reference when the project is build. Please check https://docs.nuget.org/consume/n... |
package com.amazon.carbonado.filter;
import java.io.IOException;
import com.amazon.carbonado.Storable;
import com.amazon.carbonado.info.ChainedProperty;
import com.amazon.carbonado.info.StorableProperty;
/**
* Filter tree node that performs an existence or non-existence test against a
* join proper... |
/* eslint no-console: 0 */
import path from 'path';
import express from 'express';
import { privateSettings } from './settings/settings';
import bodyParser from 'body-parser';
import { graphqlExpress } from 'graphql-server-express';
import { executableSchema } from './schema/schema';
const APP_PORT = process.env.PORT ... |
*Really dirty and hacky prototype, don't use*
Overload methods of python classes depending on the behavior of the passed arguments:
* containing an attribute
* responding to a method call
* having a type
* responding to a method call with a certain value
* having the same list structure
example:
```python
from matc... |
BEGIN_MESSAGE_MAP(CStalker_netApp, CWinApp)
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
// CStalker_netApp construction
CStalker_netApp::CStalker_netApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
CStalker_netApp::~CStalker_netApp()
{
Core._destro... |
import socket
import karesansui
import web
from karesansui.lib.rest import Rest, auth
from karesansui.lib.utils import is_uuid, is_int, karesansui_database_exists
from karesansui.lib.utils import generate_phrase, generate_uuid, string_from_uuid
from karesansui.lib.file.k2v import K2V
from karesansui.lib.crypt import ... |
package Transposome::Annotation::Search;
use 5.010;
use Moose::Role;
use IPC::System::Simple qw(system capture EXIT_ANY);
use Path::Class::File;
use File::Basename;
use Try::Tiny;
use Log::Any qw($log);
=head1 NAME
Transposome::Annotation::Search - Run the BLAST search on the clusters and singletons.
=head1 VERSION... |
#import <Foundation/Foundation.h>
/**
* Protocol for easily creating arbitrary and unique instances of model objects.
*
* Use this to reduce tedious creation of model objects when you don't have specific requirements for
* their properties.
*/
@protocol MWKRandom <NSObject>
/// A unique instance of the receiv... |
require "google/cloud/errors"
require "google/cloud/dialogflow/v2/session_pb"
require "google/cloud/location"
module Google
module Cloud
module Dialogflow
module V2
module Sessions
##
# Client for the Sessions service.
#
# A service used for session interacti... |
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Dahuangdog.GitHub.io by dahuangdog</title>
<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/github-dark.css">
<script src="https://aj... |
#!/usr/bin/env python3
"""Make a header that lists other headers.
usage: make_all_header.py header_name.h include_prefix headers
"""
import sys
import glob
import os
sys.path.append(os.path.split(sys.argv[0])[0])
import python_tools
# Treat an open file as UTF8-encoded, regardless of the locale
if sys.version_info[... |
package me.scarlet.undertailor.gfx.spritesheet;
import com.badlogic.gdx.utils.Array;
/**
* Skeleton implementation of a spritesheet.
*/
public interface SpriteSheet {
/**
* Returns the name assigned to this {@link SpriteSheet}
* .
*
* @return the name of this SpriteSheet
*/
publ... |
<?php
namespace app\models;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use app\models\Gprofile;
/**
* GprofileSearch represents the model behind the search form about `app\models\Gprofile`.
*/
class GprofileSearch extends Gprofile
{
/**
* @inheritdoc
*/
public function rules()
... |
package com.microsoft.alm.plugin.idea.ui.common.mocks;
import com.microsoft.alm.plugin.context.ServerContext;
import com.microsoft.alm.plugin.operations.ServerContextLookupOperation;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class MockServerContextLookupOperation extends... |
<?php
@ini_set("display_errors","1");
@ini_set("display_startup_errors","1");
require_once("include/dbcommon.php");
header("Expires: Thu, 01 Jan 1970 00:00:01 GMT");
require_once("include/NEFTTransfer_variables.php");
$field = postvalue('field');
if( !isLogged() )
return;
if( !CheckSecurity(@$_SESSION["_".$s... |
from __future__ import annotations
class OAuthException(Exception): ...
class CredentialsError(OAuthException): ...
class KeyEncodingError(OAuthException): ...
|
use super::{RmpWrite, write_marker};
use crate::encode::ValueWriteError;
use crate::Marker;
/// Encodes and attempts to write an `f32` value as a 5-byte sequence into the given write.
///
/// The first byte becomes the `f32` marker and the others will represent the data itself.
///
/// # Errors
///
/// This function w... |
using System;
namespace Custom.Algebra.QrCode.Encoding.Masking
{
internal class Pattern6 : Pattern
{
public override bool this[int i, int j]
{
get { return ((i * j) % 2 + (i * j) % 3) % 2 == 0; }
set { throw new NotSupportedException(); }
}
... |
namespace seqan
{
SEQAN_DEFINE_TEST(testEmptyIndex)
{
typedef String<Dna5> TString;
typedef Index<TString> TIndex;
TIndex index;
Iterator<TIndex, TopDown<> >::Type iterator(index);
}
SEQAN_DEFINE_TEST(testIssue509)
{
// goDown causes assertion on small index #509
// Originally by John on Tr... |
Pattern: Possible encryption override for AWS Athena
Issue: -
## Description
Athena workgroup configuration should be enforced to prevent client side changes to disable encryption settings.
**Resolution**: Enforce the configuration to prevent client overrides.
## Examples
Example of **incorrect** code... |
YUI.add('datasource-get', function (Y, NAME) {
/**
* Provides a DataSource implementation which can be used to retrieve data via the Get Utility.
*
* @module datasource
* @submodule datasource-get
*/
/**
* Get Utility subclass for the DataSource Utility.
* @class DataSource.Get
* @extends DataSource.Local
*... |
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null |
package de.hpi.bpmn2_0.model.data_object;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
/**... |
#line 2 "togo/game/gfx/renderer.cpp"
#include <togo/game/config.hpp>
#include <togo/core/error/assert.hpp>
#include <togo/core/utility/utility.hpp>
#include <togo/core/collection/hash_map.hpp>
#include <togo/core/algorithm/sort.hpp>
#include <togo/core/threading/condvar.hpp>
#include <togo/core/threading/mutex.hpp>
#... |
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.php.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/php-project/1">
<name>MYWeb</name>
</data>
</configuration>
</project>
|
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated 30-April-2008 09:43:47.4531250 -->
<!-- Generated by MathSBML 2.7.4 -->
<!-- Generated using Mathematica Version 5.2 for Microsoft Windows (June 20, 2005) -->
<sbml xmlns="http://www.sbml.org/sbml/level2/version3"
level="2"
version="3">
<model id="case00537... |
//%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor lice... |
package ch.uzh.ifi.attempto.acerules.help.page;
import ch.uzh.ifi.attempto.acerules.help.HelpWindow;
public class RuleExamplesPage extends Page {
public RuleExamplesPage(HelpWindow helpWindow) {
super(helpWindow, "Rules by examples", "Language");
addText("Here we present a collection of examples of rules. Thi... |
package org.yndongyong.fastandroid.base;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import org.yndongyong.fastandroid.R;
/**
* 原则上使用Fragment,会发现大量类似的代码
* Created by Dong on 2016/5/15.
*/
public ab... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T46154119475507200</title>
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,600">
<link rel="stylesheet" href="/style.css">
<link ... |
package com.thoughtworks.xstream.io;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
import com.thoughtworks.xstream.io.naming.NameCoder;
import com.thoughtworks.xstream.io.naming.NoNameCoder;
/**
* Abstract base class for... |
<?php
declare(strict_types=1);
namespace Prooph\ProophessorDo\Model;
interface ValueObject
{
public function sameValueAs(ValueObject $object): bool;
}
|
static CGVector CGVectorBetween(const CGPoint p0, const CGPoint p1) {
return CGVectorMake(p1.x - p0.x, p1.y - p0.y);
}
/// Get length of vector
static CGFloat CGVectorLength(const CGVector vector) {
return sqrt((vector.dx * vector.dx) + (vector.dy * vector.dy));
}
/// Get CGRect by expanding given size around... |
- Dropped support for old Node versions. Node 10+ is now required
## 0.3.0 - 2019-09-01
### Changed
- Dropped support for Node <8
## 0.2.0 - 2019-05-11
### Added
- Added TypeScript type definitions. See [#2](https://github.com/helmetjs/dns-prefetch-control/pull/2) and [helmetjs/helmet#188](https://github.com/helm... |
package br.com.objectos.way.schema.it;
import java.time.LocalDate;
import br.com.objectos.way.code.Testing;
import br.com.objectos.way.orm.Insertable;
import br.com.objectos.way.pojo.Pojo;
import br.com.objectos.way.schema.it.REVISION;
@Pojo
@Testing
abstract class Revision implements Insertable {
@REVISION.SEQ
... |
angular.module('orderCloud')
.controller('OrderInputCtrl', OrderInputController)
.directive('ordercloudOrderInput', OrderCloudOrderInputDirective)
;
function OrderCloudOrderInputDirective() {
return {
restrict: 'E',
scope: {
product: '=',
validationform: '='
... |
@implementation ALTRelationshipKeyMapping
+(instancetype)keyWithMasterKey:(NSString *)masterKey detailKey:(NSString *)detailKey
{
ALTRelationshipKeyMapping *rel = [[self alloc] initWithMasterKey:masterKey detailKey:detailKey];
return rel;
}
- (instancetype)initWithMasterKey:(NSString *)masterKey detailKey:(NS... |
Step 2a: Setup Doctrine ORM mapping
===================================
The ORM implementation does not provide a concrete Comment class for your use,
you must create one. This can be done by extending the abstract entities
provided by the bundle and creating the appropriate mappings.
For example:
``` php
<?... |
@interface ortclib_Test_iosUITests : XCTestCase
@end
@implementation ortclib_Test_iosUITests
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
// In UI tests it is usually best to stop immediately when a failure ... |
'use strict'
const autoprefixer = require('autoprefixer')
const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin')
const InterpolateHtmlPlugin = require('react-dev-utils/Inter... |
module.exports = (function(App){
var Command = App.Command(App);
var path = require('path');
/*
* VERY IMPORTANT!!!!
* Each service provider should expose an object that describes the available menu items
* Thus looping through the service providers we can get the info needed to create a menu... |
package io.microprofile.showcase.vote.api;
import static io.microprofile.showcase.vote.utils.Debug.isDebugEnabled;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
i... |
A simple library providing some cool charts.
|
FROM ubuntu:14.04
RUN apt-get update && \
apt-get install -y ca-certificates nginx && \
rm -rf /var/lib/apt/lists/*
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log
VOLUME ["/var/cache/nginx"]
EXPOSE 80 ... |
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null |
package com.intellij.openapi.util.io;
import com.intellij.openapi.util.SystemInfo;
import consulo.logging.Logger;
import org.jetbrains.annotations.TestOnly;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.io.File;
import java.io.IOException;
import java.nio.file.*;
import java.nio.file... |
package com.library.common;
import android.content.Context;
import android.util.DisplayMetrics;
import android.util.TypedValue;
/**
* 尺寸大小实用工具类
* <p/>
* Created by Clock on 2016/1/16.
*/
public class RuleUtils {
/**
* 获取屏幕的宽度
*
* @param context
* @return
*/
public static int getS... |
<html><body><p><!-- saved from url=(0024)http://docs.autodesk.com -->
<!DOCTYPE html>
<!-- Mirrored from help.autodesk.com/cloudhelp/2016/ENU/Maya-Tech-Docs/PyMel/generated/functions/pymel.core.runtime/pymel.core.runtime.RenameAttribute.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 01 Aug 2015 05:38:16 GMT --... |
<?php
namespace Fabulator\Endomondo;
use GuzzleHttp\Client;
use GuzzleHttp\Cookie\SetCookie;
class Endomondo
{
const SPORT_RUNNING = 0;
const SPORT_CYCLING_TRANSPORT = 1;
const SPORT_CYCLING_SPORT = 2;
const SPORT_MOUNTAIN_BIKINGS = 3;
const SPORT_SKATING = 4;
const SPORT_ROLLER_SKIING = 5;
... |
from __future__ import unicode_literals
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('webmarks_bookmarks', '0011_populate_uuid_values'),
]
operations = [
migrations.AlterField(
model_name='historicalbookmark',... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>graphs: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css"... |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" con... |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Ap... |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Sa... |
namespace xwalk {
// In Tizen the system indicator is shown by each application. This widget draws
// the indicator for Crosswalk by waiting for new images from the system (using
// TizenSystemIndicatorWatcher, that uses elm_plug protocol) and setting them
// into the TizenSystemIndicator view, which is the only conte... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>coqprime: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.cs... |
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="app_name">Zapr</string>
<string name="cantChangeChannel">Kan ikke skifte kanal.</string>
<string name="lists">Lister</string>
<string name="loginError">Kunne ikke logge ind</string>
<... |
Hello!
This is a test for a new repository creation.
append feature
change fearure
<br>
i'm doing something
<br>
doing more.
<br>
pr test
|
layout: post
title: "leader选举"
date: 2018-02-09
excerpt: "利用zookeeper实现主节点选举"
tag:
- zookeeper
- selector
- curator
comments: true
---
> 最近在项目中使用了zk来实现主节点的选举,下面主要介绍下`curator`中提供的leader selector模块
## Apache Curator
Apache Curator是Apache提供的zookeeper客户端,提供了诸如zk节点操作,分布式锁,通知,订阅,注册发现选举等操作。
## 选举客户端
继承`LeaderSelectorL... |
\usepackage{lineno}
\usepackage{hyperref}
\linenumbers
|
package gov.nih.nci.cabig.caaers.dao.query;
public class LoadStudyFundingSponsorIdentifierDataQuery extends HQLQuery{
public LoadStudyFundingSponsorIdentifierDataQuery(String query) {
super(query);
}
}
|
;(function(window, undefined){
'use strict';
// First, check for JSON support
// If there is no JSON, we no-op the core features of Opbeat
// since JSON is required to encode the payload
var _Opbeat = window.Opbeat,
hasJSON = !!(window.JSON && window.JSON.stringify),
lastCapturedException,
lastEventId,
... |
layout: archive
permalink: /year-archive/
title: "Yıllara Göre Yazılar"
author_profile: true
---
{% include base_path %}
{% capture written_year %}'None'{% endcapture %}
{% for post in site.posts %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% if year != written_year %}
<h2 id="{{ year | s... |
package io.grpc.examples.errorhandling;
import com.google.common.base.Verify;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.Uninterruptibles;
import io.grp... |
param($VALUES)
$ReplaceOption = "";
if($Replace){
$ReplaceOption = ",REPLACE"
}
$NoRecoveryOption = ""
if($VALUES.PARAM.NoRecovery){
$NoRecoveryOption = ",NORECOVERY"
}
$BaseCommand =
"
RESTORE DATABASE
[$DestinationDatabase]
FROM
DISK = '$($VALUES.SOURCE_BACKUP.fullPath)'
WITH
STATS = 1... |
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
/*
* @author max
*/
package com.intellij.psi.stubs;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.psi.PsiElement;
import com.intellij.util.io.... |
\documentclass[a4paper, 12pt, KOMAold]{scrlttr2}
\usepackage[utf8]{inputenc} % this is needed for umlauts
\usepackage[ngerman]{babel} % this is needed for umlauts
\usepackage[T1]{fontenc} % needed for right umlaut output in pdf
\usepackage[ngerman, num]{isodate} % get DD.MM.YYYY dates
\usepackage{parskip}
\usepackag... |
package com.foc.admin;
import com.foc.Application;
import com.foc.Globals;
import com.foc.util.Encryptor;
public class FocLoginAccess {
private FocUser user = null;
private int loginStatus = Application.LOGIN_WRONG;
public FocLoginAccess(){
}
public void dispose(){
user = null;
}
public int... |
package org.sc.probro.data;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Arra... |
/*
* Created on Nov 11, 2004
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package gov.nih.nci.security.authentication.helper;
/**
*
*<!-- LICENSE_TEXT_START -->
*
*The NCICB Common Security Module (CSM) Software License, Version... |
<html dir="LTR">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
<title>CurrentThreadId Property</title>
<xml>
</xml>
<link rel="stylesheet" type="text/css" href="... |
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Magellan.Composite")]
[assembly: AssemblyDescription("Composite WPF support for Magellan")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Paul Stovell")]
[assembly: AssemblyProduct("Magellan.Composite")]
[asse... |
/*!
\file
\version \$Id: Debug.h 639 2004-07-09 20:59:14Z mosu $
\author Steve Lhomme <robux4 @ users.sf.net>
\author Moritz Bunkus <moritz @ bunkus.org>
*/
#ifndef LIBEBML_DEBUG_H
#define LIBEBML_DEBUG_H
#include <stdarg.h> // va_list
#include <string.h>
#ifdef WIN32
#include <windows.h>
#else
#include... |
package org.apache.calcite.sql.validate;
/**
* An enumeration of moniker types.
*
* <p>Used in {@link SqlMoniker}.
*/
public enum SqlMonikerType {
COLUMN, TABLE, VIEW, SCHEMA, REPOSITORY, FUNCTION, KEYWORD
}
// End SqlMonikerType.java
|
create class test_class (int_col int, datetime_col datetimetz primary key);
insert into test_class(int_col) values(1);
alter class test_class modify datetime_col datetimetz default datetimetz '1991-01-02 23:59:59.999';
insert into test_class(int_col) values(2);
insert into test_class(int_col) values(2);
insert into ... |
require "exchange_rate_cache"
require "exchange_rate_updater"
class ExchangeRateProvider
def initialize(cache = ExchangeRateCache.load, updater = ExchangeRateUpdater.new)
@cache = cache
@updater = updater
end
def exchange_rate_for(currency)
update_cache if cache.stale?
cache.exchange_rate_for(cu... |
<?php
namespace Application\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* CourseCategory
*
* @ORM\Table(name="course_category", indexes={@ORM\Index(name="ind_parent_category", columns={"parent_category"})})
* @ORM\Entity
*/
class CourseCategory
{
/**
* @var integer
*
* @ORM\Column(name="id",... |
Meteor.publish('simulations', function() {
if (this.userId) {
const user = Meteor.users.findOne(this.userId);
if (user.superuser) {
return Simulation.find();
}
return Simulation.find({_id: user.simulationId});
}
return this.ready();
})
Meteor.publish('simulati... |
from tester.tester import Tester
from ui.application import Application
from controller.controller import Controller
from repository.repository import Repository
with open("database.txt", "r") as f:
t = Tester()
repo = Repository()
controller = Controller(repo, f)
app = Application(controller, rep... |
#include <assert.h>
#include <string.h>
#include <errno.h>
#include <dlfcn.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/binary.h"
#include <jni.h>
#define JJ(call, ...) (*env)->call(env, __VA_ARGS__)
static JavaVM *jvm;
static JNIEnv *env;
static jclass String_class;
static jmethodID Class_getField... |
package discounty.com.google.zxing.client.result;
/**
* <p>See
* <a href="http://www.nttdocomo.co.jp/english/service/imode/make/content/barcode/about/s2.html">
* DoCoMo's documentation</a> about the result types represented by subclasses of this class.</p>
*
* <p>Thanks to Jeff Griffin for proposing rewrite of ... |
import os
import re
import datetime
import json
import urllib
import urllib.parse
import urllib.request
import pprint as pp
import sqlite3
import xml.etree.ElementTree as ET
from os.path import join, dirname
from dotenv import load_dotenv
dotenv_path = join(dirname(__file__), '.env')
load_dotenv(dotenv_path)
DEF_URL... |
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Threading;
namespace Tibialyzer {
cl... |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>org.apache.commons.math3.stat.descriptive.summary Class Hierarchy (Apache Commons Math 3.5 API)</tit... |
package com.frameworkset.commons.dbcp2;
import com.frameworkset.commons.pool2.ObjectPool;
import javax.management.*;
import java.lang.management.ManagementFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Collection;
/**... |
<?php
namespace Google\Service\Dns;
class RRSetRoutingPolicyGeoPolicy extends \Google\Collection
{
protected $collection_key = 'items';
/**
* @var bool
*/
public $enableFencing;
protected $itemsType = RRSetRoutingPolicyGeoPolicyGeoPolicyItem::class;
protected $itemsDataType = 'array';
/**
* @var... |
// This file declares PrefetchDataset class which wraps around another dataset
// instance and prefetches elements from the underlying dataset in an internal
// buffer.
#ifndef TFRT_LIB_DATA_PREFETCH_DATASET_H_
#define TFRT_LIB_DATA_PREFETCH_DATASET_H_
#include <list>
#include <queue>
#include "tfrt/data/dataset.h... |
package com.planet_ink.coffee_mud.Items.Basic;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.... |
using EPI.DynamicProgramming;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace EPI.UnitTests.DynamicProgramming
{
[TestClass]
public class BinomialCoefficientsUnitTest
{
[TestMethod]
public void NChooseK()
{
BinomialCoefficients.ComputeNChooseK(5, 2).Should().Be(10);
... |
class dtkFemTestCase : public QObject
{
Q_OBJECT
public:
dtkFemTestCase(void);
~dtkFemTestCase(void);
private slots:
void initTestCase(void);
private slots:
void testBasisFunctions(void);
void testLocalMatrix(void);
private slots:
void cleanupTestCase(void);
void cleanup(void);
priv... |
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var core_1 = require('@angular/core');
var nest... |
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lotes', '0078_regracolecao_lotes_caixa'),
]
operations = [
migrations.AlterField(
model_name='regracolecao',
name='referenci... |
<?php
namespace ITB\Bundle\UltimateFrisbeeBundle\Entity;
use Herzult\Bundle\ForumBundle\Entity\Category as BaseCategory;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="Herzult\Bundle\ForumBundle\Entity\CategoryRepository")
*/
class Category extends BaseCategory
{
}
|
ACCEPTED
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null |
#include "Application.h"
#include "TuioManager.h"
#include "TouchEvent.h"
#include "Blob.h"
#include "Utils.h"
/** @param port UDP port where TUIO messages are sent to */
TuioManager::TuioManager(int port){
client = new TuioClient(port);
client->addTuioListener(this);
client->connect();
}
TuioManager::~TuioMa... |
<?php
namespace DoctrineMigrations;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your need!
*/
class Version20121030164024 extends AbstractMigration
{
public function up(Schema $schema): void
{
// this up() migration is... |