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
C
UTF-8
8,935
3.4375
3
[]
no_license
// ATM code by using c programming language #include<stdio.h> #include<stdlib.h> void pingenerate(); int pin(int a); void condition(); int balance(int amount); int credit(int credit_amount); int check_account(int account_number); int main(){ int option; ...
Markdown
UTF-8
7,975
2.84375
3
[]
no_license
Title: My view on microservice arch Date: 2020-08-24 09:48 Tags: thoughts Slug: my view on microservice arch Author: Feng Xia <figure class="col s12"> <img src="images/DSC_1100384.JPG"/> </figure> This is an email w/ teammates regarding my thinkings on microservice arch and a few other things happening in the proje...
Java
UTF-8
977
2.21875
2
[]
no_license
package ar.edu.unlam.diit.scaw.services; import java.util.List; import ar.edu.unlam.diit.scaw.entities.Usuario; public interface UsuarioService { public void crearUsuario(Usuario usuario) throws Exception; public Boolean usuarioYaExiste(String username); public List<Usuario> getListaDeUsuarios(); public ...
Java
UTF-8
2,697
2.265625
2
[]
no_license
package com.forever.zhb.server.server.controller; import java.io.BufferedReader; import java.io.File; import java.io.InputStream; import java.io.InputStreamReader; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http...
C#
UTF-8
467
2.703125
3
[]
no_license
using System; using System.Linq.Expressions; namespace SpecUI.Extensions { public static class ExpressionExtensions { public static string GetName<T>(this Expression<Func<T>> exp) { var body = exp.Body as MemberExpression; if (body == null) { var ubody = (UnaryE...
Markdown
UTF-8
2,648
2.546875
3
[ "MIT" ]
permissive
# p2p-gate Шлюз Bank-gate обеспечивает перевод с карты на карту через банк Тинькофф, резерв Бин-Банк --- Перед сборкой билда необходимо отредактировать следуцющие переменные в файле .config **CALL_BACK_PAY***=http://<имя хоста докера>:8226/pay/confirm **ERROR_PAGE** страница на которую будет переадресовываться пол...
C++
UTF-8
3,440
2.6875
3
[ "MIT", "JSON" ]
permissive
#include "screenshot.hpp" #include "../util/file_system.hpp" #include <iostream> #include <string> #include <gtk/gtk.h> #include <unistd.h> #include <xcb/xcb.h> const std::string g_defaultModule = "screenshot_static"; std::string g_filename = ""; std::string g_module = ""; GtkBuilder* g_pBuilder = nullptr; GtkWidge...
C
UTF-8
3,974
4.0625
4
[]
no_license
#include <stdio.h> #include <string.h> #include <math.h> /* * Lab Sheet 3 */ /* Question 1 Complete the function below which converts a hexadecimal string into its decimal value. (Do not use a C standard library function.) The main function calls this function with an example hexadecimal value. Chan...
Java
UTF-8
4,269
2.6875
3
[]
no_license
package com.agileengine.analyzer.parser; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import java.io.FileNotFoundException; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; impor...
JavaScript
UTF-8
889
3.875
4
[]
no_license
//"async and await make promises easier to write" // async makes a function return a Promise // await makes a function wait for a Promise //here i am work with js promise async function myDisplay() { try{ let myPromise = new Promise(function(myResolve, myReject) { setTimeout(function() { ...
Go
UTF-8
2,126
3.34375
3
[]
no_license
package eventhandler import ( "fmt" "sync" ) // Registry stores the concrete `eventhandler.Interface` implementations registered with the system. type Registry struct { mutex sync.RWMutex registry map[EventType]Interface } // NewRegistry creates a new `Registry` object. // // This should typically only be use...
Java
UTF-8
2,484
3.578125
4
[]
no_license
import java.util.*; import java.util.stream.Collectors; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); List<Set<Integer>> bingoLines; List<List<Integer>> card = new ArrayList<List<Integer>>(5); int number, plays, n = scanner.ne...
Java
UTF-8
509
1.960938
2
[]
no_license
package com.lanpang.server.service.impl; import com.lanpang.server.dao.UserDao; import com.lanpang.server.dataobject.UserInfo; import com.lanpang.server.service.IUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class UserServic...
C#
UTF-8
856
3.109375
3
[]
no_license
using Xunit; namespace Solutions.Event2017.Day08 { public class Tests { [Fact] public void Problem1_Example1() { string[] input = { "b inc 5 if a > 1", "a inc 1 if b < 5", "c dec -10 if a >= 1", "c inc -20 if c == 10" ...
Rust
UTF-8
1,363
3.484375
3
[ "MIT" ]
permissive
/*! * https://leetcode.com/explore/challenge/card/may-leetcoding-challenge-2021/599/week-2-may-8th-may-14th/3738/ */ pub struct Solution {} impl Solution { // /// a normal way // pub fn count_primes(n: i32) -> i32 { // (0..n) // .filter(|x| *x == 2 || *x % 2 != 0) // .filter(...
Go
UTF-8
3,441
3
3
[ "Apache-2.0" ]
permissive
package beehive import "fmt" // CellKey represents a key in a dictionary. type CellKey struct { Dict string Key string } // AppCellKey represents a key in a dictionary of a specific app. type AppCellKey struct { App string Dict string Key string } // Cell returns the CellKey of this AppCellKey. func (ack Ap...
Java
UTF-8
687
2.5
2
[]
no_license
package com.ctbu.javateach666.util; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; /** * BCrypt加密 * @author luokan * */ public class BCryptEncoderUtil { public final static String passwordEncoder(String password){ BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); ...
Python
UTF-8
1,817
2.75
3
[ "MIT" ]
permissive
# -*- coding: utf-8 -*- import cv2 import numpy as np import sys reload(sys) sys.setdefaultencoding('utf8') def stretch(pixel, mini, maxi): return (pixel-min_i)*(max_o-min_o)/(max_i-min_i)+min_o def shrink(pixel, mini, maxi, mins, maxs): return (max_s-min_s)*(pixel-min_i)/(max_i-min_i)+min_s def realzado(ima...
JavaScript
UTF-8
1,800
2.609375
3
[]
no_license
function MyStool(scene) { CGFobject.call(this,scene); this.tableAppearance = new CGFappearance(this.scene); this.tableAppearance.loadTexture("../resources/images/table.jpg"); this.tableAppearance.setDiffuse(1,1,1,1); this.tableAppearance.setSpecular(0,0,0,1); this.tableAppearance.setShininess(200); this.uni...
Markdown
UTF-8
2,525
2.65625
3
[]
no_license
# Purpose This is a basic API written as a learning exercise to understand http requests writing to a Mongo-memory-server. Tests demo the functionality. # Infrastructure - INCREASE KNOWLEDGE OF DEV OPS Node server can be run as a docker container. To progress I first set up AWS Codepipelin...
Swift
UTF-8
5,719
2.5625
3
[]
no_license
// // SearchController.swift // ClickAndShare // // Created by Madhusudhan B.R on 7/19/17. // Copyright © 2017 Madhusudhan. All rights reserved. // import UIKit import FirebaseDatabase import FirebaseAuth class SearchController : UICollectionViewController,UICollectionViewDelegateFlowLayout,UISearchBarDelegate ...
Java
UTF-8
1,868
3.546875
4
[ "Apache-2.0" ]
permissive
package EffectiveJava3rd.hMethods; //50 必要时进行防御性拷贝 public class H50 { //愉快使用Java的原因,它是一种安全的语言(safe language)。 //必须防御性地编写程序,假定类的客户端尽力摧毁类其不变量。 //从Java8开始,使用Instant(或LocalDateTime或ZonedDateTime)代替Date。 //防御性拷贝是在检查参数(条目49)的有效性之前进行的,有效性检查是在拷贝上而不是在原始实例上进行的。虽然这看起来不自然,但却是必要的。 //不要使用clone方法对其类型可由不可信任子类化的参数进...
Java
UTF-8
3,285
2.203125
2
[]
no_license
package com.xuh.platform.module.account.controller; import java.util.Date; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotatio...
TypeScript
UTF-8
1,180
2.609375
3
[ "MIT" ]
permissive
import type { PayloadAction } from '@reduxjs/toolkit'; import { initialBubbleState } from '../../state'; import type { BubbleStateElementsEnvironmentAction, BubbleStateElementsEnvironmentItemList, BubbleState, } from '@bubble/types'; export const addEnvironmentInList = ( state: BubbleState, action: PayloadAc...
C#
UTF-8
1,469
2.84375
3
[]
no_license
using System.Linq; using FoodCalendar.BL.Models; using FoodCalendar.DAL.Entities; using FoodCalendar.DAL.Factories; namespace FoodCalendar.BL.Mappers { public static class MealMapper { public static MealModel MapEntityToModel(Meal entity) { if (entity != null) { ...
SQL
UTF-8
1,001
3.359375
3
[]
no_license
drop database LzAGV; create database LzAGV; use LzAGV; -- creat table -- t_transport_plan create table t_transport_plan( id int(8) unsigned primary key auto_increment, product varchar(30), start_place varchar(30), end_place varchar(30), car_num varchar(10), start_time timestamp default CURRENT_TIMESTAM...
Ruby
UTF-8
1,308
3.234375
3
[ "Apache-2.0" ]
permissive
Dir.chdir("..") if File.basename(Dir.pwd) == "examples" $LOAD_PATH.unshift(Dir.pwd + "/lib") require "use" module Mod_A def meth_a "hello" end def meth_b "world" end end module Mod_B def meth_a "goodbye" end def meth_b "new york" end def meth_c "adios" end ...
Markdown
UTF-8
8,498
3.140625
3
[ "MIT" ]
permissive
--- title: "Quickstart and Examples" --- `parallel`'s main goal is to make the process of parallelizing code transparent to us developers. For that, it offers 2 main functions (with their respective non-blocking versions): * `parallel.map`: to parallelize the same function with multiple arguments. * `parallel.par`: t...
C++
GB18030
1,680
3.671875
4
[]
no_license
/* time : 2015-5-14 author : ht comment: ѾŹе鹹Ϊƽ */ #include<iostream> #include<cmath> #include<cstring> using namespace std; //Definition for a binary tree node. struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; }; struct TreeNode* Node(struct TreeNode* current, int*array, int nums)...
Java
UTF-8
2,805
2.0625
2
[]
no_license
package com.brothersplant.domain; import java.util.Date; public class UserInfoVO { private String id; private String password; private String name; private String nickname; private String birth; private String email; private String tel; private String addr; private String profile; private String secure; ...
Java
UTF-8
8,672
3.34375
3
[]
permissive
package Thirteenth; // 17명의 사람이 있다. 17명을 임의로 1 ~ 4 팀으로 // 나눌것이다. // 1 팀 : 4 명 // 2 팀 : 4 명 // 3 팀 : 4 명 // 4 팀 : 5 명 으로 나눠야 한다. // 팀을 나누는건 랜덤하게 나눠져야 한다. // 1번. 17명에게 임의의 배열 번호를 부여한다. // 2번. 17명에게 0 ~ 16 번의 랜덤숫자를 부여한다 // 3번. 부여받은 숫자를 기준으로 4 / 4 / 4 / 5 를 나눈다. import java.util.ArrayList; import java.util.Iterator; cl...
JavaScript
UTF-8
172
2.75
3
[]
no_license
/** get minimum angle between angles */ const MinAngleBetween = function(a, b) { return Math.atan2(Math.sin(b - a), Math.cos(b - a)) }; export default MinAngleBetween;
Java
UTF-8
1,666
2.8125
3
[]
no_license
package dto; import entities.Rental; import java.util.Date; public class RentalDTO { public long id; public String userName; public int rentalDays; public Date rentalDate; public double totalRentalPrice; public String brand; public String model; public int year; public double pric...
C++
UTF-8
865
2.96875
3
[]
no_license
// link to question - https://leetcode.com/problems/number-of-digit-one/ class Solution { public: int countDigitOne(int num) { if(num < 0) return 0; int ans = 0, c1 = 0, c2, rem, val; string n = to_string(num); for(int i = n.size() - 1; i >= 0; i--){ c1++; va...
C++
UTF-8
5,220
2.890625
3
[ "MIT" ]
permissive
#include "dfs_time.h" #include "dfs_string.h" static char *week[] = { (char *)"Sun", (char *)"Mon", (char *)"Tue", (char *)"Wed", (char *)"Thu", (char *)"Fri", (char *)"Sat" }; static char *months[] = { (char *)"Jan", (char *)"Feb", (char *)"Mar", (char *)"Apr", (char *)"May", (char *)"Jun", (char *)"Jul", ...
Java
UTF-8
22,165
2.046875
2
[]
no_license
package com.yash.RMS.TestAction.ProjectAttribute; import org.openqa.selenium.By; import com.yash.RMS.CustomProperties.Constant; import com.yash.RMS.CustomProperties.Report; import com.yash.RMS.POM.ProjectAttribute.PageObjects_ProjectAttribute; import com.yash.RMS.POM.ResourceAttribute.PageObjects_ResourceAttri...
Java
UTF-8
243
2.34375
2
[]
no_license
package Inheritance; public class App { public static void main(String[] args) { Machine obj1=new Machine(); obj1.start(); obj1.stop(); Car obj2=new Car(); obj2.start(); obj2.wipewindshield(); obj2.accelerate(); obj2.stop(); } }
Java
UTF-8
1,238
2.25
2
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package beans; import dao.Dao; import java.util.Date; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionSc...
Markdown
UTF-8
3,029
2.609375
3
[]
no_license
--- layout: blog title: Strange Day lede: Alchemy & Autism featured_image: >- https://res.cloudinary.com/dthkwbvgt/image/upload/t_BlogCardThumb/v1586267897/668473906_2ee0e3f97b_c_efyzdk.jpg date: 2020-04-06T15:25:02.054Z tags: - autism - symbols - home learning - home schooling - lessons --- What was I doin...
Java
UTF-8
340
1.539063
2
[]
no_license
package me.wang.featureconfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class FeatureconfigApplication { public static void main(String[] args) { SpringApplication.run(FeatureconfigApplication.cla...
Java
UTF-8
1,039
2.1875
2
[ "MIT" ]
permissive
package tv.dyndns.kishibe.qmaclone.server; import java.io.IOException; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServlet; import com.google.common.base.Preconditions; @SuppressWa...
Ruby
UTF-8
145
2.609375
3
[]
no_license
class TennisTournament def max_courts max_courts = p / 2 return max_courts if c > max_courts return c if c <= max_courts end end
Java
UTF-8
371
1.710938
2
[ "MIT" ]
permissive
//,temp,QueueStorePrefetch.java,97,106,temp,QueueStorePrefetch.java,70,80 //,3 public class xxx { @Override protected synchronized boolean isStoreEmpty() { try { return this.store.isEmpty(); } catch (Exception e) { LOG.error("Failed to get message count", e); ...
Markdown
UTF-8
46,469
3.078125
3
[]
no_license
title: 一些 iOS 小技巧与注意点(持续更新) date: 2017/2/9 10:07:12 categories: iOS tags: - 学习笔记 - 持续更新 ------ 这篇中将收集一些关于 iOS 开发中的一些小技巧以及注意事项,可能比较零散。 <!--more--> ### 隐藏Xcode 对于 performSelector 方法的⚠️ 使用 performSelector 方法,Xcode 会提示会可能产生内存泄漏,可以添加这两句宏在方法上,就不会有⚠️了: ```objc #pragma clang diagnostic push #pragma clang diagnostic ...
Python
UTF-8
9,263
2.765625
3
[]
no_license
import re; import gconst; import parsing import os; from collections import *; from Bio.Seq import reverse_complement; from itertools import combinations, product, combinations_with_replacement; Mismatch = namedtuple("Mismatch", "fr, to, position"); Deletion = namedtuple("Deletion", "fr, position"); Insertion = namedt...
Java
UTF-8
1,662
2.703125
3
[ "BSD-3-Clause" ]
permissive
/* * Copyright (c) 1998-2018 John Caron and University Corporation for Atmospheric Research/Unidata * See LICENSE for license information. */ package ucar.nc2.iosp; /** * Uses longs for indexing, otherwise similar to ucar.ma2.Index * * @author caron * @since Jul 30, 2010 */ public class IndexLong { private i...
Java
UTF-8
44,666
2.09375
2
[ "Apache-2.0" ]
permissive
package com.gh.mygreen.xlsmapper.cellconverter; import static com.gh.mygreen.xlsmapper.TestUtils.*; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; import java.awt.Point; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream...
Markdown
UTF-8
1,261
3.1875
3
[]
no_license
# Host_Url-Anomaly-Detection-with-Word-Embedding This project explores the dataset in the internal system, aiming to accurately spot the potential host_url anomaly with the help of word embeddings. # Data Fetched from elasticsearch with the assigned score to indicate its severity level. Complied in a csv file with ...
Java
UTF-8
455
2.671875
3
[]
no_license
package sample.utils; import javafx.scene.paint.Color; import java.util.concurrent.ThreadLocalRandom; public class ColorSelector { private static Color[] colors = { Color.BLUE, Color.BROWN, Color.GREEN, Color.GREY, Color.ORANGE, Color.PINK, Color.PURPLE, Color.RED, Color.WHITE, Color.YELLOW}; public...
C++
UTF-8
1,296
3.140625
3
[]
no_license
/// Emil Hedemalm (base from Fredrik Larsson) /// 2015-05-20 #include <iostream> #include "Windows.h" int main (int argc, char *argv[]) { int mode = 0; enum{ BASIC, BASIC_GL, MULTI_GL, MULTI_GL_THREADED }; for (int i = 0; i < argc; ++i) { char * arg = argv...
Markdown
UTF-8
3,138
3.03125
3
[]
no_license
# TP 102: How to Use Git and GitHub Git and GitHub are commonly used tools in open source practice. Whether you are considering contribute to an open source project or start your own open source project. This course includes a collection of Git and GitHub related learning materials and will guide you through everythin...
Python
UTF-8
1,725
3.015625
3
[ "MIT" ]
permissive
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from six.moves import range import numpy as np __all__ = [ 'effective_sample_size', 'effective_sample_size_1d', ] def effective_sample_size_1d(samples): """ Compute the effective sa...
Python
UTF-8
2,132
3.546875
4
[]
no_license
from sqlalchemy import create_engine #object relation mapping(store object in relational db) from sqlalchemy.ext.declarative import declarative_base; from sqlalchemy import Column, Integer, String; from sqlalchemy.orm import sessionmaker; Base = declarative_base() #global var, base class provided by SqlAlchemy to ORM ...
Shell
UTF-8
93
2.8125
3
[]
no_license
#!/bin/bash for c in $@ { make -C $c $FOCP_SECTION if [ "$?" != "0" ] then break fi }
Java
UTF-8
228
3.015625
3
[]
no_license
package com.company; public class Storage { public double availableCash(double cash, double price) { System.out.println("Your available balance is £" + (cash - price) + "."); return cash - price; } }
Markdown
UTF-8
3,261
2.859375
3
[]
no_license
# ID3 Decision Tree This is an implementation of ID3 decision tree algorithm. ## Structure ```ID3/dtree.py``` is the main file to be executed ```ID3/DT_Model.py``` is the model class file that builds a ID3 decision tree ## Usage ```shell python3 ID3/dtree.py [data_folder_path] use_full_sample max_depth u...
JavaScript
UTF-8
2,339
3.296875
3
[]
no_license
// var salary = document.getElementById("salary").value; // let salaryContent = Number(salary); // console.log(salary); function CalcDeductions() { alert ("Hello we are in the Quebec tax calculator"); let salary1 = document.getElementById("salary").value; let salary = parseInt(salary1); if (salary>=42705 && sal...
Java
UTF-8
850
2.3125
2
[]
no_license
package com.byted.chapter5; import com.google.gson.annotations.SerializedName; import java.util.List; class ArticleResponse { @SerializedName("errorCode") public int errorCode; @SerializedName("errorMsg") public String errorMsg; @SerializedName("data") List<Article> articles; public stat...
Shell
UTF-8
2,525
3.953125
4
[]
no_license
#!/bin/sh # # Kernel NET hotplug params include: # # ACTION=%s [register or unregister] # INTERFACE=%s . /lib/rc-scripts/functions.network mesg() { /usr/bin/logger -t $(basename $0)"[$$]" "$@" } debug_mesg() { : } # returns true if device is either wireless, usbnet or is named eth* and supports ethtool eth...
Java
UTF-8
1,601
2.5625
3
[]
no_license
package com.detection.UtilLs; import com.sun.imageio.plugins.common.InputStreamAdapter; import com.sun.javafx.image.IntPixelGetter; import javafx.util.Pair; import java.io.File; import java.io.FileInputStream; import java.io.InputStreamReader; import java.util.HashMap; import java.util.Properties; public class readP...
PHP
UTF-8
98,756
2.53125
3
[]
no_license
<?php // ************************************************************************************// // * WoltLab Burning Board 2 // ************************************************************************************// // * Copyright (c) 2001-2004 WoltLab GmbH // * Web http://www.woltlab.de/ // * License ...
Java
UTF-8
167
1.90625
2
[]
no_license
package com.testtask.exception; public class MazeBuildException extends AppException{ public MazeBuildException(String message) { super(message); } }
C++
UTF-8
2,192
3.296875
3
[]
no_license
#include "List.h" #include <cstdio> #include <cstddef> using namespace std; List::List() : _len(0) {} List::List(unsigned int _length) : Array(_length), _len(_length) {} List::List(const List &other){ _len = other._len; if (_len>0) { _Array = new long [_len]; for (int i=0; i < _len; ...
JavaScript
UTF-8
2,136
3.046875
3
[ "MIT" ]
permissive
'use strict'; const client = require('./client.js'); var checkNotInsideDatabase = true; var signinChecking = { signinFunction: function (obj, res) { let userName = obj.user; let password = obj.pass; let confirmPassword = obj.confirm; client.query(`SELECT username FROM users;`) ...
Java
UTF-8
460
2.15625
2
[]
no_license
package org.pih.hivmigration.common.code; import java.util.Arrays; import java.util.List; /** * This corresponds to the hiv_exam_system_status.system values */ public enum PartnerReferralStatus implements CodedValue { REFERRED("t"), NOT_REFERRED("f"), NO_PARTNER_IDENTIFIED("9"); private String value; Partne...
Java
UTF-8
1,075
3.15625
3
[]
no_license
package Multiplayer.Sudoku.Protocol; public class MovePacket extends Packet { private int value; private int row; private int col; public MovePacket(int value, int row, int col) { super(PacketTypes.MOVE); this.value = value; this.row = row; this.col = col; ...
PHP
UTF-8
986
2.5625
3
[]
no_license
<?php namespace CaptchaRefresher\Service; use Zend\Captcha\AbstractAdapter; /** * Description of CaptchaRefreshService * * @author David Contavalli <mauipipe@gmail.com> * @copyright M.V. Labs 2013 - All Rights Reserved - * You may execute and modify the contents of this file, but only within the scope of this p...
Markdown
UTF-8
4,719
4.25
4
[ "MIT" ]
permissive
# [Medium][950. Reveal Cards In Increasing Order](https://leetcode.com/problems/reveal-cards-in-increasing-order/) In a deck of cards, every card has a unique integer. You can order the deck in any order you want. Initially, all the cards start face down (unrevealed) in one deck. Now, you do the following steps rep...
Java
UTF-8
362
1.8125
2
[]
no_license
package com.itheima.plugins_test.dao; import com.itheima.plugins_test.domain.User; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; import java.util.List; @Mapper @Repository public interface UserXmlMapper { @Select("select ...
Python
UTF-8
321
2.84375
3
[]
no_license
#Build-In Functions #print() #input() #len() #modules has to be inported first import random, sys, os, math random.randint(1, 10) #oprionally not to print "random." each time infront function (but not recommended import random from random import * randint(1, 10) #to terminate running program import sys sys.exit()...
Markdown
UTF-8
12,859
2.96875
3
[ "LicenseRef-scancode-public-domain", "MIT" ]
permissive
--- layout: post title: "茅于轼:以人为本,还是以国为本?" date: 2010-05-11 author: 茅于轼 from: http://unirule.cloud/index.php?c=article&id=1121 tags: [ 天则观点 ] categories: [ 天则观点 ] --- <div class="article"> <div class="body-text"> <p align="left"> </p> <div style="text-indent: 18pt"> <span style="font-size: 9pt"> 俄罗斯小孩"阿尔...
Markdown
UTF-8
262
2.765625
3
[ "MIT" ]
permissive
# century-club A quick 5 minute app that tracks drinks for a century club game on new year's eve. A countdown timer tells you when you need to take your next drink. ## Installation ```bower install ``` Then, open the index.html file in your browser. Simple.
Java
UTF-8
477
2.015625
2
[]
no_license
package com.gavinandre.androidherosamples.chaptersix.canvaspaintbase; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import com.gavinandre.androidherosamples.R; /** * Created by gavinandre on 17-5-6. */ public class CanvasPaintActivity extends AppCompatActivity { @Override prot...
C#
UTF-8
1,800
2.515625
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class PrefabPreview : MonoBehaviour { public Transform prefabContainer; public Text currentPrefabName; private Transform[] prefabs; private Transform activePrefab; private int prefabIndex = 0; // Use t...
C#
UTF-8
2,993
2.65625
3
[]
no_license
using collegeWebSite.App_Data; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace collegeWebSite { public partial class Home : System.Web.UI.Page { public string NewsTicker = string.Emp...
Swift
UTF-8
2,322
2.625
3
[]
no_license
// // LaunchViewModel.swift // ShellHacks NASA // // Created by Peter Khouly on 9/25/21. // import Foundation import SwiftUI import SwiftyJSON import Alamofire class LaunchViewModel: ObservableObject { @Published var rockets: [Rocket] = [] let dateFormatter = DateFormatter() @Published var f...
Java
UTF-8
9,168
1.929688
2
[]
no_license
import org.restlet.data.Form; import gr.gradle.demo.conf.Configuration; import gr.gradle.demo.data.DataAccess; import gr.gradle.demo.data.model.Product; import gr.gradle.demo.data.model.Price; import gr.gradle.demo.data.model.Result; import gr.gradle.demo.data.Limits; import com.google.gson.Gson; import gr.gradle.demo...
PHP
UTF-8
411
2.90625
3
[]
no_license
<html> <head> <title> User Count </title> </head> <body> <?php $counterfile = "./counter.txt"; $f = fopen($counterfile, "r+"); $counter = fgets($counterfile); $counter++; fwrite($counterfile, $counter); fclose($f); ...
C
UTF-8
4,582
3.28125
3
[]
no_license
// // day07.c // day07 // // Created by Brandon Holland on 2018-12-03. // Copyright © 2018 Brandon Holland. All rights reserved. // #include <stdio.h> #include <stdlib.h> #include <string.h> #include <limits.h> typedef struct step step; struct step { char id; int working; int completed; int second...
Java
UTF-8
1,960
3.421875
3
[]
no_license
package com.playground; import java.util.HashSet; import java.util.Set; //rate limiting using token bucket filter. this algorithm is used for shaping network traffic flow. It is also known as leaky bucket algorithm //implementing rate limiting using a naive token bucket filter algorithm public class TokenBucketFilter...
Rust
UTF-8
137
2.640625
3
[]
no_license
fn main() { let a=[-1,-1,3]; let b=a.into_iter().skip_while(|x| **x<0).cloned().collect::<Vec<i32>>(); println!("{:?}",b); }
Java
UTF-8
3,111
2.703125
3
[]
no_license
package com.yesway.wechat.platform.message; import java.util.ArrayList; import java.util.List; public class NewsMessage extends BaseMessage { // 图文消息列表 private List<Article> articles = new ArrayList<Article>(); public NewsMessage() { msgType = "news"; } public List<Article> getArticles() { return articles;...
TypeScript
UTF-8
766
2.59375
3
[ "MIT" ]
permissive
import IBaseRequest from "../../IBaseRequest"; import convroute from "../convroute"; interface IRequest extends IBaseRequest { params: { appId: string; }; } export default convroute({ path: "/apps/:appId", method: "get", description: "Get app", tags: ["apps"], parameters: [ ...
Markdown
UTF-8
9,479
2.78125
3
[ "MIT" ]
permissive
## 十三經 ##### 孟子    `公孫丑下` * * * 孟子曰:「天時不如地利,地利不如人和。三里之城,七里之郭,環而攻之而不勝;夫環而攻之,必有得天時者矣,然而不勝者,是天時不如地利也。城非不高也,池非不深也,兵革非不堅利也,米粟非不多也,委而去之,是地利不如人和也。故曰:域民不以封疆之界,固國不以山谿之險,威天下不以兵革之利。得道者多助,失道者寡助。寡助之至,親戚畔之;多助之至,天下順之。以天下之所順,攻親戚之所畔,故君子有不戰,戰必勝矣。」 孟子將朝王。王使人來曰:「寡人如就見者也,有寒疾,不可以風;朝將視朝,不識可使寡人得見乎?」 對曰:「不幸而有疾,不能造朝。」 明日出弔於東郭氏。公孫丑曰:「昔者辭...
C
UTF-8
2,247
3.734375
4
[ "MIT" ]
permissive
// // main.c // MasteringAlgorithms // Illustrates using a heap (see Chapter 10). // // Created by YourtionGuo on 05/05/2017. // Copyright © 2017 Yourtion. All rights reserved. // #include <stdio.h> #include <stdlib.h> #include "heap.h" static void print_heap(Heap *heap) { int i; /// 打印堆结构 fprintf...
Java
UTF-8
3,496
2.390625
2
[]
no_license
package com.brennan.deviget.redditposts.domain; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.io.Serializable; import java.util.Objects; public class RedditNewsDataResponse implements Serializable { @SerializedName("author_fullname") @Expose pr...
TypeScript
UTF-8
657
3.234375
3
[]
no_license
/** * interface para el modelo de los comentarios */ export interface IComment { id: string; name: string; email: string; body: string; } export class Comment { private _id: string; private _name: string; private _email: string; private _body: string; constructor(comment: IComment) { this._id ...
Python
UTF-8
734
3
3
[]
no_license
def solve(word): result = [word[0]] for w in word[1:]: if w >= result[0]: result.insert(0, w) else: result.append(w) return "".join(result) def main(source, dest): with open(source, 'r') as fd, open(dest, 'w') as fo: T = int(fd.readline()) ...
C#
UTF-8
3,861
2.546875
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; using UnityEditorInternal; using System.IO; using System; namespace CodeSampleOne { [CustomEditor(typeof(AnimalDataHandler))] public class AnimalDataEditor : Editor { public bool makeJSONPretty = defau...
Java
UTF-8
2,669
2.34375
2
[]
no_license
package com.iba.kozlov.web.writers; import com.iba.kozlov.db.dto.WriterDto; import com.iba.kozlov.web.application.WriterBean; import com.iba.kozlov.web.writers.view.AddBean; import com.iba.kozlov.web.writers.view.EditorBean; import com.iba.kozlov.web.writers.view.SearchBean; import com.iba.kozlov.web.writers.view.Tabl...
Java
UTF-8
396
1.578125
2
[]
no_license
package com.fancv; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; /** * @author hamish-wu */ @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication springApplication = new Spri...
PHP
UTF-8
757
2.640625
3
[ "Apache-2.0" ]
permissive
<?php namespace Stark\Daemon\Consumer; class Callback extends Base { protected $_init = ''; protected $_run = ''; protected $_complete = ''; public function init(\Stark\Daemon\Worker $worker) { if (function_exists($this->_init)) { call_user_func_array($this->_init, array($worker));...
Python
UTF-8
814
2.921875
3
[ "MIT" ]
permissive
from mltoolkit.mldp.steps.preprocessors import BasePreProcessor from mltoolkit.mlutils.helpers.paths_and_files import get_file_paths from numpy import random class FileShuffler(BasePreProcessor): """Reads the paths of files; assigns them to `data_path` in a shuffled order, and passes them along in the data-so...
Python
UTF-8
2,994
3.453125
3
[]
no_license
import sys import pandas as pd from sqlalchemy import create_engine def load_data(messages_filepath, categories_filepath): ''' :param messages_filepath: messages.csv file path :param categories_filepath: categories file path :return: merged message and categories dataset----df ''' messages = ...
Markdown
UTF-8
876
3.0625
3
[]
no_license
## TF2 runs Eager Execution by default, thus removing the need for Sessions. If you want to run static graphs, the more proper way is to use tf.function() in TF2. While Session can still be accessed via tf.compat.v1.Session() in TF2, I would discourage using it. It may be helpful to demonstrate this differenc...
PHP
UTF-8
88,063
2.796875
3
[]
no_license
<?php /** * 后台操作的记录 * * @author ZP 2012-10-25 16:33:17 * @param string $user_name操作人 time $time操作时间 string $act操作文件什么的 string $content操作内容(参数什么的) * @modify 薛升 2015-6-16 15:04:55 添加判断整数或小数并保留2位 * @tudo 多人追加写引发问题 */ function mywayec_log_record($user_name = '', $time = '', $ip = '', $act = '', $content = a...
Java
UTF-8
3,786
3.28125
3
[]
no_license
package batch_processing.batch_insert; import java.sql.BatchUpdateException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Arrays; /** * Insert Batch operation using PreparedStatement Interface * @author Ramesh Fadatare ...
Go
UTF-8
2,825
3.4375
3
[]
no_license
package main import ( "bufio" "fmt" "log" "net" "time" ) type client struct { c chan<- string name string } var ( entering = make(chan client) leaving = make(chan client) messages = make(chan string) // all incoming client messages ) func main() { listener, err := net.Listen("tcp", "localhost:8000") ...
Java
UTF-8
1,011
2.140625
2
[]
no_license
package com.liang.lagou.mail.config; import lombok.Getter; import lombok.Setter; import lombok.ToString; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; import java.util.Properties; /** * smtp配置类 * * 项目中可能有多邮箱配置, * neuabc,dam和neupals可能都...
JavaScript
UTF-8
2,068
2.625
3
[ "MIT" ]
permissive
import React, {Component} from 'react'; import { Panel,Form,FormGroup,FormControl,ControlLabel } from 'react-bootstrap'; class Report extends Component { constructor(props) { super(props); this.state = { report: [], item:'', value:'', } this.handleChange = this.handleChange.bind(this); this.handl...