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
93
1.625
2
[]
no_license
package org.leanpoker.player; /** * ... */ enum Suit { clubs,spades,hearts,diamonds }
C++
UTF-8
2,043
2.9375
3
[]
no_license
// // Created by sahar on 12/4/17. // #ifndef REVERSI_CLIENT_H #define REVERSI_CLIENT_H #include <string> #include "PlayerHuman.h" const int length = 50; /** * This object inherits from PlayerType (an abstract class) and iד responsible for managing the AI player's * members and implementation of PlayerType. */ c...
Markdown
UTF-8
5,417
3.203125
3
[ "MIT" ]
permissive
--- layout: post title: What’s New in RxJS 7&#58; Small Bundles and Big Changes to share image: rxjs-logo.png --- RxJS 7 has shipped! For us Angular developers, it unfortunately did not ship in time for Angular 12. I've summarized key takeaways from Ben Lesh’s talk from RxJS Live Asia and his slides below. Lesh is a ...
Python
UTF-8
877
3.015625
3
[]
no_license
import pprint N = int(input()) list = [] for i in range(N-1): list.append(str(input())) vertexes = set() def graph_from_input(): graph = {} for element in list: a, b = element.split() vertexes.add(a) vertexes.add(b) if a not in graph: graph[a] = b for v in ve...
Java
UTF-8
317
1.585938
2
[]
no_license
package com.haulmont.screenapidemos.web.airport; import com.haulmont.cuba.gui.screen.*; import com.haulmont.screenapidemos.entity.airport.Airport; @UiController("sad_Airport.browse") @UiDescriptor("airport-browse.xml") @LookupComponent("airportsTable") public class AirportBrowse extends StandardLookup<Airport> { }
C#
UTF-8
4,379
3.03125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data.SqlClient; namespace db_SmartMovers { public class Customerdetails { public string C_Id; public string C_Type_Id; public string C_Name; public ...
C++
UTF-8
1,132
3.109375
3
[]
no_license
#include <iostream> #include "my_memory.h" using namespace std; void shareDelete(){ my_shared_ptr<int> t1(new int {5}); my_shared_ptr<int> t2(t1); if(*t2 == 5) cout << "test 1 ... OK\n"; t1.~my_shared_ptr(); if(t1.isNullptr()) cout << "test 2 ... OK\n"; if(*t2 == 5) cou...
PHP
UTF-8
5,445
2.53125
3
[ "Unlicense" ]
permissive
<?php class DepartmentsController extends Controller { /** * @var string the default layout for the views. Defaults to '//layouts/docflow' */ public $layout='//layouts/column2'; public $defaultAction='admin'; /** * @return array action filters */ public function filters() { ...
Markdown
UTF-8
3,068
3.515625
4
[]
no_license
--- title: Async Reactive Declarations in Svelte JS date: "2020-01-01T00:00:00.000Z" --- One of the tricker aspects of writing an app is **handling asynchronous actions**. In Svelte, there are a number of ways to handle async code; in this tutorial, we'll compare and contrast a few of them. ## Challenge Svelte's rea...
Java
UTF-8
2,653
2.84375
3
[ "Apache-2.0" ]
permissive
package com.rincliu.library.common.persistence.rootmanager.container; import java.io.IOException; import java.io.OutputStream; import com.rincliu.library.common.persistence.rootmanager.Constants; import com.rincliu.library.common.persistence.rootmanager.utils.RootUtils; public abstract class Command { private S...
Java
UTF-8
658
2.546875
3
[ "MIT" ]
permissive
package net.anotheria.anoprise.fs; /** * Factory for file system service. * * @author abolbat */ public final class FSServiceFactory { /** * Create instance of {@link net.anotheria.anoprise.fs.FSService} with given {@link net.anotheria.anoprise.fs.FSServiceConfig}. * * @param config * - {@link...
Markdown
UTF-8
4,319
4.21875
4
[]
no_license
## [733. 图像渲染](https://leetcode-cn.com/problems/flood-fill) 有一幅以二维整数数组表示的图画,每一个整数表示该图画的像素值大小,数值在 0 到 65535 之间。 给你一个坐标 (sr, sc) 表示图像渲染开始的像素值(行 ,列)和一个新的颜色值 newColor,让你重新上色这幅图像。 为了完成上色工作,从初始坐标开始,记录初始坐标的上下左右四个方向上像素值与初始坐标相同的相连像素点,接着再记录这四个方向上符合条件的像素点与他们对应四个方向上像素值与初始坐标相同的相连像素点,……,重复该过程。将所有有记录的像素点的颜色值改为新的颜色值。 最后返回经过上色渲染后的图像...
C++
UTF-8
538
2.734375
3
[]
no_license
#ifndef PLAYER_H_ #define PLAYER_H_ #include <vector> #include <string> #include <set> #include "Tile.h" using namespace std; class Player { public: Player(); ~Player(); // void place(set<Tile*> tiles, int x, int y); // void pass(); // void exchange(set<Tile*>tiles); void setName(string name); void setS...
TypeScript
UTF-8
2,263
2.796875
3
[ "MIT" ]
permissive
import fs from "fs"; import { join as joinPath } from "path"; import type * as Preserve from "@truffle/preserve"; import type { TargetPathOptions, PathEntryOptions } from "./types"; export async function* targetPath( options: TargetPathOptions ): Preserve.Process<Preserve.Target> { const { path } = options; co...
Shell
UTF-8
623
2.859375
3
[]
no_license
#!/bin/bash set -o nounset -o pipefail -o errexit IFACE=enp0s25 config() { cat <<EOF conky.config = { background = false, own_window = true, own_window_type = 'desktop', gap_x = 0, gap_y = 0, update_interval = 1, alignment = 'top_left', use_xft = true, font = 'Inconsolata:pixe...
C#
UTF-8
398
3.28125
3
[]
no_license
using System; namespace WhereIsMyCarOOP { class Program { static void Main(string[] args) { Car car = new Car("mark", "model", "123456", "blue"); car.PrintCarInfo(); while (car.DriveLap()) { Console.WriteLine($"Car {car.Mark} drov...
Markdown
UTF-8
5,422
3.15625
3
[]
no_license
# Conceitos Básicos I ## Dado e Informação Tendo como base um sistema de computador, dados podem ser definidos como um conjunto de bits (ou de caracteres em uma macro visão) para armazenamento de caracteres e textos no formato alfanumérico ou, até mesmo, de arquivos e imagens. Basicamente, um dado é um conjunto alf...
Markdown
UTF-8
2,254
3.3125
3
[ "MIT" ]
permissive
``` X XXX X X X X X X X X X F X X X G X X X X D X A X X X ...
Python
UTF-8
489
2.625
3
[]
no_license
import sys import random n,m,c,rev,seed = map(int, sys.argv[1:]) random.seed(seed) assert c <= n assert c <= m cn = random.randint(0, c) cm = random.randint(0, c) lim = (n+m) * 5 common = lim // 2 a = [common] * cn + sorted([random.randint(common + 1, lim) for _ in range(n - cn)]) b = sorted([random.randint(1, common...
JavaScript
UTF-8
209
2.75
3
[]
no_license
class Hello extends React.Component { render() { let who = "World"; return ( <h1> Hello {who}! </h1> ); } } ReactDOM.render( <Hello/>, document.querySelector("#root"));
Python
UTF-8
2,040
3.234375
3
[]
no_license
import numpy as np from math import sqrt, pi, exp, pow, factorial, fabs, ceil distributions = [ { 'name': 'normal', 'func': lambda size: np.random.normal(size=size), 'destiny': lambda x: 1 / sqrt(2 * pi) * exp(-x * x / 2) }, { 'name': 'poisson', 'func': lambda size:...
C
UTF-8
532
3.296875
3
[]
no_license
#include "array.h" int printArray(char *st,int n) { int i = 0; if(NULL == st) { printf("The array is empty!\n"); return 1; } for(i = 0;i < n;i++) { printf("%c ",st[i]); } printf("\n"); return 0; } int getArray(void) { char str[10] = "array"; int result = 0; printf("array!This is in libarray.a"); pr...
Markdown
UTF-8
5,815
2.546875
3
[ "MIT" ]
permissive
# CryptHash.NET [![Build status (crypthash-net)](https://github.com/alecgn/crypthash-net/workflows/build/badge.svg)](#) [![Nuget version (CryptHash.Net)](https://img.shields.io/nuget/v/CryptHash.Net)](https://nuget.org/packages/CryptHash.Net) [![Nuget downloads (CryptHash.Net)](https://img.shields.io/nuget/dt/CryptHa...
Java
UTF-8
8,048
2.53125
3
[ "Apache-2.0" ]
permissive
package com.shijingsh.ai.jsat.math.optimization; import java.util.ArrayList; import java.util.List; import com.shijingsh.ai.jsat.linear.IndexValue; import com.shijingsh.ai.jsat.linear.Vec; import com.shijingsh.ai.jsat.math.Function; import com.shijingsh.ai.jsat.math.FunctionVec; import com.shijingsh.ai.jsat.linear.I...
JavaScript
UTF-8
5,237
2.53125
3
[ "MIT" ]
permissive
/* eslint-disable */ // TODO: Remove previous line and work through linting issues at next edit 'use strict'; var BufferReader = require('../encoding/bufferreader'); var BufferWriter = require('../encoding/bufferwriter'); var BufferUtil = require('../util/buffer'); var _ = require('lodash'); var isHexString = require(...
Java
UTF-8
2,358
2.6875
3
[]
no_license
package com.yhh.mybatis.dao; import com.yhh.mybatis.entity.User; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; import java.util.List; /** * @Author: -小野猪- * @Date: 2019/6/30 0:00 * @Version: 1.0 * @Desc: */ public class UserDaoImpl implements UserDao { // ...
Java
UTF-8
218
1.859375
2
[]
no_license
package com.weikun.service; import com.weikun.model.Account; /** * Created by Administrator on 2016/9/5. */ public interface IUserService { Account login( Account record); int register(Account record); }
Java
GB18030
2,762
2.796875
3
[]
no_license
package org.housy.mario; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import javax.imageio.ImageIO; public class StaticValue { // public static List<BufferedImage> allMarioImage = new ArrayList<BufferedImage>(); //ͼƬ pu...
Java
UTF-8
6,056
2.875
3
[]
no_license
package laundyclinic; import java.sql.*; import java.util.Vector; import javax.swing.*; public class MyTools { // this code is used to manipulate the JTable // columnNames and data should be return to the caller to fill in the // columns and rows of the table private Vector columnNames = new Vector()...
Markdown
UTF-8
5,438
2.546875
3
[]
no_license
# HTTP는 무엇일까요? ### ❗ HTTP란? HTTP(Hyper Text Transfer Protocol) 는 텍스트 기반의 통신 규약이며 <u>"인터넷에서 정보를 주고 받을 수 있는 프로토콜"</u> 을 의미한다. 80번 포트를 사용하며, [TCP](https://github.com/hjyeon-n/BE_TIL/blob/master/%EC%9D%B8%ED%84%B0%EB%84%B7/%EC%9D%B8%ED%84%B0%EB%84%B7%EC%9D%80%20%EC%96%B4%EB%96%BB%EA%B2%8C%20%EC%9E%91%EB%8F%99%EB%90%...
Python
UTF-8
3,091
3.5625
4
[]
no_license
def startUp(): """Read accounts from file and create dictionary with secret code as key. Returns True if successful, False otherwise""" global accts try: infile = open('accounts.txt') except: print('We are very sorry. This ATM is current uder maintainance.\nPlease try later.') ...
C++
UTF-8
340
2.6875
3
[]
no_license
#include "../library/lib.hpp" class copy { public: void solve(std::istream& in, std::ostream& out) { long long n,a,b,c; in >> n >> a >> b >> c; long long req = 4 - (n%4); long long cost[4]; cost[0] = 0; cost[1] = a; cost[2] = min(2*cost[1],b); cost[3] = min(cost[2] + cost[1],c); out << cost[...
Java
UTF-8
510
2.71875
3
[ "MIT" ]
permissive
package graphics; // This is just a helper class to keep track of the colours // that I am using, i.e. it translates the colour name to its // hex value // You can change the colour definitions if you like public class ColorDef { public static String LIGHTGRAY = "#F2F3F3"; public static String DARKGRAY...
Python
UTF-8
12,462
3.453125
3
[]
no_license
import pandas as pd import re import itertools as it import collections as cl movies_bd = pd.read_csv(r"D:\SkillFactory\Module1\movie_bd_v5.csv") # function to process strings like 'cast', 'genres', 'production_companies' def name_processor(long_string): names_list = [] for row in long_string: ...
C#
UTF-8
378
2.6875
3
[]
no_license
using System; using System.Collections.Generic; using System.Text; namespace _09_DecoratorDesignPattern.Pattern.Decorators { class ConcreteDecoratorA : AbstractDecorator { private string addedState = "Some state"; public override void Operation() { base.Operation(); ...
Markdown
UTF-8
6,033
2.515625
3
[]
no_license
--- title: "2018 IIIF Conference - Washington, DC" layout: event tags: [event ] page: overview --- The 2018 International Image Interoperability Framework ([IIIF][home-page]) Conference will be held May 21-25 in Washington, DC, co-hosted by the Library of Congress, the Smithsonian Institution, and the Folger Shakespea...
C++
UTF-8
1,157
2.640625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; const int N = 25; string dict[N][N]; int cnt[N], n, res; void dfs(string str, int last) { int l = str.size(); res = max(res, l); for (int i = 1; i <= n; i++) { if (cnt[i] == 2 || dict[last][i] == "") continue; cnt[i]++; dfs(str + dict[la...
C
UTF-8
670
3.484375
3
[]
no_license
#include<stdio.h> #include<string.h> typedef struct data_strings_t { char s1[1000]; char s2[1000]; }data_strings; data_strings strs[100] = { {"hello", "hello"}, {"hello", "helloooo"}, {"Hello", "HeLlo"}, {"Hello", "Hello"}, {"helloooooo", "hello"}, {"how are you","HOW are YOU"} }; main() ...
Go
UTF-8
292
3.09375
3
[]
no_license
package main import ( "bufio" "fmt" "os" "strings" ) func main() { scanner := bufio.NewScanner(os.Stdin) for scanner.Scan() { line := scanner.Text() terms := strings.Split(line, " ") for _, term := range terms { out := fmt.Sprintf("%s\t1", term) fmt.Println(out) } } }
C#
UTF-8
6,716
2.703125
3
[ "MIT" ]
permissive
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; using System.Linq; using Microsoft.Cci; namespace Microsoft.DotNet.AsmDiff { public static class DiffConfigurationExtensions { // O...
Java
UTF-8
1,968
2.0625
2
[]
no_license
package com.arturjoshi.account; import com.arturjoshi.project.Project; import com.arturjoshi.project.entities.ProjectAccountPermission; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import javax.persistence.*; import java.time...
Java
UTF-8
1,410
2.25
2
[]
no_license
//package YCpowergroup.mealplanner.oud; // //import javax.persistence.Embeddable; // ////@Embeddable //public class NutritionValuesDeprecated { // double netCarbs; // double carbs; // double fats; // double protein; // double calories; // // public NutritionValuesDeprecated(double netCarbs, double car...
TypeScript
UTF-8
366
3.5
4
[]
no_license
//https://leetcode-cn.com/problems/subsets/ function subsets(nums: number[]): number[][] { const n = nums.length const result: number[][] = [] for (let mask = 0; mask < 1 << n; ++mask) { const temp = [] for (let i = 0; i < n; ++i) { if (mask & (1 << i)) { temp.push(nums[i]) } } ...
Java
UTF-8
214
2.3125
2
[]
no_license
package com.springtutorial.aspect.oriented.programming.siddartha; public class Machine implements IMachine { @Override public void start() { System.out.println(" *** MACHINE STARTING ***"); } }
PHP
UTF-8
1,291
2.515625
3
[ "MIT" ]
permissive
<?php namespace App\Form; use App\Entity\User; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\PasswordType; use Symfony\Component\Form\Extension\Core\Type\RepeatedType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormEvents; use Symfony\Componen...
Markdown
UTF-8
2,959
3.03125
3
[]
no_license
# DotNetBrowser This project is to create a fully managed .NET browser implementation that can run on Windows, Linux, MacOs, and anything else that can run .NET. # Are you nuts? It would take years and tons of man-hours! The way I see things, those are excuses rather than legitimate reasons not to do this. We go to ...
Shell
UTF-8
101
2.84375
3
[]
no_license
#!/bin/bash if [[ -d $HOME/cosmin ]]; then echo "directory exists" fi else mkdir -p $HOME/cosmin
Swift
UTF-8
946
2.578125
3
[ "MIT" ]
permissive
// // ProcessingView+Transform.swift // ProcessingKit // // Created by AtsuyaSato on 2018/09/09. // Copyright © 2018年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif extension ProcessingView: TransformModelContract { public func pushMatrix()...
Python
UTF-8
1,286
2.59375
3
[ "MIT" ]
permissive
from flask import Flask, request from flask import Response from omorfi.omorfi import Omorfi app = Flask(__name__) @app.route('/') def hello(): return 'Hello World!' @app.route('/api/v1/lemmatise', methods=['POST']) def lemmatise(): def stream(text): om = Omorfi() om.load_from_dir('/usr/loc...
Python
UTF-8
2,468
2.53125
3
[ "Apache-2.0" ]
permissive
import os def vtkrow_to_dict(attributes, i): row = {} for c in range(attributes.GetNumberOfArrays()): arr = attributes.GetAbstractArray(c) values = [] comp = arr.GetNumberOfComponents() for c in range(comp): variant_value = arr.GetVariantValue(i*comp + c) ...
TypeScript
UTF-8
1,527
2.90625
3
[]
no_license
import { Component, OnInit } from '@angular/core'; import {DataService} from '../../services/data.service'; @Component({ selector: 'app-user', templateUrl: './user.component.html', styleUrls: ['./user.component.css'] }) export class UserComponent implements OnInit { name:string; //var of type string initial...
JavaScript
UTF-8
705
2.59375
3
[]
no_license
// 在首页会同时发送三个网络请求,必须在三个请求的数据都到达后再关闭loading let requestTime = 0 export function request(params) { let baseUrl = "https://api-hmugo-web.itheima.net/api/public/v1"; requestTime++; wx.showLoading({ title: '加载中', mask: true }) return new Promise((resolve, reject) => { wx.request({ ...params, url: baseU...
Go
UTF-8
3,615
2.9375
3
[ "MIT" ]
permissive
package ip import ( "encoding/binary" "fmt" "math" "math/rand" "net" "github.com/NetSys/quilt/minion/network" log "github.com/Sirupsen/logrus" ) var ( // Rand32 stores rand.Uint32 in a variable so that it can be easily mocked out // for unit tests. Nondeterminism is hard to test. Rand32 = rand.Uint32 //...
Java
UTF-8
3,963
2.203125
2
[]
no_license
package vn.com.fis.model.cinvoice; import java.io.Serializable; public class ViewCreditLimitOutput implements Serializable{ /** * */ private static final long serialVersionUID = 1L; private String account_Status; private String bill_Cycle; private String last_Billing_Date; private String payment_Due_Date; ...
PHP
UTF-8
1,927
2.78125
3
[]
no_license
<?php /* Based on UserPie Version: 1.0 : http://userpie.com */ function sendUserManagementEmail($EmailAddress, $TemplateName, $TemplateData, $Subject) { $Header; $EmailContent; $Footer; include(__DIR__."/views/mailTemplates/Header.php"); include(__DIR__."/views/mailTemplates/" . $TemplateName . ".ph...
PHP
UTF-8
237
2.65625
3
[]
no_license
<?php interface IComputer { public function whoAreYou(); public function showLoadingScreen(); public function bam(); public function closeEverything(); public function turnOff (); public function state (); }
Java
UTF-8
3,642
3.59375
4
[]
no_license
package Khasang.Java.Level0.lesson6; import java.util.*; public class HorsesInRace { private String teamName; private List<Animal> animals = new ArrayList<Animal>(); public HorsesInRace(String teamName, Animal... raceParticipants) { //if (raceParticipants.length == 0) { throw new IllegalArgumentE...
Python
UTF-8
650
2.703125
3
[]
no_license
# %matplotlib inline import string import requests from bs4 import BeautifulSoup from selenium import webdriver def auto_click(): url = "https://www.woolworths.com.au//" browser = webdriver.Chrome() browser.get(url) item = browser.find_element_by_id('categoryHeaderSmallFormat-browseButton')...
TypeScript
UTF-8
12,501
3.484375
3
[ "MIT" ]
permissive
import { describe, it, expect } from "vitest"; import LinkedList from "@/utils/linked-list"; describe( "Linked list", () => { it( "should by default be empty upon construction", () => { const list = new LinkedList(); expect( list.head ).toBeNull(); // expected list to not contain a head upon const...
Markdown
UTF-8
2,341
3.21875
3
[ "Apache-2.0" ]
permissive
--- morea_id: experience-H07 morea_type: experience title: "H07: Two-Dice Pig Game" published: True morea_start_date: "2016-10-21T23:55:00" morea_summary: "Write a program that allows players to play Two-Dice Pig." morea_labels: - "Homework Assignment" --- # ICS 111 Homework Assignment H07: Two-Dice Pig Game 1) W...
JavaScript
UTF-8
974
3.109375
3
[]
no_license
"use strict"; (function(){ var Vec2D = (function(){ function Vec2D(x1, y1){ this.x = x1; this.y = y1; } Vec2D.prototype.constructor = Vec2D; Vec2D.prototype.x = function(){ return this.x; }; Vec2D.prototype.y = function() { return this.y; }; Vec2D.prototype.setX = function(x1) { thi...
Shell
UTF-8
133
2.90625
3
[]
no_license
#!/usr/bin/env bash #Displays Holberton School 10 times using while loop. for line in * do echo "$line" | cut -d '-' -f 2 done
Java
UTF-8
1,143
2.4375
2
[]
no_license
package com.ualr.emoweat.core.utils; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.util.Properties; /** * @author - Tolgahan CAKALOGLU "Jackalhan" */ public class Property { private static Properties...
Python
UTF-8
3,068
2.609375
3
[ "BSD-3-Clause" ]
permissive
import xmltodict as xmld #JMDict parsing from gzip import GzipFile #JMDict streaming import pickle #cache serialization import romkan #kana/romaji conversion def loopOn(input): if isinstance(input,list): for i in input: yield i; else: yield input; class Dictionary: def __init__(self, jmfile, kjfile): ...
Java
UTF-8
354
2.71875
3
[]
no_license
package me.Lorinth.BossApi.Abilities; import org.bukkit.Location; import org.bukkit.entity.Creature; public class Teleport extends Action{ Location loc; public Teleport(Location loc){ this.loc = loc; } @Override public void execute(Creature ent){ //Entity doesn't change worlds loc.setWorld(ent.getWorl...
Java
UTF-8
19,013
1.820313
2
[]
no_license
package jp.groupsession.v2.sch.sch040kn; import java.sql.Connection; import java.sql.SQLException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import jp.co.sjts.util.NullDefault; import jp.groupsession.v2.cmn.GSConst; ...
Rust
UTF-8
3,772
3.734375
4
[]
no_license
//! A graph data structure backed by a Vec and a Hashmap. The Vec stores the //! vertices whereas the Hashmap provides a quick way to find a vertex by its //! name. // todo: // - implement tests // - test performance for this implementation agains one soleny based on HashMap use std::collections::{HashMap, HashSet}; ...
Java
UTF-8
776
2.25
2
[]
no_license
import org.apache.log4j.Logger; import org.sonar.template.java.checks.myException; public class logTCheckFile { private static Logger logger = Logger.getLogger(logTCheckFile.class); public void loggingWithID(String nonsense) throws myException{ logger.error("errorID:20160801 this is an error"); return; ...
Java
UTF-8
1,359
2.46875
2
[]
no_license
package gov.noaa.ncdc.wct.decoders.cdm; //package gov.noaa.ncdc.ndit.decoders.cdm; // //import org.junit.Test; // //public class TestGridDatasetContours { // // // @Test // public void testContour() throws Exception { // GridDatasetContours ce = new GridDatasetContours(); // String inFile = "H:\\Net...
PHP
UTF-8
980
3.390625
3
[]
no_license
<?php class Actor { private $id; private $first_name; private $last_name; private $movie_id; private $title; public function __construct($first_name, $last_name) { $this->first_name = $first_name; $this->last_name = $last_name; } public function setFirstName($first_name) ...
JavaScript
UTF-8
11,670
3.046875
3
[]
no_license
// Hunter Figueroa // New Relic Code Challenge // 2018 8 28 // // Mobx AppStore/Data layer, contains most of site data and methods, and all API calls import {observable, action, toJS} from 'mobx'; import moment from 'moment'; export default class AppStore{ constructor(){ // Initialize Day Range t...
Java
UTF-8
1,338
3.78125
4
[]
no_license
package com.zhangpan.leetcode.tree; /** * 110. 平衡二叉树 * 给定一个二叉树,判断它是否是高度平衡的二叉树。 * * 本题中,一棵高度平衡二叉树定义为: * * 一个二叉树每个节点 的左右两个子树的高度差的绝对值不超过 1 。 * * 示例 1: * * * 输入:root = [3,9,20,null,null,15,7] * 输出:true * 示例 2: * * * 输入:root = [1,2,2,3,3,null,null,4,4] * 输出:false * 示例 3: * * 输入:root = [] * 输出:true * ...
C++
UTF-8
1,160
2.859375
3
[]
no_license
#pragma once #include <vector> #include "glUtility/Vertex.h" #include "math/Vector.h" namespace Curves { class Curve { public: Curve( const MathTypes::Vector<3, float>& start, const MathTypes::Vector<3, float>& end, const GLUtility::Colour<float>& colourOfControlCurve, const GLUtili...
C#
UTF-8
707
3.140625
3
[]
no_license
using System; namespace WorkingWithNulls { class Program { static void Main(string[] args) { Person[] person = new Person[3] { new Person(){Name = "Sarah"}, new Person(), null }; //int b = (int)pers...
Markdown
UTF-8
1,038
2.578125
3
[]
no_license
# leuko-tf ### local development * Create a virtual machine using the latest version of Ubuntu 64-bit. * Launch the virtual machine, upgrade and update ``` sudo apt upgrade sudo apt update ``` * Install TensorFlow dependencies ``` sudo apt install python-pip python-dev python-virtualenv git ``` * Create virtual env...
C#
UTF-8
1,884
3.03125
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Threading.Tasks; using UnoServer.Services; namespace UnoServer.Models { public class UnoCard : IEquatable<Un...
Java
UTF-8
1,239
2.5
2
[]
no_license
package com.demo.booking.service; import java.util.List; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.demo.booking.dto.MovieDTO; import com.demo.booking.repo.MovieRepo; @Service public class MovieServiceImpl imple...
Java
UTF-8
5,521
2.1875
2
[ "Apache-2.0" ]
permissive
/* * Copyright © 2021-present Arcade Data Ltd (info@arcadedata.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...
JavaScript
UTF-8
4,077
2.734375
3
[]
no_license
import { clearButton, colorPicker, thicknessSlider, drawButton, eraseButton, colorPickerBtn, thicknessBtn, thicknessBarPopup } from "./constants.js"; import { getRoomId, CanvasData } from "./helpers.js"; import { drawStroke, eraseStroke } from "./stroke_events.js"; import { handleToolbar...
Swift
UTF-8
777
3
3
[]
no_license
// // SchoolSAT.swift // MVCSample // // Created by Park, Chanick on 3/8/18. // Copyright © 2018 Chanick Park. All rights reserved. // import Foundation // // School SAT Model // struct SchoolSAT : Codable { let dbn: String let school_name: String let num_of_sat_test_takers: String let sat_critic...
Java
UTF-8
4,350
2.421875
2
[]
no_license
package selenium; import org.testng.annotations.Test; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chr...
Python
UTF-8
97,661
3.140625
3
[]
no_license
__FILENAME__ = build_html #!/usr/bin/env python import markdown f_in = open('README.md', 'r') guidelines = "".join(f_in.readlines()) md = markdown.Markdown(safe_mode='escape', extensions=['urlize']) html = md.convert(guidelines) html = html.replace('&lt;true_pre&gt;', '<pre>') html = html.replace('&lt;/...
PHP
UTF-8
1,992
3.109375
3
[ "MIT" ]
permissive
<?php namespace Perfumer\Component\Container\Storage; /** * FileStorage * Uses php-files to store parameters. * You must register folders and files with your parameters first. * All folders and files must be registered before first "getParamGroup" call. * * @package perfumer/container * @category storage ...
Markdown
UTF-8
3,252
3.34375
3
[]
no_license
--- layout: post title: 用JavaScript来说数据结构 category: 编程 tag: JavaScript exception: readtime: 12 --- ## 什么是数据结构 * 在计算机科学中,数据结构(data structure)是计算机存储、组织数据的方式。 * 数据结构是指相互之间存在一种或多种特定关系的数据元素的集合。 ## 数据结构概念定义 * 数据:是用来描述一种客观事物的符号,分为数据元素、数据对象、数据项等。 * 结构:数据元素相互之间的关系,分为逻辑结构和存储结构两大类。 * 数据逻辑结构:指数据元素之间的前后件关系,分为集合、线性结构、非线性结构等。 * 数据...
Java
UTF-8
224
1.960938
2
[]
no_license
package com.tzy.annotationdemo; import org.springframework.stereotype.Component; @Component public class TestService implements Service { @Override public String getService() { return "das ist test service"; } }
Python
UTF-8
577
3.0625
3
[]
no_license
def maxNum(WH, cut_lst): last = 0 max_len = 0 for i in range(len(cut_lst)): if max_len < (cut_lst[i] - last): max_len = cut_lst[i] - last last = cut_lst[i] if max_len < (WH - last): max_len = WH - last return max_len W, H = map(int, input().split(' ')) N = int(in...
PHP
UTF-8
3,811
2.625
3
[]
no_license
<?php if(isset($_GET['edit_user']) && !empty($_GET['edit_user']) ){ $user_id = $_GET['edit_user']; $su = $connection->prepare("SELECT * FROM users WHERE user_id=?"); $su->bind_param("i", $user_id); $su->execute(); if(!$su){ printf("Error: %s.\n", $su->error); } ...
PHP
UTF-8
4,875
2.5625
3
[]
no_license
<?php namespace jinglan\ethereum; /** * Created by PhpStorm. * User: op * Date: 2018-05-25 * Time: 15:39 */ use Yii; class EthereumRPC { //private $NODE_HOST = "http://116.62.129.180:8545"; //private $NODE_HOST = "http://47.105.103.240:8545"; private $method; //Ethereum RPC method private $params; ...
Java
UTF-8
6,180
1.929688
2
[]
no_license
package com.nonfamous.tang.web.home; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.multiaction.MultiActionController; import org.springframework.web.servlet.view.RedirectView;...
Java
UTF-8
1,015
2.75
3
[]
no_license
package yanry.lib.java.entity; import java.util.HashMap; import java.util.Map; import java.util.UUID; /** * @author yanry * * 2015年10月4日 */ public class Session { private static Map<Integer, Session> uidMap = new HashMap<Integer, Session>(); private static Map<String, Session> sidMap = new HashMap<Strin...
JavaScript
UTF-8
729
3.75
4
[]
no_license
const a = { nome: 'Carlos'} const b = a console.log(b) //Atribuição por Referencia b.nome = 'Opa' //B aponta para o mesmo endereco de A, logo se eu alterar b, a será alterada console.log(b) console.log(a) let c = 3 let d = c d++ console.log(c) console.log(d) let valor //Variavel não inicializada console.log(valor)...
Ruby
UTF-8
1,001
2.8125
3
[]
no_license
module ExcelAdapter class ProjectReport attr_accessor :project def initialize(project) @project = project end def to_excel excel = Excel.new populate_project_properties(excel) populate_iterations(excel) excel.write_to_file("#{@project.name}.xls") excel.path e...
Python
UTF-8
1,322
2.890625
3
[ "BSD-2-Clause" ]
permissive
from .atoms import MemoryLocation, Register from .dataset import DataSet class Definition(object): def __init__(self, atom, codeloc, data): self.atom = atom self.codeloc = codeloc self.data = data # convert everything into a DataSet if not isinstance(self.data, DataSet):...
Markdown
UTF-8
4,698
2.796875
3
[]
no_license
--- description: "low fat Chocolate Cupcakes w/ Vanilla Buttercream Frosting | how to cook Chocolate Cupcakes w/ Vanilla Buttercream Frosting" title: "low fat Chocolate Cupcakes w/ Vanilla Buttercream Frosting | how to cook Chocolate Cupcakes w/ Vanilla Buttercream Frosting" slug: 447-low-fat-chocolate-cupcakes-w-vanil...
Java
UTF-8
10,361
2.171875
2
[]
no_license
/* * JettyDesktop is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * Free Software Foundation,version 3. * * JettyDesktop is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the imp...
Java
UTF-8
1,336
2.234375
2
[]
no_license
package com.wz.option; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.wz.test.AdminCRUD; import com.wz.test.MusicTypeCRUD; public class listM...
Rust
UTF-8
2,600
3.0625
3
[]
no_license
use super::LabeledGraph; pub fn djikstra<T>(g: &LabeledGraph<T>, s: usize) -> Vec<Option<T>> where T: std::ops::Add<Output = T> + Ord + Default + Copy, { use std::{cmp::Ordering, collections::BinaryHeap}; struct Node<T>(usize, T); impl<T: PartialEq> PartialEq for Node<T> { fn eq(&self, other: &...
Java
UTF-8
352
2.5
2
[]
no_license
package com.dream.composite.menu; /** * HeadFirstDesignPatterns * Created by SuSong on 2015-04-14 下午8:26. */ public class Waitress { private MenuComponent menuComponent; public Waitress(MenuComponent menuComponent){ this.menuComponent = menuComponent; } public void printMenu(){ men...
Java
UTF-8
322
1.96875
2
[]
no_license
package example.spring.social.with.facebook.repository; import example.spring.social.with.facebook.model.User; import org.springframework.data.jpa.repository.JpaRepository; import java.util.Optional; public interface UserRepository extends JpaRepository<User,Integer> { Optional<User> findByEmail(String email); ...
Java
UTF-8
1,960
3.328125
3
[]
no_license
package thread.pool; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicInteger; public class QueueOverflowPolicy { public static void main(String[] args){ ThreadPoolExecutor executor = new ThreadPoolExecutor(2, 2, 10, TimeUnit.SECONDS, new ArrayBlocki...