code
stringlengths
4
1.01M
language
stringclasses
2 values
// // RegionContainerViewController.h // MH4U Dex // // Created by Joseph Goldberg on 3/6/15. // Copyright (c) 2015 Joseph Goldberg. All rights reserved. // #import <UIKit/UIKit.h> @class Region; @interface RegionContainerViewController : UIViewController @property (nonatomic, strong) Region *region; @end
Java
--- layout: post title: "Welcome to Jekyll!" date: 2015-12-13 00:34:28 -0600 author: kyletaylored category: jekyll image: get-started-with-jekyll.png --- You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, bu...
Java
# cooper document with one key example class RevisionedObject include Cooper::Document revision_field :key, type: String end describe 'Updating documents' do let(:object) do RevisionedObject.new end it 'works like Mongoid::Document' do object.key = 'value0' object.save object.update_attribut...
Java
<?php namespace BackendBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class DefaultControllerTest extends WebTestCase { public function testIndex() { $client = static::createClient(); $crawler = $client->request('GET', '/'); $this->assert...
Java
# AIT_MAIKON マイコン演習最終課題<br> 詳しくはwiki見て
Java
--- title: The “Example” of Rest date: 07/09/2021 --- Besides the examples we already have looked at, this idea of types and symbols can apply to the biblical concept of rest as well. To see this, we go to the New Testament book of Hebrews. `Read Hebrews 4:1–11. What is the remaining promise of entering His rest re...
Java
using System; using System.Net; using Microsoft.Extensions.Logging; namespace CakesNoteProxy { public static class NoteProxyConfigure { public static ILoggerFactory LoggerFactory; public static class NoteApi { public static string SiteFqdn { get; private set; }...
Java
module HealthSeven::V2_5 class Rq1 < ::HealthSeven::Segment # Anticipated Price attribute :anticipated_price, St, position: "RQ1.1" # Manufacturer Identifier attribute :manufacturer_identifier, Ce, position: "RQ1.2" # Manufacturer's Catalog attribute :manufacturer_s_catalog, St, position: "RQ1.3" # Vendor...
Java
using System; using Lunt.IO; namespace Lunt { /// <summary> /// Represent a dependency to an asset. /// </summary> public sealed class AssetDependency { private readonly FilePath _path; private readonly long _fileSize; private readonly string _checksum; /// <summar...
Java
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include "liste.h" #include "atl.h" #include "es.h" #define FILE_ATLETI "atleti.txt" #define FILE_ESERCIZI "esercizi.txt" #define MAX_NOME 25 #define LUNG_CODICE 5 #define non_strutturato ;; #ifdef _WIN32 #define F_CLEAR "cls" #else ...
Java
#include "ofQuickTimeGrabber.h" #include "ofUtils.h" #if !defined(TARGET_LINUX) && !defined(MAC_OS_X_VERSION_10_7) //--------------------------------- #ifdef OF_VIDEO_CAPTURE_QUICKTIME //--------------------------------- //-------------------------------------------------------------- static ComponentResult frameI...
Java
# frozen_string_literal: true require 'spec_helper' describe 'logging' do it "should have a logger" do expect(Dummy).to respond_to(:logger) end it "should be able to log debug methods" do expect(Dummy.logger).to respond_to(:debug) end it "should be settable" do expect(Dummy).to respond_to(:log...
Java
// // RepeatExpression.h // iLogo // // Created by Yuhua Mai on 10/27/13. // Copyright (c) 2013 Yuhua Mai. All rights reserved. // #import "ScopedExpression.h" //#import "Expression.h" @interface RepeatExpression : ScopedExpression { Expression *variableExpression; NSMutableArray *commandExpression; } ...
Java
// Copyright (c) 2015-2018 William W. Fisher (at gmail dot com) // This file is distributed under the MIT License. #include "ofp/tablestatus.h" #include "ofp/writable.h" using namespace ofp; bool TableStatus::validateInput(Validation *context) const { size_t length = context->length(); if (length < sizeof(Tabl...
Java
@charset "UTF-8"; /* MFG Labs iconset 1.0 ------------------------------------------------------- License ------------------------------------------------------- • The MFG Labs iconset font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL • MFG Labs inconset CSS fi...
Java
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title>Post It App</title> <link rel="apple-touch-icon" sizes="57x57" href="/icon2015/apple-icon-57x57.png"> <link rel="apple-touch-icon" sizes="60x60" href="/icon2015/apple-icon-60x60.png"> <link rel="apple-touch-icon" sizes="72x72" hre...
Java
#!/bin/sh # CYBERWATCH SAS - 2017 # # Security fix for USN-2950-5 # # Security announcement date: 2016-05-25 00:00:00 UTC # Script generation date: 2017-01-01 21:05:27 UTC # # Operating System: Ubuntu 14.04 LTS # Architecture: x86_64 # # Vulnerable packages fix on version: # - samba:2:4.3.9+dfsg-0ubuntu0.14.04.3 ...
Java
require 'delegate' module Bizflow module BusinessModel class SimpleWrapper < SimpleDelegator def self.wrap(item) new item end def self.wraps(items) res = items.map do |item| new item end res end end end end
Java
class Solution { public int solution(int[] A) { int[] temArray = new int[A.length + 2]; for (int i = 0; i < A.length; i++) { temArray[A[i]] = 1; } for (int i = 1; i < temArray.length + 1; i++) { if(temArray[i] == 0){ return i; ...
Java
function EditMovieCtrl(MovieService,$stateParams) { // ViewModel const edit = this; edit.title = 'Edit Movies' + $stateParams.id; edit.back = function(){ window.history.back() } edit.checker = function(bool){ if(bool=='true') return true; if(bool=='false') return false; } ...
Java
# CGGameCircle Marmalade Lua Binding for Game Circle
Java
/** * @fileoverview Rule to require or disallow line breaks inside braces. * @author Toru Nagashima */ "use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ let astUtils = requ...
Java
import random, math import gimp_be #from gimp_be.utils.quick import qL from gimp_be.image.layer import editLayerMask from effects import mirror import numpy as np import UndrawnTurtle as turtle def brushSize(size=-1): """" Set brush size """ image = gimp_be.gimp.image_list()[0] drawable = gimp_be.p...
Java
import {Option} from "./option"; export class HelpOption extends Option { /** * */ constructor() { super(); this.shortName = 'h'; this.longName = 'help'; this.argument = ''; } }
Java
import * as React from 'react'; import { createIcon } from '../Icon'; export const ShieldIcon = createIcon( <path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" />, 'ShieldIcon' );
Java
"use strict"; var GLOBAL_MOUNT_POINT_MAX = Math.pow(2, 53); var util = { uuid: function(){ return Math.ceil(Math.random() * GLOBAL_MOUNT_POINT_MAX); } }; module.exports = util;
Java
<?php namespace ToyLang\Core\Lexer; use ToyLang\Core\Lexer\Token\Token; use ToyLang\Core\Lexer\Token\TokenType; interface Lexer { /** * @param TokenType $tokenType * @return $this */ public function addTokenType(TokenType $tokenType); /** * @param TokenType[] $tokenTypes * @retu...
Java
// // HomeDateContainerView.h // XQDemo // // Created by XiangqiTu on 15-4-13. // // #import <UIKit/UIKit.h> @interface HomeDateContainerView : UIView - (void)caculateDateWithTimestamp:(NSString *)timestamp; @end
Java
require 'test_helper' class CustomerQuestionshipTest < ActiveSupport::TestCase # test "the truth" do # assert true # end end
Java
/** * @author Mat Groves http://matgroves.com/ @Doormat23 */ /** * A DisplayObjectContainer represents a collection of display objects. * It is the base class of all display objects that act as a container for other objects. * * @class DisplayObjectContainer * @extends DisplayObject * @constructor */ PIXI.D...
Java
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/...
Java
function ga() {} var _gaq = []
Java
export { default } from 'ember-stripe-elements/components/stripe-card';
Java
<?php return [ /** *-------------------------------------------------------------------------- * Default Broadcaster *-------------------------------------------------------------------------- * * This option controls the default broadcaster that will be used by the * framework when ...
Java
--- name: Bug report about: Create a report to help us improve --- **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. use option '...' 3. See error **Expected behavior** A clear and concise description of what you expected to ...
Java
#include "binary_buffer.hpp" #include <iterator> #include <algorithm> #include <sstream> #include <boost/endian/conversion.hpp> using boost::endian::native_to_big; using boost::endian::big_to_native; namespace { using aria::byte; template <typename P> void append_bytes_to_vector(std::vector<byte> & vec,...
Java
<pre><code class="css">h1(class='s-simple-title u-fs-h5x') Thumbnail Object h2.s-simple-title--sub Default .s-simple-objects.thumbnail .o-thumb img(class="o-thumb__item" src= "http://placehold.it/200") .s-simple-code include ../code/highlight/highlight-code-javascript.html h2.s-simple-title--sub Thumbnail Roun...
Java
# Acknowledgements This application makes use of the following third party libraries: ## AFNetworking Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "So...
Java
# :floppy_disk: ghbackup [![GoDoc](https://godoc.org/qvl.io/ghbackup?status.svg)](https://godoc.org/qvl.io/ghbackup) [![Build Status](https://travis-ci.org/qvl/ghbackup.svg?branch=master)](https://travis-ci.org/qvl/ghbackup) [![Go Report Card](https://goreportcard.com/badge/qvl.io/ghbackup)](https://goreportcard.com/...
Java
version https://git-lfs.github.com/spec/v1 oid sha256:a2aca9cd81f31f3e9e83559fdcfa84d3ee900090ee4baeb2bae129e9d06473eb size 1264
Java
const exec = require('child_process').exec const path = require('path') const fs = require('fs') const execPath = process.execPath const binPath = path.dirname(execPath) const dep = path.join(execPath, '../../lib/node_modules/dep') const repository = 'https://github.com/depjs/dep.git' const bin = path.join(dep, 'bin/de...
Java
using MongoDB.Driver; namespace AspNet.Identity.MongoDB { public class IndexChecks { public static void EnsureUniqueIndexOnUserName<TUser>(IMongoCollection<TUser> users) where TUser : IdentityUser { var userName = Builders<TUser>.IndexKeys.Ascending(t => t.UserName); var unique = new CreateIndexOptions...
Java
class SystemModule < ActiveRecord::Base attr_accessible :name def self.CUSTOMER readonly.find_by_name("Customer") end def self.USER readonly.find_by_name("User") end def self.CONTACT readonly.find_by_name("Contact") end end
Java
# github-language-rainbow Just look at the colors
Java
package org.aikodi.chameleon.support.statement; import org.aikodi.chameleon.core.declaration.Declaration; import org.aikodi.chameleon.core.element.ElementImpl; import org.aikodi.chameleon.core.lookup.DeclarationSelector; import org.aikodi.chameleon.core.lookup.LookupContext; import org.aikodi.chameleon.core.lookup.Loo...
Java
"use strict"; ace.define("ace/snippets/matlab", ["require", "exports", "module"], function (e, t, n) { "use strict"; t.snippetText = undefined, t.scope = "matlab"; });
Java
(function(){ /** * PubSub implementation (fast) */ var PubSub = function PubSub( defaultScope ){ if (!(this instanceof PubSub)){ return new PubSub( defaultScope ); } this._topics = {}; this.defaultScope = defaultScope || this; }; PubSub.prototype...
Java
function fixPosition() { console.log($(window).scrollTop()); // if its anywhee but at the very top of the screen, fix it if ($(window).scrollTop() >= headerHeight) { // magic number offset that just feels right to prevent the 'bounce' // if (headPosition.top > 0){ $('body').addClass('js-fix-positi...
Java
<?php return [ '@class' => 'Grav\\Common\\File\\CompiledYamlFile', 'filename' => '/Users/kenrickkelly/Sites/hokui/user/plugins/admin/languages/tlh.yaml', 'modified' => 1527231007, 'data' => [ 'PLUGIN_ADMIN' => [ 'LOGIN_BTN_FORGOT' => 'lIj', 'BACK' => 'chap', '...
Java
#!/usr/bin/env bash # Run a raspberry pi as ulnoiot gateway (wifi router and mqtt_broker) # # To enable this, # make sure ulnoiot-run script is porperly setup (for example in /home/pi/bin) # add the following to the end of /etc/rc.local with adjusted location of the # run-script: # export PATH="/usr/local/sbin:/usr/loc...
Java
import React from 'react'; import ReactDOM from 'react-dom'; import _ from 'underscore'; import babel from 'babel-core/browser'; import esprima from 'esprima'; import escodegen from 'escodegen'; import estraverse from 'estraverse'; import Codemirror from 'react-codemirror'; import classNames from 'classnames'; import ...
Java
/** @babel */ /* eslint-env jasmine, atomtest */ /* This file contains verifying specs for: https://github.com/sindresorhus/atom-editorconfig/issues/118 */ import fs from 'fs'; import path from 'path'; const testPrefix = path.basename(__filename).split('-').shift(); const projectRoot = path.join(__dirname, 'fixt...
Java
/* * Generated by class-dump 3.3.4 (64 bit). * * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. */ #import <HomeSharing/HSRequest.h> @interface HSItemDataRequest : HSRequest { } + (id)requestWithDatabaseID:(unsigned int)arg1 itemID:(unsigned long long)arg2 format:(id)arg3; -...
Java
/* * Generated by class-dump 3.3.4 (64 bit). * * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. */ #import <Foundation/NSPredicateOperator.h> @interface NSCompoundPredicateOperator : NSPredicateOperator { } + (id)notPredicateOperator; + (id)orPredicateOperator; + (id)andPred...
Java
import React from "react" import { injectIntl } from "react-intl" import { NavLink } from "react-router-dom" import PropTypes from "prop-types" import Styles from "./Navigation.css" function Navigation({ intl }) { return ( <ul className={Styles.list}> <li><NavLink exact to="/" activeClassName={Styles.acti...
Java
package main import ( "bufio" "os" "fmt" ) func main() { counts := make(map[string]int) fileReader, err := os.Open("words.txt") if err != nil { fmt.Println(err) os.Exit(1) } defer fileReader.Close() scanner := bufio.NewScanner(fileReader) // Set the split function for the scanning operation. scanner....
Java
<?php defined("_VALID_ACCESS") || die('Direct access forbidden'); $recordsets = Utils_RecordBrowserCommon::list_installed_recordsets(); $checkpoint = Patch::checkpoint('recordset'); $processed = $checkpoint->get('processed', array()); foreach ($recordsets as $tab => $caption) { if (isset($processed[$tab])) { ...
Java
const Marionette = require('backbone.marionette'); const MeterValuesView = require('./MeterValuesView.js'); module.exports = class EnergyMetersView extends Marionette.View { template = Templates['capabilities/energy/meters']; className() { return 'energy-meters'; } regions() { return { metersByPeriod...
Java
// // Copyright (c) 2017-2020 the rbfx project. // // 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, mer...
Java
const _ = require('lodash'); const en = { modifiers: require('../../res/en').modifiers }; const Types = require('../../lib/types'); const optional = { optional: true }; const repeatable = { repeatable: true }; const nullableNumber = { type: Types.NameExpression, name: 'number', nullable: true...
Java
class ACLHelperMethod < ApplicationController access_control :helper => :foo? do allow :owner, :of => :foo end def allow @foo = Foo.first render inline: "<div><%= foo? ? 'OK' : 'AccessDenied' %></div>" end end
Java
<?php namespace App\Application\Controllers\Traits; trait HelpersTrait{ protected function checkIfArray($request){ return is_array($request) ? $request : [$request]; } protected function createLog($action , $status , $messages = ''){ $data = [ 'action' => $action, ...
Java
/* 1023 组个最小数 (20 分) */ #include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char *argv[]) { // 处理输入 int n = 10; int quantities[n]; for (int i = 0; i < n; i++) { if (scanf("%d", &quantities[i]) != 1) return EXIT_FAILURE; } // 组装数字 int nums[5...
Java
<html><body> <h4>Windows 10 x64 (19041.508)</h4><br> <h2>_XPF_MCE_FLAGS</h2> <font face="arial"> +0x000 MCG_CapabilityRW : Pos 0, 1 Bit<br> +0x000 MCG_GlobalControlRW : Pos 1, 1 Bit<br> +0x000 Reserved : Pos 2, 30 Bits<br> +0x000 AsULONG : Uint4B<br> </font></body></html>
Java
angular.module('Reader.services.options', []) .factory('options', function($rootScope, $q) { var controllerObj = {}; options.onChange(function (changes) { $rootScope.$apply(function () { for (var property in changes) { controllerObj[property] = changes[property].newValue; ...
Java
class UsersController < ApplicationController def index end def show @user = User.find(params[:id]) end def edit @user = User.find(params[:id]) end def update @user = User.find(params[:id]) if @user.update_attributes(user_params) @user.geocode else render 'edit' end end ...
Java
# blog [![Build Status](https://travis-ci.org/Lurk/blog.svg?branch=master)](https://travis-ci.org/Lurk/blog) Weekend project for self education ## backend configuration create config.local.js on ./server directory with ``` module.exports = { secret: 'some random text', port: 3000, greeting: 'blog ser...
Java
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="refresh" content="0;URL=../../openssl_sys/fn.SSL_CTX_set_read_ahead.html"> </head> <body> <p>Redirecting to <a href="../../openssl_sys/fn.SSL_CTX_set_read_ahead.html">../../openssl_sys/fn.SSL_CTX_set_read_ahead.html</a>...</p> <script>location.replac...
Java
# TriDIYBio Web site for TriDIYBio ## Workflow Setup: - `git clone https://github.com/Densaugeo/TriDIYBio.git` - `npm install` Making changes: - `git pull` - Make your changes and save files - `node gen.js` - `node test_server.js` - `git commit -am "Commit message"` - `npm run push`
Java
import Ember from 'ember'; import DS from 'ember-data'; import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin'; export default DS.RESTAdapter.extend(DataAdapterMixin, { authorizer: 'authorizer:dspace', initENVProperties: Ember.on('init', function() { let ENV = this.container.lookupFactory(...
Java
html { height: 100%; } body { background: #538eb8; /* For browsers that do not support gradients */ background: -webkit-linear-gradient(left top, #538eb8, #ffd044); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(bottom right, #538eb8, #ffd044); /* For Opera 11.1 to 12.0 */ background: -m...
Java
function alertThanks (post) { alert("Thanks for submitting a post!"); return post; } Telescope.callbacks.add("postSubmitClient", alertThanks);
Java
1. ping命令与ICMP 协议 ping」是用来探测本机与网络中另一主机之间是否可达的命令,如果两台主机之间ping不通,则表明这两台主机不能建立起连接。ping是定位网络通不通的一个重要手段。 ping 命令是基于 ICMP 协议来工作的,「 ICMP 」全称为 Internet 控制报文协议(Internet Control Message Protocol)。ping 命令会发送一份ICMP回显请求报文给目标主机,并等待目标主机返回ICMP回显应答。因为ICMP协议会要求目标主机在收到消息之后,必须返回ICMP应答消息给源主机,如果源主机在一定时间内收到了目标主机的应答,则表明两台主机之间网络是可达的。...
Java
"use strict"; var async = require('async'); var fs = require('fs'); var util = require('util'); var prompt = require('prompt'); var httpRequest = require('emsoap').subsystems.httpRequest; var common = require('./common'); var mms = require('./mms'); var mmscmd = require('./mmscmd'); var deploy = require('./deploy'); ...
Java
#!/usr/bin/env python # coding:utf-8 """ Database operation module. This module is independent with web module. """ import time, logging import db class Field(object): _count = 0 def __init__(self, **kw): self.name = kw.get('name', None) self.ddl = kw.get('ddl', '') self._default =...
Java
package cn.libery.calendar.MaterialCalendar; import android.content.Context; import java.util.Collection; import java.util.HashSet; import cn.libery.calendar.MaterialCalendar.spans.DotSpan; /** * Decorate several days with a dot */ public class EventDecorator implements DayViewDecorator { private int color...
Java
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; // import Layout from '../.....
Java
using System; using System.Collections.Generic; namespace HarmonyLib { /// <summary>Specifies the type of method</summary> /// public enum MethodType { /// <summary>This is a normal method</summary> Normal, /// <summary>This is a getter</summary> Getter, /// <summary>This is a setter</summary> Setter, ...
Java
<?php namespace MyApplication\Navigation\Navigation; interface NavigationControlFactory { /** * @return NavigationControl */ function create(); }
Java
import pytest from tests.base import Author, Post, Comment, Keyword, fake def make_author(): return Author( id=fake.random_int(), first_name=fake.first_name(), last_name=fake.last_name(), twitter=fake.domain_word(), ) def make_post(with_comments=True, with_author=True, with_...
Java
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="author" content="Aurelio De Rosa"> <title>Geolocation API Demo by Aurelio De Rosa</title> <style> * { -webkit-box-sizing...
Java
<!DOCTYPE html> <!--[if IEMobile 7 ]> <html class="no-js iem7"> <![endif]--> <!--[if (gt IEMobile 7)|!(IEMobile)]><!--> <html class="no-js"> <!--<![endif]--> <head> <meta charset="utf-8"> <title></title> <meta name="description" content=""> <meta name="HandheldFriendly" content="T...
Java
# Declaring a Function def recurPowerNew(base, exp): # Base case is when exp = 0 if exp <= 0: return 1 # Recursive Call elif exp % 2 == 0: return recurPowerNew(base*base, exp/2) return base * recurPowerNew(base, exp - 1)
Java
c rutina leemallab c lee el fichero de control de lineas y longitudes de onda:'mallaobs' c ntau : numero de puntos en tau c tau : log10(tau) c ntl : numero total de lineas c nlin : indice de cada linea y de cada blend c npas : numero de puntos en cada linea c dlamda:cada delta de l.d.o. en ma c nble :numero de blends...
Java
// flow-typed signature: 267f077135db8f8ca8e152b4b262406e // flow-typed version: <<STUB>>/react-redux_v^5.0.4/flow_v0.46.0 /** * This is an autogenerated libdef stub for: * * 'react-redux' * * Fill this stub out by replacing all the `any` types. * * Once filled out, we encourage you to share your work with th...
Java
import * as riot from 'riot' import { init, compile } from '../../helpers/' import TargetComponent from '../../../dist/tags/popup/su-popup.js' describe('su-popup', function () { let element, component let spyOnMouseover, spyOnMouseout init(riot) const mount = opts => { const option = Object.assign({ ...
Java
package app.components.semanticui import japgolly.scalajs.react import japgolly.scalajs.react.{Callback, Children} import japgolly.scalajs.react.vdom.VdomNode import scala.scalajs.js object Menu { val component = react.JsComponent[js.Object, Children.Varargs, Null](SemanticUiComponents.Menu) def apply()(childre...
Java
require "graph_engine/engine" module GraphEngine end
Java
import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { SharedModule, ExamplesRouterViewerComponent } from '../../../shared'; import { AppModule } from './app.module'; import { AppComponent } from './app.component'; @NgModule({ imports: [ SharedModule, AppModule, ...
Java
# docker images This repository includes docker container images
Java
const jwt = require('jsonwebtoken'); const User = require('../models/User'); // import { port, auth } from '../../config'; /** * The Auth Checker middleware function. */ module.exports = (req, res, next) => { if (!req.headers.authorization) { return res.status(401).end(); } // get the last part from a a...
Java
//10. Odd and Even Product //You are given n integers (given in a single line, separated by a space). //Write a program that checks whether the product of the odd elements is equal to the product of the even elements. //Elements are counted from 1 to n, so the first element is odd, the second is even, etc. using Syst...
Java
var Ringpop = require('ringpop'); var TChannel = require('TChannel'); var express = require('express'); var NodeCache = require('node-cache'); var cache = new NodeCache(); var host = '127.0.0.1'; // not recommended for production var httpPort = process.env.PORT || 8080; var port = httpPort - 5080; var bootstrapNodes =...
Java
Element.prototype.remove = function() { this.parentElement.removeChild(this); } const addIcon = (icon) => `<i class="fa fa-${icon}"></i>` const headerTxt = (type) => { switch (type) { case 'error': return `${addIcon('ban')} Error` case 'warning': return `${addIcon('excl...
Java
<!DOCTYPE html> <!-- Developed by Ruben Schulz - www.rubenschulz.nl --> <html> <head> <meta charset='utf-8'> <meta http-equiv='x-ua-compatible' content='ie=edge'> <meta name='viewport' content='width=device-width, initial-scale=1.0'> <meta name='apple-mobile-web-app-tit...
Java
<?php /* * This file is part of Rocketeer * * (c) Maxime Fabre <ehtnam6@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * */ namespace Rocketeer\Services\History; use Illuminate\Support\Collection; /** * Keeps a memor...
Java
<?php /** * Created by PhpStorm. * User: olivier * Date: 01/02/15 * Time: 00:58 */ namespace AppBundle\Entity; use Doctrine\ORM\EntityRepository; /** * BusinessServiceRepository */ class BusinessServiceRepository extends EntityRepository { public function findByRefList(array $refList) { $qb =...
Java
package br.com.k19.android.cap3; import android.app.Activity; import android.os.Bundle; public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.frame); } }
Java
--- title: HTTP 原理 date: 2017-12-31 categories: HTTP --- # TCP/IP 协议参考模型 ![TCP/IP 协议参考模型](/img/TCP-IP参考模型.png) TCP/IP是全世界的计算机和网络设备常用的层次化分组交换网络协议集,属于参考模型的传输层,用于过滤掉每个计算机的差异性,隐藏相关弱点,向应用程序提供“相同的”服务接口。 # HTTP 概念 http 是数据传输协议(超文本传输协议),用来沟通客户端和服务器,是一种 client-server 协议,它是承载于 TCP/IP 之上。通常是由像浏览器这样的接受方发起的,像浏览器这样的客户端发出的消息叫...
Java
import {WidgetConfig} from '../shared/widget-config'; import {WidgetService} from '../shared/widget.service'; export class Widget { title: string; updateInterval: number = 1000; widgetConfig: WidgetConfig; titleUrl: string; description: string; constructor(private widgetService: WidgetService) { } g...
Java