code
stringlengths
4
1.01M
language
stringclasses
2 values
 #### প্রারম্ভিকা Go আসলে বেশি পরিচিত golang নামেই। এটি ২০০৭ সালে Google -এ ডেভেলপ করা হয়েছিল রবার্ট গ্রিজমার, রব পাইক এবং কেইন থম্পসন এর দ্বারা। ২০০৯ সালের দিকে এই ল্যাঙ্গুয়েজটি প্রকাশ করা হয়। ইতোমধ্যে এটি Google এর বেশ কিছু প্রোডাকশন সিস্টেমে ব্যবহৃত হচ্ছে। - বিষয় : Go Language সম্পর্কে জানা - গবেষণা ক্ষেত্র ...
Java
import cx from 'clsx' import PropTypes from 'prop-types' import React from 'react' import { customPropTypes, getElementType, getUnhandledProps, useKeyOnly } from '../../lib' /** * A placeholder can contain an image. */ function PlaceholderImage(props) { const { className, square, rectangular } = props const cla...
Java
(function (angular) { "use strict"; var appFooter = angular.module('myApp.footer', []); appFooter.controller("footerCtrl", ['$scope', function ($scope) { }]); myApp.directive("siteFooter",function(){ return { restrict: 'A', templateUrl:'app/componen...
Java
xss-test ========
Java
# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/do...
Java
<?php namespace App\Http\Controllers\API\V2; use App\Beacon; use App\Http\Requests\BeaconRequest; use Illuminate\Http\Request; class BeaconController extends Controller { /** * Return a list of items. * * @param Request $request * * @return json */ public function index(Request ...
Java
#!/bin/sh usage() { cat <<EOF USAGE: \${DOTFILES}/shell/csh/launcher.sh <function> [arg ...] FUNCTION: exit <return_code> EOF } # Print usage if not specify the function that need to run. if [ $# -eq 0 ]; then usage exit 1 fi # The function name is the first argument. func_name=${1} # Remove the first...
Java
/* -*- C++ -*- */ // $Id: ntsvc.h 80826 2008-03-04 14:51:23Z wotte $ // ============================================================================ // // = LIBRARY // examples/NT_Service // // = FILENAME // ntsvc.h // // = DESCRIPTION // This is the definition of the sample NT Service class. This example ...
Java
import {IDetailsService} from '../services/details.service'; class DetailsController implements ng.IComponentController { private detailsService: IDetailsService; private detailsData: any; private previousState: any; constructor($stateParams: any, detailsService: IDetailsService) { console.log...
Java
package main import ( "bufio" "fmt" "os" "os/exec" "strings" "sync" ) func checkError(err error, prefix string) { if err != nil { panic(fmt.Sprintf("%s %s", prefix, err.Error())) } } func cleanFeedbackLine(s string) (out string) { out = s out = strings.TrimSpace(out) out = strings.Replace(out, "\r", "",...
Java
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Header &lt;boost/icl/iterator.hpp&gt;</title> <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="../../...
Java
<html> <head> <title>Progmia | Game | Level Selection</title> <link href="<?php echo base_url(); ?>assets/css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/css/levels.css"> <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>asse...
Java
--[[checkboxData = { type = "checkbox", name = "My Checkbox", tooltip = "Checkbox's tooltip text.", getFunc = function() return db.var end, setFunc = function(value) db.var = value doStuff() end, width = "full", --or "half" (optional) disabled = function() return db.someBooleanSetting end, --or boolean (optional...
Java
import base64 try: from functools import wraps except ImportError: from django.utils.functional import wraps # Python 2.3, 2.4 fallback. from django import http, template from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth import authenticate, login from djang...
Java
// BEGIN CUT HERE // END CUT HERE #include <sstream> #include <cstdio> #include <cstdlib> #include <iostream> #include <cstring> #include <algorithm> #include <cmath> #include <vector> #include <map> #include <string> #include <set> #include <algorithm> using namespace std; const int V = 64; const int E = V * V * 2;...
Java
<?php /** * wCMF - wemove Content Management Framework * Copyright (C) 2005-2020 wemove digital solutions GmbH * * Licensed under the terms of the MIT License. * * See the LICENSE file distributed with this work for * additional information. */ namespace wcmf\lib\core; /** * A session that requires clients to...
Java
happy_photo_data ================
Java
export default function formatList(xs, { ifEmpty = 'нет', joint = ', ' } = {}) { return (!xs || xs.length === 0) ? ifEmpty : xs.join(joint) }
Java
<?php namespace Tests\Builders; class SaveCardBuilder extends AbstractModelBuilder { public function __construct() { $this->attributeValues = array( 'yourConsumerReference' => '12345', 'cardNumber' => '4976000000003436', 'expiryDate' => '12/20'...
Java
// $Author: benine $ // $Date$ // $Log$ // Contains the mismatch class for afin #ifndef MISMATCH_H #define MISMATCH_H //////////////////////////////////////////////\ // Mismatch Class: ////////////////////////////> ////////////////////////////////////////////// // // Mismatch object, contains all classes, methods, da...
Java
<?php /* * 注意:此文件由itpl_engine编译型模板引擎编译生成。 * 如果您的模板要进行修改,请修改 templates/default/shop/map.html * 如果您的模型要进行修改,请修改 models/shop/map.php * * 修改完成之后需要您进入后台重新编译,才会重新生成。 * 如果您开启了debug模式运行,那么您可以省去上面这一步,但是debug模式每次都会判断程序是否更新,debug模式只适合开发调试。 * 如果您正式运行此程序时,请切换到service模式运行! * * 如您有问题请到官方论坛()提问,谢谢您的支持。 */ ?><?php...
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>fairisle: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.cs...
Java
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <!-- ZeepIt --> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>ZeepIt</title> <meta http-equiv="Content...
Java
package com.example; import java.util.Set; import javax.servlet.ServletContainerInitializer; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.ServletRegistration; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; import org.springfra...
Java
import React from 'react'; const EditHero = props => { if (props.selectedHero) { return ( <div> <div className="editfields"> <div> <label>id: </label> {props.addingHero ? <input type="number" name="id" ...
Java
#ifndef SE_SCANNNER_H #define SE_SCANNNER_H #include <stdio.h> #include <stdlib.h> #include <string> #include "read.h" #include "fusion.h" #include "match.h" #include <cstdlib> #include <condition_variable> #include <mutex> #include <thread> #include "fusionmapper.h" using namespace std; struct ReadPack { Read*...
Java
/** * Module dependencies. */ var express = require('express') var MemoryStore = express.session.MemoryStore var mongoStore = require('connect-mongo')(express) var path = require('path') var fs = require('fs') var _ = require('underscore') var mongoose = require('mongoose') var passport = require('passport') var http...
Java
#guimporter.py import sys from PySide import QtGui, QtCore, QtWebKit Signal = QtCore.Signal
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: AssemblyTitle("Sea...
Java
'use strict'; var redis = require('redis') , xtend = require('xtend') , hyperquest = require('hyperquest') ; module.exports = FetchAndCache; /** * Creates a fetchncache instance. * * #### redis opts * * - **opts.redis.host** *{number=}* host at which redis is listening, defaults to `127.0.0.1`...
Java
package org.blendee.jdbc; /** * プレースホルダを持つ SQL 文と、プレースホルダにセットする値を持つものを表すインターフェイスです。 * @author 千葉 哲嗣 */ public interface ComposedSQL extends ChainPreparedStatementComplementer { /** * このインスタンスが持つ SQL 文を返します。 * @return SQL 文 */ String sql(); /** * {@link PreparedStatementComplementer} を入れ替えた新しい {@link Co...
Java
# basic-data-structure basic data strcture in python from THU Data Structure 3rd Edition, including: * Vector (Chapter 2) * LinkedList (Chapter 3) * Stack based on Vector and LinkedList (Chapter 4) * Queue based on Vector and LinkedList (Chapter 4) * Deque based on Vector and LinkedList (Chapter 4) * BinTree bas...
Java
<TS language="es_419" version="2.1"> <context> <name>AddressBookPage</name> <message> <source>Right-click to edit address or label</source> <translation>Haga clic para editar la dirección o etiqueta</translation> </message> <message> <source>Create a new address</source> ...
Java
package com.github.sixro.minihabits.core.infrastructure.domain; import java.util.*; import com.badlogic.gdx.Preferences; import com.github.sixro.minihabits.core.domain.*; public class PreferencesBasedRepository implements Repository { private final Preferences prefs; public PreferencesBasedRepository...
Java
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); let _ = require('lodash'); let async = require('async'); const pip_services3_commons_node_1 = require("pip-services3-commons-node"); const pip_services3_facade_node_1 = require("pip-services3-facade-node"); class RolesOperationsV1 extends pip_...
Java
local core = require ("core") local function echo (prefix, channel, suffix) core:respond (channel, "My life meaning: Marry Ratbot!") end core:addCommand ("meaning", echo)
Java
require_relative 'rules_factory_common' FactoryBot.define do factory :priority_bills, parent: :answers do factory :S6_H1_missed_payment_low, traits: [:country, :S6_H1_missed_payment_low_answers] factory :S6_H2_council_tax_severe, traits: [:country, :S6_H2_tax_severe_answers] factory :S6_H2_domestic_rat...
Java
var config = require('../lib/config')(); var Changeset = require('./Changeset'); var queries = require('./queries'); var helpers = require('../helpers'); require('../validators'); var validate = require('validate.js'); var errors = require('../errors'); var pgPromise = helpers.pgPromise; var promisifyQuery = helpers.pr...
Java
# Nancy.Rest.Client Dynamic proxy client generation for [Nancy](http://nancyfx.org) using [Nancy.Rest.Module](https://github.com/maxpiva/Nancy.Rest.Module). ## Prerequisites A server using [Nancy](http://nancyfx.org) & [Nancy.Rest.Module](https://github.com/maxpiva/Nancy.Rest.Module). It is recommended you read the...
Java
Setlocal EnableDelayedExpansion @rem BUILD SOLUTIONS C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild META\make.msbuild /t:All /m /nodeReuse:false || exit /b !ERRORLEVEL! C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild tonka\make.msbuild /t:All /m /nodeReuse:false || exit /b !ERRORLEVEL! @rem RUN TON...
Java
//--------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Windows.Automation.Peers; using System.Windows.Media; using System.W...
Java
// John Meyer // CSE 271 F // Dr. Angel Bravo import java.util.Scanner; import java.io.*; /** * Copies a file with line numbers prefixed to every line */ public class Lab2InputOutput { public static void main(String[] args) throws Exception { // Define variables Scanner keyboardReader = new Scan...
Java
/* ' Copyright (c) 2013 Christoc.com Software Solutions ' All rights reserved. ' ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED ' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ' THE AUTHORS...
Java
module ClassifyCluster VERSION = "0.4.17" end
Java
set Path=%PATH%;"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\" makecert -r -pe -n "CN=ChangeDynamix LLC" -sr localmachine -a sha1 -cy authority -sky signature -sv changedynamix.ca.pvk changedynamix.ca.cer makecert -pe -n CN="WinPCAP NDIS 6.x Filter Driver" -a sha1 -sky signature -eku 1.3.6.1.5.5.7.3.3 -ic ...
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 (1.8.0_91) on Mon Jun 20 22:26:50 PDT 2016 --> <title>Rational</title> <meta name="date" content="2016-06-20"> <link rel="stylesheet" type="text/css" ...
Java
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"/><!-- using block title in layout.dt--><!-- using block ddox.defs in ddox.layout.dt--><!-- using block ddox.title in ddox.layout.dt--> <title>Method Adapter.renderContext</title> <link rel="stylesheet" type="text/css" href="../../../styles/ddox.css"/> <link ...
Java
// Copyright 2013 The Changkong Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package dmt const VersionNo = "20131207" /* 图片分类 */ type PictureCategory struct { Created string `json:"created"` Modified str...
Java
'use strict'; const assert = require('assert'); const HttpResponse = require('./http-response'); describe('HttpResponse', () => { const mockResponse = { version: '1.0', status: '200 OK' }; it('should create an instance', () => { const httpResponse = new HttpResponse(mockResponse); assert.ok(htt...
Java
"use strict"; let datafire = require('datafire'); let openapi = require('./openapi.json'); module.exports = datafire.Integration.fromOpenAPI(openapi, "azure_sql_failoverdatabases");
Java
--- layout: sidebar-right title: 'Meet the Author: Rose Tremain' date: 2016-08-16 author: brandon-king category: meet-the-author excerpt: Brandon King interviews Whitbread winner Rose Tremain. breadcrumb: meet-the-author --- ![Rose Tremain](/images/featured/featured-rose-tremain.jpg) Rose Tremain was one of only five ...
Java
--- layout: post title: "Visão da Verdade" date: 2018-01-01 source: Módulo Básico 209, Módulo Básico Edição Revisada 219. tags: [nenhum, bardo] --- **arcana 6, divina 5 (adivinhação)** **Alcance**: toque **Teste de Resistência**: nenhum. **Duração**: 10 minutos **Alvo**: criatura tocada **Tempo de Execução**: ...
Java
<!DOCTYPE html> <head> <title>Terrible Treats - Cookie Recipe</title> <link rel="stylesheet" type="text/css" href="styling.css"> </head> <body> <div id="header"> <p id="title">Terrible Treats</p> <p id="subTitle">Desserts For Your Worst Enemies</p> </div> <div id="navCon" class="flex-container"> <d...
Java
package generated.zcsclient.mail; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for messagePartHitInfo complex type. * * <p>The following schema fragme...
Java
#!/bin/bash -ex cd "$(dirname "$0")" docker run --rm \ -v "$PWD/.:/work" \ -w "/work" \ ruby:2.5 bash -ec " gem install -N parse_a_changelog parse ./CHANGELOG.md "
Java
<!DOCTYPE html> <html> <head> <title></title> <meta name="description" content="" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> <script type="text/javascript" src="../../../core/uni.js"></script> <script t...
Java
<template name="loading"> <div class="ui active inline loader"></div> </template>
Java
require File.expand_path('../boot', __FILE__) # Pick the frameworks you want: require "active_model/railtie" require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "action_view/railtie" require "sprockets/railtie" # require "rails/test_unit/railtie" # Require the g...
Java
/* * Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved. * * 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 ri...
Java
'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:2.0.50727.1433 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. ' </auto-generated> '------------...
Java
#include "stdafx.h" #include "Renderer.h" #include "RenderMethod_PhongPoint_CG.h" RenderMethod_PhongPoint_CG::RenderMethod_PhongPoint_CG(class Renderer *r) { ASSERT(r, "Null pointer: r"); renderer = r; useCG = true; } bool RenderMethod_PhongPoint_CG::isSupported() const { return areShadersAvailable(); ...
Java
#ifndef _SYSAPPDB_SYSAPPDBHELPER_H_ #define _SYSAPPDB_SYSAPPDBHELPER_H_ #include <vector> #include <map> #include <string> #include "sqlite3.h" std::vector<std::string> read_text_file(std::string path); std::vector<std::string> split_str(std::string src, char c); std::string join_str(std::vector<std::string> strings,...
Java
class AddOriginalMd5ChecksumToVideos < ActiveRecord::Migration def change add_column :videos, :original_md5_checksum, :string, :limit => 40 end end
Java
function SendMessage(a_Player, a_Message) a_Player:SendMessageInfo(a_Message) end function SendMessageSuccess(a_Player, a_Message) a_Player:SendMessageSuccess(a_Message) end function SendMessageFailure(a_Player, a_Message) a_Player:SendMessageFailure(a_Message) end --- Kicks a player by name, with the specified r...
Java
import ReactIdSwiper from './ReactIdSwiper'; // Types export { ReactIdSwiperProps, ReactIdSwiperRenderProps, SelectableElement, SwiperInstance, WrappedElementType, ReactIdSwiperChildren, SwiperModuleName, SwiperRefNode } from './types'; // React-id-swiper export default ReactIdSwiper;
Java
# -*- coding: utf-8 -*- # @Author: karthik # @Date: 2016-12-10 21:40:07 # @Last Modified by: chandan # @Last Modified time: 2016-12-11 12:55:27 from models.portfolio import Portfolio from models.company import Company from models.position import Position import tenjin from tenjin.helpers import * import wikipedia...
Java
using System; using System.Collections.Generic; using System.Html; namespace wwtlib { public class PlotTile : Tile { bool topDown = true; protected PositionTexture[] bounds; protected bool backslash = false; List<PositionTexture> vertexList = null; List<Triangle>[] chi...
Java
<?php /** * This file is part of the browscap-json-cache package. * * (c) Thomas Mueller <mimmi20@live.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types = 1); namespace Browscap\Cache; use BrowscapPHP\Cache...
Java
(function () { "use strict"; require('futures/forEachAsync'); var fs = require('fs'), crypto = require('crypto'), path = require('path'), exec = require('child_process').exec, mime = require('mime'), FileStat = require('filestat'), dbaccess = require('../dbaccess'), utils = require('../utils'), has...
Java
#!/usr/bin/python from typing import List, Optional """ 16. 3Sum Closest https://leetcode.com/problems/3sum-closest/ """ def bsearch(nums, left, right, res, i, j, target): while left <= right: middle = (left + right) // 2 candidate = nums[i] + nums[j] + nums[middle] if res is None or ab...
Java
package bits; /** * Created by krzysztofkaczor on 3/10/15. */ public class ExclusiveOrOperator implements BinaryOperator { @Override public BitArray combine(BitArray operand1, BitArray operand2) { if(operand1.size() != operand2.size()) { throw new IllegalArgumentException("ExclusiveOrOper...
Java
--- layout: post title: "Using the right terms: Method?" date: 2015-08-05 12:00:00 comments: true tags: [components, programming, components programming, componentsprogramming, stepanov, knuth, stroustrup, generic, genericprogramming, generic programming, genericity, concepts, math, mathematics, elements, eop, contr...
Java
/*"use strict"; var expect = require("expect.js"), ShellController = require("../lib/shell-controller"), testView = require("./test-shell-view"); describe("ShellController", function() { var ctrl; it("is defined", function() { expect(ShellController).to.be.an("function"); }); describe("constructor", functi...
Java
var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); // Database var mongo = require('mongodb'); var monk = require('monk'); var db = monk('localhost:270...
Java
# Smallest Integer # I worked on this challenge [by myself, with: ]. # smallest_integer is a method that takes an array of integers as its input # and returns the smallest integer in the array # # +list_of_nums+ is an array of integers # smallest_integer(list_of_nums) should return the smallest integer in +list_of_nu...
Java
FactoryGirl.define do factory :user do provider 'trello' uid 'trello-special-uid' full_name 'Dennis Martinez' nickname 'dennmart' oauth_token 'trello-token' trait :admin do admin true end end end
Java
<!DOCTYPE html> <html lang="en" ng-app="bookmarkApp"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Bookmark</title> <link type="text/css" href="app/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link typ...
Java
from multiprocessing import Pool import os, time, random def long_time_task(name): print 'Run task %s (%s)...' % (name, os.getpid()) start = time.time() time.sleep(random.random() * 3) end = time.time() print 'Task %s runs %0.2f seconds.' % (name, (end - start)) if __name__ == '__main__': p...
Java
package net.comfreeze.lib; import android.app.AlarmManager; import android.app.Application; import android.app.NotificationManager; import android.content.ComponentName; import android.content.Context; import android.content.SharedPreferences; import android.content.pm.PackageInfo; import android.content.pm.PackageMan...
Java
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "WFBTLEServiceProcessor.h" @class NSData, WFNordicDFUControlPointCh, WFNordicDFUPacketCh; @interface WFBTLENordicDFUService : WFBTLEServiceProcessor { id <WFNordicDFUD...
Java
/** * @author yomboprime https://github.com/yomboprime * * GPUComputationRenderer, based on SimulationRenderer by zz85 * * The GPUComputationRenderer uses the concept of variables. These variables are RGBA float textures that hold 4 floats * for each compute element (texel) * * Each variable has a fragment shad...
Java
package com.example.mesh; import java.util.HashMap; import java.util.Map; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; @Path("/") @Cons...
Java
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <pthread.h> #include <errno.h> #include "semaphore.h" typedef struct lock { Semaphore *sem; } Lock; Lock *make_lock () { Lock *lock = (Lock *) malloc (sizeof(Lock)); lock->sem = make_semaphore(1); return lock; } void l...
Java
<section id="main"> <a href="./#/mocks"><- Back to mocks list</a> <nav id="secondary" class="main-nav"> <div class="mock-picture"> <div class="avatar"> <img ng-show="mock" src="img/mocks/{{mock.Mock.mockId}}.png" /> <img ng-show="mock" src="img/flags/{{mock.Mock.nationality}}.png" /><br/> ...
Java
/*jshint node:true*/ /*global test, suite, setup, teardown*/ 'use strict'; var assert = require('assert'); var tika = require('../'); suite('document tests', function() { test('detect txt content-type', function(done) { tika.type('test/data/file.txt', function(err, contentType) { assert.ifError(err); assert...
Java
--- title: Workshop Title layout: workshop --- # Introduction to REDCap -------- --------- Please have a REDCap account if you want to follow along. - **REDCap**: [login here](https://edc.camhx.ca/redcap/) --------- ***Demographics Form*** - Record ID - Date of assessment - Initials - DOB ...
Java
<html> <head> <title>im a title</title> <META http-equiv='x-ua-compatible' content="IE=edge,chrome=1" /> <script> junk </script> </head> <body>im some body text</body> </html>
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>React Webpack Boilerplate</title> </head> <body> <div id="root"></div> <script src="/bundle.js"></script> </body> </html>
Java
<?php namespace Screeenly\Screenshot; /** * Interface description. * * @author Stefan Zweifel */ interface ClientInterface { /** * Method description. * * @author Stefan Zweifel * * @param type $parameter * * @return type */ public function build(); public fu...
Java
// cpu/test/unique-strings.cpp -*-C++-*- // ---------------------------------------------------------------------------- // Copyright (C) 2015 Dietmar Kuehl http://www.dietmar-kuehl.de // // Permissi...
Java
#!/usr/bin/env bash PIDFILE="$HOME/.brianbondy_nodejs.pid" if [ -e "${PIDFILE}" ] && (ps -u $USER -f | grep "[ ]$(cat ${PIDFILE})[ ]"); then echo "Already running." exit 99 fi PATH=/home/tweetpig/webapps/brianbondy_node/bin:$PATH LD_LIBRARY_PATH=/home/tweetpig/lib/libgif NODE_ENV=production PORT=32757 /home/twee...
Java
/* * Encog(tm) Core v3.1 - Java Version * http://www.heatonresearch.com/encog/ * http://code.google.com/p/encog-java/ * Copyright 2008-2012 Heaton Research, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obt...
Java
# Strict Mode To enable strict mode, simply pass in `strict: true` when creating a Vuex store: ```js const store = createStore({ // ... strict: true }) ``` In strict mode, whenever Vuex state is mutated outside of mutation handlers, an error will be thrown. This ensures that all state mutations can be explicitly...
Java
/** * React Static Boilerplate * https://github.com/koistya/react-static-boilerplate * Copyright (c) Konstantin Tarkus (@koistya) | MIT license */ import './index.scss' import React, { Component } from 'react' // import { Grid, Col, Row } from 'react-bootstrap'; export default class IndexPage extends Component { ...
Java
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
Java
package controllers; import java.lang.reflect.InvocationTargetException; import java.util.List; import java.util.Date; import models.Usuario; import play.Play; import play.mvc.*; import play.data.validation.*; import play.libs.*; import play.utils.*; public class Secure extends Controller { @Before(unless={"log...
Java
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import os import re import subprocess import sys from datetime import date import click import yaml from...
Java
from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse from paste.models import Paste, Language @csrf_exempt def add(request): print "jojo" if request.method == 'POST': language = request.POST['language'] content = r...
Java
module Ahoy module Stores class ActiveRecordStore < BaseStore def track_visit(options, &block) visit = visit_model.new do |v| v.id = ahoy.visit_id v.visitor_id = ahoy.visitor_id v.user = user if v.respond_to?(:user=) end set_visit_pro...
Java
import {extend} from 'lodash'; export default class User { /** * The User class * @class * @param {Object} user * @return {Object} A User */ constructor(user) { extend(this, user); console.log(this); } }
Java