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
Markdown
UTF-8
4,962
2.546875
3
[ "MIT" ]
permissive
# Requerio: predictable client-side state + server-side testability [![Known Vulnerabilities][snyk-image]][snyk-url] [![Linux Build Status][linux-image]][linux-url] [![Mac Build Status][mac-image]][mac-url] [![Windows Build Status][windows-image]][windows-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Li...
JavaScript
UTF-8
292
3.703125
4
[]
no_license
/* Exercise #1 Create a for loop that prints out the numbers 1 to 100 in the console. */ for(var i=0;i<100;i++){ console.log(i); } /* Exercise #2 Write a loop that makes seven calls to console.log to output the following triangle: for() # ## ### #### ##### ###### ####### */ for('#' * i)
Markdown
UTF-8
861
3.046875
3
[ "MIT" ]
permissive
--- title: Telegram Bot description: An ExpressJS server with a Telegram bot tags: - express - telegraf - typescript --- # Telegram bot example This example starts a [Telegram](https://telegram.org/) bot on an [ExpressJS](https://expressjs.com/) server. [![Deploy on Railway](https://railway.app/button.svg)](ht...
JavaScript
UTF-8
859
2.984375
3
[]
no_license
import moment from 'moment' const dateUtil = {} /** * 计算指定时间与今天的时间差 * @param time 指定时间 * @return 相差时间 (2天前) */ dateUtil.timeDifferenceToContent = (time) => { const nowDate = moment(moment(new Date()).format('YYYY-MM-DD HH:mm:ss')) let diff = nowDate.diff(time, 'years') if (diff > 0) { return diff + '年前'...
Java
UTF-8
258
2.890625
3
[]
no_license
public class CashRebate extends CashSuper { private double moenyRebate; public CashRebate(String moneyRebate){ this.moenyRebate = Double.parseDouble(moneyRebate); } public double acceptCash(double money){ return money * this.moenyRebate; } }
Ruby
UTF-8
876
2.6875
3
[]
no_license
# frozen_string_literal: true class ViaCep include ::HTTParty def self.get(cep: nil) response = HTTParty.get("https://viacep.com.br/ws/#{cep}/json/") object = response.parsed_response ViaCep.serializer(object: object) rescue StandardError {} end def self.serializer(object: nil) # Retorn...
TypeScript
UTF-8
844
2.59375
3
[]
no_license
import { expect } from 'chai'; import { of,} from 'rxjs'; import 'mocha'; import {UnderGrad, Class} from './app' describe('Test for observable.ts', () =>{ const student1 = new UnderGrad("Dan", 2779638); const class1 = new Class("CS44", "Fall 2019"); student1.addClass(class1); const student2 = new Under...
Go
UTF-8
8,711
2.5625
3
[]
no_license
package datastore import ( "context" "errors" "github.com/AlekSi/pointer" "github.com/gocraft/dbr/v2" "github.com/videocoin/marketplace/internal/model" "github.com/videocoin/marketplace/pkg/dbrutil" "github.com/videocoin/marketplace/pkg/random" "strings" "time" ) var ( ErrAccountNotFound = errors.New("accou...
C#
UTF-8
858
3.59375
4
[ "Apache-2.0" ]
permissive
using System; using System.Collections.Generic; namespace Assignment3.Classes { //4-6-2021 Saung NEW 5L : Generic queue which can be serialized [Serializable] public class SerializableQueue<T>: Queue<T> { //4-6-2021 Saung NEW 5L : Generic method returns item at given index or defaul...
Python
UTF-8
1,619
3.09375
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Tue Nov 07 17:41:46 2017 @author: doug """ import pandas as pd import gMaps as gm def getSites(turbine_data): if turbine_data[0] == 0: print("bad data. please try again") return 0 else: tDB = turbine_data[1] stateDB = turbine_data[2]...
C#
UTF-8
1,922
2.703125
3
[]
no_license
using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Concurrent; using System.Diagnostics; using System.Linq; using System.Threading; using System.Threading.Tasks; using Zhenway.BatchRequestAggregrators; namespace UnitTest { [TestClass] public class BatchRequestAggregator...
Java
UTF-8
1,265
2.734375
3
[]
no_license
package com.finezoom.javatraining.filesystem; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileReader; import java.io.FileWriter; import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream...
Python
UTF-8
2,148
3.390625
3
[]
no_license
# python3 시간초과 안나는 코드 # deque의 rotate 이용!!! import sys input = sys.stdin.readline from collections import deque n, k = map(int, input().split()) belt = deque(list(map(int, input().split()))) robot = deque([0]*n) res = 0 while 1: belt.rotate(1) # 시계방향으로 1칸 회전// -1일 경우 반시계 방향 robot.rotate(1) robot[-1]=0 # ...
Markdown
UTF-8
1,356
3.25
3
[]
no_license
# Data-Wrangling-Challenge ## Objective This is a simple script uses Nodejs to normalize the “European Union Road Safety Facts and Figures” table from [Wikipedia](https://en.wikipedia.org/wiki/Road_safety_in_Europe). The script cleans the data and makes it very easy to process and conduct further analysis. ## How to...
Shell
UTF-8
1,272
3.953125
4
[]
no_license
#!/bin/bash source ./utils.sh usage() { cat << EOF usage: $0 [options] deploys wheninmustang to AWS S3 bucket. OPTIONS: -e Environment name (e.g. dev, staging, prod or production) EOF } setupBucket(){ cat << EOF Bucket does not exist. Create a static web hosting bucket with the name ${S3_BUC...
SQL
UTF-8
2,700
3.578125
4
[ "MIT" ]
permissive
-- MySQL Script generated by MySQL Workbench -- Wed Jul 8 02:30:20 2015 -- Model: New Model Version: 1.0 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----...
Swift
UTF-8
6,596
2.53125
3
[]
no_license
// // CustomListRow.swift // FeelBetter (iOS) // // Created by Jason on 10/10/20. // import SwiftUI import CareKitStore struct CustomListRow: View { @EnvironmentObject var store: ClericStore @GestureState private var dragDistance = CGSize.zero @State private var newReveal: Bool = false @State priva...
Markdown
UTF-8
2,072
3.03125
3
[]
no_license
Hello :) This is simple api that uses OAuth2 for authorization. Unauthenticated users can see all tags, articles and comments. Authenticated user can create an article (he needs to provide access token), edit and delete his own articles. Authenticated user can comment any article and comments can be deleted by user...
JavaScript
UTF-8
3,606
2.515625
3
[]
no_license
/** * Author: Arkady Zelensky */ import React, {Component} from "react"; import DatePicker from 'react-datepicker'; import 'react-datepicker/dist/react-datepicker.css'; import moment from 'moment'; export default class Item extends Component { constructor(props) { super(props); this.state = { title...
C#
UTF-8
1,979
2.59375
3
[]
no_license
using System; using System.Diagnostics; using System.IdentityModel.Selectors; using System.Security.Cryptography.X509Certificates; using dk.nita.saml20.Properties; using Trace=dk.nita.saml20.Utils.Trace; namespace dk.nita.saml20.Specification { /// <summary> /// Validates a selfsigned certificate ...
Python
UTF-8
4,066
2.53125
3
[]
no_license
# -*- coding: utf-8 -*- import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import random import math import numpy as np # from pylab import * # rcParams['figure.figsize'] = 15,5 # Always display all the columns # pd.set_option('display.width', 5000) # pd.set_option('display.max_columns', 60)...
Java
UTF-8
1,608
2.765625
3
[]
no_license
package com.bigcustard.blurp.ui; import com.badlogic.gdx.*; import com.badlogic.gdx.graphics.*; import com.badlogic.gdx.graphics.g2d.*; import com.badlogic.gdx.math.*; import com.bigcustard.blurp.core.*; import com.bigcustard.blurp.model.*; public class SimpleButton { private final TextureRegion textureRegion; ...
Java
UTF-8
985
3.40625
3
[]
no_license
import java.util.LinkedList; import java.util.List; import java.util.function.Function; import java.util.function.Predicate; public class MyIterableImpl { //Returns a view of unfiltered containing all elements that satisfy the input predicate retainIfTrue. public static <T> Iterable<T> filter(Iterable<T> unfi...
Python
UTF-8
11,446
2.9375
3
[]
no_license
import urllib.request as urllib; from lxml import etree import numpy as np; import pandas as pd import time; import pickle; import datetime """ Author : Brandon Veber Date : 1/3/2014 email : veber001@umn.edu This python file contains all the modules required to obtain statistics for all players in a given...
Java
UTF-8
5,673
2.140625
2
[ "Apache-2.0" ]
permissive
package org.jitsi.util.swing; import org.jitsi.android.util.java.awt.Component; import org.jitsi.android.util.java.awt.Container; import org.jitsi.android.util.java.awt.Dimension; import org.jitsi.android.util.java.awt.LayoutManager; import org.jitsi.android.util.java.awt.Rectangle; public class FitLayout implements ...
Python
UTF-8
1,545
3.03125
3
[ "Apache-2.0" ]
permissive
import shutil import os import datetime import configparser # change dir to directory of this file so we can find the config file os.chdir(os.path.dirname(os.path.abspath(__file__))) config = configparser.ConfigParser() config.read(R'backup_config.ini') DB_LOCATION = config['DEFAULT']['db_location'] BACKUP_DIR = conf...
Shell
UTF-8
279
3
3
[]
no_license
function setBackground() { setuppath=$1 backgroundImage=$2 cp $setuppath${backgroundImage} /home/vagrant/Pictures gsettings set org.gnome.desktop.background picture-uri /home/vagrant/Pictures/${backgroundImage} } setBackground "/home/vagrant/setup/" "mr.robot.jpg"
Java
UTF-8
2,324
1.953125
2
[ "Apache-2.0" ]
permissive
package com.github.nijian.jkeel.concept.config; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import java.util.Map; @XmlAccessorType(XmlAccessType.FIELD) publi...
Java
UTF-8
179
1.507813
2
[]
no_license
package com.online.movie.ticket.util; public abstract class RestFulPath { public static final String INCLUDE_REQUEST_URI_ATTRIBUTE = "javax.servlet.include.request_uri"; }
Markdown
UTF-8
2,973
2.609375
3
[ "MIT" ]
permissive
# Readmission Prediction [![Awesome](https://awesome.re/badge.svg)](https://awesome.re) ![size](https://img.shields.io/github/repo-size/freesinger/Readmission_Prediction.svg?style=plastic) ![stars](https://img.shields.io/github/stars/freesinger/Readmission_Prediction.svg?style=social) ![license](https://img.shields.io...
C#
UTF-8
1,521
2.75
3
[]
no_license
using System; using System.Collections.Generic; using System.Configuration; using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DataLayer { public class DB { public static string EmployeePortalString { get { ...
Java
UTF-8
5,127
3
3
[]
no_license
import java.io.IOException; import java.io.PrintWriter; import java.util.InputMismatchException; /* * 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. */ /** * * @author hitarthk */ publ...
Python
UTF-8
1,950
2.84375
3
[ "BSD-3-Clause" ]
permissive
import typing from contextlib import suppress import qtawesome as qta from qtpy import QtGui from qtpy.QtCore import QRect, Qt from qtpy.QtGui import QFont, QFontMetrics, QPainter from qtpy.QtWidgets import QCheckBox, QWidget class CollapseCheckbox(QCheckBox): """ Check box for hide widgets. It is painted as...
Python
UTF-8
4,043
2.65625
3
[]
no_license
#!/usr/bin/env python # coding: utf-8 # In[1]: import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns get_ipython().run_line_magic('matplotlib', 'inline') # In[2]: df=pd.read_csv("C:/Users/Somay/Documents/heart.csv",encoding='ISO-8859-1') df.head() # In[3]: df.shape # ...
Shell
UTF-8
287
3.0625
3
[ "Apache-2.0" ]
permissive
#!/bin/sh set -eux origin=$(git remote get-url origin) name=$(printf '%s\n' "$origin" | sed -e 's,\.git/*$,,' -e 's,.*/,,') commit=$(git subtree split --annotate="(${name}) " --prefix=build-aux HEAD) git push git@github.com:datawire/build-aux.git "${commit}:master" "${0%-push}-pull" "$commit"
Markdown
UTF-8
846
3.015625
3
[]
no_license
蜗牛爱吃香蕉 有 N piles bananas 每一把香蕉上有不同数量的bananas [3,6,7,11] [30,11,23,4,20] 每个小时可以吃某一piles 里的N 只香蕉。规定H小时内一定要吃完,吃每把的时候,要不就是吃m只,要不就吃余下的。 koko bananas - 把香蕉吃完函数 canEatAllBananas h 来自于吃法规则 一小时mid 只,一次只吃一把 return h >= H; - while 去疯狂的试 1,2,3,4,5,6,.........Math,max(...piles) 能拿到结果,但是太慢了 最大的来吗? 中间 最大概率最快的,二分查找 二分查找优化查找的效率 ...
Python
UTF-8
434
2.546875
3
[ "MIT" ]
permissive
from pymongo import Connection, json_util import simplejson as json class Stops(object): def get_nearest_stops(self, lat, lon, limit): connection = Connection() db = connection.countdown stops = db.stops nearestStops = list( stops.find({ "loc": { "$near" : [ float(lat), float(lon) ] } }).limit(...
JavaScript
UTF-8
3,312
3.59375
4
[]
no_license
// Versión 1: Ponle color a la corbata // const path = document.querySelectorAll("path"); // const boton = document.getElementById("dadContainer_boton") // console.log(path) // let paths = []; // for (let i = 0; i <= 172; i++) { // paths.push(path[i]); // } // function barajar(array) { // let n = array.length...
Java
UTF-8
474
1.8125
2
[]
no_license
package com.primary.service; import java.util.List; import com.primary.bean.TeacClassCourseGrade; import com.primary.bean.TeacClassCourseGradeExample; public interface TeacClassCourseGradeService { public int countByExample(TeacClassCourseGradeExample example); public List<TeacClassCourseGrade> s...
C#
UTF-8
413
3.234375
3
[]
no_license
using System.Linq; public static class PermMissingElem { public static int Solution(int[] a) { if (a.Length <= 0) return 0; var size = a.Length + 1; var sum = size * (1 + size) / 2; //https://en.wikipedia.org/wiki/Arithmetic_progression#Sum var aSum = 0; for (...
Java
UTF-8
253
1.773438
2
[]
no_license
package spikes.sneer.kernel.container; import java.io.File; import basis.brickness.Brick; @Brick public interface SneerConfig extends ContainerConfig { File sneerDirectory(); File brickDirectory(Class<?> brickClass); File tmpDirectory(); }
Markdown
UTF-8
849
3.578125
4
[]
no_license
### What is Markdown? Markdown is a way to style text on the web. You control the display of the document; formatting words as bold or italic, adding images, and creating lists are just a few of the things we can do with Markdown. ### Syntax guide First Header | Second Header ------------ | ------------- Headers | ```...
Java
UTF-8
1,883
2.875
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 e1; /** * * @author Brais */ public final class Cliente extends Persona { private final String code; p...
Markdown
UTF-8
5,374
2.671875
3
[]
no_license
--- description: "Steps to Prepare Quick Crab Cream Gratin" title: "Steps to Prepare Quick Crab Cream Gratin" slug: 1241-steps-to-prepare-quick-crab-cream-gratin date: 2020-04-20T08:52:50.137Z image: https://img-global.cpcdn.com/recipes/32cc66a9aa3ba427/751x532cq70/crab-cream-gratin-recipe-main-photo.jpg thumbnail: htt...
Markdown
UTF-8
3,673
3.34375
3
[]
no_license
# Report *Please include a short, 300-word report that highlights three technical elements of your implementation that you find notable, explain what problem they solve and why you chose to implement it in this way. Include this in your repository as a report.md file.* ## rich console: Implemented *rich console*, ver...
JavaScript
UTF-8
1,215
2.515625
3
[ "MIT" ]
permissive
(function(){ var map = L.map('map').setView([39.2500,-97.743061], 4); L.tileLayer('http://{s}.tiles.mapbox.com/v3/examples.map-i875mjb7/{z}/{x}/{y}.png', { attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">C...
Shell
UTF-8
1,543
4.0625
4
[]
no_license
#!/bin/bash if [ -z "$2" ]; then echo "usage: $0 <site> <days> [-list]" echo " [-list] - generates list without archiving or removing." exit fi SITED=$1 DAYS=$2 LISTONLY=$3 LOGDIR="/web/$SITED/htdocs/sites/default/files/contentwatch" if [ -d $LOGDIR ]; then echo "$LISTONLY $LOGDIR in progress...." cd $LOGDIR ...
Java
UTF-8
612
2.59375
3
[]
no_license
package com.qx.common.tools; import java.io.UnsupportedEncodingException; /** * * @author Administrator * */ public class StringTools { public static boolean isNotBlank(Object obj) { if (obj == null) { return false; } if (obj.toString().trim().equals("")) { return false; } re...
JavaScript
UTF-8
450
3.21875
3
[]
no_license
// Reflect.get方法查找并返回target对象的name属性,如果没有该属性,则返回undefined。 let obj = { a: 1, get g() { return this.a; }, }; console.log(Reflect.get(obj, 'a'), Reflect.get(obj, 'z')); // 取值器函数返回取出的值,其中的this是receiver||本身 console.log(Reflect.get(obj, 'g'), Reflect.get(obj, 'g', {a: 10})); // 如果第一个参数不是对象,Reflect.get...
TypeScript
UTF-8
1,036
2.640625
3
[]
no_license
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; import { TodoModel } from '../../models/todo-model'; @Component({ selector: 'app-todo', templateUrl: './todo.component.html', styleUrls: ['./todo.component.css'] }) export class TodoComponent implements OnInit { // @Input : pour qu...
C++
UTF-8
2,437
3.203125
3
[]
no_license
#pragma once #include "converter.hpp" #include "format.hpp" enum color { red, green, blue }; inline const char* color_names[] = {"red", "green", "blue"}; template <class Char> struct lrstd::formatter<color, Char> : lrstd::formatter<const Char*, Char> { // TODO: the implementation of formatted_size and format_to_...
Markdown
UTF-8
23,369
3.0625
3
[]
no_license
# Vue.js概述 [参考](https://cn.vuejs.org/v2/guide/installation.html) Vue.js(读音 /vjuː/, 类似于 view) 是一套构建用户界面的渐进式框架。 Vue 只关注视图层, 采用自底向上增量开发的设计。 Vue 的目标是通过尽可能简单的 API 实现响应的数据绑定和组合的视图组件。 ## 安装 - 独立版本 ``` 在 Vue.js 的官网上直接下载 vue.min.js 并用 <script> 标签引入。 <script src="/static/js/vue.js"></script> ``` - 网络版本 ``` BootCDN(国内) :...
Java
UTF-8
688
2.328125
2
[]
no_license
package service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import repository.MemberDao; import vo.Member; @Component public class MemberService { @Autowired private MemberDao dao; public void setMemberDao (MemberDao dao){ this.dao = dao; }...
Markdown
UTF-8
9,905
2.875
3
[ "BSD-2-Clause" ]
permissive
![][digitaljs-logo] # DigitalJS This project is a digital circuit simulator implemented in Javascript. It is designed to simulate circuits synthesized by hardware design tools like [Yosys](https://yosyshq.net/yosys/) (Github repo [here](https://github.com/YosysHQ/yosys/)), and it has a companion project [yosys2digita...
Markdown
UTF-8
2,408
2.78125
3
[]
no_license
# Hand-Gesture-Reognition-using-Depth-Camera System Requirements CPU: Intel Core i5 RAM: 4GB Operating System: Ubuntu 16.04 LTS Language: Python 2.7 Libraries: Numpy, Scikit-Learn, OpenCV2, libfreenect, SimpleCV, cPickle, scipy, glob * Running the Project: ---------------------- Setting up the kinect: 1. Place kinect a...
C++
UTF-8
451
3.125
3
[]
no_license
#pragma once namespace lab1 { class Measurer { private: std::string name; double start; double end {}; public: Measurer(std::string name) : name {std::move(name)} , start {omp_get_wtime()} { } ~Measurer() { ...
Java
UTF-8
590
1.953125
2
[]
no_license
package com.project.operationvolcano.booking.api.model; import com.project.operationvolcano.booking.api.validators.ValidDateRangeConstraint; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDate; ...
C#
UTF-8
1,411
2.65625
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text; namespace ArathsBaby.Infrastructure { public class Users { [Key] public int Id { get; set; } [Required(ErrorMessage = "El campo {0} es requerido ")] public s...
PHP
UTF-8
1,637
2.71875
3
[ "MIT" ]
permissive
<?php function geraSelect($valor1,$valor2,$valor3,$valor4,$valor5){ echo $valor2."<br/>"; $id=0; $sql = 'SELECT * FROM '.$valor1; echo $sql."<br/>"; $result = mysqli_query($GLOBALS['conexao'],$sql); ?> <select name="<?php echo $valor5; ?>"> <?php while ($row = mysqli_fetch_array($result)) { ...
PHP
UTF-8
4,222
2.8125
3
[ "Apache-2.0" ]
permissive
<?php require_once dirname( __DIR__ ) . "/bdd/Conection.php"; class Products { function Select() { $parametros = func_get_args(); $pdo = new Conection(); if(count($parametros) == 0) { $select = $pdo->prepare("SELECT * FROM productos"); if($select->execute()) ...
Markdown
UTF-8
3,273
3.234375
3
[ "MIT" ]
permissive
# Lap.js > Lokua Audio Player. A SIY (style it yourself) HTML5 Audio Player implementation for modern (ES5) browsers with support for single-track, single-album, and mutliple-album player implementations. Selector, element, and event hooks are all baked in - you just have to make them come to life. ## Ge...
JavaScript
UTF-8
111
2.953125
3
[]
no_license
let birthYear = 1989; let futureYear = 2025 console.log("I will be " + (futureYear - birthYear) + " in "+ sho);
Python
UTF-8
1,855
3.109375
3
[]
no_license
#!/usr/bin/env python3 """File that contains the function train_model""" import tensorflow.keras as K def train_model(network, data, labels, batch_size, epochs, validation_data=None, early_stopping=False, patience=0, learning_rate_decay=False, alpha=0.1, decay_rate=1, s...
C++
UTF-8
823
3.015625
3
[]
no_license
#include <iostream> using namespace std; int fillHeight(int p[],int node,int visited[],int height[]){ if(p[node]==-1){ visited[node]=1; return 0; } if(visited[node]) return height[node]; visited[node]=1; height[node]=1+fillHeight(p,p[node],visited,height); return height[node]; } int findHeight(...
C++
UTF-8
1,143
3.71875
4
[]
no_license
#include <iostream> #include <stdexcept> #include <exception> using namespace std; class NegativeArraySizeException : public exception { virtual const char* what() const throw() { return "NegativeArraySizeException"; } } negException; int* copyOf(int* original, int oldLength, int newLength) { if (newLength < 0...
PHP
UTF-8
2,414
2.609375
3
[ "MIT" ]
permissive
<?php /** * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. * * Windows10AssociatedApps File * PHP version 7 * * @category Library * @package Microsoft.Graph * @copyright (c) Microsoft Corporation. All rights reser...
Markdown
UTF-8
3,311
2.84375
3
[]
no_license
# 手把手教你搭建DHCP服务器 ## 1、参考 https://blog.csdn.net/weixin_56903457/article/details/120391901 http://t.zoukankan.com/jpfss-p-10918222.html ## 2、DHCP定义 DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)是一个局域网的网络协议,使用UDP协议工作。它是一种流行的Client/Server协议,一般用于为主机或者为路由器等指定相关的配置信息。DHCP服务在企业和家庭中得到了大量的应用,它能够自动分配ip地址以及一些其他的相关信息,整...
C
UTF-8
11,220
2.6875
3
[]
no_license
#include <stdio.h> #include <time.h> #include <conio.h> #include <stdlib.h> #include <windows.h> #define N (20) #define M (20) #define L (N * M) #define True 1 #define False 0 #define UP 0 #define DOWN 1 #define LEFT 2 #define RIGHT 3 typedef struct mark { int x; int y; } bodySnake; char scoreFile[] = "scor...
Java
UTF-8
683
1.710938
2
[ "Apache-2.0" ]
permissive
package com.ctrip.xpipe.redis.console.notifier.cluster; import com.ctrip.xpipe.api.observer.Event; import com.ctrip.xpipe.api.observer.Observable; import com.ctrip.xpipe.cluster.ClusterType; import com.ctrip.xpipe.redis.console.notifier.EventType; import com.ctrip.xpipe.redis.console.notifier.shard.ShardEvent; import...
SQL
UTF-8
1,110
3.984375
4
[]
no_license
/** Database Schema Creation Script for QSense application. In this version, added the device-type in the application. Default device-type is Android. Switch context to qsense_db **/ USE qsense_db; START TRANSACTION; SET foreign_key_checks = 0; /** Create device_type table This table will store information about the...
JavaScript
UTF-8
1,492
2.984375
3
[]
no_license
export { Template }; class Template { // load all template HTML files static async loadTemplates () { Template.templates = {}; for (let templateName of ['navbar', 'filter', 'filter-option', 'tag', 'recipe', 'recipe-ingredient']) { Template.templates[templateName] = await ...
Markdown
UTF-8
333
2.5625
3
[]
no_license
<H1>Simplistic Portfolio Website</H1> <P>This is a very basic and clean website design, which can be used as a simple portfolio page. You can add links to all of your social media and repository platforms, in a clean and intuitive design. Feel free to download it and use it as a template.</P> <P> New sections comin...
PHP
UTF-8
20,451
3.1875
3
[]
no_license
<?php //Define list of available units of measure $units_of_measure = ["cups","pints","gallons","tablespoons","teaspoons","pieces","liters","milliliters","handfuls","units"]; sort($units_of_measure); //Define list of recipe types $recipe_types = ["Meal","Snack","Dessert"]; //Function to verify log in credentials func...
Python
UTF-8
4,720
2.96875
3
[]
no_license
import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import tensorflow as tf from matplotlib import pyplot as plt import PIL.Image import numpy as np base_model = tf.keras.applications.InceptionV3(include_top=False, weights='imagenet') # 选择最大激活的层 layer_names = ['mixed3', 'mixed5'] layers = [base_model.get_layer(name)....
PHP
UTF-8
6,731
2.953125
3
[]
no_license
<?php /** * Description of Meses del año * * Idiomas implementados: Inglés, Francés, Italiano, Alemán, Español, Ruso, Chino * * @author Sergio Pérez <sergio.perez@albatronic.com> * @copyright Informática ALBATRONIC, SL * @since 20-feb-2013 * */ class Meses extends Tipos { protected $tipos; public f...
Java
UTF-8
3,754
2.890625
3
[]
no_license
package com.telogical.diff.util; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.jar.JarEntry; import java.util.zip.ZipOutputStream; public class ArchiveUtils { private static final...
C
UTF-8
8,137
3.203125
3
[]
no_license
#include "quicksort.h" #include "stretchy_buffer.h" //function to produce a random number between low and high ssize_t random_in_range(ssize_t low, ssize_t high) { ssize_t r = rand(); r = (r << 31) | rand(); return r % (high - low + 1) + low; } //function to swap two tuples void swap(tuple *tuples, ss...
Java
UTF-8
1,322
2.734375
3
[]
no_license
package storage; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import com.google.gson.Gson; import common.model.Article; public class ArticleStorage...
JavaScript
UTF-8
686
2.84375
3
[]
no_license
var fs = require('fs'); const result = `'지점코드','지점명','품목코드','품목명','규격','단위','수량','단가','금액','세액','매입처코드','매입처명','비고','수정자','수정시간'`; const resultLength = result.split(',').length; let str ='\n'; console.log(resultLength); result.split(',').map((v,i)=>{ // fs.writeFile(__dirname+'/test.txt', v, 'utf8', function...
Java
UTF-8
8,603
1.6875
2
[]
no_license
package com.br.tiago.roupas.activity; import android.content.Intent; import android.content.pm.ActivityInfo; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.design.widget.NavigationView; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransactio...
Ruby
UTF-8
7,778
3.078125
3
[ "MIT" ]
permissive
# mimeparse.rb # # This module provides basic functions for handling mime-types. It can # handle matching mime-types against a list of media-ranges. See section # 14.1 of the HTTP specification [RFC 2616] for a complete explanation. # # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 # # --------- # # ...
Go
UTF-8
1,979
2.53125
3
[ "MIT" ]
permissive
package main import ( "encoding/json" "fmt" "io/ioutil" "log" "os" "os/signal" "path/filepath" "syscall" "github.com/alexflint/go-arg" ) type ( configStruct struct { Title string `json:"title"` Runners []runnerStruct `json:"services"` } obj map[string]interface{} ) var ( wd, _ = os.Getwd(...
Markdown
UTF-8
15,774
3.109375
3
[]
no_license
# Tema 4 - Gestión de procesos (I) Este tema trata sobre la gestión de procesos en ejecución. Un proceso puede ejecutarse en primer plano (*foreground*) o en segundo plano (*background*). Hay procesos que están diseñados para ejecutarse en *background*, y se les suele llamar **demonios**. usuarios y grupos...
PHP
UTF-8
1,966
2.71875
3
[ "Apache-2.0" ]
permissive
<?php declare (strict_types=1); namespace app; use app\common\core\interfaces\InterfaceModel; use think\Model; use app\ExceptionHandle; abstract class BaseModel extends Model implements InterfaceModel { /** * 查找单条数据 * @param array $where * @return array|string */ public static function findSingle(array $wh...
JavaScript
UTF-8
2,421
2.75
3
[ "MIT" ]
permissive
/** * preview-image.js * version 1.0 * Eric Olson * https://github.com/zpalffy/preview-image-jquery * * License: MIT - http://opensource.org/licenses/MIT * Original: http://cssglobe.com/easiest-tooltip-and-image-preview-using-jquery/ * by Alen Grakalic (http://cssglobe.com) */ (function($) { $.previewI...
JavaScript
UTF-8
1,253
2.921875
3
[ "MIT" ]
permissive
import Vue from 'vue' import Main from './main.vue' import {isEmpty} from "@/util" let Constructor = Vue.extend(Main) export default function ({left, top} = {}) { const instance = new Constructor() const position = getPosition({height: instance.height + 130, width: instance.width + 20, left, top}) instan...
Java
ISO-8859-1
5,239
3.265625
3
[]
no_license
import java.util.ArrayList; import java.util.List; public class CamelCaseToStringList { private static List<String> palavras = new ArrayList<>(); private static int index = 0; private static char anterior; private static String palavraMaiuscula = ""; private static String numero = ""; private Came...
Python
UTF-8
4,554
3.359375
3
[ "BSD-3-Clause" ]
permissive
from __future__ import unicode_literals import six __all__ = [ 'to_formatted_text', 'is_formatted_text', 'Template', 'merge_formatted_text', 'FormattedText', ] def to_formatted_text(value, style='', auto_convert=False): """ Convert the given value (which can be formatted text) into a lis...
TypeScript
UTF-8
740
2.953125
3
[ "MIT" ]
permissive
import File from '../../lib/java/io/File.js' import FileUtils from '../../lib/org/apache/commons/io/FileUtils.js' import * as YAML from 'yaml' export default class YAMLDatabase { file: File data: any = {} constructor(file: File) { this.file = file this.load() } load() { if (this.file.exists())...
Java
UTF-8
795
2.234375
2
[ "MIT" ]
permissive
package TypewiseAlert.alert; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import TypewiseAlert.model.BreachType; import static org.junit.Assert.*; /** * @author Shrinidhi Muralidhar K...
Rust
UTF-8
121
3.203125
3
[ "Unlicense" ]
permissive
fn main() { let mut tot=0; for i in 1..1000 { if i%3==0||i%5==0 {tot+=i;} } println!("{}",tot); }
PHP
UTF-8
11,214
2.515625
3
[]
no_license
<?php namespace App\Service; use App\Jobs\WhoisStorage; use App\Utils\CommonUtil; use App\Utils\DomainUtil; use Carbon\Carbon; use Illuminate\Support\Facades\Redis; class WhoisService extends BaseService { /** * 域名Whois查询 * @param $domain * @param bool $fresh * @return array */ publ...
C++
UTF-8
7,950
3.28125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <string.h> #include <time.h> #include <iostream> #include <string> #define MAX_WIDTH 14 #define MAX_BOARD_SIZE (MAX_WIDTH * MAX_WIDTH) int g_Ply = 3; int g_Trials = 100; void tune_depth(int width) { if (width <= 7) g_Ply = 4; else g_Ply ...
Markdown
UTF-8
829
2.640625
3
[]
no_license
--- layout: default title: 入职流程与训练 lang: zh-cn description: 如何快速上手工作! --- 当您在入职过程中,我们会提供您相关的资料让您熟悉工作并快速上手,请先完成以下的步骤: 1. 填写[背景调查表](https://forms.gle/Heimpw1gFko2k37Z6){:target="_blank"} 1. 认识你的队友。 1. 熟悉我们的[公司理念]({{ site.baseurl }}/{{ page.lang }}{{site.link_jd_culture}})和所有工作期望。 1. 工具和环境设置。 1. 如果是工程师,请检阅[工程流程]({{ si...
Java
UTF-8
3,289
2.25
2
[]
no_license
package com.du.quartz.controller; import com.du.quartz.domain.AppQuartz; import com.du.quartz.service.JobService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springfr...
Python
UTF-8
4,044
2.828125
3
[ "Apache-2.0", "LicenseRef-scancode-proprietary-license" ]
permissive
# Copyright The Lightning team. # # 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 required by applicable law or agreed to in writin...
Java
UTF-8
255
2.3125
2
[]
no_license
package cn.com.cootoo.design.proxy; /** * Created by system * Date 2020/1/17 4:11 下午 * Description */ public class RealSubject implements Subject { @Override public void request() { System.out.println("do real subject "); } }
Java
UTF-8
2,008
2.03125
2
[]
no_license
package com.sobjectparser; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationCon...
C++
UTF-8
826
2.53125
3
[]
no_license
#include<iostream> #include<set> using namespace std; const int maxn = 5e4+ 10; int cnt[maxn]; struct node{ int num, cnt; node(int _num, int _cnt): num(_num), cnt(_cnt){} bool operator <(const node& a)const { if(cnt != a.cnt) return cnt > a.cnt; else return num < a.num; } }; set<node> ans; int n, t; int main...
SQL
UTF-8
1,278
3.703125
4
[]
no_license
create table individuals( id serial primary key, first_name varchar(25), last_name varchar(40), date_of_birth date, date_of_death date ); --not used create table relationships_types( relationship_type_code serial primary key, relationship_type_description varchar(40) ); create table roles( role_code serial pri...