code
stringlengths
4
1.01M
language
stringclasses
2 values
namespace UrlBuilderTests { using System; using System.Collections.Generic; using Microsoft.VisualStudio.TestTools.UnitTesting; using Se.Url; [TestClass] public class QueryParamTest { [TestMethod] public void DefaultQueryParam() { var url = new UrlBuilde...
Java
(function(){ 'use strict' angular .module("jobDetail") .service("jobDetailService",jobDetailService); jobDetailService.$inject = ['apiService','apiOptions']; function jobDetailService(apiService,apiOptions) { var jobId; this.getJobDetail=function(jobId) { // return "ok"; return apiService.get("j...
Java
/** * Copyright MaDgIK Group 2010 - 2015. */ package madgik.exareme.worker.art.container.job; import madgik.exareme.worker.art.container.ContainerJob; import madgik.exareme.worker.art.container.ContainerJobType; import madgik.exareme.worker.art.executionEngine.session.PlanSessionReportID; /** * @author heraldkllap...
Java
<?xml version="1.0" ?><!DOCTYPE TS><TS language="pt_BR" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About SwansonCoin</source> <translation>Sobre o SwansonCoin</translatio...
Java
/* * optimization needed. */ struct ListNode { int val; struct ListNode *next; }; #ifndef NULL #define NULL ((struct ListNode *)0) #endif struct ListNode *detectCycle(struct ListNode *head) { if (!head || !head->next) return(NULL); if (head->next == head) return(head); struct ListNode *p1, *p2; int has...
Java
# Makefile for project pi-admin MODULES = sn-core sn-props sn-approute connect CLEAN_THESE_FILES = css/bootstrap.css css/bootstrap.min.css css/bootstrap-theme.css css/bootstrap-theme.min.css \ js/bootstrap.js js/bootstrap.min.js js/jquery.js js/underscore-min.js js/backbone-min.js js/handlebars.js \ js/sn-core.js ...
Java
html, body, .container, .header { height: 100%; } /* Header */ .header { position: relative; margin: 0 auto; min-height: 560px; width: 100%; } .bg-img { position: absolute; overflow: hidden; top: 0; left: 0; right: 0; bottom: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; } .bg-...
Java
package com.twitter.meil_mitu.twitter4holo.api.help; import com.twitter.meil_mitu.twitter4holo.AbsGet; import com.twitter.meil_mitu.twitter4holo.AbsOauth; import com.twitter.meil_mitu.twitter4holo.ITwitterJsonConverter; import com.twitter.meil_mitu.twitter4holo.OauthType; import com.twitter.meil_mitu.twitter4holo.Resp...
Java
module Cranium::ImportStrategy autoload :Base, 'cranium/import_strategy/base' autoload :DeleteInsert, 'cranium/import_strategy/delete_insert' autoload :Delete, 'cranium/import_strategy/delete' autoload :TruncateInsert, 'cranium/import_strategy/truncate_insert' autoload :Delta, 'cranium/import_strategy/delta'...
Java
<!--<section data-ng-controller="NewsFeedsController" data-ng-init="findOne()">--> <section data-ng-controller="NewsFeedsController" data-ng-init="findOne()"> <section class="container"> <div class="page-header"> <h1>Edit News feed</h1> </div> <div class="col-md-12"> <form class="form-horizo...
Java
using PlayFab.SharedModels; using PlayFab.Internal; namespace PlayFab.Events { public partial class PlayFabEvents { public delegate void PlayFabErrorEvent(PlayFabRequestCommon request, PlayFabError error); public delegate void PlayFabResultEvent<in TResult>(TResult result) where TResult : PlayF...
Java
var STATE_START = 0; var STATE_END = 1; var STATE_GROUND = 2; var STATE_FOREST = 3; var STATE_WATER = 4; function Cell(col, row) { this.col = col; this.row = row; this.state = STATE_GROUND; } Cell.prototype.draw = function() { stroke(66); switch (this.state) { case STATE_START: Color.Material.light_green[5...
Java
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.34014 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //--...
Java
'use strict'; /* Services */ // Demonstrate how to register services // In this case it is a simple value service. angular.module('baApp.services', []). value('version', '0.1');
Java
var fs = require('fs'); var join = require('path').join; var iconv = require('iconv-lite'); var debug = require('debug')('ip'); var util = require('util'); var EventEmitter = require('events').EventEmitter; var thunkify = require('thunkify-wrap'); function IpUtil(ipFile, encoding, isLoad) { if (typeof encoding === '...
Java
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: AssemblyTi...
Java
<HTML><HEAD> <TITLE>Review for Vertical Limit (2000)</TITLE> <LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css"> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1 ALIGN="CENTER" CLASS="title"><A HREF="/Title?0190865">Vertical Limit (2000)</A></H1><H3 ALIGN=CENTER>reviewed by<BR><A HREF="/ReviewsBy?Dennis+Sc...
Java
using System; using CommandLine; using System.IO; using Nancy.Hosting.Self; using SeudoBuild.Core; using SeudoBuild.Core.FileSystems; using SeudoBuild.Pipeline; using SeudoBuild.Net; namespace SeudoBuild.Agent { class Program { private const string Header = @" _ _ _ _ _ ...
Java
<section ng-controller="DashboardController" ng-init="createdCourseList()"> <div class="row mt"> <div class="col-lg-12"> <div class="form-panel"> <div class="chat-room-head"> <h3> Professor Dashboard</h3> </div> <!-- <div class=...
Java
# Elevator of the Americas Welcome! This is a small project that describes an elevator in code - including dispatching and interacting with the elevator. Desired requirements: * The elevator bank must have at least 3 elevators * The elevator bank must have a way to have elevators dispatched to certain floors *...
Java
import { task } from 'gulp'; import { join } from 'path'; import { config } from '../utils/config'; import { sequenceTask } from '../utils/sequence-task'; import { readFileSync, writeFileSync } from 'fs'; const serve = require('browser-sync'); const webpack = require('webpack'); const webpackDevMiddelware = require(...
Java
.nav, .pagination, .carousel, .panel-title a { cursor: pointer; } .done-true { text-decoration: line-through; color: #ddd; } .form-control[disabled], .form-control[readonly], .fieldset[disabled], .form-control { cursor: pointer; background-color: white; }
Java
// TODO: write a test that ensures that Quagga.decodeSingle returns a Promise when it should // TODO: write a test that tests the multiple: true decoding option, allowing for multiple barcodes in // a single image to be returned. // TODO: write a test that allows for locate: false and locator configs to be tested. imp...
Java
import copy import pytest from peek.line import InvalidIpAddressException, Line, InvalidStatusException # 127.0.0.1 - - [01/Jan/1970:00:00:01 +0000] "GET / HTTP/1.1" 200 193 "-" "Python" test_line_contents = { 'ip_address': '127.0.0.1', 'timestamp': '[01/Jan/1970:00:00:01 +0000]', 'verb': 'GET', ...
Java
/* Noble cread UART service example This example uses Sandeep Mistry's noble library for node.js to read and write from Bluetooth LE characteristics. It looks for a UART characteristic based on a proprietary UART service by Nordic Semiconductor. You can see this service implemented in Adafruit's BLEFriend library. ...
Java
var db = require('mongoose'); var Log = require('log'), log = new Log('info'); var clienttracking = require('./clienttracking.js'); var mapreduce = require('./mapreduce.js'); var io = null; exports.server = require('./adnoceserver.js'); exports.setDatabase = function(databaseConfiguration, callback) { var port = ...
Java
class QuestionGroupTracker attr_reader :questions, :question_group_id, :question_group def initialize(question_group_id) @questions = Question.where('question_group_id=?', question_group_id) @counter = 0 @question_group_id = question_group_id @question_group = QuestionGroup.find(question_group_id...
Java
import logging import requests from django.conf import settings from django.contrib.sites.models import Site from django.core.mail import EmailMultiAlternatives from django.template.loader import get_template from django.utils import timezone from invitations.models import Invitation logger = logging.getLogger('email...
Java
/* ********************************************************************************************************** * The MIT License (MIT) * * * * Copyright (c) 2016 Hypermediasystems Ges. f. Software mbH * * Web: http://www.hypermediasystems.de * ...
Java
module BlocVoting.Tally.Resolution where import qualified Data.ByteString as BS data Resolution = Resolution { rCategories :: Int , rEndTimestamp :: Int , rName :: BS.ByteString , rUrl :: BS.ByteString , rVotesFor :: Integer , rVotesTotal :: Integer , rResolved :: Bool } deriving (Show, Eq) update...
Java
# Erase duplicate entries from history export HISTCONTROL="erasedups" # Increase history size export HISTSIZE="10000"
Java
<!DOCTYPE html> <html lang="en"> <head> {{ bokeh_css }} {{ bokeh_js }} <style> {% include 'styles.css' %} </style> <meta charset="utf-8"> <title>MolExplorer</title> </head> <body> <div> <h1>Vizard</h1> {{ plot_div|indent(8) }} ...
Java
//using System; //using System.Collections.Generic; //using System.Linq; //using System.Text; //using parser; // //namespace runic.lexer //{ // public class Lexer_Bootstrap_Old : Parser_Context // { // public Lexer_Bootstrap_Old(Definition definition) // : base(definition) // ...
Java
# Instruction Counter Counting number of instructions by `ptrace` system call **This repository is for experimental use, so it may contain some dangerous code. Use this repository at your own risk.** ## Requirement The code is written assuming only when using GCC on Linux. Probably it can not be compiled by compile...
Java
// Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ 'karma-jasmine', 'karma-chrome-l...
Java
using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using StockExchangeYahooFinance.DbContext; namespace StockExchangeYahooFinance.Migrations { [DbContext(typeof(YahooFi...
Java
--- layout: post title: swyambhu before the quake nepal swyambhu date: '2015-07-25T18:15:01+02:00' tags: - Instagram - PhotoOfTheDay tumblr_url: http://deepredsky.tumblr.com/post/124997225759/swyambhu-before-the-quake-nepal-swyambhu --- <img src="/tumblr_files/tumblr_ns1mq1tesy1s8ugabo1_1280.jpg"/><br/><p>swyambhu befo...
Java
#import "MOBProjection.h" @interface MOBProjectionEPSG6331 : MOBProjection @end
Java
'use strict'; const util = require('util'); const colors = require('colors/safe'); Object.entries({ info: colors.blue, warn: colors.yellow, error: colors.red }).map(([method, color]) => { const _ = global.console[method]; global.console[method] = (...args) => { if (args.length) { ...
Java
<!DOCTYPE html> <html lang="english"> <head> <link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic' rel='stylesheet' type='text/css'> <link rel="stylesheet" type="text/css" href="../theme/stylesheet/style.min.css"> <link rel="stylesheet" type="text/css" href="../theme/pygments/g...
Java
require.ensure([], function(require) { require("./73.async.js"); require("./147.async.js"); require("./294.async.js"); require("./588.async.js"); }); module.exports = 589;
Java
<html> <head> <meta charset="utf-8"> <title>Resources - git init</title> <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' > <link rel="stylesheet" href="octicons/octicons.css"> <link rel="stylesheet" href="style.css"> </head> <body> <div id="head...
Java
<rtl code> var m = function (){ function T(){ this.a = []; } var r = new T(); var a = RTL$.makeArray(3, 0); var dynamicInt = []; var dynamicString = []; var dynamicChar = []; var dynamicByte = []; var dynamicRecord = []; var dynamicArrayOfStaticArrayInt = []; var i = 0; var s = ''; var byte = 0; function assignDynami...
Java
# npmup [![NPM version][npm-image]][npm-url] > Cli tool to overview dependencies in package.json This is scope reduction result of my `update-my-deps` project. At the end I found out, that I wrote small part of [`david`](https://github.com/alanshaw/david) functionality. Oops. ![2014-03-11 18-35-40 1 npmupexample zsh]...
Java
var expect = require('chai').expect; var assert = require('chai').assert; var sinon = require('sinon'); var Config = require('../lib/config'); describe('config', function() { describe('#constructor', function() { it('creates a new object with the config defaults', function() { sinon.spy(Config.prototyp...
Java
def burrows_wheeler(text): """Calculates the burrows wheeler transform of <text>. returns the burrows wheeler string and the suffix array indices The text is assumed to not contain the character $""" text += "$" all_permutations = [] for i in range(len(text)): all_permutations.append(...
Java
local M = {} function M:init() print("test contract transfer caller") local contract_transfer_demo = import_contract 'contract_transfer_demo' local res = contract_transfer_demo:start() pprint("transfer demo start response is ", res) end function M:start() end return M
Java
using System.ComponentModel.Composition; using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; using Microsoft.Azure; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; using Microsoft.Deployment.Common.ActionModel; using Microsoft.Deploym...
Java
package com.example.dao; import com.example.model.Publisher; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Select; import java.util.List; @Mapper public interface PublisherMapper { @Select("SELECT *, PHONE as phoneNumber from PUBLISHERS") //SQL List<Publisher> findAll(); // ...
Java
<?php while (have_posts()) : the_post(); ?> <article <?php post_class(); ?>> <div class="entry-content content-medicina-prepagada"> <header class="menu-med-prep text-center"> <ul class="list-inline"> <?php $loop = new WP_Query( array( 'post_type' => 'aps', 'order' => 'ASC', 'category_name'=> 'link'));?>...
Java
<!DOCTYPE html> <html lang="en-us"> {% include head.html %} <body class="theme-base-08 layout-reverse sidebar-overlay"> <!-- Enable Google Analytics --> {% include googleanalytics.html %} {% include sidebar.html %} <!-- Wrap is the content to shift when toggling the sidebar. We wrap the ...
Java
package wikimediaparser import ( "fmt" "github.com/golang/glog" "strings" ) // Node as it is emitted by the parser // - contains a NodeType for clear identification // - a string val Val // - a list of named parameters which are actually Node Lists // -a list of anonymous parameters, a Node list aga...
Java
# # Module manifest for module 'SqlCmdTools' # # @{ # Script module or binary module file associated with this manifest. RootModule = 'SqlCmdTools.psm1' # Version number of this module. ModuleVersion = '0.0.0.1' # ID used to uniquely identify this module GUID = '97222863-d093-489a-8b09-e37f5607df83' # Author of th...
Java
# domBareMetal Xen 4.6. bare metal domain for Odroid XU-3 Tested on Odroid XU3, for toggling GPA2.4 GPIO. Toggling is done directly by changing the register in memory. On this link you can find XU3 expansion header: http://odroid.com/dokuwiki/doku.php?id=en:xu3_hardware_gpio Xen devel thread on enabling emergency ...
Java
import Vue from 'vue'; import VueForm from 'vue-form'; Vue.use(VueForm, { validators: { 'step': function(value, stepValue) { return stepValue === `any` || Number(value) % Number(stepValue) === 0; }, 'data-exclusive-minimum': function(value, exclusiveMinimum) { return Number(value) > Number(ex...
Java
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Post extends Application { /** * Index Page for this controller. * * Maps to the following URL * http://example.com/index.php/welcome * - or - * http://example.com/index.php/welcome/in...
Java
--- layout: post title: How To Order Bitcoin Debit Card With SpectroCoin? description: How To Order Bitcoin Debit Card With SpectroCoin? author: Melvin Draupnir authorurl: /melvin-draupnir/ published: true --- <p><a href="/spectrocoin/">SpectroCoin</a> now offers Bitcoin prepaid cards which could be a virtual one or ...
Java
var resources = require('jest'), util = require('util'), models = require('../../models'), async = require('async'), common = require('./../common'), calc_thresh = require('../../tools/calc_thresh.js'), GradeActionSuggestion = require('./grade_action_suggestion_resource.js'), ActionSuggesti...
Java
module Sample VERSION = '1.2' end
Java
using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; namespace CameraModifications { public class LookButton : MonoBehaviour { public bool isHead; public H_Scene h_scene; public H...
Java
/** * This Control enables to render a Scene with a Screen Space Ambient Occlusion (SSAO) effect. * * @namespace GIScene * @class Control.SSAO * @constructor * @extends GIScene.Control */ GIScene.Control.SSAO = function() { //inherit GIScene.Control.call(this); var scenePass; var ssaoEffect; var fxaaEf...
Java
div.CodeMirror-wrapping { float:left; width:275px; height:303px; border-width:2px; border-style:solid; background:#fff; } #canvas { width:470px; height:303px; }
Java
package com.cnpc.framework.utils; import com.cnpc.framework.base.pojo.GenerateSetting; import freemarker.template.Configuration; import freemarker.template.DefaultObjectWrapper; import freemarker.template.Template; import freemarker.template.TemplateException; import org.springframework.core.io.Resource; import org.sp...
Java
<?php /* @SRVDVServer/Registration/checkEmail.html.twig */ class __TwigTemplate_b7388a253fe83dce0c06be9794c45a140b6b7d51b0d7f4393b8bb6ea03bbb2f5 extends Twig_Template { public function __construct(Twig_Environment $env) { parent::__construct($env); // line 1 $this->parent = $this->load...
Java
import * as b from "bobril"; import { IRouteWithNavDefinition } from "../../../../common/routing"; import { Anchor } from "../../../../common/Anchor"; import { Example } from "../../../../common/Example"; import { Col, Form, margin, Row } from "../../../../../index"; import { Code } from "../../../../common/Code"; impo...
Java
package easyauth import ( "context" "crypto/rand" "encoding/base64" "fmt" "html/template" "log" "net/http" "strings" "time" "github.com/gorilla/mux" ) //Role is a number representing a permission level. //Specific roles will be defined by the host application. //It is intended to be a bitmask. //Each user ...
Java
import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(h("path", { d: "M20 15H4c-.55 0-1 .45-1 1s.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1zm0-5H4c-.55 0-1 .45-1 1v1c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-1c0-.55-.45-1-1-1zm0-6H4c-.55 0-1 .45-1 1v2c0 .55.45 1 1 1h16c.55 0 1-...
Java
FROM python:3 WORKDIR /root # install any Python packages this app depends on COPY requirements.txt /root/requirements.txt RUN pip install -r requirements.txt ENV FLASK_APP /root/main.py # copy sources COPY main.py /root/main.py COPY templates /root/templates CMD ["flask", "run", "--host=0.0.0.0", "--port=80"]
Java
package test.unit.hu.interconnect.hr.module.personaldata.vacations; import static com.google.common.collect.Lists.newArrayList; import static hu.interconnect.hr.backend.api.enumeration.KivetelnapTipus.MUNKANAP; import static hu.interconnect.hr.backend.api.enumeration.KivetelnapTipus.PIHENONAP; import static java.util....
Java
<!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" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>JsDoc Reference - Index</title> <meta n...
Java
using ENode.EQueue; using ENode.Eventing; namespace ENode.Tests { public class EventTopicProvider : AbstractTopicProvider<IDomainEvent> { public override string GetTopic(IDomainEvent source) { return "EventTopic"; } } }
Java
#!/usr/bin/env python # coding: utf-8 import os,sys import ctypes import numpy as np from .hmatrix import _C_HMatrix, HMatrix class _C_MultiHMatrix(ctypes.Structure): """Holder for the raw data from the C++ code.""" pass class AbstractMultiHMatrix: """Common code for the two actual MultiHMatrix classes...
Java
public class Grid { public Tile array[][] = new Tile[10][8]; public Grid() { // for(int y = 0; y < getHeight(); y++) { for(int x = 0; x < getWidth(); x++) { array[x][y] = new Tile(); } } } public int getWidth() { return 9; } public int getHeight() { return 7; } p...
Java
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { FootComponent } from './foot.component'; describe('FootComponent', () => { let component: FootComponent; let fixture: ComponentFixture<FootComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarati...
Java
# path Create a 2d path using SVG syntax. * `d` is the path descriptor {% craftml %} <!-- rectangle --> <path d="M10 10 h 10 v 10 h -10 z"/> <!-- triangle --> <path d="M30 10 l 10 10 l 10 -10 z"/> {% endcraftml %} Typically, you would use another drawing program to draw a path and export it as an SVG tag to use in ...
Java
import {normalize, resolve} from "path"; import {existsSync, readFileSync} from "fs"; import {sys, ScriptSnapshot, resolveModuleName, getDefaultLibFilePath} from "typescript"; export function createServiceHost(options, filenames, cwd) { const normalizePath = (path) => resolve(normalize(path)); const moduleResoluti...
Java
--- layout: sidebar-right title: "Piglettes by Clémentine Beauvais" date: 2019-03-26 author: emma-maguire category: young-adult excerpt: "<cite>Piglettes</cite> is funny, uplifting and inspiring." featured-image: /images/featured/featured-piglettes.jpg featured-alt: "Piglettes" breadcrumb: young-adult genre: literary-f...
Java
package main import ( "fmt" "log" ) type ListCommand struct { All bool `short:"a" long:"available" description:"also prints all available version for installation"` } type InitCommand struct{} type InstallCommand struct { Use bool `short:"u" long:"use" description:"force use of this new version after installati...
Java
/* * $Id: Perl5Matcher.java,v 1.27 2003/11/07 20:16:25 dfs Exp $ * * ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and b...
Java
--- layout: post title: "Sourdough Cinnamon Rolls" date: 2014-07-21 07:30:37 -0600 comments: true categories: - buddy image: http://anthonyrotio.com/rotiofood/2014-07-21/rolls_1.jpg alt-image: http%3A%2F%2Fanthonyrotio.com%2Frotiofood%2F2014-07-21%2Frolls_1.jpg author: rotio keywords: sourdough, cinnamon rolls, buns, ...
Java
rfstats ====== statistics for random fields ---------------------------- Several different methods for estimating correlation functions for random fields are included.
Java
import path from 'path'; import {runScheduler} from './scheduler'; import logger from '../util/logger'; import dotenv from 'dotenv'; import {loadConfig} from '../../config'; import {initQueue} from './pipeline.queue'; logger.info(" _____ _ _ _ _ _ _ _ _ "); logger.info("| | |_|__...
Java
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc --> <title>org.robolectric.util.reflector Class Hierarchy</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="style...
Java
<!DOCTYPE html> <html xmlns:msxsl="urn:schemas-microsoft-com:xslt"> <head> <meta content="en-us" http-equiv="Content-Language" /> <meta content="text/html; charset=utf-16" http-equiv="Content-Type" /> <title _locid="PortabilityAnalysis0">.NET Portability Report</title> <style> ...
Java
<?php /* Unsafe sample input : get the field userData from the variable $_GET via an object Uses a special_chars_filter via filter_var function construction : use of sprintf via a %s with simple quote */ /*Copyright 2015 Bertrand STIVALET Permission is hereby granted, without written agreement or royalty fee, to ...
Java
describe VagrantHyperV do it 'should have a version number' do VagrantHyperV::VERSION.should_not be_nil end it 'should do something useful' do false.should be_true end end
Java
import primes as py def lcm(a, b): return a * b / gcd(a, b) def gcd(a, b): while b != 0: (a, b) = (b, a % b) return a # Returns two integers x, y such that gcd(a, b) = ax + by def egcd(a, b): if a == 0: return (0, 1) else: y, x = egcd(b % a, a) return (x - (b ...
Java
package com.aokyu.service; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super...
Java
using System; using System.Collections.Generic; using System.Linq; using System.IO; using System.Data.SqlTypes; using Microsoft.SqlServer.Server; using PowerLib.System; using PowerLib.System.Collections; using PowerLib.System.IO; using PowerLib.System.IO.Streamed.Typed; using PowerLib.System.Numerics; using PowerLib.S...
Java
require 'spec_helper' describe Pagerage::IncidentsParser do before(:each) do Pagerage::Incident.delete end let(:incidents_json) { File.read(File.dirname(__FILE__) + '/incidents_sample.json') } let(:incidents_data) { JSON.parse(incidents_json) } let(:parser) { Pagerage::IncidentsParser.new(incidents_json)...
Java
a = a # e 4 a = 1 # 0 int l = [a] # 0 [int] d = {a:l} # 0 {int:[int]} s = "abc" c = ord(s[2].lower()[0]) # 0 int # 4 (str) -> int l2 = [range(i) for i in d] # 0 [[int]] y = [(a,b) for a,b in {1:'2'}.iteritems()] # 0 [(int,str)] b = 1 # 0 int if 0: b = '' # 4 str else: b = str(b) # 4 str # 12 int ...
Java
Java-essais =========== JAVA : essais de programmation 1. Déclarations de variables
Java
<?php //var_dump($games) ?> <?php $this->load->view('includes/tables-head') ?> <body class="fixed-header" ng-app="app" ng-controller="gameCtrl"> <?php $this->load->view('admin/admin-nav') ?> <div class="page-container"> <?php $this->load->view('admin/admin-header') ?> <div class="page-content-wrapper "> ...
Java
define(['js/util'], function (util) { "use strict"; var sf2 = {}; sf2.createFromArrayBuffer = function(ab) { var that = { riffHeader: null, sfbk: {} }; var ar = util.ArrayReader(ab); var sfGenerator = [ "startAddrsOf...
Java
=begin <recording pid="" cookie="" stamp="" agent=""> <record id="" stamp="" status="" method="" url="" request-time=""> <header name="" value=""/> <body><![CDATA[HTML OR WHATEVER HERE]]></body> ...
Java
import static org.junit.Assert.*; import java.util.List; import org.junit.Test; public class IdParserTest { @Test public void testListParser() { String testMedList = "{1;3;9}"; List<Integer> ids = IdParser.parse(testMedList); assertEquals(3, ids.size()); assertEquals(new Integer(1), ids.get...
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>User agent detail - Mozilla/5.0 (Linux; U; Android 1.1.20; En-au; A101C Build/ECLAIR) AppleWebKit/530.17 (KHTML, Like Gecko) Version/4.0 Mobile Safari/530.17</title> <link rel="stylesheet" href="https://cdnjs.clou...
Java
```javascript /** * @param {string} s * @return {boolean} * * Maximum length is 50000 * s is not empty * s only contains a-z */ var validPalindrome = function(s) { return validHelper(s, 0, s.length - 1, 0); }; var validHelper = function(s, startIndex, endIndex, deleteCount) { let left = startIndex, righ...
Java
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // @ignoreDep @angular/compiler-cli const ts = require("typescript"); const path = require("path"); const fs = require("fs"); const { __NGTOOLS_PRIVATE_API_2, VERSION } = require('@angular/compiler-cli'); const resource_loader_1 = require("./r...
Java
package org.softlang.service.company; import java.io.Serializable; import java.util.LinkedList; import java.util.List; /** * A department has a name, a manager, employees, and subdepartments. */ public class Department implements Serializable { private static final long serialVersionUID = -2008895922177165250L; ...
Java