language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
Java
UTF-8
3,502
2.296875
2
[]
no_license
package er.jquerymobile.components; import com.webobjects.appserver.WOContext; import er.extensions.components.ERXNonSynchronizingComponent; import er.extensions.foundation.ERXStringUtilities; /** * data-icon : * * Left arrow - data-icon="arrow-l" * Right arrow - data-icon="arrow-r" * Up arrow - data-icon="arr...
Markdown
UTF-8
777
3.96875
4
[]
no_license
### Problem Description Fizz buzz is a group word game for children to teach them about division. Players take turns to count incrementally, replacing any number divisible by three with the word "fizz", and any number divisible by five with the word "buzz". Another point to be noted here is, if a number is divisible by...
SQL
UTF-8
2,922
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 05-12-2020 a las 17:06:13 -- Versión del servidor: 5.5.24-log -- Versión de PHP: 5.4.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
Java
UTF-8
424
1.71875
2
[]
no_license
package com.github.jw.service; import com.github.jw.service.impl.UserServiceHiHystric; import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; /** * Created by Jeffrey on 12/11/2017. */ @FeignClient(value = "user-server-center", fallback = UserServiceHi...
Markdown
UTF-8
6,495
3.53125
4
[]
no_license
#ST2334 Ch03 - Descriptive Statistics ## Categorical Variables ### Pie charts > * Area (and angle) of each slice of pie corresponds to the percentage for each outcome. > * Full pie represents 100% of the observations > * Bad way to display information because the eye is not good at judging relative areas. Better at ju...
C++
UTF-8
540
2.796875
3
[]
no_license
class Solution { public: vector<string> summaryRanges(vector<int>& nums) { vector<string> ans; for (int i = 0; i < nums.size(); ) { int j = 1; stringstream ss; ss << nums[i]; while (i + j < nums.size() && nums[i + j] - nums[i + j - 1] == 1) j++; if (j...
Shell
UTF-8
563
2.8125
3
[]
no_license
#!/bin/bash ICON="/opt/scripts/i3lock/icon.png" TMPBG="/tmp/screen.png" scrot "$TMPBG" TEXT="Digite a senha para desbloquear" # Cria a imagem com o efeito de blur convert "$TMPBG" -scale 10% -scale 1000% -fill black -colorize 75% "$TMPBG" >/dev/null 2>&1 # Coloca o ícone de chave no meio da imagem convert "$TMPBG" "$I...
Python
UTF-8
2,594
3.5625
4
[]
no_license
import numpy as np import pandas as pd import timeit def fibonacci_0(n): if n == 0: return [0] if n == 1: return [0, 1] fibs = [0, 1, 1] i = 2 while i <= (n - 1): fibs.append(fibs[-2] + fibs[-1]) i += 1 return fibs def fibonacci_1(n): if n == 0: re...
C
UTF-8
8,489
4.25
4
[]
no_license
/* * sort.c * Author: Mahmoud Elmohr * */ #include "sort.h" #include <stdbool.h> /* * Swap function used by sorting algorithms */ void swap(int* a, int* b){ int temp; temp = *a; *a = *b; *b= temp; } /* * Bubble Sort: * compare each two adjacent elements and swap if left is >...
Ruby
UTF-8
2,110
3.171875
3
[ "MIT" ]
permissive
require 'moneta' require 'bigdecimal' # # Given a line from an input file, parse and execute it, # delegating the details of the work to the Accound and Product # model objects. # # Errors are log to STDERR, with the offending line numbers from # the input file. File processing continues when errors are # encountered,...
Java
UTF-8
611
2.078125
2
[]
no_license
package com.quanta.async; /** * 针对quanta包的全局配置文件 * @author wangjiewen * */ public class QuantaConfig { /** * 每个应用放实体model的包名,必须设置,否则将会找不到路径 */ public final static String MODEL_PACKAGE = "com.gw.smstransmit.model"; /** * 全局sharepreference的名字, 建议根据自己的应用设置 */ public final static String SHARE_PREFERENCE...
Python
UTF-8
4,463
3.03125
3
[]
no_license
def df_zip(*args): """ >>> import pandas as pd >>> df = pd.DataFrame([[1,2,3], [4,5,6], [7,8,9], [10,11,12]], columns=('a', 'b', 'c')) >>> it = df_zip(df, df.iloc[1:]) >>> left, right = next(it) >>> list(left[['a', 'b', 'c']]) [1, 2, 3] >>> list(right[['a', 'b', 'c']]) [4, 5, 6] ...
Markdown
UTF-8
2,048
3.390625
3
[]
no_license
--- title: Normal Function Call vs changes setup: | tests: - name: Normal Function Call code: | var convertor = function(value){ var len = (value).toString().length; var _baseK = 1000; var _baseL = 100000; sw...
Python
UTF-8
1,980
2.71875
3
[ "Apache-2.0" ]
permissive
import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), "../../../")) from datetime import datetime import unittest import numpy as np import pandas as pd from karura.core.insights import DatetimeToCategoricalInsight from karura.core.dataframe_extension import DataFrameExtension, FType class Test...
Java
UTF-8
2,694
2.65625
3
[ "Apache-2.0" ]
permissive
package org.apache.lucene.store; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Versio...
PHP
UTF-8
4,056
2.65625
3
[]
no_license
<?php defined('SYSPATH') OR die('No direct script access'); /** * Le modèle ORM pour la jointure "subscription/membre" * * @package Guidoline * @category Model * @author Ziopod | ziopod@gmail.com * @copyright BY-SA 2013 Ziopod * @license http://creativecommons.org/licenses/by-sa/3.0/deed.fr */ class M...
Markdown
UTF-8
13,457
2.953125
3
[]
no_license
--- layout: post title: "Servo motor tester in NETMF (.NET Micro Framework) with Netduino" date: 2015-01-09 10:36:54 +0100 categories: author: "Laurent Ellerbach" thumbnails: "/assets/2015-01-09-thumb.jpg" --- I rencently bought new servo motor as I needed some to pilot new switches in [my Lego train]({% post_url 201...
Python
UTF-8
2,264
2.515625
3
[ "MIT" ]
permissive
import logging import abc class CSSParser(metaclass=abc.ABCMeta): def __init__(self, parser, logger_name): self._logger = logging.getLogger(logger_name) self._parser = parser self._url_token_list = list() self._import_token_list = list() @abc.abstractmethod def parse_token...
Java
UTF-8
647
2.921875
3
[]
no_license
package com.example.javaee.multithread.ch04; import java.util.Hashtable; /** * @author tgl * @data create in 9:19 2018/4/15 */ public class HashtableTest { public static void main(String[] args){ Hashtable<String, Integer> ha = new Hashtable<>(); ha.put("one", 1); ha.put("two", 2); ...
Markdown
UTF-8
3,098
3.03125
3
[]
no_license
--- layout: single author_profile: true classes: wide title: "Adventures with CoreOS - Part 2" date: 2014-08-19 categories: ['Home Lab'] tags: archived coreos --- In the previous article, I created three CoreOS VMs and got them to talk to each other using etcd. In this article, we'll be going over cloud-config/confi...
C
UTF-8
926
3.375
3
[]
no_license
#ifndef MEMORY_H_INCLUDED #define MEMORY_H_INCLUDED /* Memory array */ struct mem{ char* deb; //array start char* ptr; //current position char* end; //array end }; typedef struct mem Mem; /* Create new Mem structure and initialize all the bytes to 0 size : size of the memory return : Pointer on mem or N...
Java
UTF-8
2,065
2.9375
3
[]
no_license
package example2; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import java.util.ArrayList; import java.util.List; public class JobDAO { //New Job Save public void addJob(Job job) throws Exception{ } //job_id에 해당하는 job정보 삭제 public void removeJ...
PHP
UTF-8
1,047
2.5625
3
[]
no_license
<link rel="stylesheet" href="css/styleform.css"> <?php if(!empty($_POST)) { $log=$_POST['login']; { $pd=$_POST['password']; $req="SELECT * FROM autho WHERE login= \"".$log."\""; try { $pdo = new PDO('mysql:host=localhost;dbname=danousdatabase', 'root', ''); $stmt = $pdo->query($req); ...
PHP
UTF-8
1,987
2.578125
3
[]
no_license
<?php namespace App\Models; use App\Scopes\TenantModels; use Eloquent; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Carbon; /** * App\Models\Supplier * * @property int $id * @property string $company_name * @property string $fantasy_name * @property s...
JavaScript
UTF-8
1,718
3.1875
3
[]
no_license
const emailInputElem = document.querySelector('#email'); const passwordInputElem = document.querySelector('#password'); const emailErrorText = document.querySelector('.error-text_email'); const passwordErrorText = document.querySelector('.error-text_password'); const isRequired = value => { return value ? undefined...
Swift
UTF-8
1,834
2.5625
3
[]
no_license
// // TrendingMujiViewController.swift // Mext // // Created by Alex Lee on 03/08/2016. // Copyright © 2016 Alex Lee. All rights reserved. // import UIKit class TrendingMujiViewController: UIViewController { @IBOutlet weak var trendingTableView: UITableView! var trendingSoundClips: [SoundClip]?{ ...
Java
UTF-8
236
1.734375
2
[]
no_license
package com.silianchuangye.sumao.success.ShangYou.PlanDayMVP.model.SubmissionPlanModel; /** * Created by Administrator on 2016/9/12 0012. */ public interface SubmissionPlanCallback { void callbackSubmissionPlan(String reuslt); }
Ruby
UTF-8
548
3.28125
3
[ "Apache-2.0" ]
permissive
module Atbash def self.encode(plaintext) plaintext .scan(/[[:alnum:]]/) .map(&method(:encode_letter)) .each_slice(GROUP_SIZE) .map { |slice| slice.join('') } .join(' ') end def self.encode_letter(letter) ENCODED_LETTERS[PLAINTEXT_LETTERS.index(letter.downcase)] end priv...
Python
UTF-8
3,383
2.78125
3
[]
no_license
import unittest import solver_funcs class TestSolver(unittest.TestCase): def test_col_1(self): puzzel = [[1,1,1,1,1],[2,2,2,2,2],[3,3,3,3,3],[4,4,4,4,4],[5,5,1,5,5]] self.assertEqual(solver_funcs.check_columns_valid(puzzel), False) def test_col_2(self): puzzel = [[1,1,1,1,1],[2,2,2,2,2],[3,3,...
Java
UTF-8
1,529
2.296875
2
[]
no_license
package com.crashreport.handler; import android.app.IntentService; import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.util.Log; import com.crashreport.database.DBConstant; public class CrashPostIntentS...
Markdown
UTF-8
2,999
3.25
3
[ "MIT" ]
permissive
# 06 Server-Side APIs: Weather Dashboard Developers are often tasked with retrieving data from another application's API and using it in the context of their own. Third-party APIs allow developers to access their data and functionality by making requests with specific parameters to a URL. Your challenge is to build a ...
JavaScript
UTF-8
6,919
2.859375
3
[ "Apache-2.0" ]
permissive
/** * Multi-tap and predictive text system emulator * * @author Nick Pershin <nikolaiperschin doggi mail punkt ru> * @copyright Copyright (c) 2010 Nick Pershin */ // 'const' is a Mozilla-specific extension, it is not supported by IE, // but has been partially supported by Opera since version 9.0 and Safari cons...
Python
UTF-8
1,720
2.734375
3
[]
no_license
import os import requests from requests import Response def exporter( guid: str, file_type: str = "PDF", width: int = 2000, height: int = 2000, personal_api_key: str = None, new_relic_region: str = "US", ) -> Response: """ New Relic Dashboard exporter. :param new_relic_region: You...
Python
UTF-8
1,196
4.15625
4
[]
no_license
# Интроспекция - механизм позволяющий анализировать данные об объектах class Shape: pass class Circle(Shape): def __init__(self, radius): self.radius = radius circle = Circle(10) print(issubclass(Circle, Shape)) # True issubclass - является ли Circle наследником Shape print(isinstance(circle, Circle)) # Tru...
Python
UTF-8
2,776
2.703125
3
[]
no_license
import pytest import pandas as pd import pandas.testing as pdt from .. import process as prc @pytest.fixture def categories(): """Category set to use for testing.""" return {"cat0": ["item0"]} @pytest.fixture def credit_bundle(): """Raw credit card dataframe.""" data = { "Transaction Date": ...
Java
UTF-8
218
2.53125
3
[ "Unlicense" ]
permissive
package pattern.structural.decorator; /** * Interface principal, que permite definir componentes concretos y * decorators */ public interface DataSource { void writeData(String data); String readData(); }
Markdown
UTF-8
1,237
2.515625
3
[]
no_license
# moshi lenient * 解析JSON 结构数据,容忍一些常见的不规范的格式。 * 允许:{} <- [] / "",[] <- "", Integer <- "", Float <- "" ## 实现方案(两种方案) 1. 通过分析JsonDataException的message格式进行分别处理 * 优点:代码少(只有一个类),只一个类,使用方便 * 缺点:如果JsonDataException的message内容有变动,需要调整相关的逻辑 2. 根据不同的数据类型自定义对应的JsonAdapter(主要参考源码中对应类型的内置JsonAdapter) * 优点:使用方便 * 缺点:代码多(添加的...
JavaScript
UTF-8
855
2.546875
3
[ "Apache-2.0" ]
permissive
var gui = (function(){ 'use strict'; var height = 200; var graph_container = d3.select('#graph-bars').append('svg').append('g').attr('height', height); function addBarChart() { graph_container.selectAll('rect') .data(d3.range(50).map(function(d){ return rando(height / 2) + 4...
C#
UTF-8
1,565
2.71875
3
[ "MIT" ]
permissive
using SQLite; using SQLiteNetExtensions.Attributes; namespace master_piece.domain { /** * Нечеткая переменная в базе данных */ public class FuzzyVariable { /// <summary> /// ID сущности /// </summary> [PrimaryKey, AutoIncrement] public int id { get; set; ...
Shell
UTF-8
208
3.375
3
[]
no_license
#!/bin/bash echo read -p "$1? " -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then [[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 # handle exits from shell or function but don't exit interactive shell fi
JavaScript
UTF-8
1,010
2.765625
3
[]
no_license
class SlingShot{ constructor(bodyA, pointB){ var options = { bodyA: bodyA, pointB: pointB, stiffness: 0.04, length: 10 } this.pointB = pointB this.sling = Constraint.create(options); World.add(world, this.sling); this.sl...
Java
UTF-8
727
1.804688
2
[]
no_license
package gov.usgs.wim.wdnr.Validation; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; import javax.validation.Constraint; @Target(TYPE) ...
Python
UTF-8
2,408
2.8125
3
[]
no_license
#!/usr/bin/env python # coding: utf-8 # Set Up import pandas as pd import numpy as np import wget import sh import simplejson as json # Download the data wget.download("http://deepyeti.ucsd.edu/jianmo/amazon/categoryFiles/Musical_Instruments.json.gz") wget.download("http://deepyeti.ucsd.edu/jianmo/amazon/metaFiles/...
C++
UTF-8
1,993
2.921875
3
[]
no_license
#include "Arduino.h" //**************************************************************************** // ARDUINO SKETCH //**************************************************************************** #include "SoftwareServo.h" #define STEP 90/6 unsigned long previousMillis = 0; unsigned lon...
Java
UTF-8
2,137
2.234375
2
[]
no_license
package edu.ycp.cs481.servlets; import java.io.IOException; import java.sql.SQLException; import java.util.ArrayList; import javax.servlet.ServletException; import javax.servlet.annotation.MultipartConfig; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.H...
Java
UTF-8
417
1.828125
2
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package capa_datos; public class LIstaDocente { public static TListaDin objetos = new TListaDin(); public static void ad...
C#
ISO-8859-1
2,574
2.796875
3
[]
no_license
using UnityEngine; using System.Collections; /// <summary> /// Manager do jogo /// </summary> public class GameManager : MonoBehaviour { public GameObject player; private GameObject currentPlayer; private GameCamera cam; private Vector3 checkpoint; public static int levelCount = 2; public static ...
Markdown
UTF-8
1,922
2.859375
3
[]
no_license
# Twitter Consumer Projeto desenvolvido em .netCore 3.0 para consumir posts do Twitter e gravar no banco de dados mongodb, de acordo com as hashtags: #openbanking, #apifirst, #devops, cloudfirst, #microservices, #apigateway, #oauth, #swagger, #raml, #openapis ## Inicialização Clonar o repositório TwitterConsumer par...
C++
UTF-8
4,431
3.25
3
[ "MIT" ]
permissive
#pragma once #include "Path.h" #include <algorithm> #include "workloads/WorkloadPool.h" namespace Simulation { /** * \brief Holds a Path, Scheduler, and WorkloadPool together to form a single unit that can be simulated. */ class Experiment { public: /** * \brief Instantiates a new, complete, experiment th...
C++
UTF-8
667
2.640625
3
[]
no_license
/* Workshop 8 at_home: Virtual Functions File: SavingsAccount.h Name: Leny Fe Fernandez email : lffernandez@myseneca.ca Student#: 120818174 Course and Section : OOP244SII Date: 2018-04-02 */ #ifndef SICT_SAVINGSACCOUNT_H__ #define SICT_SAVINGSACCOUNT_H__ #include "Account.h" namespace sict { cl...
Java
UTF-8
3,556
2.734375
3
[ "Apache-2.0" ]
permissive
package primitive; import org.apache.zookeeper.*; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.stream.IntStream; /** * @author admin * @title: TimedTask * @projectName zookeeper * @description: TODO * @date 2019/9/1813:38 */ public class TimedTask { pr...
Shell
UTF-8
2,151
3.453125
3
[]
no_license
#!/bin/bash # Install DNS Server # http://www.krizna.com/ubuntu/configure-dns-server-ubuntu-14-04/ if [ "$(id -u)" != "0" ]; then echo "This script must be run as root" 1>&2 exit 1 fi sudo apt-get update sudo apt-get install bind9 domain="krisna.com." local_ip="10.0.2.15" last_number_local_ip="15" reverse_local_ip...
Python
UTF-8
873
3.34375
3
[ "MIT" ]
permissive
#This demo code demonstrates how to write to a GPIO import sys import serial if (len(sys.argv) < 4): print "Usage: gpiowrite.py <PORT> <GPIONUM> <COMMAND> \nEg: gpiowrite.py COM1 0 set" sys.exit(0) else: portName = sys.argv[1]; gpioNum = sys.argv[2]; command = sys.argv[3]; #Open port for communication serPort...
Markdown
UTF-8
494
2.5625
3
[]
no_license
# Article 5 Sont affranchis de l'impôt sur le revenu : 1° (Disposition périmée) ; 2° (Abrogé) ; 2° bis (Abrogé) ; 3° Les ambassadeurs et agents diplomatiques, les consuls et agents consulaires de nationalité étrangère, mais seulement dans la mesure où les pays qu'ils représentent concèdent des avantages analog...
C++
UTF-8
8,158
3.359375
3
[]
no_license
#include<iostream> using namespace std; #include<cmath> #define m 3 //矩阵的行数 #define n 3 //矩阵的列数 //高斯消去法--返回一个数组--故要用一个指针------double matrix[][n]==double (*matrix)[n] double *gauss(double matrix[][n],double *b,double x[])//double x[] ==double *x 不改变值如下 void cit(const int b[],int n) { //遍历矩阵的每一列 for (int j = ...
Java
UTF-8
473
1.820313
2
[]
no_license
package com.test.Proj.vo; import lombok.Data; /** * 게시글 정보 VO */ @Data public class BoardVO { private int boardnum; //글번호 private String id; //작성자ID private String title; //제목 private String contents; //내용 private String inputdate; //작성일, private int hits; //조회수 private Strin...
JavaScript
UTF-8
1,580
2.828125
3
[]
no_license
const fs = require('fs'); const Database = require('./db.js'); const Storage = require('./storage.js'); class File { static readFs(callback, sounds) { const newCommands = []; fs.readdir('./sounds', {}, (err, files) => { const commands = new Map(); files.forEach((element) => { const cmd = element.split('...
Java
UTF-8
1,076
3.03125
3
[]
no_license
import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.text.DateFormat; import java.util.Date; //from ww w.j a v a 2s. c om import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.Timer; public class Main { ...
C++
UTF-8
5,424
3.109375
3
[]
no_license
//============================================================================ // Name : queue.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <io...
PHP
UTF-8
1,568
3.1875
3
[ "MIT" ]
permissive
<?php namespace mh\Common; class Random { /** * Generate the new password * * @access public * @param array $params * @return string **/ public static function generate($params = array()) { $length = (!array_key_exists('length', $params)) ? 15 : $params['length']; $use_lower = (!a...
Python
UTF-8
3,184
2.84375
3
[ "MIT" ]
permissive
#coding:utf8 #从voc中间读出来所有的词 #分成单字词、2-3字词、4字词、5字以上词4个集合 import sys import random import gensim import numpy as np import matplotlib.pyplot as plt import seaborn as sns reload(sys) sys.setdefaultencoding('utf-8') voc_file = open('../../data/wiki_phrase2/wiki_voc') voc_list = list(voc_file) uniSet = set() biTriSet =...
Java
UTF-8
584
2.296875
2
[]
no_license
package finloop.com.test.interfaces; import androidx.annotation.NonNull; import androidx.annotation.Nullable; public interface Login { interface view { void showError(@NonNull String error);// display a toast with a error } interface presenter { void showError(@NonNull String error);// d...
JavaScript
UTF-8
1,371
3.015625
3
[]
no_license
var keyVideo; var backgroundImage; var w = $(window).width(); var h = $(window).height(); var backW = $(window).width(); var hFactor = 0.5625; var backH = backW*hFactor; function setup() { createCanvas(w,h); frameRate(30); imageMode(CENTER); keyVideo = createVideo('action-01.mp4'); keyVideo.hide(); keyVideo.l...
SQL
UTF-8
306
3.78125
4
[]
no_license
select t.tuid, t.superior_id, t.show_name as show_name, h.tuid as headline_id from t_faq t left join t_faq_headline h on t.tuid = h.faq_id where t.faq_type = '0' and t.tenantry_id = ${def:tenantry} and (t.is_delete = '0' or t.is_delete is null or t.is_delete = '') order by t.superior_id asc
JavaScript
UTF-8
253
3.546875
4
[]
no_license
function allSubStrings(input) { let result = []; for (let i = 0; i < input.length; i++) { for (let j = i + 1; j < input.length + 1; j++) { let newString = input.slice(i, j); result.push(newString); } } console.log(result); }
Java
UTF-8
2,066
2.5
2
[ "MIT" ]
permissive
package org.jlw.test.db; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; public interface DatabaseDialectInitializer { String DEFAULT_STRING_TABLE = "CREATE TABLE STRING_TABLE (TEST_ID CHAR(26) NOT NULL, VALUE_COLUMN INT NOT NULL, CONSTRAINT str_pk PRIMARY KEY (TEST_ID))"; Stri...
PHP
UTF-8
2,324
2.71875
3
[ "MIT" ]
permissive
<?php namespace App\Ratings; use App\HTTPResponse; use App\TranslateableMessage; use Delight\Cookie\Cookie; class SetCookieRating extends Rating { public function __construct(HTTPResponse $response) { $this->name = 'SET_COOKIE'; $this->scoreType = 'hidden'; parent::__construct($respo...
Python
UTF-8
661
3.28125
3
[ "MIT" ]
permissive
#die #throws a die from microbit import * import random display.scroll('A Die', wait = True) def getDiceImage(num): num2images = { 1: '00000:00000:00900:00000:00000', 2: '00000:09000:00000:00090:00000', 3: '90000:00000:00900:00000:00009', 4: '00000:09090:00000:09090:00000', ...
C
UTF-8
980
2.546875
3
[ "MIT" ]
permissive
// Copyright 2018 jem@seethis.link // Licensed under the MIT license (http://opensource.org/licenses/MIT) #include "core/error.h" #include <string.h> XRAM uint8_t g_error_code_table[SIZE_ERROR_CODE_TABLE]; static XRAM uint8_t s_has_critical_error; void init_error_system(void) { memset(g_error_code_table, 0, SI...
Java
UTF-8
1,122
2.484375
2
[]
no_license
package StepDef; import java.util.List; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import cucumber.api.DataTable; import cucumber.api.java.en.Given; import cucumber.api.java.en.Then; import cucumber.api.java.en.When; public class Stepdeff { WebDriver driver=null; @...
JavaScript
UTF-8
1,106
3.96875
4
[ "Apache-2.0" ]
permissive
/** * 这个函数用来解析来自 URL 的查询串中的 name=value 参数对 * 它将 name=value 对存储在一个对象的属性中,并返回该对象 * 这样来使用它 * * var args = urlArgs() // 从 URL 中解析参数 * var q = args.q || "" // 如果参数定义了的话就使用参数;否则使用一个参数默认值 * var n = args.n ? parseInt(args.n) : 10 */ function urlArgs() { var args = {} // 定义一个空对象 var query = location.se...
Java
UTF-8
600
2.328125
2
[]
no_license
package br.com.yoda.model; public abstract class TemplateProdutoDesconto extends Produto implements Desconto { public TemplateProdutoDesconto(Double preco, TipoPagamento tipoPagamento) { super(preco, tipoPagamento); } public void aplicaDesconto() { if (pagamentoAVista()) { if (deveUsarMaiorODesconto()) ...
Python
UTF-8
801
3.078125
3
[]
no_license
""" Tokyo skytree """ from numpy import sin,cos,tan,pi import ephem xx,yy = [],[] ll =[] sky = ephem.Observer() sky.lon, sky.lat = '139.8106','35.71004' RAD=pi/180. Earth=6378137.0 # (m) H=634.0 # (m) sky.date='2015/12/06 7:00' #JST 16:00 PM sun=ephem.Sun() lon=float(sky.lon) lat=float(sky.lat) pri...
C#
UTF-8
1,151
3.34375
3
[ "MIT" ]
permissive
using System; using System.Runtime.CompilerServices; namespace Solve.BCLExtensions.Booleans { public static class BooleanExt { /// <summary> /// Converts a <see cref="String"/> to <see cref="Boolean"/> or throws an /// </summary> /// <exception cref="ArgumentNullExce...
Markdown
UTF-8
2,497
3.671875
4
[]
no_license
```metadata tags: c, memory, volatile ``` ## basic: volatile In C and C++, the volatile keyword simply indicates that you must always read the variable from memory and write to memory. The variable should not be cached. It may be changed at any time that's why it is **volatile**. ### why volatile ### cache CPUs ha...
Python
UTF-8
1,614
2.578125
3
[]
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import time import threading from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler datatool = None class TestHTTPHandler(BaseHTTPRequestHandler): def do_GET(self): # print self.path # print self.client_address global dat...
C++
UTF-8
347
2.8125
3
[]
no_license
#pragma once #include <iostream> #include <conio.h> #include <cmath> // sqrt using namespace std; class Point { public : Point(const int& _x = 0, const int& _y = 0); ~Point(); Point operator + (const Point& obj); float operator - (const Point& obj); Point& operator = (const Point& obj); void print(void); pri...
Python
UTF-8
1,211
3
3
[]
no_license
# In accordance with ACI Sec. 10.6, #crack width is controlled by limiting #the spacing of tension reinforcement #to a value given by ACI Eq. 10-4, where fs is in units of kips/in2. print "\n serviceability requirements of conc beam - control of width of crack \n" size = raw_input(" The size of stirrup = ...
Java
UTF-8
6,705
2.375
2
[]
no_license
package Servlets.Accounts; import Tools.DBConnection; import Tools.Images; import Tools.PathFinder; import Tools.SQLtools; import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.servlet.ServletFileUpload; import users.User; imp...
Java
UTF-8
554
1.703125
2
[]
no_license
package c.e.a.a.j.d; import android.util.SparseArray; import c.e.a.a.o.F; /* compiled from: TimestampAdjusterProvider */ public final class r { /* renamed from: a reason: collision with root package name */ public final SparseArray<F> f8850a = new SparseArray<>(); public F a(int i2) { F f2 = th...
JavaScript
UTF-8
516
4.03125
4
[]
no_license
var todos = ["Buy a turtle"]; var stop = false; while (stop === false){ var input = prompt("What would you like to do?"); if(input === "list"){ todos.forEach(function(task, i){ //first argument is the value of each index, the second argument is the index console.log(task); }); } else if (input === "new"...
C#
UTF-8
8,786
2.53125
3
[ "MIT" ]
permissive
// Copyright (c) Aloïs DENIEL. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. namespace Microcharts { using System.Linq; using SkiaSharp; /// <summary> /// ![chart](../images/Line.png) /// /// Line chart. /// </summary> ...
Markdown
UTF-8
4,582
2.609375
3
[]
no_license
###### Project: openjms ###### Class: CS5340 (Software Maintenance) ###### Name: Kathryn Hines #### INTRO This is a legacy code project for the purpose of software maintenance and testing. openjms was an open source messaging service, according to the project website, listed below in the artifacts section. See Word...
Java
UTF-8
198
1.554688
2
[]
no_license
package com.sinosoft.trans.service; public interface IAccountAgeAnalyse { public String ageAnalyse(String accBookType,String accBookCode,String branchCode,String yearMonth,String analyseDate); }
Java
UTF-8
862
2.109375
2
[ "MIT" ]
permissive
package org.openforis.collect.relational; import java.util.List; import org.junit.Test; import org.openforis.collect.relational.model.DataTable; import org.openforis.collect.relational.model.RelationalSchema; import org.openforis.collect.relational.model.RelationalSchemaGenerator; import org.openforis.collect...
Java
UTF-8
1,438
2.609375
3
[]
no_license
package ck; import java.sql.*; public class ck { static final String strDBDriver = "com.mysql.jdbc.Driver"; static final String strDBUrl = "jdbc:mysql://localhost/enterprise?useUnicode=true&characterEncoding=UTF-8"; static final String USER = "root"; static final String PASS = "123"; private Connection conn = ...
Swift
UTF-8
2,998
2.6875
3
[]
no_license
// // BuyViewController.swift // Astrology // // Created by Rishabh Wadhwa on 24/11/15. // Copyright © 2015 Sunpac Solutions. All rights reserved. // import UIKit class BuyViewController: UIViewController, UIScrollViewDelegate { @IBOutlet weak var scrollView: UIScrollView! @IBOutlet weak var pageControl:...
C#
UTF-8
1,081
2.578125
3
[]
no_license
using Microsoft.AspNetCore.Components; namespace GGNet.Components { public partial class YLabel<T, TX, TY> : ComponentBase where TX : struct where TY : struct { [CascadingParameter] public Panel<T, TX, TY> Panel{ get; set; } protected bool visibility = false; p...
JavaScript
UTF-8
3,629
3.375
3
[]
no_license
const HashMap = require('./HashMap') function main() { const lotr = new HashMap() lotr.MAX_LOAD_RATIO = .5 lotr.MAX_SIZE_RATIO = 3 // lotr.set('Hobbit', 'Bilbo') lotr.set('Hobbit', 'Frodo') lotr.set('Wizard', 'Gandolf') lotr.set('Human', 'Aragorn') // lotr.set('Elf', 'Legolas') //...
Python
UTF-8
1,776
4.15625
4
[]
no_license
#! /usr/bin/env python """ Problem Given a sorted array arr[] of N integers and a number K is given. The task is to check if the element K is present in the array or not. Input First line of input contains number of test cases T. For each testcase, first line of input contains number of elements in t...
Markdown
UTF-8
3,747
2.828125
3
[ "MIT" ]
permissive
--- author: Arun Manivannan date: '2007-04-14 01:46:33' layout: post comments: true slug: live-free-or-die status: publish title: Live free or Die. wordpress_id: '211' ? '' : - linux - live free - migrating from windows - Uncategorized --- It really pains when people tell me that Linux Operating System isn't use...
C++
UTF-8
4,237
3.03125
3
[]
no_license
#include <stdio.h> #include <GL/glew.h> #include <GL/freeglut.h> #include "math_3d.h" /* Este é o nosso primeiro encontro com o GLEW, a OpenGL Extension Wrangler Library. O GLEW ajuda você a lidar com a dor de cabeça que pode acompanhar o gerenciamento de extensões no OpenGL. Uma vez inicializado, ele consulta tod...
Markdown
UTF-8
7,011
2.796875
3
[]
no_license
# 利用 Docker 编译 Heron (Compiling With Docker) 您可能需要本地环境中编译不同平台的 Heron 可执行文件。Heron 提供了相关脚本文件,满足您利用 Docker 编译不同平台可执行文件的需求。 目前,仅支持编译 Ubuntu 14.04、Ubuntu 15.10 和 CentOS7 平台。如果您需要新的平台,您可以根据[编写新平台的 `Dockerfile` 小节](#编写新平台的-dockerfile-contributing-new-environments)的指引添加新文件。 ## 前置编译条件 (Requirements) * [Docker](https://docs....
Java
UTF-8
6,747
2.671875
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package thebluetoothbrush; import java.awt.Color; import java.awt.Dimension; import java.awt.GridLayout; import java.awt.event.ActionE...
Java
UTF-8
3,130
2.0625
2
[]
no_license
package pikahayang.pikahayang.Model; public class CartItemsModel { String id_cart, id_produk, id_users, nama_produk, kode_produk, jenis_batik, jenis_kelamin, quantity, harga, image, size, stock, berat, subtotal; public CartItemsModel(String id_cart, String id_produk, String id_users, String nama_produk, ...
Markdown
UTF-8
1,031
2.84375
3
[ "MIT" ]
permissive
# HBaaS Server This is a fun demo API for saying happy birthday to people for the purposes of demonstrating server containerisation and deployment. ## Software Stack This project uses the [Go programming language](https://go.dev/) for rapid prototype development and easy containerisation. For the RESTful API, we a...
Python
UTF-8
1,026
2.609375
3
[]
no_license
#!/usr/bin/env python """reddman -- the Reddit<->Mailman bridge Usage: reddman.py message (--file=<path> | -) reddman.py replies reddman.py -h | --help | --version Options: message read a message (from file or STDIN) and post it to reddit replies scan for replies in reddit and post them to ...
PHP
UTF-8
3,576
2.53125
3
[ "MIT" ]
permissive
<?php namespace Helium\EventDispatcher\Test; use Helium\EventDispatcher\EventDispatcher; use Helium\EventDispatcher\StoppableEventTrait; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\EventDispatcher\ListenerProviderInterface; use Psr\EventDispatcher\StoppableEventInterface; cla...
Java
UTF-8
2,457
2.3125
2
[]
no_license
package com.godared.controlbus.controller; import java.util.List; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PathVariable; impo...
C++
UTF-8
2,892
2.53125
3
[]
no_license
#include"voisinage.h" #include"reseau_cellule_etats.h" #include<cmath> #include<iostream> void RegleVoisinageNeumann::calculVoisinage(Voisinage& v, const Reseau& r) const { v.voisinage = std::vector<Cellule*>(); int cellX = static_cast<int>(v.celluleCentre->abs); int cellY = static_cast<int>(v.celluleCentre->ord); ...