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
279
3.3125
3
[]
no_license
public class TestSwitch{ public static void main(String args[]){ int i = 18; switch(i){ case(8): System.out.println("8"); case(10): System.out.println("10"); default: System.out.println("error"); } } }
Markdown
UTF-8
1,229
2.84375
3
[]
no_license
# Deploy apps on AKS - goazure Meetup ## Assignment-1: Prepare Image In this assignment you have to prepare image. You can also create your own image ### 1.1 Login to Azure Run following steps ```sh az login --service-principal --username 255a5fbe-7b77-4b6a-ac18-f3fdb780d84a --password "goazuremeetup@123" --tenant...
Markdown
UTF-8
1,358
2.5625
3
[]
no_license
### Project: [Ripple](../projects/ripple.md) ### Date: 28 September 2017 ## Summary Ripple's Team announced opening of a new office in Singapore. This decision was taken due to positive fintech and investent climate in Singapore that in future can be the world’s leading fintech and innovation hub. It is also one of ...
Python
UTF-8
1,777
3.140625
3
[]
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- import csv import numpy as np from matplotlib import pyplot as plt from sklearn.preprocessing import StandardScaler from sklearn.decomposition import PCA from sklearn.cluster import KMeans CLUSTER_NUM = 5 UNIVERSITY_DATA_FILE = 'data/university_data.csv' def main(): ...
PHP
UTF-8
242
2.578125
3
[]
no_license
<?php /** * Created by PhpStorm. * User: Ishchishin * Date: 28.11.2016 * Time: 0:57 * Выведите столбец чисел от 1 до 100 */ $i=1; while ($i<=100){ echo "<pre>"; echo $i; echo "</pre>"; $i++; } ?>
C++
UTF-8
1,918
3.515625
4
[]
no_license
/* UVa problem: 558 * * Topic: Graph Algorithms * * Level: easy * * Brief problem description: * Given a graph with n nodes(from 1 to n-1), and m edges. Each edge has a weight. * The weight of edge could be negative. Start from node 0, find whether we can * reach a negative cycle from node 0. * * Solut...
Markdown
UTF-8
1,336
2.96875
3
[]
no_license
# ByM Pronóstico de Billetes y Monedas (ByM) en Circulación On this repository I am trying to forecast the circulation ammount of banknotes and coins (Billetes y Monedas en Circulación). This time series is very important for the country economy, the economists suggest the cash demmand is determinyin by three principa...
Markdown
UTF-8
306
2.5625
3
[]
no_license
--- title: port group: SSH settings brief: The SSH port number to connect to. Optional. --- The SSH port number to connect to. Optional. # config/deploy.rb set :domain, 'flipstack.me' set :port, 30000 # This will invoke SSH sessions with: # $ ssh flipstack_www@flipstack.me -p 30000
C#
UTF-8
1,674
2.640625
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace TRAN_EVENT { public partial class Form1 : Form { public Form1() { ...
Java
UTF-8
860
2.8125
3
[]
no_license
package com.mechwreck.wireless; import com.badlogic.gdx.math.Vector2; /** * Message sent to initialize the game. */ public class InitializeMessage { private Vector2[] planetPositions; private Vector2[] mechPositions; /** * Creates a new Initialize message. */ public InitializeMessage() { } /** * C...
Shell
UTF-8
283
3.4375
3
[]
no_license
#!/bin/sh # xpager.sh - ファイル名が指定されなかった場合にファイル選択ダイアログを # 表示 if [ -z "$1" ]; then fname=`Xdialog --stdout --fselect ./ 25 60` || exit 1 else fname="$1" fi Xdialog --no-cancel --textbox "$fname" 25 80
Python
UTF-8
2,582
3.96875
4
[]
no_license
# chapter1 # 00.文字列の逆順 string0="stressed" print("A0:{}".format(string0[::-1])) # 01.「パタトクカシーー」 string1="パタトクカシーー" print("A1:{}".format((string1[1::2]))) # 02.「パトカー」+「タクシー」=「パタトクカシーー」 string2_1="パトカー" string2_2="タクシー" print("A2:{}".format("".join([(sub1+sub2) for sub1,sub2 in zip(string2_1,string2_2)]))) # 03.円周率 st...
Markdown
UTF-8
2,929
2.875
3
[ "Apache-2.0" ]
permissive
Crowdsale The crowdsale version of the smart token controller, allows contributing ether in exchange for Bancor tokens The price remains fixed for the entire duration of the crowdsale Note that 20% of the contributions are the BNT token's ETH reserve balance # Functions: - [`constructor(contract ISmartToken _token...
C++
UTF-8
1,109
2.8125
3
[]
no_license
#include <iostream> #include <cstdio> using namespace std; int times[100005], people_num; long long ow[3], nw[3]; int of[3], nf[3]; int max_in_3(int a, int b, int c) { if (a >= b && a >= c) { return a; } if (b >= c) { return b; } return c; } int min_index_in_3(int a, int b, int c) { if (a <= b &...
Python
UTF-8
1,838
3.34375
3
[]
no_license
from bs4 import BeautifulSoup from urllib.request import urlopen from icecream import ic ''' 지원하는 Parser 종류 "html.parser" : 빠르지만 유연하지 않기 때문에 단순한 HTML문서에 사용합니다. "lxml" : 매우 빠르고 유연합니다. "xml" : XML 파일에만 사용합니다. "html5lib" : 복잡한 구조의 HTML에 대해서 사용합니다. ''' class BugsMusic(object): def __init__(self, url): self.ur...
Java
UTF-8
8,414
1.546875
2
[ "Apache-2.0", "LicenseRef-scancode-gutenberg-2020", "CC0-1.0", "BSD-3-Clause" ]
permissive
/* * 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, Version 2.0 * (the "License"); you may ...
Swift
UTF-8
2,766
3.03125
3
[]
no_license
/////////////////////////////////////////////////////////////////////////////// /// @file VisiteurSelectionnable.swift /// @author Mikael Ferland et Pierre To /// @date 2017-10-10 /// @version 0.1 /// /// @addtogroup log3900 LOG3900 /// @{ /////////////////////////////////////////////////////////////////////////////// ...
Markdown
UTF-8
2,282
3.484375
3
[]
no_license
Where, in a react (or ES6) source code, can access variables that were imported from node_modules. It seams that it is not everywhere of this file. Check these codes. ```javascript import moment from 'moment' const foo = () => { var now = moment(); // will get a moment object of current time } ``` ```javascript...
Python
UTF-8
1,574
2.859375
3
[ "MIT" ]
permissive
# Namespace-specific rules for e.g. object name conversions from exceptions import ObjectError def Dataset_format_software_version(value): return value def Block_to_internal_name(name_str): return name_str def Block_to_real_name(name): return name def Block_to_full_name(dataset_name, block_real_name): ...
Java
UTF-8
488
3.3125
3
[]
no_license
package com.syntax.class24; public abstract class Vehicle { public void drive() { System.out.println("Vehicle drives"); } void stop() { System.out.println("Vehicle stops"); } abstract void start(); abstract void speed(); } abstract class Araba extends Vehicle{//multi level void speed() { System.out.pr...
Markdown
UTF-8
14,591
2.734375
3
[ "MIT" ]
permissive
--- title: Отладка JavaScript программы в браузере. Инструменты Разработчика description: В рамках браузеров есть Инструменты Разработчика, которые предоставляют набор инструментов для отладки программы. order: 3 --- В ходе разработки JavaScript программы большое значение имеет умение её отлаживать, так как в процессе...
Java
UTF-8
1,746
3.21875
3
[]
no_license
package com.leetcode.strringpro; /** * @author zlCalma * @date 2019/1/1 17:46. */ public class MinimumWindowSubstring76 { public String minWindow(String s, String t) { if(s==null || s.length()==0 || t==null || t.length()==0){ return ""; } char[] target = t.toCharArray(); ...
Python
UTF-8
1,268
2.9375
3
[]
no_license
import numpy as np import sys # Uses python3 def evalt(a, b, op): if op == '+': return a + b elif op == '-': return a - b elif op == '*': return a * b else: assert False def get_maximum_value(dataset): def MinAndMax(i, j): myMin = sys.maxsize myMax ...
Rust
UTF-8
1,262
2.71875
3
[]
no_license
use structopt::StructOpt; mod generator; use generator::Generator; use iso_10303::express::parser; use std::process::Command; #[derive(StructOpt, Debug)] struct Args { schema: std::path::PathBuf, dotfile: std::path::PathBuf, root: Option<String>, } fn main() -> std::io::Result<()> { let args = Args::...
Java
UTF-8
927
3.125
3
[]
no_license
package leetcode; /* * it's the same idea of I. but while recursion, do right child first. * other wise will have some case cause error. eg: 21307912#10##88####7### */ import leetcodeLib.TreeLinkNode; public class PopulatingNextRightPointersInEachNodeII { public void connect(TreeLinkNode root) { ...
Java
UTF-8
2,808
2.390625
2
[ "Apache-2.0" ]
permissive
package com.aldaviva.twitter_birthday.twitter.auth; import com.aldaviva.twitter_birthday.common.exceptions.TwitterException; import com.aldaviva.twitter_birthday.config.TwitterConfig; import com.aldaviva.twitter_birthday.twitter.data.TwitterConstants; import com.aldaviva.twitter_birthday.twitter.data.TwitterSession; i...
Swift
UTF-8
3,781
2.546875
3
[ "Apache-2.0", "MIT" ]
permissive
// // URLSessionDelegate.swift // ThunderRequest // // Created by Simon Mitchell on 12/12/2018. // Copyright © 2018 threesidedcube. All rights reserved. // import Foundation protocol SessionDelegate { //MARK: - Download Delegate - func urlSession(_ session: URLSession, downloadTask: URLSessionDo...
C++
UTF-8
648
4.0625
4
[]
no_license
// A Program to check whether a number is divisible by 7 #include<iostream> using namespace std; int isDivisibleBy7( int num ) { // If number is negative, make it positive if( num < 0 ) return isDivisibleBy7( -num ); // Base cases if( num == 0 || num == 7 ) return 1; if( num < 10 ...
Markdown
UTF-8
5,088
3.4375
3
[]
no_license
# Links allow you to move from one web page to another ,by using the &lt;a> element. Users can click on anything between the opening &lt;a> tag and the closing &lt;/a> tag. You specify which page you want to link to using the href attribute. like &lt;a href="https://www.google.com"> google &lt;/a> Clear link text ...
TypeScript
UTF-8
488
2.59375
3
[]
no_license
import ast from "../../../Ast"; import { Scope } from "../../../Interpreter/scope"; import { LuaScript } from "../../../Interpreter/script"; import { visitExpression } from "../visitExpression"; import { isFalsy } from "./isFalsy"; export function visitConditionalStatement( script: LuaScript, scope: Scope, node: as...
Java
UTF-8
149
1.851563
2
[]
no_license
/** * */ package individuals; /** * Individual direction class * * @author Oguzhan SEZGIN * */ public enum Direction { UP, DOWN, RIGHT, LEFT; }
SQL
UTF-8
670
3.0625
3
[]
no_license
USE zipvilla; CREATE TABLE IF NOT EXISTS users ( id int(11) NOT NULL AUTO_INCREMENT, username varchar(50) NOT NULL, password varchar(50) NOT NULL, firstname varchar(50) NOT NULL, lastname varchar(50) NOT NULL, email varchar(50) NOT NULL, salt varchar(50) NOT NULL, role varchar(50) NOT NULL, date_modif...
C++
UTF-8
2,182
3
3
[]
no_license
#include<iostream> #include<cmath> #include<vector> #include<fstream> #include"GridFunction.h" double f(double x); //Boundary condition double g(double t); //Lower initial condition double h(double t); //Upper initial condition double u(double x, double t, double a); //analytic solution of PDE const double PI = 2 * a...
Go
UTF-8
3,658
2.5625
3
[]
no_license
package benchs import ( "fmt" "strconv" "github.com/jmoiron/sqlx" _ "github.com/lib/pq" ) var sqlxdb *sqlx.DB func init() { st := NewSuite("sqlx") st.InitF = func() { st.AddBenchmark("Insert", 2000*ORM_MULTI, SqlxInsert) st.AddBenchmark("MultiInsert 100 row", 500*ORM_MULTI, SqlxInsertMulti) st.AddBenchm...
TypeScript
UTF-8
2,311
3.109375
3
[ "Apache-2.0" ]
permissive
import { getUrlQueryParams } from './index'; export interface IUrlCoordinates { latitude: number; longitude: number; zoom: number; } export const toUrlCoordinateNumber = (value: string): number => Number(parseFloat(value).toFixed(7)); export const isValidCoordinate = (value: number, limit: number): boolean =...
Shell
UTF-8
344
2.9375
3
[]
no_license
#! /bin/bash APP_NAME="JProxy" installPath="/usr/local/jproxy" echo "Uninstalling $APP_NAME..." cd "$installPath/wrapper/bin/" if [ -f $installPath/wrapper/bin/cloudGateway.sh ];then bash $installPath/wrapper/bin/cloudGateway.sh remove else echo "$APP_NAME already stopped." fi rm -rf $installPath echo "Unins...
Java
UTF-8
804
4.28125
4
[]
no_license
package java0904; public class ForTest { public static void main(String[] arg) { //Hello Java를 3번 출력 - for 이용 //for(처음수행되는식; false가 나오면 반복문을 중단하는 식; 두번째부터 수행되는 ){반복할 내용} //while은 반복조건을 하나씩 세로로 작성하지만, for는 가로로 하나의 행에 작성 for(int i=0; i<3; i = i + 1){System.out.printf("Hello Java \n");} //1부터 10까지의 짝수 합계 - ...
Markdown
UTF-8
6,305
3.296875
3
[]
no_license
# rendezvous_with_unifromly_moving_point Assume you have the initial positions and velocities ``xA0, vA0`` and ``xB0, vB0`` of spaceships A and B respectively. B moves with no acceleration and with constant velocity ``vB0``. Therefore, it travels uniformly along a straight line. Its motion is described as: ``xB = xB0 ...
Java
UTF-8
10,079
1.53125
2
[ "MIT" ]
permissive
package com.rho; import java.io.InputStream; import com.rho.RhoEmptyLogger; import com.rho.RhoLogger; import com.xruby.runtime.lang.*; import com.xruby.runtime.builtin.*; import java.io.IOException; import com.rho.db.DBAdapter; import com.rho.sync.SyncThread; import com.rho.net.AsyncHttp; import com.rho.Properties; ...
Markdown
UTF-8
1,625
2.875
3
[]
no_license
# RestfulNode This repositary is an effort to create an easy to use production ready framework for node.js using it as a RESTFUL API. ### Technologies:- 1) ExpressJs --- Used to create the scaffold for the Framework. See http://wwww.expressjs.com for full documentation 2) PassportJs --- Used to create the Authenticat...
Java
UTF-8
743
1.84375
2
[]
no_license
package org.sample12; import org.openqa.selenium.Alert; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; public class Alertsq3 { public static void main(String[] args) { System.setProperty("webdriver.chrome.d...
TypeScript
UTF-8
231
2.6875
3
[]
no_license
class Gigasecond { private dateObject: Date constructor(date: Date) { this.dateObject = date } date(): Date { return new Date(this.dateObject.valueOf() + (Math.pow(10,9) * 1000)) } } export default Gigasecond
Java
UTF-8
1,144
1.84375
2
[]
no_license
package cn.itcast.core.service.goods; import cn.itcast.core.entity.PageResult; import cn.itcast.core.pojo.good.Goods; import cn.itcast.core.vo.GoodsVo; public interface GoodsService { /** * 录入商品 * @param goodsVo */ public void add(GoodsVo goodsVo); /** * 查询当前商家下的商品列表 * @param pa...
Java
UTF-8
810
2.21875
2
[]
no_license
package com.alfian.latihanspring.models.entity; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import lombok.Data; import lomb...
JavaScript
UTF-8
3,930
3.625
4
[]
no_license
'use strict'; const assert = require('assert'); const readline = require('readline'); const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); function rockPaperScissors(hand1, hand2) { // Write code here // function should take in two inputs and then compare them to see which...
Swift
UTF-8
525
3.5625
4
[]
no_license
import UIKit func anagram(str1: String, str2: String) -> Bool { str1.lowercased().replacingOccurrences(of: " ", with: "") str2.lowercased().replacingOccurrences(of: " ", with: "") print(str1.count, str2.count) if str1.count != str2.count{ return false } let sorted1 = Array(str1).sort...
Markdown
UTF-8
2,913
3.53125
4
[]
no_license
# API Requirements The company stakeholders want to create an online storefront to showcase their great product ideas. Users need to be able to browse an index of all products, see the specifics of a single product, and add products to an order that they can view in a cart page. You have been tasked with building the A...
Rust
UTF-8
7,324
2.8125
3
[ "MIT" ]
permissive
use std::fmt; use std::io; use std::result; use ring::{aead, digest, hkdf, hmac}; use ring::rand::{SecureRandom, SystemRandom}; static CIPHER: &'static aead::Algorithm = &aead::AES_256_GCM; static DIGEST: &'static digest::Algorithm = &digest::SHA256; pub type Result<T> = result::Result<T, Error>; #[derive(Clone, Co...
TypeScript
UTF-8
1,552
2.96875
3
[ "MIT" ]
permissive
/** * V4 UUID Generator * * Adapted from @orbi/utils: * * --------------------------------------------------------------------------------------------------------- * Fast UUID generator, RFC4122 version 4 compliant. * * @author Jeff Ward (jcward.com). * @license MIT license * @link http://stackoverflow.com/qu...
Python
UTF-8
2,988
4.15625
4
[]
no_license
# matrix manipulations def Display(A,c): print("Matrix",c) for i in A: print(*i) def Addition(A, B): print("Addition :: ") Add = [] for i in range(r1): a = [] for j in range(c1): a.append(A[i][j] + B[i][j]) Add.append(a) for r in Add: print(*r) def...
Python
UTF-8
378
2.578125
3
[]
no_license
l = list(map(int,input().rstrip())) dp = [0]*(len(l)+1) dp[0] = 1 dp[1] = 1 for idx in range(2,len(l)+1): if l[idx-1]: dp[idx] += dp[idx-1] if l[idx-2] and l[idx-2]*10 + l[idx-1] <= 34: dp[idx] += dp[idx-2] print(dp[-1]) ''' 반례 조심 항상 OJ의 예제말고도 케이스 분류해서 생각해보기 ㅜ 0 조심 3012 -> 2 30 -> 1 123456 -> 5...
Go
UTF-8
805
2.8125
3
[]
no_license
package database import ( "database/sql" "encoding/json" "fmt" "io/ioutil" "log" "os" ) type DBConfig struct { Host string `json:"host"` Database string `json:"db"` User string `json:"user"` Password string `json:"pass"` } var DbConn *sql.DB func SetupDatabase() { var err error var db DBConfig ...
Python
UTF-8
895
4.46875
4
[]
no_license
# types of operators in python # 1. arithmetic -> +, -, *, /, %, **, // # 2. assignment # 3. comparison # 4. logical -> and, or, not # 5. membership => they are used to check if a sequence is present in an object -> in => returns true if a sequence with the specified value is present in the object, not in => vice-...
Markdown
UTF-8
3,156
2.984375
3
[]
no_license
# 获取openid,unionid [https://www.jianshu.com/p/d2faa62967cd](https://www.jianshu.com/p/d2faa62967cd) ## 方法一(前端获取) 注意:虽然前端能拿到openid,但是发布上线的时候会无法过审,因为出于安全考虑,前端代码不允许暴露小程序appId和app secret(秘钥),所以此种方法不可取。 1. 登录凭证校验,通过 wx.login() 接口获得临时登录凭证 code 后传到开发者服务器调用此接口完成登录流程。更多使用方法详见 小程序登录。 2. 接着访问 https://api.weixin.qq.com/sns/jsco...
Java
UTF-8
293
3.3125
3
[]
no_license
package snippet; class Super { int i; void display() { System.out.println(i); } } class Sub extends Super { int j; void display() { System.out.println(j); } } public class MethodOverriding { public static void main(String args[]){ Sub obj = new Sub(); obj.i=1; obj.j=2; obj.display(); } }
Java
UTF-8
1,503
2.359375
2
[]
no_license
package sample.data.jpa.rest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import sample.data.jpa.model.Section; import sample.data.jpa.model.Tablo; import sam...
Python
UTF-8
409
3.5625
4
[]
no_license
class Keys: def __init__(self, filepath, delimeter='\n'): self._fp = filepath with open(self._fp) as keysfile: data = keysfile.read() self._keys = data.split(delimeter) self._total = len(self._keys) def __iter__(self): current = 0 while current < self._total: yield self._k...
Java
UTF-8
1,441
2.1875
2
[]
no_license
package com.video_editor.pro.UtilsAndAdapters; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.view.View; import android.view.View.OnClickListener; import android.widget.ImageView; import android.widget.TextView; im...
Python
UTF-8
2,022
3.640625
4
[ "Apache-2.0" ]
permissive
class Solution: def buildTree(self, preorder: List[int], inorder: List[int]): self.preorder = preorder self.inorder = inorder # Node value: Index in inorder traversal. self.val_to_index = {} for i, node in enumerate(inorder): self.val_to_index[node]= i ...
JavaScript
UTF-8
1,034
2.828125
3
[]
no_license
// Require and initialise Express var express = require('express'), app = express(), port = process.env.PORT || 8090, bodyParser = require('body-parser'); // Middleware app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json()); // Functions /** * This endpoint is called by pokerwars.io...
C++
UTF-8
8,549
3.125
3
[]
no_license
// CalculateRadius.cpp : This file contains the 'main' function. Program execution begins and ends there. // /****************************************************************************** Online C++ Debugger. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Deb...
C++
UTF-8
595
2.609375
3
[]
no_license
#include<bits/stdc++.h> #define ll long long using namespace std; int find_max(vector<int> a, int X){ int start=0, end=0; int n=a.size(); int current_sum=0, min_len=n+1; while(end<n) { while(current_sum<=X && end<n){ current_sum+=a[end++]; } while(current_sum>X && start<end){ min_len=min(min_len, end-s...
Python
UTF-8
4,318
2.671875
3
[]
no_license
from pdfminer.converter import TextConverter from pdfminer.pdfinterp import PDFPageInterpreter from pdfminer.pdfinterp import PDFResourceManager from pdfminer.layout import LAParams from pdfminer.pdfpage import PDFPage import re #import docx2txt import spacy from spacy.matcher import Matcher import io file_path="/User...
JavaScript
UTF-8
2,138
2.65625
3
[]
no_license
const fs = require('fs') const j2s = require('hapi-joi-to-swagger') const jsyaml = require('json2yaml') const { map } = require('lodash') const joiToSwagger = (config, schemas, commonSchemas) => { const API_PATH_COMPONENT = config.apiPathComponent const FILE_NAME = config.fileName || '_definitions' cons...
Java
UTF-8
795
1.945313
2
[]
no_license
package com.integration.dao; import java.util.List; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Select; import com.integration.entity.Notice; public interface NoticeDAO { @Select("select * from patrolNotice where noticeTi...
JavaScript
UTF-8
3,427
3.796875
4
[]
no_license
//my openweathermap.org API key const appKey = "4fdb2d8339feaef5789bedc8a5c9b43d"; //ID variables let searchButton = document.getElementById("search-btn-2"); let searchInput = document.getElementById("search-txt"); //ID variables for returned (onscreen) data values let cityName = document.getElementById("city-name");...
Java
UTF-8
2,310
3.015625
3
[]
no_license
package com.nic.netty.simple; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.util.CharsetUtil; import java.nio.charset.Charset; /** * Description: ...
Swift
UTF-8
6,081
2.734375
3
[ "MIT" ]
permissive
import HTTP import Vapor import Foundation import Multipart import FormData /** Our CloudinaryService is the service for actually using the Restful API connection to ensure that we've made progress and response */ final class CloudinaryService { // MARK: Properties private let apiKey: String private let apiSec...
Python
UTF-8
5,437
3.640625
4
[ "Apache-2.0" ]
permissive
# 1 # import math # a,b,c,=map(float,input('请输入a,b,c:').split()) # d = b*b-4*a*c # if d==0: # r1=(-b+math.sqrt(d))/2*a # print('根为',r1) # elif d>0: # r2=(-b-math.sqrt(d))/2*a # r1=(-b+math.sqrt(d))/2*a # print('根为',r1,r2) # elif d<0: # print('没有实根') # else: # pass # 2 # i...
Java
UTF-8
4,462
2.109375
2
[ "Apache-2.0" ]
permissive
/** * Copyright © 2015 Pablo Grela Palleiro (pablogp_9@hotmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requ...
C++
UTF-8
1,716
2.6875
3
[]
no_license
//------------------------------------------------------------------------------ /* This file is part of sdchaind: https://github.com/SDChain/SDChain-core Copyright (c) 2017, 2018 SDChain Alliance. */ //============================================================================== #include <sdchain/protocol...
JavaScript
UTF-8
1,452
2.65625
3
[]
no_license
import { FETCH_TODO, POST_TODO, REMOVE_TODO, TODO_ERROR, UPDATE_TODO } from "../actions/actionConstants"; const initialState = { todos: [], errors: {} }; export default function(state = initialState, action) { switch (action.type) { case FETCH_TODO: return { ...state, todos: ...
Java
UTF-8
457
1.890625
2
[]
no_license
package com.mevo.app.presentation.main.city_card.without_nfc; import android.view.View; import android.view.View.OnClickListener; final /* synthetic */ class CardFragment$$Lambda$1 implements OnClickListener { private final CardFragment arg$1; CardFragment$$Lambda$1(CardFragment cardFragment) { this....
Java
UTF-8
1,018
3.46875
3
[]
no_license
package com.coderbd.day3; /** * * @author Instructor */ public class ArrayEx3 { public static void main(String[] args) { int scoresArray[] = {2, 7, 9, 12, 15, 20, 2, 6, 45}; getResult(scoresArray); } public static void getResult(int[] scores) { boolean passed = false; i...
Java
UTF-8
6,933
1.835938
2
[]
no_license
/** * <pre>项目名称:hxs-iptv-service * 文件名称:ProductBuyRecordServiceImpl.java * 包名:com.eeduspace.cibn.service.impl * 创建日期:2016年12月19日下午1:40:05 * Copyright (c) 2016, wanglmir@163.com All Rights Reserved.</pre> */ package com.eeduspace.cibn.service.impl; import java.text.SimpleDateFormat; import j...
Markdown
UTF-8
3,322
2.5625
3
[]
no_license
--- title: Group Policy and MDM settings | Microsoft Docs description: Provides information about group policy and mobile device management (MDM) settings that should be used on corporate-owned devices. These policies are applied to the user’s entire device. services: active-directory keywords: what are group Policy a...
Java
UTF-8
11,207
2.703125
3
[]
no_license
import java.awt.*; import javax.swing.*; import java.awt.event.*; import javax.swing.event.*; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; public class StartWindow extends JFrame { private int flockSize = 100; private int width = 1200; private int height = 900; private JPanel main...
PHP
UTF-8
4,570
2.65625
3
[]
no_license
<?php /** * Created by PhpStorm. * User: Roman * Date: 8/18/17 * Time: 10:39 AM */ namespace App\Console\Commands; use App\Models\Championship\Game; use App\Models\Championship\Player; use App\Models\Championship\Team; use App\Models\Championship\Tournament; use App\Models\Championship\Username; use Illuminate\...
C
UTF-8
2,143
2.53125
3
[ "MIT" ]
permissive
#include <avr/io.h> #include <util/atomic.h> #include "can.h" #include "mcp2515reg.h" #include "mcp2515.h" #include "spi.h" #include "init.h" #include "message.h" /************************************************************************ * GLOBAL VARIABLES */ extern volatile uint16_t tx_timer; /********************...
JavaScript
UTF-8
325
2.53125
3
[]
no_license
const http = require('http'); const app = require('./app'); const port = process.env.PORT || 3000; const server = http.createServer(app); //server.listen(port); //For newcomers: You can use //server.use(app); // app is imported from app.js server.listen(port, () => { console.log(`App is listening on port ${port}!`...
Java
UTF-8
892
2.09375
2
[]
no_license
package com.spring.presentation; import javax.servlet.RequestDispatcher; import javax.servlet.http.HttpServletRequest; import org.springframework.boot.web.servlet.error.ErrorController; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.a...
JavaScript
UTF-8
1,686
2.625
3
[]
no_license
/* A form for starting the crawl */ var React = require("react"); var { Panel } = require("react-bootstrap"); var JobStore = require("../stores/JobStore"); export var CrawlForm = React.createClass({ getInitialState: function () { return {value: ""}; }, render: function () { // it must b...
Markdown
UTF-8
9,647
3.109375
3
[ "MIT" ]
permissive
--- layout: exam num: e02 ready: true desc: "Midterm Exam" exam_date: 2016-11-16 12:30:00.00-8 --- <p>The first two questions are essay/short answer type of question, with an emphasis on "short answer". For this and *all other similar questions on this exam*, answer as if you were in a *job interview*. Your answer w...
Java
UTF-8
2,679
3.859375
4
[]
no_license
// Lab6 - Palindrome - Java 156 // Author: Ayesha Ahmed // Date: 10/15/13 import java.util.*; import java.lang.*; public class Lab6_1{ static Scanner console = new Scanner(System.in); public static void main(String[] args){ boolean value; String checkString, entry; int checkNum; ...
Markdown
UTF-8
4,611
3.21875
3
[]
no_license
# Django Models Models are usually defined in an application's models.py file. They are implemented as subclasses of django.db.models.Model, and can include fields ## Fields Model can have an arbitrary number of fields, of any type each one represents a column of datatables. #### Common field arguments - help_t...
Java
UTF-8
803
3.1875
3
[]
no_license
package leetcode.contest74.LRBoundsLimits; class Solution { public static int numSubarrayBoundedMax(int[] A, int L, int R) { int j=0,count=0,res=0; for(int i=0;i<A.length;i++){ if(A[i]>=L && A[i]<=R){ res+=i-j+1; count=i-j+1; } ...
SQL
UTF-8
364
2.953125
3
[]
no_license
/* Warnings: - Added the required column `jobId` to the `Customers` table without a default value. This is not possible if the table is not empty. */ -- AlterTable ALTER TABLE "Customers" ADD COLUMN "jobId" INTEGER NOT NULL; -- AddForeignKey ALTER TABLE "Customers" ADD FOREIGN KEY ("jobId") REFERENCES "Jobs"...
Java
UTF-8
8,447
1.554688
2
[]
no_license
package com.expensemanager; import android.app.ActionBar.OnNavigationListener; import android.app.Activity; import android.app.AlertDialog.Builder; import android.content.Context; import android.content.DialogInterface.OnClickListener; import android.content.Intent; import android.os.Bundle; import android.view.Contex...
C
UTF-8
195
3.28125
3
[]
no_license
#include<stdio.h> int main() { int a; printf("enter your age \n"); scanf("%d",&a); if(a>=18) printf("you are ready to vote \n"); else printf("you not ready to vote\n"); return 0; }
C++
UTF-8
761
2.78125
3
[]
no_license
#include "InputHandler.h" #include "../shared/HeldCommand.h" #include <memory> InputHandler::InputHandler() { } InputHandler::~InputHandler() { } void InputHandler::keyEvent(sf::Event e) { //Handle +/- codes (+ = onPress - = onRelease) auto p = keyBindings.find(e.key.code); if (p != keyBindings.end()) { share...
Markdown
UTF-8
4,370
3.25
3
[]
no_license
## http请求概述 - DNS解析(通过域名解析ip),建立TCP连接(三次握手),发送http请求 - server端接收到http请求,处理并返回 - 客户端接收到返回数据,处理数据 ------ ## nodejs处理http请求 1. ### get请求和querystring - `get`请求,即客户端要向`server`端获取数据 - 通过`querystring`来传递参数 - 浏览器直接访问,就发送`get`请求 ```javascript const http = require('http') const querystring = require('querystring') // 通过直接...
C++
UTF-8
3,651
2.640625
3
[]
no_license
// // Predicate.cpp // DatalogProgram // // Created by Taylor McCord on 9/23/13. // Copyright (c) 2013 McCord Inc. All rights reserved. // //<Datalog Program> -> Schemes : <Scheme List> //Facts : <Fact List> //Rules : <Rule List> //Queries : <Query List> //EOF // //<Scheme List> -> <Scheme> <Scheme List>...
Python
UTF-8
244
3.734375
4
[]
no_license
def evens(l): result = [] x = 0 while x < len(l): if x % 2 != 0: result.append(str(l[x])) x += 1 return ' '.join(result) my_list = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100] print(evens(my_list))
Markdown
UTF-8
1,730
3.015625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
# `Faker.dune` [Dictionary file](../src/main/resources/locales/en/dune.yml) Available Functions: ```kotlin Faker.dune.characters() // => Paul \"Muad'Dib\" \"Usul\" Atreides Faker.dune.titles() // => Master of Assassins Faker.dune.planets() // => Arrakis // Random quote from a character (case-insensitive) Faker.d...
JavaScript
UTF-8
776
4.09375
4
[]
no_license
/** ** Rest parameters are used in function definition ** Spread operators are using while invoking functions **/ // before es2015 using arguments object let argumentTest = function () { let args = arguments; // arguments is the object which holds the args console.log("args for function with arguments", args);...
Java
UTF-8
298
2.3125
2
[]
no_license
package castro.alejandro.security.service.exception; public class SecurityException extends RuntimeException { private static final long serialVersionUID = 1L; public SecurityException() { super(); } public SecurityException(String message) { super(message); } }
TypeScript
UTF-8
10,783
2.515625
3
[]
no_license
import { Character, CharState, Idle, WarpIn } from "./character"; import { Weapon, Buster, Torpedo, Sting, RollingShield, ShotgunIce, FireWave, Tornado, Boomerang, ElectricSpark } from "./weapon"; import { game, Menu } from "./game"; import { Palette } from "./color"; import { ElectricSparkProj } from "./projectile...
C++
UTF-8
466
2.84375
3
[]
no_license
#include <iostream> #include <algorithm> #include <tuple> #include <map> #include <typeinfo> using namespace std; int main() { auto t = make_tuple("1123", 2, 'x'); tuple<string, int> h("123", 12); // auto tp = tie(1, "12"); cout<<(get<0>(t))<<endl; auto tt = get<1>(t); auto cnt = tuple_size(decltype(h))::valu...
Java
UTF-8
938
2.375
2
[]
no_license
package com.ustglobal.webappp.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletConfig; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletR...
Java
UTF-8
976
1.914063
2
[]
no_license
package com.ub.techexcel.bean; public class DocumentAction { private int attachmentId; private int syncId; private String zippedActionData; private int index; private int total; public int getAttachmentId() { return attachmentId; } public void setAttachmentId(int attachme...