code
stringlengths
4
1.01M
language
stringclasses
2 values
class Solution { public: int findRadius(vector<int>& houses, vector<int>& heaters) { sort(houses.begin(), houses.end()); sort(heaters.begin(), heaters.end()); auto radius = 0; auto idx = 0; for (auto house : houses) { auto current = abs(house - heaters[idx]); if (current <= radius) continue; for (...
Java
<div *ngIf="user"> <div class="page-header"> <h2>{{user.name}}</h2> </div> <ul class="list-group"> <li class="list-group-item">Username: {{user.username}}</li> <li class="list-group-item">Email: {{user.email}}</li> </ul> </div>
Java
from django.conf.urls import patterns, include, url import views urlpatterns = patterns('', url(r'^logout', views.logout, name='logout'), url(r'^newUser', views.newUser, name='newUser'), url(r'^appHandler', views.appHandler, name='appHandler'), url(r'^passToLogin', views.loginByPassword, name='passToL...
Java
/* * This file was autogenerated by the GPUdb schema processor. * * DO NOT EDIT DIRECTLY. */ package com.gpudb.protocol; import java.util.LinkedHashMap; import java.util.Map; import org.apache.avro.Schema; import org.apache.avro.SchemaBuilder; import org.apache.avro.generic.GenericData; import org.apache.avro.ge...
Java
module Dragoman module Mapper def localize locales = I18n.available_locales unscoped_locales = [I18n.default_locale] scoped_locales = locales - unscoped_locales scope ':locale', shallow_path: ':locale', defaults: {dragoman_options: {locales: scoped_locales}} do yield end ...
Java
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //--...
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>infotheo: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.cs...
Java
<?php if(!defined('BASEPATH')) die; class MY_Controller extends CI_Controller { public $session; public $user; function __construct(){ parent::__construct(); $this->output->set_header('X-Powered-By: ' . config_item('system_vendor')); $this->output->set_header('X-D...
Java
/* ================================================================ * startserver by xdf(xudafeng[at]126.com) * * first created at : Mon Jun 02 2014 20:15:51 GMT+0800 (CST) * * ================================================================ * Copyright 2013 xdf * * Licensed under the MIT License * You may not...
Java
/** * Default admin */ new User({ firstName: 'Admin', lastName: 'Admin', username: 'admin', type: 'admin', password: 'admin', email: 'admin@admin.com', subscribed: false, }).save((u) => { }) /** * Test users */ new User({ firstName: 'Jonathan', lastName: 'Santos', username: ...
Java
--- layout: page title: Mcclain Family Reunion date: 2016-05-24 author: Roger Moss tags: weekly links, java status: published summary: Nullam hendrerit elit lectus. Vestibulum in purus efficitur. banner: images/banner/leisure-04.jpg booking: startDate: 02/07/2019 endDate: 02/11/2019 ctyhocn: PRIWVHX groupCode: ...
Java
--- layout: page title: Purple Systems Seminar date: 2016-05-24 author: Martha Chandler tags: weekly links, java status: published summary: Fusce risus orci, porttitor id molestie sit amet, mollis. banner: images/banner/meeting-01.jpg booking: startDate: 10/13/2016 endDate: 10/14/2016 ctyhocn: FTWMFHX groupCode...
Java
--- title: "Suriname" published: true featured_image_path: featured_image_attribution: geocode: SUR iso_code: SR territory: state_party: true signed_but_not_ratified: false signed_date: ratified_or_acceded_date: 2008-07-15T00:00:00.000Z entry_into_force_date: 2008-10-01T00:00:00.000Z ratified_apic_date: genocide: crime...
Java
/** * Automatically generated file. Please do not edit. * @author Highcharts Config Generator by Karasiq * @see [[http://api.highcharts.com/highstock]] */ package com.highstock.config import scalajs.js, js.`|` import com.highcharts.CleanJsObject import com.highcharts.HighchartsUtils._ /** * @note JavaScript...
Java
--- layout: home title: Borislav Stanimirov stylesheet: homepage ---
Java
using UnityEngine; using System.Collections; public class GravitySwitch : MonoBehaviour { public float GravityStrength; float momentum; float click; public bool GameState; bool GravityState; public GameObject Explosion; public GameObject[] Jets; public GameObject[] CharacterPieces; public Vector3 hitpositi...
Java
<h1>Most Viewed</h1> <table class="table table-hover"> <thead> <tr> <th>Tool ID</th> <th>Tool Name</th> <th>Tool Description</th> <th>Extent</th> <th>Rating</th> ...
Java
import sys import pytest from opentracing.ext import tags from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from opentracing_instrumentation.client_hooks import mysqldb as mysqldb_hooks from opentracing_instrumentation.request_context import span_in_context from .sql_common import metadata...
Java
// Write a boolean expression that returns if the bit at position p (counting from 0) // in a given integer number v has value of 1. Example: v=5; p=1 -> false. using System; class BitInIntegerCheck { static void Main() { // декларираме променливи за числото (v) и позицията (p), за която ще проверяв...
Java
<header role="banner" id="top"> <div class="mdj-header"> <div style="flex-grow: 2;"> <div class="mdj-card"> <div class="mdj-card--photo"> <a href="{{ site.baseurl }}/"><img class="mdj-card--photo__rainbow" src="/assets/mdjablonski-white.jpg"></a> ...
Java
/* * Copyright 2017 Max Schafer, Ammar Mahdi, Riley Dixon, Steven Weikai Lu, Jiaxiong Yang * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation t...
Java
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>Privacy Policy</title> <style> body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; padding: 1em; } </style> </head> <body> <h2...
Java
import * as React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M2 21.5c0 .28.22.5.49.5h13.02c.27 0 .49-.22.49-.5V20H2v1.5zM15.5 16H11v-2H7v2H2.5c-.28 0-.5.22-.5.5V18h14v-1.5c0-.28-.22-.5-.5-.5zm4.97-.55c.99-1.07 1.53-2.48 1.53-3.94V2h-6v9.47c0 1.48.58 2.92 1...
Java
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::DataMigration::Mgmt::V2018_07_15_preview module Models # # Results for query analysis comparison between the source and target #...
Java
import {MdSnackBar} from '@angular/material'; export abstract class CommonCrudService { constructor(private snackBar: MdSnackBar) { } // todo refactor crud operations to here (use metadata?) onOperationPerformedNotify(opName: string): (res: boolean) => void { return (res) => { let text; if (...
Java
--- layout: post author: Christoph Broschinski author_lnk: https://github.com/cbroschinski title: TU Clausthal reports its 2016 and 2017 APC expenditures date: 2018-02-05 08:00:00 summary: categories: [general, openAPC] comments: true --- The [TU Clausthal](http://www.tu-clausthal.de/Welcome....
Java
package org.vitrivr.cineast.core.util.audio.pitch.tracking; import java.util.LinkedList; import java.util.List; import org.apache.commons.math3.stat.descriptive.SummaryStatistics; import org.vitrivr.cineast.core.util.audio.pitch.Pitch; /** * This is a helper class for pitch tracking. It represents a pitch contour, t...
Java
using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Windows; using System.Windows.Markup; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify t...
Java
package com.company; import java.util.Scanner; public class EvenPowersOf2 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = Integer.parseInt(scanner.nextLine()); int num = 1; for (int i = 0; i <= n ; i+=2) { System.out.printl...
Java
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting model 'Participant' db.delete_table(u'pa_participant') # Removing M2M table for field us...
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>美艺空间手工饰品 2017-03-18-2 - 美艺空间</title> <meta name="description" content="美艺空间手工饰品"> <link rel="shortcut icon" href=...
Java
/************************************************************************ The MIT License(MIT) Copyright(c) 2014 Lingjijian [B-y] 342854406@qq.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software ...
Java
# Jrails-ui module ActionView module Helpers module JavaScriptHelper def hash_to_jquery(hash) '{'+hash.map { |k,v| [k, case v.class.name when 'String' "'#{v}'" when 'Hash' hash_to_jquery(v) else v.t...
Java
/* * Copyright (c) 2020 by Stefan Schubert under the MIT License (MIT). * See project LICENSE file for the detailed terms and conditions. */ package de.bluewhale.sabi.webclient.rest.exceptions; import de.bluewhale.sabi.exception.ExceptionCode; import de.bluewhale.sabi.exception.MessageCode; import de.bluewhale.sa...
Java
package okeanos.data.services.entities; import javax.measure.quantity.Power; import org.jscience.physics.amount.Amount; public interface Price { double getCostAtConsumption(Amount<Power> consumption); }
Java
<?php namespace Shop\MainBundle\Data; use Doctrine\Common\Persistence\ObjectRepository; use Shop\MainBundle\Entity\Settings; /** * Class ShopSettingsResource * @package Shop\MainBundle\Data */ class ShopSettingsResource { /** * @var ObjectRepository */ protected $settingsRepository; /** ...
Java
<!DOCTYPE html> <!--[if lt IE 9]><html class="no-js lt-ie9" lang="en" dir="ltr"><![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en" dir="ltr"> <!--<![endif]--> <!-- Usage: /eic/site/ccc-rec.nsf/tpl-eng/template-1col.html?Open...
Java
var builder = require("botbuilder"); var botbuilder_azure = require("botbuilder-azure"); const notUtils = require('./notifications-utils.js'); module.exports = [ function (session) { session.beginDialog('notifications-common-symbol'); }, function (session, results) { var pair = results.res...
Java
#ifndef _PSW_H_INCLUDED_ #define _PSW_H_INCLUDED_ /* * (補足) プロセッサステータスレジスタ(PSW): * -------+----------+---------------------------------------- * b16 | I | 割り込み許可ビット(0:禁止/1:許可) * b17 | U | スタックポインタ指定ビット(0:ISP/1:USP) * b20 | PM | プロセッサモード設定ビット(0:S/1:U) * b27-24 | IPL[3:0] | プロセッサ割り込み優先...
Java
/* Copyright c1997-2014 Trygve Isaacson. All rights reserved. This file is part of the Code Vault version 4.1 http://www.bombaydigital.com/ License: MIT. See LICENSE.md in the Vault top level directory. */ #ifndef vinstant_h #define vinstant_h /** @file */ #include "vtypes.h" #include "vstring.h" class VCodePoint;...
Java
using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; namespace Terra.WebUI.Models.AccountViewModels { public class LoginViewModel { [Required] [EmailAddress] public string Email { get; set; } ...
Java
version https://git-lfs.github.com/spec/v1 oid sha256:a396601eca15b0c281513d01941cfd37300b927b32a1bb9bb6e708a9910f1b49 size 2712
Java
package com.ruenzuo.weatherapp.adapters; import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import com.ruenzuo.weatherapp.R; import com.ruenzuo.wea...
Java
module SelecaoAdmin class Engine < ::Rails::Engine isolate_namespace SelecaoAdmin end end
Java
<?php include __DIR__.'/../lib/SALT.php'; /** An example of using the SALT Secure Storage API to store then use a stored Credit Card */ use \SALT\Merchant; use \SALT\HttpsCreditCardService; use \SALT\CreditCard; use \SALT\PaymentProfile; // connection parameters to the gateway $url = 'https://test.salt.com/gateway/c...
Java
package tehnut.resourceful.crops.compat; import mcp.mobius.waila.api.*; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math...
Java
<?php /* * This file is part of the WeatherUndergroundBundle. * * (c) Nikolay Ivlev <nikolay.kotovsky@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SunCat\WeatherUndergroundBundle\DependencyInjection; use ...
Java
import _ from 'lodash'; /** * Represents a channel with which commands can be invoked. * * Channels are one-per-origin (protocol/domain/port). */ class Channel { constructor(config, $rootScope, $timeout, contentWindow) { this.config = config; this.$rootScope = $rootScope; this.$timeout...
Java
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); include __DIR__.'/../../../application/config/config.php'; /* |-------------------------------------------------------------------------- | Base Site URL |-------------------------------------------------------------------------- | | URL to y...
Java
import { NO_ERRORS_SCHEMA } from '@angular/core'; import { inject, async, TestBed, ComponentFixture } from '@angular/core/testing'; // Load the implementations that should be tested import { AppComponent } from './app.component'; import { AppState } from './app.service'; describe(`App`, () => { });
Java
export function getName(value) { if (value == 0) { return "上班"; } if (value == 1) { return "下班"; } throw "invalid route direction"; } export function getValue(name) { if (name == "上班") { return 0; } if (name == "下班") { return 1; } throw "invalid r...
Java
# reactjs-program A collection of ReactJS examples. ### Requirements 1) NodeJS & npm 2) python (optional, used for serving up HTTP) ### Getting Started You can view the examples through any HTTP server. The following assumes use of [Python's SimpleHTTPServer] (https://docs.python.org/2/library/simplehttpserver.html#...
Java
#ifndef VIEWER_H #define VIEWER_H #include "common.h" #include "drawable.h" #include "controller.h" class Viewer { public: bool glfw_is_up; GLFWwindow* window; GLuint VertexArrayID; int width; int height; Controller controls; std::vector<Drawable *> drawables; Viewer(); void add( Drawabl...
Java
// config/database.js module.exports = { 'secret': 'puneetvashisht', 'url' : 'mongodb://localhost/userdb' // looks like mongodb://<user>:<pass>@mongo.onmodulus.net:27017/Mikha4ot };
Java
import { LOAD_SEARCH_RESULT_SUCCESS, CLEAR_SEARCH_RESULTS, } from 'actions/search'; import { createActionHandlers } from 'utils/reducer/actions-handlers'; const actionHandlers = {}; export function loadSearchResultSuccess(state, searchResultsList) { return searchResultsList.reduce((acc, result) => { return ...
Java
/** specified=*(N): you have had a specifier added to you (internal). 0 = no, new ones have to score higher than old specifier=[_]: you are capable of being used in situation where we need to know what to do with you (external). bare noun: has no specifier added, but if it *were* to be used as an NP then the va...
Java
import { autoinject } from 'aurelia-framework'; import { Customers } from './customers'; import { Router } from 'aurelia-router'; @autoinject() export class List { heading = 'Customer management'; customerList = []; customers: Customers; router: Router; constructor(customers: Customers, router: Router) { ...
Java
# Chokidar CLI [![Build Status](https://travis-ci.org/kimmobrunfeldt/chokidar-cli.svg?branch=master)](https://travis-ci.org/kimmobrunfeldt/chokidar-cli) Fast cross-platform command line utility to watch file system changes. The underlying watch library is [Chokidar](https://github.com/paulmillr/chokidar), which is o...
Java
The MIT License (MIT) Copyright (c) 2014 Christophe Van Neste Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, me...
Java
/** * Created by huangxinghui on 2016/1/20. */ var $ = require('jquery') var Widget = require('../../widget') var plugin = require('../../plugin') var TreeNode = require('./treenode') var Tree = Widget.extend({ options: { 'labelField': null, 'labelFunction': null, 'childrenField': 'children', 'aut...
Java
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Advent of Code 2015 from http://adventofcode.com/2015/day/5 Author: James Walker Copyrighted 2017 under the MIT license: http://www.opensource.org/licenses/mit-license.php Execution: python advent_of_code_2015_day_05.py --- Day 5: Doesn't He Have Intern-Elves For ...
Java
#!/bin/sh _now=$(date +"%m_%d_%Y_%H_%M_%S") PATH=$PATH:/usr/local/bin export PATH cd $HOME/Code/newspost/crawlers/crawlers && $HOME/Installs/envs/newspost/bin/scrapy runspider spiders/huffingtonpost.py -o feeds/huffingtonpost-$_now.json wait cd $HOME/Code/newspost/crawlers/crawlers && $HOME/Installs/envs/newspost/bi...
Java
# Image Widget ?> GitPitch widgets greatly enhance traditional markdown rendering capabilities for slide decks. The image widget extends traditional markdown image syntax with support for positioning, sizing, transformations, and filters. ### Widget Paths All paths to image files specified within [PITCHME.md](/conv...
Java
/** * Test program. * * Copyright (c) 2015 Alex Jin (toalexjin@hotmail.com) */ #include "test/test.h" #include <iostream> namespace { void help() { std::cout << "Usage: testalgo -a" << std::endl; std::cout << " testalgo <test-case-name>" << std::endl; std::cout << std::endl; std::cout << "Options:" <<...
Java
function solve(args) { function biSearch(array, searchedNumber, start, end) { for (var i = start; i <= end; i += 1) { if (+array[i] === searchedNumber) { return i; } } return -1; } var data = args[0].split('\n'), numberN = +data.shift()...
Java
#!/usr/bin/env node var pluginlist = [ ]; var exec = require('child_process').exec; function puts(error, stdout, stderr) { console.log(stdout); } pluginlist.forEach(function(plug) { exec("cordova plugin add " + plug, puts); });
Java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Java
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated from a template. // // Manual changes to this file may cause unexpected behavior in your application. // Manual changes to this file will be overwritten if the code is regenerated...
Java
const path = require('path'); require('dotenv').config(); const HtmlWebpackPlugin = require('html-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const { AureliaPlugin } = require('aurelia-webpack-plugin'); const { optimize: {...
Java
--- title: The Coliseum author: rami layout: lifestream categories: [Lifestream] tags: [oakland, california, usa, instagram] image: the-coliseum.jpg --- {% include image.html url="/assets/images/content/lifestream/the-coliseum.jpg" description="The Coliseum Oakland Athletics" %}
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Enjoying The New</title> <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,600"> <link rel="stylesheet" href="/style.css"> <link re...
Java
<!-- Begin Footer --> <footer id="footer" class="footer"> <div class="row"> <div class="pull-left col-md-6 col-xs-6"> <div class="g-plusone" data-size="medium" data-annotation="inline" data-width="300" data-href="{{ site.url }}"></div> </div> <div class="logo logo-footer logo-gray pull-right"></div> </div> ...
Java
# rustual-boy-www A basic landing page/blog for [Rustual Boy](https://github.com/emu-rs/rustual-boy). ## running locally 1. Update/install dependencies by running: `npm install` from the repo directory (safe to only do this once per pull) 2. Run the site: `node app` The site will be available on [localhost:3000](ht...
Java
#!/bin/env/python # coding: utf-8 import logging import os import time import uuid from logging import Formatter from logging.handlers import RotatingFileHandler from multiprocessing import Queue from time import strftime import dill from .commands import * from .processing import MultiprocessingLogger class TaskP...
Java
<html><body> <h4>Windows 10 x64 (18362.329)</h4><br> <h2>_DEVICE_MANAGE_DATA_SET_ATTRIBUTES_OUTPUT</h2> <font face="arial"> +0x000 Size : Uint4B<br> +0x004 Action : Uint4B<br> +0x008 Flags : Uint4B<br> +0x00c OperationStatus : Uint4B<br> +0x010 ExtendedError : U...
Java
package com.rebuy.consul; import com.ecwid.consul.v1.ConsulClient; import com.ecwid.consul.v1.QueryParams; import com.ecwid.consul.v1.Response; import com.ecwid.consul.v1.agent.model.NewService; import com.ecwid.consul.v1.catalog.model.CatalogService; import com.rebuy.consul.exceptions.NoServiceFoundException; import ...
Java
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xam...
Java
<?php namespace LeadCommerce\Shopware\SDK\Query; use LeadCommerce\Shopware\SDK\Util\Constants; /** * Class CustomerQuery * * @author Alexander Mahrt <amahrt@leadcommerce.de> * @copyright 2016 LeadCommerce <amahrt@leadcommerce.de> */ class CustomerQuery extends Base { /** * @var array */ protec...
Java
--- @module vline local BASE = (...):match("(.-)[^%.]+$") local core = require( BASE .. "core" ) local style = require( BASE .. "style" ) local group = {} ------------------------------------------------------------------------------- -- vertically allign all elements -------------------------------------------------...
Java
**Blight** **School** necromancy; **Level** druid 4, sorcerer/wizard 5 **Casting Time** 1 standard action **Components** V, S, DF **Range** touch **Target** plant touched **Duration** instantaneous **Saving Throw** [Fortitude](../combat#_fortitude) half; see text; **[Spell Resistance](../glossary#_spell-resista...
Java
<?php namespace GFire\InvoiceBundle\Entity\Interfaces; interface InvoiceInterface{ }
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package test.thread; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util...
Java
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ /...
Java
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.generated; import com.azure.core.util.Context; /** Samples for ConsumerGroups ListByEventHub. */ public final class C...
Java
/** @jsx m */ import m from 'mithril'; import { linkTo, hrefTo } from '@storybook/addon-links'; const Main = { view: vnode => ( <article style={{ padding: 15, lineHeight: 1.4, fontFamily: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif', backgroundColo...
Java
from simtk.openmm import app import simtk.openmm as mm from simtk import unit def findForce(system, forcetype, add=True): """ Finds a specific force in the system force list - added if not found.""" for force in system.getForces(): if isinstance(force, forcetype): return force if add==True: system....
Java
namespace InControl { using System; // @cond nodoc [AutoDiscover] public class EightBitdoSNES30AndroidProfile : UnityInputDeviceProfile { public EightBitdoSNES30AndroidProfile() { Name = "8Bitdo SNES30 Controller"; Meta = "8Bitdo SNES30 Controller on Android"; // Link = "https://www.amazon.com/Wirel...
Java
#pragma once #include "Component.h" #include "Transform.h" #include "CubeMesh.h" using namespace Beans; class PlayerController : public Component, public Utilities::AutoLister<PlayerController> { public: PlayerController(GameObject* owner); REFLECT_CLASS; static void UpdatePlayerControllers(double dt); void...
Java
package context import ( "github.com/Everlane/evan/common" "github.com/satori/go.uuid" ) // Stores state relating to a deployment. type Deployment struct { uuid uuid.UUID application common.Application environment string strategy common.Strategy ref string sha1 string flags ma...
Java
<!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> <head> <meta charset="utf-...
Java
window.Lunchiatto.module('Transfer', function(Transfer, App, Backbone, Marionette, $, _) { return Transfer.Layout = Marionette.LayoutView.extend({ template: 'transfers/layout', ui: { receivedTransfers: '.received-transfers', submittedTransfers: '.submitted-transfers' }, behaviors: { ...
Java
body { font-family: Arial, Verdana, "Times New Roman", Times, serif; } div.pages { font-weight: bold; } a.page, span.page { padding: 4px 6px; } a.page { margin: 0 3px; border: 1px solid #ddd; text-decoration: none; color: #0063dc; } a.page:hover { border: 1px solid #003366; background-color: #0063...
Java
--- layout: post title: "Leetcode (48, 64, 542) Matrix Series" category: Leetcode tags: Leetcode --- * content {:toc} Leetcode Matrix Series ## Leetcode 48. Rotate Image * [Leetcode 48. Rotate Image](https://leetcode.com/problems/rotate-image/#/description) You are given an n x n 2D matrix representing...
Java
package analytics import ( "fmt" elastic "gopkg.in/olivere/elastic.v3" ) //Elasticsearch stores configuration related to the AWS elastic cache isntance. type Elasticsearch struct { URL string IndexName string DocType string client *elastic.Client } //Initialize initializes the analytics engine. fun...
Java
'use strict'; var i18n = require('./i18n.js') i18n.add_translation("pt-BR", { test: 'OK', greetings: { hello: 'Olá', welcome: 'Bem vindo' } }); i18n.locale = 'pt-BR'; console.log(i18n.t('greetings.hello')); console.log(i18n.t('greetings.welcome')); console.log("Hallo"); // Example 2 i18n.add_translat...
Java
/** * @flow */ /* eslint-disable */ 'use strict'; /*:: import type { ReaderFragment } from 'relay-runtime'; export type ReactionContent = "CONFUSED" | "EYES" | "HEART" | "HOORAY" | "LAUGH" | "ROCKET" | "THUMBS_DOWN" | "THUMBS_UP" | "%future added value"; import type { FragmentReference } from "relay-runtime"; decl...
Java
require 'bio-ucsc' describe "Bio::Ucsc::Hg19::WgEncodeAffyRnaChipFiltTransfragsKeratinocyteCytosolLongnonpolya" do describe "#find_by_interval" do context "given range chr1:1-100,000" do it "returns an array of results" do Bio::Ucsc::Hg19::DBConnection.default Bio::Ucsc::Hg19::DBConnection...
Java
# EETetris EETetris, a monogame application to play tetris in a style that looks like EE. Based off of an EE world ( PWNLqCFExbbUI ) # How to play 1) Download it from the releases 2) Know your hotkeys To make the tetris piece move left/right, <-- A | D --> (Arrow keys apply) To rotate the piece left ( 90 degrees co...
Java
<!doctype html> <html> <head> <title>Code coverage report for wizard/test/wizardSpecs.js</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="content-language" content="en-gb"> <link rel='stylesheet' href='../../prettify.css'> <style type='text/...
Java
require File.expand_path("../../../test_helper", __FILE__) describe Redcarpet::Render::HTMLAbbreviations do before do @renderer = Class.new do include Redcarpet::Render::HTMLAbbreviations end end describe "#preprocess" do it "converts markdown abbrevations to HTML" do markdown = <<-EOS...
Java