text stringlengths 3 1.05M |
|---|
init_rid_plat()
{
# Detect Distro
if [ $__CrossBuild == 1 ]; then
if [ -z $ROOTFS_DIR ]; then
echo "ROOTFS_DIR is not defined."
exit -1
else
if [ -e $ROOTFS_DIR/etc/os-release ]; then
source $ROOTFS_DIR/etc/os-release
__rid_plat... |
package org.jbpm.process.workitem.jms;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import javax.jms.BytesMessage;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Mess... |
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
import chainer
def conjugate_gradient(A_product_func, b, t... |
ACCEPTED
#### According to
NUB Generator [autonym]
#### Published in
null
#### Original name
null
### Remarks
null |
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
<title>Sentence Calendar | Home</title>
<script src="js/home.js"></script>
<script src="js/database.js"></script>
<link rel="stylesheet" type="text/css" href="css/app.css" />
<link rel="stylesheet" type="text/css" href="css/hom... |
package org.terracotta.offheapstore;
import org.terracotta.offheapstore.OffHeapHashMap;
import static org.junit.Assert.fail;
import java.nio.ByteBuffer;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import org.junit.Assert;
import org.junit.Test;
import org.terraco... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE90_LDAP_Injection__w32_wchar_t_file_62a.cpp
Label Definition File: CWE90_LDAP_Injection__w32.label.xml
Template File: sources-sink-62a.tmpl.cpp
*/
/*
* @description
* CWE: 90 LDAP Injection
* BadSource: file Read input from a file
* GoodSource: Use a fixed s... |
__author__ = 'adaml'
import unittest
import os
from cloudify_exoscale.cloudify_exoscale import _read_config
from cloudify_exoscale.cloudify_exoscale import ExoscaleLogicError
from cloudify_exoscale.cloudify_exoscale import ExoscaleConnector
from cloudify_exoscale.cloudify_exoscale import ExoscaleKeypairCreator
from cl... |
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("google/ads/googleads/v12/enums/matching_function_context_type.proto", :syntax => :proto3) do
add_message "google.ads.googleads.v12.enums.MatchingFunctionContextTypeEnum" do
end
add_enum "google.ads.googleads.v12.... |
ACCEPTED
#### According to
Index Fungorum
#### Published in
Anal. Mus. nac. B. Aires, Ser. 3 19(12): 433 (1909)
#### Original name
Lophiostoma praeandinum Speg.
### Remarks
null |
import pygame
import sys
import time
import os
from . import pygame_textinput
from .game_engine import GameEngine
from pygame.locals import *
from .g_map import Map
from .menu_init import MenuInit
from .menu_fetch import MenuFetch
from .light_beacon import LightBeacon
from .globals import FPS, fps_clock, screen_width,... |
package com.phicomm.hu;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;
public class FxResultActivity extends Activity {
private static final String TAG = "ResultActivity";
@Override
protected void onCreate(Bundle savedInstanceState) {
// TO... |
#include <aws/devops-guru/model/MonitoredResourceIdentifier.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DevOpsGuru
{
namespace Model
{
MonitoredResourceIdentifier::MonitoredResourceIdentifier() :
... |
using DotNetMVCWebAppUsingMongoDB.Models;
using DotNetMVCWebAppUsingMongoDB.Models.Home;
using DotNetMVCWebAppUsingMongoDB.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;
//using System.Web.Mvc;
... |
#if NET35
namespace System.ComponentModel.DataAnnotations
{
using System;
public sealed class KeyAttribute : Attribute { }
}
#endif |
from setuptools import setup
import os
def readme():
parent_dir = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(parent_dir, "README.md")) as f:
return f.read()
setup(
name="plotly-geo",
version="1.0.0",
author="Chris P",
author_email="chris@plot.ly",
maintain... |
<?php namespace Keios\Support\Components;
use Cms\Classes\ComponentBase;
use Keios\Support\Models\Settings;
use Keios\Support\Models\Ticket;
/**
* Class TicketList
* @package Keios\Support\Components
*/
class TicketList extends ComponentBase
{
/**
* @return array
*/
public function componentDeta... |
<?php
require_once('../src/ColoCrossing.php');
$colocrossing_client = new ColoCrossing_Client();
$colocrossing_client->setAPIToken('YOUR_API_TOKEN');
?>
<h1>List Subnets</h1>
<?php
$options = array(
'sort' => 'ip_address'
);
$subnets = $colocrossing_client->subnets->findAll($options);
foreach ($subnets as $key ... |
TransformableComponent::TransformableComponent()
{
}
TransformableComponent::~TransformableComponent()
{
}
|
from absl.testing import parameterized
import tensorflow as tf
import tensorflow_federated as tff
from generalization.utils import eval_metric_distribution
def keras_model_builder_with_zeros():
# Create a simple linear regression model, single output.
# We initialize all weights to zero.
model = tf.keras.Seque... |
<?php
use yii\db\Migration;
class m170110_195306_add_znaki_zodiaka extends Migration
{
public $tableName = '{{%znaki_zodiaka}}';
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
$this->createTable($this->tableName, [
'id' => $this->bigPr... |
package net.sourceforge.marathon.runtime;
import java.util.logging.Logger;
import net.sourceforge.marathon.api.INamingStrategy;
import net.sourceforge.marathon.objectmap.ObjectMapNamingStrategy;
public class NamingStrategyFactory {
public static final Logger LOGGER = Logger.getLogger(NamingStrategyFactory.clas... |
<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ul class="list-inline text-center">
{% if site.RSS %}
<li>
<a href="{{ site.url }}/... |
package io.hosuaby.restful.domain.validators;
import io.hosuaby.restful.domain.Teapot;
import java.util.Arrays;
import java.util.regex.Pattern;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import org.springframework.validation.Errors;
import org.springframework.valida... |
#!/usr/bin/env node
require('../server.babel'); // babel registration (runtime transpilation for node)
var nodemon = require('nodemon');
let path = require('path');
let rootDir = path.resolve(__dirname, '..');
/**
* Define isomorphic constants.
*/
global.__CLIENT__ = false;
global.__SERVER__ = true;
global.__DISABLE_... |
package de.fau.cs.mad.kwikshop.common;
public class TutorialChapter {
private int gifID;
private int titleID;
private int descriptionID;
public TutorialChapter(int gifID, int titleID, int descriptionID){
this.gifID = gifID;
this.titleID = titleID;
this.descriptionID = descript... |
package javaselast.lessons.lesson10.classes;
import java.util.ArrayList;
import java.util.List;
public class InlineOverride {
public static void main(String[] args) {
List<Integer> list = new ArrayList<Integer>() {
{
add(1);
add(3);
add(4);
... |
from __future__ import unicode_literals
from django import forms
from django.utils.encoding import smart_text
from django.utils.text import capfirst
from django.utils.translation import ugettext_lazy as _
from . import connections
from .constants import DEFAULT_ALIAS
from .query import EmptySearchQuerySet, SearchQuer... |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="es">
<head>
<!-- Generated by javadoc (1.8.0_66) on Wed Nov 11 20:52:04 CET 2015 -->
<title>domini.Basic Class Hierarchy</title>
<meta name="date" content="2015-11-11">
<li... |
angular.module('myApp')
.service('Authorization', function($state) {
this.authorized = false,
this.memorizedState = null;
var
clear = function() {
this.authorized = false;
this.memorizedState = null;
},
go = function(fallback) {
this.authorized = true;
var targetState = this.memorizedState... |
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of... |
package com.awong.lollipop.egg;
import com.awong.lollopop.egg.R;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
public class LLandActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstance... |
using App.Models.Documents;
using App.Models.Images;
using System.ComponentModel.DataAnnotations;
using System.Web;
using System.Web.Mvc;
namespace App.Models.Materials
{
public class EditMaterialCategoryInputModel
{
public int Id { get; set; }
[Required(ErrorMessage = " * Задължително:")]
[StringLength(250,... |
/* eslint-disable no-param-reassign, consistent-return */
import AccessorUtilities from './lib/utils/accessor';
export default class Autosave {
constructor(field, key, fallbackKey, lockVersion) {
this.field = field;
this.isLocalStorageAvailable = AccessorUtilities.isLocalStorageAccessSafe();
if (key.jo... |
<BroadcastMonitor>
<updated>2015-08-03T14:01:56</updated>
<stationName>Radio 6</stationName>
<Current>
<startTime>2015-08-03T14:01:51</startTime>
<itemId>1000080509:1241843</itemId>
<titleId>216138670</titleId>
<itemCode>10598</itemCode>
<itemReference></itemReference>
<titleName>... |
package com.sagasu.playground;
/**
* Created by foo on 26/10/2015.
*/
public class Lambdas {
//with type declaration
MathOperation addition = (int a, int b) -> a + b;
//with out type declaration
MathOperation subtraction = (a, b) -> a - b;
//with return statement along with curly braces
Mat... |
namespace facebook { namespace deeplearning { namespace torch {
namespace {
long numFFTCols(long cols) {
return numHermitian(cols);
}
}
template <int FFTDim>
std::unique_ptr<THCudaTensor, CudaTensorDeleter>
makeCuFFTTensorReal(
THCState* state,
THCudaTensor* in,
const std::vector<long>& commonDims,
THCuda... |
import Datasource from './datasource'
export default class Warp10ConfigCtrl {
static templateUrl = 'template/config.html'
current: Datasource
// Dom needs
newExtraKey: any
newExtraVal: any
newSecretKey: string
newSecretVal: string
constructor(private backendSrv: any, private $routeParams: any) {
... |
package com.subterranean_security.crimson.sv.profile.set;
import java.util.HashSet;
import com.subterranean_security.crimson.sv.profile.Profile;
public class ProfileSet extends HashSet<Profile> {
private static final long serialVersionUID = 1L;
}
|
package azblob
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"path/filepath"
"github.com/Azure/azure-storage-blob-go/2017-07-29/azblob"
"github.com/go-spatial/tegola"
"github.com/go-spatial/tegola/cache"
"github.com/go-spatial/tegola/dict"
)
const CacheType = "azblob"
const (
Config... |
Midwest proves a `colorizeStack` utility that highlights
all files in the stack that are not in the projects `node_modules`.
This greatly simplifies finding what code in your project is actually
causing the error.
It is highly recommended to override the default `uncaughtException`
to utilize this.
```js
const color... |
#ifndef BOOST_HANA_DETAIL_OPERATORS_ORDERABLE_HPP
#define BOOST_HANA_DETAIL_OPERATORS_ORDERABLE_HPP
#include <boost/hana/config.hpp>
#include <boost/hana/core/tag_of.hpp>
#include <boost/hana/fwd/greater.hpp>
#include <boost/hana/fwd/greater_equal.hpp>
#include <boost/hana/fwd/less.hpp>
#include <boost/han... |
namespace media {
namespace {
uint32_t kDefaultDataPipeCapacityBytes = 512;
class MojoDataPipeReadWrite {
public:
MojoDataPipeReadWrite(
uint32_t data_pipe_capacity_bytes = kDefaultDataPipeCapacityBytes) {
mojo::ScopedDataPipeProducerHandle producer_handle;
mojo::ScopedDataPipeConsumerHandle consume... |
<!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 (version 1.7.0_91) on Tue Dec 29 12:44:17 AEDT 2015 -->
<title>org.bouncycastle.util.io.pem.test Class Hierarchy (Bouncy Castle Library 1.54 API Speci... |
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Authentication Driver
|--------------------------------------------------------------------------
|
| This option controls the authentication driver that will be utilized.
| This driver ... |
<?php
namespace PHPExiftool\Driver\Tag\XMPPlus;
use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;
/**
* @ExclusionPolicy("all")
*/
class ImageSupplierID extends AbstractTag
{
protected $Id = 'ImageSupplierImageSupplierID';
protected $Name = 'ImageSupplierID';
prote... |
using Chalmers.ILL.Models;
using Chalmers.ILL.OrderItems;
using Chalmers.ILL.Providers;
using Chalmers.ILL.Templates;
using Chalmers.ILL.UmbracoApi;
using Examine;
using Microsoft.Practices.Unity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Web.Mvc;
using Umbraco.W... |
import proto # type: ignore
__protobuf__ = proto.module(
package="google.ads.googleads.v10.enums",
marshal="google.ads.googleads.v10",
manifest={
"UserListCrmDataSourceTypeEnum",
},
)
class UserListCrmDataSourceTypeEnum(proto.Message):
r"""Indicates source of Crm upload data."""
cl... |
namespace ts.pxtc {
export class LSHost implements ts.LanguageServiceHost {
constructor(private p: ts.Program) { }
getCompilationSettings(): ts.CompilerOptions {
const opts = this.p.getCompilerOptions();
opts.noLib = true;
return opts;
}
getNewLi... |
#include "btkMEXObjectHandle.h"
#include "btkMXEvent.h"
#include <btkAcquisition.h>
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
if(nrhs != 3)
mexErrMsgTxt("Three input arguments required.");
if (nlhs > 1)
mexErrMsgTxt("Too many output arguments.");
if ((mxGetClass... |
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>"KLF200-API/GW_CLEAR_ACTIVATION_LOG_CFM" | klf-200-api</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
... |
import java.util.ArrayList;
import java.lang.*;
public class Lexicogrphic_permutations {
public static void main(String[] args) {
}
public static void sort(ArrayList<Integer> perms){
int index=0;
while(index!=perms.size()){
int min=find_min(perms, index);
swap(perms, index, min);
}
}
publ... |
package gwbot.track;
import java.util.List;
/**
*
* @author benedict
*/
public class Track {
private final String id;
private final String name;
private final List<Piece> pieces;
private final List<Lane> lanes;
private final StartingPoint startingPoint;
public Track(String id, String name, List<Piece> piec... |
extern "C" {
BOOST_SYMBOL_IMPORT pdalboost::detail::winapi::BOOL_ WINAPI
QueryPerformanceCounter(::_LARGE_INTEGER* lpPerformanceCount);
BOOST_SYMBOL_IMPORT pdalboost::detail::winapi::BOOL_ WINAPI
QueryPerformanceFrequency(::_LARGE_INTEGER* lpFrequency);
}
#endif
namespace pdalboost {
namespace detail {
namespace win... |
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**item_name** | **str** | Order item description | [optional]
**item_count** | **float** | Items count | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentat... |
import { Injectable } from '@angular/core';
import { Action } from '@ngrx/store';
@Injectable()
export class NowPlaylistActions {
static QUEUE_LOAD_VIDEO = '[NOW PLAYLIST] QUEUE_LOAD_VIDEO';
static QUEUE = '[NOW PLAYLIST] QUEUE';
static QUEUE_LOAD_VIDEO_SUCCESS = '[NOW PLAYLIST] QUEUE_LOAD_VIDEO_SUCCESS';
stat... |
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/analytics/data/v1alpha/data.proto
package com.google.analytics.data.v1alpha;
public interface UserSegmentSequenceGroupOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.UserSegmentSequence... |
package sftp
import (
"errors"
"io"
"os"
"reflect"
"testing"
"github.com/kr/fs"
)
// assert that *Client implements fs.FileSystem
var _ fs.FileSystem = new(Client)
// assert that *File implements io.ReadWriteCloser
var _ io.ReadWriteCloser = new(File)
func TestNormaliseError(t *testing.T) {
var (
ok ... |
/*
* rtGetInf.c
*
* Real-Time Workshop code generation for Simulink model "NLPIDVersion2.mdl".
*
* Model Version : 1.89
* Real-Time Workshop version : 7.3 (R2009a) 15-Jan-2009
* C source code generated on : Mon Mar 24 18:43:48 2014
*
* Target selection: nidll.tlc
* Note: GRT includes extra in... |
package org.gradle.test.performance.mediummonolithicjavaproject.p415;
public class Production8312 {
private String property0;
public String getProperty0() {
return property0;
}
public void setProperty0(String value) {
property0 = value;
}
private String property1;
... |
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
<title>aroundFn</title>
<link href="../../../../images/logo-icon.svg" rel="icon" type="image/svg">
<script>var pathToRoot = "../../../../";</script>
<script type="text/javascript" src="../../../../sc... |
For manual testing purposes only
|
<html>
<head>
<link rel="stylesheet" type="text/css" href="main.css">
<link rel="stylesheet" type="text/css" href="page.css">
<link rel="stylesheet" type="text/css" href="myths.css">
<link rel="stylesheet" type="text/css" href="nav.css">
<link rel="stylesheet" type="text/css" href="hover.css">
<link rel="styleshe... |
$(function() {
// Get the form.
var form = $('#rsvp-form');
// Get the messages div.
var formMessages = $('#form-messages');
// Set up an event listener for the contact form.
$(form).submit(function(e) {
// Stop the browser from submitting the form.
e.preventDefault();
// Serialize the form data.
var ... |
package org.osgi.framework;
/**
* A {@code ServiceEvent} listener that does not filter based upon
* package wiring. {@code AllServiceListener} is a listener interface
* that may be implemented by a bundle developer. When a
* {@code ServiceEvent} is fired, it is synchronously delivered to an
* {@code AllServiceL... |
'use strict';
angular
.module('efg.nextView', [
'efg.nextApi',
'efg.responsiveBackgroundDirective',
'hc.marked',
'ngRoute'
])
.config(function($routeProvider) {
$routeProvider.when('/next/:id', {
controller: 'NextCtrl as next',
templateUrl: 'efg.nextView.tpl.html'
});
})
.... |
#include "CCApplication.h"
#include "CCDirector.h"
#include "CCDrawingPrimitives.h"
#include "CCEventCustom.h"
#include "CCEventType.h"
#include "CCGLView.h"
#include "CCShaderCache.h"
#include "CCTextureCache.h"
#include "platform/android/jni/JniHelper.h"
#include <android/log.h>
#include <jni.h>
#define LOG_TAG ... |
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version2" level="2" version="2">
<model metaid="_case00022" id="case00022" name="case00022">
<listOfCompartments>
<compartment id="compartment" name="compartment" size="0.3" units="volume"/>
</listOfCompartments>
<li... |
<?php
namespace Magento\Weee\Test\Unit\Model\Total\Quote;
use Magento\Tax\Model\Calculation;
class WeeeTest extends \PHPUnit_Framework_TestCase
{
/**
* @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Pricing\PriceCurrencyInterface
*/
protected $priceCurrency;
/**
* @var \... |
// flow-typed signature: 962a204054819a00dd8e3d40faf80bb8
// flow-typed version: <<STUB>>/parallelshell_v^3.0.1/flow_v0.47.0
/**
* This is an autogenerated libdef stub for:
*
* 'parallelshell'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work wit... |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateDefectsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('defects', function(Blueprint $table)
{
$table->increments('id');
$table-... |
namespace ui {
namespace {
static const size_t kDefaultCursorWidth = 64;
static const size_t kDefaultCursorHeight = 64;
bool IsCrtcInUse(
uint32_t crtc,
const std::vector<std::unique_ptr<HardwareDisplayControllerInfo>>&
displays) {
for (size_t i = 0; i < displays.size(); ++i) {
if (crtc == disp... |
package rules
// Rule is an interface that all Rule
// types implement. This give consistency
// for the documentation generation.
type Rule interface {
Name() string
Definition() string
Identifier() string
Undetectable() bool
}
// RuleCategory holds documentation and
// inventory for each of the rule types
type ... |
NSObjectToXML
=============
Convert any NSObjects in XML, including other descendants objects. |
channel.getMessages().then(function(messages) {
const totalMessages = messages.items.length;
for (i = 0; i < totalMessages; i++) {
const message = messages.items[i];
console.log('Author:' + message.author);
}
console.log('Total Messages:' + totalMessages);
});
|
typedef struct SpriteSheetRegion
{
int X;
int Y;
int Width;
int Height;
} SpriteSheetRegion;
class SpriteSheet
{
private:
ALLEGRO_BITMAP* sheet;
std::vector<SpriteSheetRegion*> frames;
public:
SpriteSheet( std::string Filename );
SpriteSheet( std::string Filename, int FrameWidth, int FrameHeight );
~S... |
.class Lcom/android/systemui/statusbar/phone/ScrimController$3;
.super Landroid/animation/AnimatorListenerAdapter;
.source "ScrimController.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/android/systemui/statusbar/phone/ScrimController;->startScrimAnimation(Landroid/view/V... |
<?php
namespace PPE\UserBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class PPEUserBundle extends Bundle
{
}
|
package core.main_content.panes.middle_pane.data_manage_mode;
import java.util.ArrayList;
import java.util.List;
import com.vaadin.ui.VerticalLayout;
public class DataManagerViewImpl extends VerticalLayout implements DataManagerView{
/**
*
*/
private static final long serialVersionUID = 5540344492589957549L;... |
/*
* Binary Heap :) - Max-heap
*
* A Tree where each node can have up 2 children and
* where for each node:
* - The node value is larger or equal to that of its children (max-heap, for min-heap is smaller or equal).
*
*
* - Heap
* - Create new heap
* - Create new heap with node
*
*/
describe("Hea... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Coq bench</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet... |
using System;
using System.Dynamic;
using System.Security.Principal;
using RIAPP.DataService.DomainService.Interfaces;
using RIAPP.DataService.DomainService.Types;
using RIAPP.DataService.Utils;
namespace RIAPP.DataService.DomainService
{
public class RequestContext : IEntityVersionProvider
{
public R... |
import argparse
import os
import logging
import sys
import yaml
from br_util import FinalResultType, classifyResult, validateMappingFile
try:
# Try to use libyaml which is faster
from yaml import CLoader as Loader, CDumper as Dumper
except ImportError:
# fall back on python implementation
from yaml import Load... |
//#define SIMULATE_CONNECTION
using MatterHackers.Agg;
using MatterHackers.Agg.UI;
using MatterHackers.Localizations;
using MatterHackers.MatterControl.PrinterCommunication;
using System;
using System.Collections.Generic;
namespace MatterHackers.MatterControl.EeProm
{
public partial class EePromRepetierWindow : Sy... |
/**
* @author Oleg V. Khaschansky
* @version $Revision$
*
* @date: Jul 12, 2005
*/
package org.apache.harmony.awt.gl.font;
import java.awt.Font;
import java.awt.GraphicsEnvironment;
import java.util.List;
import java.util.Map;
/**
* This class chooses the default font for the given text.
* If it finds the ch... |
import {thunk, logger} from 'common/utils/middleware';
import rootReducer from 'home/reducers/rootReducer';
import {createStore, applyMiddleware} from 'redux';
const middleware = [thunk];
if (process.env.NODE_ENV !== 'production') {
middleware.push(logger);
}
export default createStore(
rootReducer,
applyMiddl... |
@interface AddressPublishViewController () <UICollectionViewDataSource, UICollectionViewDelegate>
@property (weak, nonatomic) UIImageView *largePhotoImageView;
@property (weak, nonatomic) UIScrollView *scrollView;
@property (weak, nonatomic) UICollectionView *subPhotosCollectionView;
@property (strong, nonatomic) NSM... |
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.5.0.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component co... |
var PinView = Backbone.View.extend({
events: {
'click': 'changeState'
},
// renderin a pin means creating an SVG rectangle with a color
render: function() {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
rect.setAttribute('x', 14);
rect.setAttribute('y', 14);
re... |
package com.facebook.litho.specmodels.model;
import java.util.ArrayList;
import java.util.List;
import javax.lang.model.element.Modifier;
/**
* Class for validating that the {@link SpecMethodModel}s for a {@link SpecModel} are well-formed.
*/
public final class SpecMethodModelValidation {
private SpecMethodMode... |
<% include ../../common/header.html %>
<script src="/js/vendor/ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="/js/vendor/ace/ext-settings_menu.js" type="text/javascript" charset="utf-8"></script>
<script src="/js/vendor/ace/ext-statusbar.js" type="text/javascript" charset="utf-8"></scrip... |
#include "BaseChunk.h"
class CFileChunk : public CBaseChunk
{
public:
CFileChunk();
virtual ~CFileChunk() override;
virtual void Read(Framework::CStream&) override;
std::string GetName() const;
const uint8* GetCompiledShader() const;
uint32 GetCompiledShaderLength() const;
private:
... |
package com.google.cloud.compute.deprecated;
import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.createStrictMock;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
import static org.junit.Assert.assertE... |
import sys
import os
import re
from pair_steps import *
ROOT_ADDRESS = os.environ['PAIRFILEPATH']
CONSTANTS_FILE = './clientTests/constants.h'
def write_pairing_code_to_constants_h():
code = read_file("%s/paircode.txt" % ROOT_ADDRESS)
if len(code) < 1:
print('code looks wrong...exiting')
return... |
let express = require('express');
let isVarName = require('is-var-name');
let app = express();
app.get("/some/path", (req, res) => {
let response = "Hello, world!";
if(req.query.jsonp && isVarName(req.query.jsonp))
response = req.query.jsonp + "(" + response + ")";
res.send(response);
});
|
package sos.base.util.namayangar.sosLayer.search;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.Shape;
import java.util.ArrayList;
import java.util.HashMap;
import javax.swing.JComponent;
import rescuecore2.misc.Pair;
import sos.base.entities.Building;
import sos.base.entit... |
package com.myriadmobile.fortune;
/**
* Created by cclose on 9/8/14.
*/
public interface RedrawListener {
void redraw();
}
|
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null |
package util.events;
import backend.resource.TurboIssue;
public class ShowAssigneePickerEvent extends Event {
public final TurboIssue issue;
public ShowAssigneePickerEvent(TurboIssue issue) {
this.issue = issue;
}
}
|
//Problem 9. Delete odd lines
//
//Write a program that deletes from given text file all odd lines.
//The result should be in the same file.
using System.IO;
class DeleteOddLines
{
static void Main()
{
using (StreamWriter sw = new StreamWriter(@"..\..\output.txt"))
{
... |