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
762
2.5625
3
[ "Apache-2.0" ]
permissive
package io.github.gdggarage.worldproblems.entity; public class Problem { private int id; private String text; private String author; private String source; private String url; private String submitter; public Problem() { }; public Problem(int id, String text, String author, String source, String url, Str...
Swift
UTF-8
1,887
2.859375
3
[ "MIT" ]
permissive
// // AlbumCell.swift // FYPhotoPicker // // Created by xiaoyang on 2020/7/30. // import UIKit class AlbumCell: UITableViewCell { fileprivate let coverImage = UIImageView() fileprivate let nameLabel = UILabel() override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super....
Markdown
UTF-8
4,173
3.140625
3
[]
no_license
# 适配问题 怎么适配iphone6 1px问题 ### 为什么页面与设计稿会出现偏差? `dpr=设备像素/ css像素`,只有dpr等于1的时候,实际效果和设计稿的尺寸比例才是1:1。 因为iPhone6的DPR(设备像素比)为2,设备像素为750,所以iPhone6的理想视口尺寸为375px。 因为设计稿是基于设备像素,页面是基于css像素的。css中的宽度是基于理想视口的(宽度375px),设计图上是基于设备宽度750px,所以尺寸不对。 ------- ###### 怎么处理? `init-scale=0.5` 。 缺陷:但是宽度不能自适应 ------- ## ⭐️rem大法 基于`html`标签的`fo...
Java
UTF-8
822
2.296875
2
[]
no_license
package assets.minecessity.items; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; public class ItemCeilLamp extends MagicItem { public ItemCeilLamp(Block blockID) { super(blockID); } @Override public boole...
TypeScript
UTF-8
4,428
2.578125
3
[ "MIT" ]
permissive
import fs = require ('fs'); import { log, LogEntry } from "./log"; import settings from "./logger-settings"; const colors = { black: '\x1b[30m', red: '\x1b[31m', green: '\x1b[32m', yellow: '\x1b[33m', blue: '\x1b[34m', magenta: '\x1b[35m', cyan: '\x1b[36m', white: '\x1b[37m', dim: '\x1b[2m', reset: '\x1b[0m...
Java
UTF-8
3,540
2.234375
2
[]
no_license
package com.ihomefnt.o2o.intf.domain.product.doo; import lombok.Data; import java.util.ArrayList; import java.util.List; /** * Created by shirely_geng on 15-1-18. */ @Data public class ProductInfomationResponse { /** 主鍵 */ private Long productId; private String name; private List<String> pictureUrlOriginal; p...
Java
UTF-8
2,926
2.484375
2
[ "MIT" ]
permissive
package com.osotnikov.examples.spring.shell.stringcompare; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import or...
Markdown
UTF-8
928
3.4375
3
[]
no_license
# Snippets-code Snippets code about calculate something simple and other stuff - Calculate! for calculate your dog age as a human age - lifeinweeks-challenge is a function that tell us how many days, weeks, and months we have until 90 years old - method-slice for getting a consisten name from user, based on user inp...
C++
UTF-8
2,971
2.96875
3
[]
no_license
#include "common/runtime/MemoryPool.hpp" #include "common/runtime/Memory.hpp" #include <new> #include <stdexcept> using std::runtime_error; namespace runtime { GlobalPool::GlobalPool() { current = newChunk(allocSize); start = (int8_t*)current + sizeof(Chunk); end = start + allocSize; } GlobalPool::~GlobalP...
C
UTF-8
361
2.9375
3
[]
no_license
// objdump -dM intel loop | grep -A 20 '<main>:' // gcc -std=c11 -o loop loop.c #include <stdio.h> int main(void) { //unsigned int i = 0; //unsigned int i; for (unsigned i=0; i < 3; i++) { printf("O valor de i eh: %u\n", i); } /* imprimir: printf("O valor de i eh: %u\n", i); i++; if (i < 3)...
C#
UTF-8
2,645
2.765625
3
[ "MIT" ]
permissive
using System.Linq; using System.Collections.Generic; using GameplayAbilitySystem.Enums; using GameplayAbilitySystem.GameplayEffects; namespace GameplayAbilitySystem.Interfaces { /// <summary> /// This is used to define how long the <see cref="GameplayEffect"/> lasts, and what it does (e.g. how much damage) ...
Java
UTF-8
5,355
2.546875
3
[]
no_license
package com.healthcare; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.*; import static com.healthcare.Main.ROOTPATH; import static com.healthcare.XsdXpathGenerator.getAllXpaths; public class DataMapperMediator { List<Source> sourceList=new ArrayList<...
C
UTF-8
1,456
4.03125
4
[]
no_license
// warmup.c // By Matthew Rundle // for cse20211.01 // Fall 2012 #include <stdio.h> #include <stdlib.h> #include <math.h> // print array void print_array(double x[],int size) { int i; for(i=0;i<size;i++){ printf(" %.2lf",x[i]); } } // Compute average of the list void avg_and_stddev(double x[],int size) { ...
Markdown
UTF-8
1,109
3.296875
3
[]
no_license
# 4.15 数据转换/格式化 Thymeleaf为变量表达式(`${...}`)和选择表达式(`*{...}`)定义了一个双括号的语法,它允许我们通过配置的转化服务对数据进行转化。 形式基本如下: ``` <td th:text="${{user.lastAccessDate}}">...</td> ``` 注意这里的双括号`${{...}}`,这里实际上将`user.lastAccessDate`的值在渲染至模板上之前传递给 *转化服务* 并让其执行 **格式化服务**(将其转化为`String`)。 假设`user.lastAccessDate`是`java.util.Calendar`类,如果现有一个注册了的转化服务(`...
Python
UTF-8
5,127
2.640625
3
[]
no_license
import os, pickle#, visualize import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from matplotlib.pyplot import figure class PlotResults: def __init__(self, algorithms=["GA_package", "NEAT", "Island"], enemies=[[1,3,6]]): self.algorithms = algorithms self.enemies = enemies...
Java
UTF-8
1,789
1.789063
2
[]
no_license
package br.edu.GEP.Domain.Commands.CronogramaCommand.Inputs; import br.edu.GEP.Domain.Commands.BaseCommand; import br.edu.GEP.Domain.Entity.GEP_CRONOGRAMA; import br.edu.GEP.Domain.Entity.GEP_STATUS; import br.edu.GEP.Domain.Entity.UsuarioEntity; import lombok.Data; import java.util.Date; @Data public class Atualiza...
PHP
UTF-8
3,810
2.5625
3
[]
no_license
<?php namespace Application\Controller; use Zend\View\Model\ViewModel; use Core\Controller\ActionController; use Application\Model\Setor; use Application\Form\Setor as SetorForm; use Doctrine\ORM\EntityManager; /** * Controlador que gerencia o cadastro de Setores * * @category Application * @package Controller ...
Java
UTF-8
2,984
3.0625
3
[]
no_license
package geometries; import primitives.Color; import primitives.Point3D; import primitives.Ray; import primitives.Vector; import java.util.ArrayList; import java.util.List; public class Box extends Geometry { private List<Square> squares = new ArrayList<>(); public Box(Color emission, int Shininess, double ...
JavaScript
UTF-8
1,197
2.8125
3
[]
no_license
import {fromJS} from 'immutable'; import * as constants from './constants'; //state的状态是不可以被改变的,为了避免他被改变 //在初始化state的时候就把它创建为immutable的对象 const defaultState=fromJS({ topicList:[], articleList:[], recommendList:[], articlePage: 1, showScroll: false }); const changeHomeData = (state, action) =>{ ...
Markdown
UTF-8
3,538
2.90625
3
[ "CC-BY-SA-4.0", "Apache-2.0" ]
permissive
[#]: subject: "sssnake – A Super Addictive Snake Game for Linux Terminal" [#]: via: "https://www.debugpoint.com/sssnake-game-linux/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" [#]: translator: " " [#]: reviewer: " " [#]: publisher: " " [#]: url: " " sssnake – A Super Addic...
Markdown
UTF-8
4,800
3.078125
3
[ "MIT" ]
permissive
--- layout: page weight: 400 title: Multi User Credentials navigation: show: true --- Multi User Credentials allow you to have multiple people who can log into the same subuser account, using a different username and password. This way, you don't have to worry if someone goes out of town and you can control who has...
Python
UTF-8
17,895
2.609375
3
[]
no_license
# Anthony Kuntz # Kayle Damage and Build Calculator, with UI # Returns the DPS of a specific build given certain limitations and stats def calculateKayle(itemList, level, neededCDR, enemyMR, enemyArmor, enemyHP, numberOfItems, runesList): mana = 322.2 + 40 * level AP = 6 + 0.89 * level CDR = 5 flatPen = 0 perP...
Markdown
UTF-8
9,891
3.03125
3
[]
no_license
# 手动写 AIDL 过程 ### 1. bean 文件 aidl 中可传递的类型有基本数据类型,string,list,map 等,但不是所有都可以,对于一些自定义的 bean 需要实现 Parcelable 接口 ``` public class Book implements Parcelable { private int price; private String name; public Book(int price, String name) { this.price = price; this.name = name; } publi...
Python
UTF-8
4,404
3.09375
3
[]
no_license
def labelslider(): global count,sliderwords text='Welcome To Typing Speed Test Game ' if(count >=len(text)): count = 0 sliderwords='' sliderwords+=text[count] count+=1 fontlable1.configure(text=sliderwords) fontlable1.after(200,labelslider) def time(): global time...
SQL
UTF-8
3,430
3.1875
3
[]
no_license
/****************************************************************************** VERSION: 1.0 FECHA: 10/06/2015 AUTOR: ownk FUNCION: Detalle Comparacion Archivo Recaudo ******************************************************************************/ set define '&' define Indices=TS_IRECAUDOS Prompt ...
Java
UTF-8
383
2.1875
2
[]
no_license
package com.example.lgggggggx.shiyanzhou; /** * Created by Lgggggggx on 2016/11/1. */ public class Store { public int sto_id; public String sto_name; public String sto_pic; public int sto_type; public Store(int id,String name,String pic,int ty){ this.sto_id=id; this.sto_name=name...
Java
UTF-8
624
1.78125
2
[]
no_license
package ru.drudenko.dnd5.webapi.monster.dto; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import ru.drudenko.dnd5.webapi.common.dto.PaginationParametersDto; @Builder @Getter @Setter @NoArgsConstructor @AllArgsConstructor public c...
C++
UTF-8
1,130
3.0625
3
[]
no_license
/* * Inventory.cpp * * Created on: Jan 27, 2013 * Author: hmarasigan */ #include "Inventory.h" Inventory::Inventory() { food=0; cannon=0; chain=0; scatter=0; explosive=0; booze=0; repair=0; sum(); } Inventory::~Inventory() { delete Inventory(); } void Inventory::setfood(int x) { food=x; } void...
JavaScript
UTF-8
1,455
3.9375
4
[]
no_license
// 45. Jump Game II // Medium // 3857 // 174 // Add to List // Share // Given an array of non-negative integers nums, you are initially positioned at the first index of the array. // Each element in the array represents your maximum jump length at that position. // Your goal is to reach the last index in the mini...
C++
UTF-8
3,569
3.109375
3
[]
no_license
#ifndef _OUTP_ #define _OUTP_ void print_cartesian_dims(int * dims, int rank, int print_rank = 0) { if(rank == print_rank){ cout << dims[0] << "\t " << dims[1] << endl; } } void print_neighbours(int rank, int left, int right, int top, int bottom, int size) { MPI_Barrier( MPI_COMM_WORLD); for(unsigned i=0; i< si...
C++
ISO-8859-1
3,743
2.6875
3
[]
no_license
/*NGL v1.0 - Nology Game Library Copyright (C) 2003, 2004 Nology Softwares SC Ltda. Todos os direitos reservados O uso desta biblioteca de software em forma de cdigo fonte ou arquivo binrio, com ou sem modificaes, permitido contanto que sejam atendidas as seguintes condies: 1. A redistribuio deste software em qual...
JavaScript
UTF-8
1,567
3.265625
3
[]
no_license
// APIを叩く async function callApi(url, params) { const query = new URLSearchParams(params); // URLSearchParamsは連想配列からクエリパラメータを作成してくれる標準APIです。 const response = await fetch(url + query); const data = await response.json(); return data; } // callApi関数から受け取ったデータをhtmlにレンダリングする async function renderHtml() { const ...
C#
UTF-8
1,802
3.203125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using MultiLayeredPerceptron.Extensions; namespace MultiLayeredPerceptron { public class Perceptron : IPerceptron { private readonly IList<double> _weights; public Perceptron(int inputsCount) { ValidateAtLeastOneInput...
PHP
UTF-8
26,876
2.609375
3
[]
no_license
<?php require_once '../../include/api.php'; require_once '../../include/user.php'; require_once '../../include/city.php'; require_once '../../include/country.php'; define('CURRENT_VERSION', 0); class ApiPage extends OpsApiPageBase { //---------------------------------------------------------------------------------...
Markdown
UTF-8
3,479
2.984375
3
[ "Apache-2.0" ]
permissive
# Infinispan Embedded Tutorial: Weather App ## Overview This is a tutorial which explains how to use Infinispan embedded in your own application. The application will retrieve the current weather conditions for some cities and store them in a cache, for quicker retrieval. It will also show how to configure the cache ...
PHP
UTF-8
409
2.6875
3
[]
no_license
<?php namespace Didslm\FileUpload\Factory; use Didslm\FileUpload\Stream; use Psr\Http\Message\StreamInterface; class StreamFactory { public static function createStreamFromFile(string $file): StreamInterface { return new Stream($file, 'r'); } public function createStream(string...
Java
UTF-8
4,569
2.796875
3
[]
no_license
package gfx; import java.awt.*; import java.awt.image.*; import java.net.URL; public class ImageUtils { public static BufferedImage getBufferedImage(java.awt.Component c, String aFile) { return ImageUtils .getBufferedImage(c, aFile, BufferedImage.TYPE_INT_RGB); } public...
Markdown
UTF-8
7,630
3.796875
4
[]
no_license
<h1>Recursion in C</h1> <span class="jr-highlight-yellow" id="jr-1551451997974">Recursion</span> is a programming technique that allows the programmer to express operations in terms of themselves. I<span class="jr-highlight-yellow" id="jr-1551452007919">n C, this takes the form of a function that calls itself. A usef...
PHP
UTF-8
3,313
3.109375
3
[]
no_license
<?php // Added by Taylor to prevent double login, check through using index and utils //if ( is_logged_in() ) //exit( 'You are already logged in!!' ); // Insert variables for login and db and tbl selection $host = "localhost"; // Host name $sqlusername = "root"; // Mysql username $sqlpassword = "Buick...
PHP
UTF-8
2,433
2.703125
3
[ "MIT" ]
permissive
<?php /** * This file is part of the jigius/acc-core-pdata library * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @copyright Copyright (c) 2020 Jigius <jigius@gmail.com> * @link https://github.com/jigius/acc-core-pdata GitHub */...
Python
UTF-8
2,466
3.125
3
[ "MIT" ]
permissive
import asyncio class CouriersOrdersResolver: def __init__(self, orders_, max_weight, values_=None): self.orders = {} i = 1 for k, v in orders_.items(): # as weight is a float number, convert to int by multiplying by 100 and rounding # (minimal value is 0.01, so it'l...
Python
UTF-8
614
3.671875
4
[]
no_license
# First line of input contains integer L # Second line contains integer D # Third line contains integer X L = int(input()) D = int(input()) X = int(input()) # Check minimal condition for i in range(L, D + 1, 1): originalDigit = i sumOfDigits = 0 while i: sumOfDigits += i % 10 i //= 10 ...
C#
UTF-8
8,578
2.671875
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Linq; /// <summary> /// <para>t_start is in range (-PI, PI], /// sign(t_end - t_start) is determined by clockdir</para> /// </summary> public class Arc : Curve { Vector2[] controlPoints; public Vector2 Center ...
Shell
UTF-8
530
3.453125
3
[ "Apache-2.0" ]
permissive
#!/bin/bash # ---------------------------- # https://www.codewars.com/kata/56e3cd1d93c3d940e50006a4/solutions/shell # How Green Is My Valley # ---------------------------- makevalley() { sorted=($(echo "$1" | xargs -n1 | sort -n -r)) n=${#sorted[@]} for i in $(seq 1 $n); do item=${sorted[$i - 1]} ...
C++
UTF-8
807
3.015625
3
[ "MIT" ]
permissive
#ifndef LIFE_HH #define LIFE_HH #include <vector> enum Generation { Current, Previous }; class Game { public: Game(int rows, int cols) : rows(rows), cols(cols), board(rows * cols, false) {} int GetRows() const; int GetCols() const; const std::vector<bool>& GetBoard() const; bool At(con...
Python
UTF-8
2,217
2.765625
3
[]
no_license
import h5py from sklearn.utils import check_random_state import numpy as np from modeling.utils import balanced_class_weights from keras.utils import np_utils class HDF5FileDataset(object): def __init__(self, file_path, data_name, target_name, batch_size, one_hot=True, random_state=17): assert isinstance(d...
Java
UTF-8
205
1.703125
2
[]
no_license
package com.zoo.repository; import com.zoo.model.Dragon; import org.springframework.data.mongodb.repository.MongoRepository; public interface DragonRepository extends MongoRepository<Dragon, String> { }
JavaScript
UTF-8
4,619
2.75
3
[]
no_license
import compareAsc from 'date-fns/compareAsc'; import { cloneDeep } from 'lodash'; import statesAbbrv from '@/assets/json-data/states_abbrv.json'; const cutOffDate = '2/25/20'; const filterByRegion = (data = [], countryRegion = 'US') => data.filter(dt => dt['Country/Region'] === countryRegion); const getMostRecentC...
Go
UTF-8
5,133
2.515625
3
[]
no_license
package gate import ( "errors" "os" "os/signal" "fmt" "github.com/colefan/config" "github.com/colefan/sailfish/log" "github.com/colefan/sailfish/network" ) const ( // DefaultMaxNum 默认最大用户数 DefaultMaxNum int = 5000 ) const ( TagProd = "prod" TagDev = "dev" TagTest = "test" ) //Gate a gate for routing...
C#
UTF-8
1,166
2.515625
3
[ "MIT" ]
permissive
using Genesis; using Genesis.Generation; using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Threading; using System.Threading.Tasks; namespace Genesis.Output.CachedRepo { public class CachedRepositoryGenerator : Generator { public override string CommandTe...
JavaScript
UTF-8
5,169
2.703125
3
[]
no_license
const Inc = (function(ItemInc, StorageCtrl, UIInc){ const income = 'income'; // Load event listeners const loadEventListeners = function(){ // Get UI selectors const UISelectors = UIInc.getSelectors(); // Add item event document.querySelector(UISelectors.addBtn).addEventListe...
Java
GB18030
925
3.28125
3
[]
no_license
package com.tong.stream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; /** * FileOutputStream * @author Administrator * */ public class FileOutputStreamTest { public static void main(String[] args) { FileOutputStream fos = null; try { fo...
C++
UTF-8
363
2.546875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main() { int n,res=0,r; cin>>n; while(n>=10) { while(n) { r=n%10; n=n/10; res=r*r+res; } n=res; res=0; } if(n==1) cout<<"happy number"; ...
Python
UTF-8
2,077
4.21875
4
[]
no_license
#############список и цикл for############### ## for magician(вводится новая переменная) magicians = ['alice', 'david', 'carolina'] for magician in magicians: ## новая переменная magician print(magician) #тут к ней обращается компилятор print(magician.title()+"that was a great trick") print("i can't wait f...
Markdown
UTF-8
17,784
2.640625
3
[ "LicenseRef-scancode-public-domain" ]
permissive
> *The following text is extracted and transformed from the livefyre.com privacy policy that was archived on 2015-03-18. Please check the [original snapshot on the Wayback Machine](https://web.archive.org/web/20150318005457id_/http%3A//legal.livefyre.com/privacy) for the most accurate reproduction.* # Privacy Policy -...
PHP
UTF-8
2,919
2.59375
3
[ "X11", "MIT" ]
permissive
<?php /** * 2014 - 2022 Watt Is It * * NOTICE OF LICENSE * * This source file is subject to the MIT License X11 * that is bundled with this package in the file LICENSE.md. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/mit-license.php * If you did not receive a...
Python
UTF-8
1,434
3.875
4
[]
no_license
# -*- coding: utf-8 -*- # @Time : 2020/5/12 19:04 # @Author : tianyunzqs # @Description : """ 152. Maximum Product Subarray Medium Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product. Example 1: Input: [2,3,-2,4] Output...
C#
UTF-8
7,138
2.546875
3
[]
no_license
using CarpentyStore2.Domain.Abstract; using CarpentyStore2.Domain.Entities; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace CarpentryStore2.Controllers { public class AdminController : Controller { private IDoorRepository...
JavaScript
UTF-8
2,664
2.546875
3
[]
no_license
/** * @author CallMeMrSam */ const Client = require('../../../structure/Client'); const Language = require('../../../structure/Language'); const { Command, Embed } = require('../../../structure/Bot'); const { Message } = require('discord.js'); const dayjs = require('dayjs'); module.exports = class extends Command {...
Python
UTF-8
186
3.015625
3
[]
no_license
class StringExpression: def __init__(self, x): self.x = x def __truediv__(self, other): result = int(self.x) + 2 * (int(other.x)) return result
Java
UTF-8
160
2.171875
2
[]
no_license
public class SinhVienRepository extends AbstractRepository<Student, Long> { public SinhVienRepository() { super(Student.class, Long.class); } }
C#
UTF-8
882
3.25
3
[]
no_license
using System; using System.Collections.Generic; using System.IO; namespace CSharpExcel { class Program { static void Main(string[] args) { var personList = new List<Person> { new Person("Ksenia", "Данилкина", 28, "79612213455"), new Perso...
Java
UTF-8
3,263
2.21875
2
[]
no_license
package com.example.nhnent.myprogress; import android.app.ProgressDialog; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.Vi...
TypeScript
UTF-8
1,114
3.15625
3
[]
no_license
export const POINTER = (duraction: number): string => { const segundos = duraction / 1000; const minutos = segundos / 60; const horas = minutos / 60; return POINTER_FORMAT(`${horas}:${minutos}:${segundos}`); } export const POINTER_FULL = (duraction: string): number => { const timeFull = duraction.s...
JavaScript
UTF-8
2,131
2.546875
3
[]
no_license
import AudioManager from "./audioManager.js"; import InputManager from "./inputManager.js"; import Population from "./population.js"; const startGame = () => { document.getElementById("click-overlay").style.display = "none"; window.removeEventListener("click", startGame); const canvas = document.getElemen...
C#
UTF-8
399
3.1875
3
[]
no_license
using System; namespace calculator_oop { public class Extraction : IOneArgumentCalculator { public double calculate(double firstNumber) { if (firstNumber < 0) { throw new Exception("Х не долженбыть отрицательным"); } ...
Java
UTF-8
1,422
2.3125
2
[]
no_license
package com.lq.po; /** * 招聘信息持久类 * @author 27602 * */ public class Recruit { private int rec_id; private String rec_name; private int rec_number; private String rec_sex; private String rec_describe; private String rec_city; private int rec_pay; public int getRec_id() { return rec_id; } public void setRe...
Swift
UTF-8
3,933
3
3
[]
no_license
// // Extensions.swift // SongDemon // // Created by Tommy Fannon on 8/10/14. // Copyright (c) 2014 crazy8dev. All rights reserved. // import MediaPlayer extension String { var length: Int { return self.characters.count } // Swift 1.2 } extension MPMediaItem { var songInfo: String { //return "\...
JavaScript
UTF-8
1,577
2.65625
3
[ "MIT" ]
permissive
#!/usr/bin/env node const fs = require('fs'); const path = require('path'); const argv = require('optimist').argv; const find = require('../index.js'); function usage() { console.log('Usage: [flag] <path>\n'); console.log('Flags:'); console.log(' --name The name of the callee. default: console\n'); conso...
Shell
UTF-8
1,320
2.8125
3
[]
no_license
export PATH=~/bin:$PATH [[ -s "/Users/zporter/.rvm/scripts/rvm" ]] && source "/Users/zporter/.rvm/scripts/rvm" # This loads RVM into a shell session. # display git info function parse_git_dirty { [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" } function parse...
Python
UTF-8
175
3.09375
3
[]
no_license
def calc(a,b): sum = a+b difference = a-b multiply = a*b divide = a / b calclist = [a+b, a-b, a*b, a/b] sum = 0 for i in list: sum += i
C++
UTF-8
862
3.609375
4
[]
no_license
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } };*/ class Solution { public: bool isSameTree(TreeNode* r1, TreeNode* r2) { if(r2 == NULL) return true; if(r1 == NULL) return false; return r1->val =...
Markdown
UTF-8
5,042
2.75
3
[]
no_license
--- description: "Simple Way to Make Speedy Usal (Sprouted beans)" title: "Simple Way to Make Speedy Usal (Sprouted beans)" slug: 2156-simple-way-to-make-speedy-usal-sprouted-beans date: 2020-09-04T21:07:27.089Z image: https://img-global.cpcdn.com/recipes/a38f15db8fb71457/751x532cq70/usal-sprouted-beans-recipe-main-pho...
SQL
UTF-8
14,128
3.265625
3
[]
no_license
MySql: a12Bo873 delimiter $$ drop procedure if exists SP_GetMarketFreight; create procedure SP_GetMarketFreight( par_Extension bit ) begin if par_Extension = 1 then select row_number() over (order by th.Pickup asc ) as Id, th.Id as TruckStopId, SF_EscapeSt...
Ruby
UTF-8
712
3.59375
4
[]
no_license
# frozen_string_literal: true require 'pry' def hash(string, array_length) total = 0 # Hashes take advantage of prime numbers to avoid collision. prime_number = 31 # Reduce the time taken if the length is greater than 100 min_length = [string.length - 1, 100].min (0..min_length).each do |index| posit...
Python
UTF-8
496
2.875
3
[]
no_license
for _ in range(int(input())): a,b,c,d=map(int,input().split()) flag=0 if a==c and b==d: print("Yes") continue elif a>c and b>d: print("No") continue else: while True: if d-c>0: d-=c else: c-=d ...
PHP
UTF-8
761
2.921875
3
[]
no_license
<?php namespace App\Service; class DataUtilService { /** * @param string $data * @param string|null $from_encoding * * @return false|string|string[]|null */ public static function convertToUTF8(string $data, ?string $from_encoding = null) { if ($from_encoding !== n...
PHP
UTF-8
6,724
3.046875
3
[]
no_license
<?php /** * This is the Facebook User Class * * Managing Facebook Session and Facebook User profile Info * * @author David Raleche * * Time: 1:51 PM */ use Facebook\FacebookSession; use Facebook\FacebookJavaScriptLoginHelper; use Facebook\FacebookCanvasLoginHelper; use Facebook\FacebookRequest; use Facebook\...
Markdown
UTF-8
4,117
2.625
3
[]
no_license
--- layout: post title: Snowplow Ruby Tracker 0.1.0 released title-short: Snowplow Ruby Tracker 0.1.0 tags: [snowplow, analytics, python, django, tracker] author: Fred category: Releases --- We are happy to announce the release of the new [Snowplow Ruby Tracker] [repo]. This is a Ruby gem designed to send Snowplow eve...
Java
UTF-8
1,299
2.171875
2
[]
no_license
package view.controller; import com.jfoenix.controls.JFXButton; import com.jfoenix.controls.JFXDialog; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.layout.StackPane; import java.net.URL; import java.util.ResourceBundle; /** * @ClassName * @Description * @Author LGH * @Date 2020/...
Shell
UTF-8
7,660
3.703125
4
[]
no_license
#!/bin/sh # Dmitry Troshenkov (troshenkov.d@gmail.com) # # This special script for making the git for a web projects on the Cloudinux when used CageFS and WHM/cPanel as a web hosting platform. # ################################ # sudo yum install git # # OR # # sudo yum groupinstall "Development Tools" # sudo yum ins...
Java
UTF-8
360
1.632813
2
[]
no_license
package com.tinder.presenters; import com.tinder.model.GlobalConfig; import rx.functions.Func1; final /* synthetic */ class ak implements Func1 { /* renamed from: a */ static final Func1 f55207a = new ak(); private ak() { } public Object call(Object obj) { return Boolean.valueOf(((Global...
Markdown
UTF-8
2,271
3.6875
4
[ "MIT" ]
permissive
# perlin-numpy I wrote two articles on my blog about this project, the [first one](https://pvigier.github.io/2018/06/13/perlin-noise-numpy.html) is about the generation of 2D noise while the [second one](https://pvigier.github.io/2018/11/02/3d-perlin-noise-numpy.html) is about the generation of 3D noise, feel free to...
Markdown
UTF-8
3,087
2.828125
3
[]
no_license
| Algorithm | Application | Complexity (Time) | Complexity (Space) | Source (Python) | Source (Java) | |:--------:|:--------:|:--------:|:--------:|:--------:|:--------:| | [Bubble Sort](https://www.youtube.com/watch?v=gfjIKgAjiB8) | already sorted (short) list | best: O(N) </br> average: O(n<sup>2</sup>) </br> wor...
Java
ISO-8859-1
2,310
3.140625
3
[]
no_license
package kailaBird; import java.awt.Graphics; import java.awt.Rectangle; import java.awt.image.BufferedImage; import java.util.Random; import javax.imageio.ImageIO; import java.io.File; import java.io.IOException; public class Wall { final private int WIDTH = 48; final private int GAP = 150; pr...
C++
UTF-8
1,855
2.671875
3
[]
no_license
#pragma once #include "glad/glad.h" #include "Vector.h" #include "Matrix.h" #include "OBJ_Loader.h" #include <vector> #include <string> class Model { public: Model(); Model(Vector<3> const& position); ~Model(); void update(float delta_time); virtual void render() const; Matrix4 const get_mo...
Go
UTF-8
616
3.15625
3
[]
no_license
package main func sumRootToLeaf(root *TreeNode) int { var arr []int res := []int{0} if root != nil { dfs1022(root, &arr, res) } return res[0] } func dfs1022(root *TreeNode, arr *[]int, sum []int) { *arr = append(*arr, root.Val) if root.Left == nil && root.Right == nil { sum[0] += getSum1022(*arr) return ...
Markdown
UTF-8
1,053
2.890625
3
[]
no_license
# SVM-Iris-Seed-DataSets 2nd Assignment, Functional Data Analysis: Support Vector Machine Computer Exercises Harold A. Hernández Roig ### Iris Data Set We deal with the classical Iris database due to R.A. Fisher. The data set contains 3 classes of 50 instances each, where each class refers to a type of iris plant. Th...
Java
UTF-8
5,078
3.09375
3
[]
no_license
package com.creditsuisse.shopping; import static org.junit.Assert.*; import org.junit.Test; import com.creditsuisse.shopping.exception.FreeLimeRequiredException; import com.creditsuisse.shopping.exception.InvalidItemException; import com.creditsuisse.shopping.exception.FreeMelonRequiredException; public class Shopp...
Python
UTF-8
1,080
3.15625
3
[]
no_license
import sqlite3 con = sqlite3.connect("first.db") # create cursor object c = con.cursor() # v1 # create table if it doesen't exist try: c.execute("""CREATE TABLE person(name TEXT, telefon TEXT)""") except: pass #========================================================================= # v2 # # create table if...
Java
UTF-8
1,265
2.328125
2
[ "MIT" ]
permissive
package com.librarymanagment.springbootlibrary.model; import javax.persistence.*; @Entity @Table(name="date_info") public class DateInformation { public DateInformation(){} public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Long getBo...
JavaScript
UTF-8
673
3.1875
3
[]
no_license
import recursiveLinearSearch from "../recursiveLinearSearch"; describe("recursiveLinearSearch", () => { it("should search number in an array", () => { const array = [1, 4, 3, 5, 7, 1]; expect(recursiveLinearSearch(array, 8)).toEqual(null); expect(recursiveLinearSearch(array, 7)).toEqual(4); expect(r...
Python
UTF-8
1,449
2.9375
3
[]
no_license
__author__ = 'Daniel' import sqlite3, csv def ReadValue(pEntity, pTime, pSource = 0, pDataBaseName = '/web-interface/simplealgotrade.db'): # Returns the most recent value for the Entity pEntity before pTime # Test case: No results returned # pTime: The number of seconds since 1900 Jan 1, 00:00:00 ...
C
UTF-8
203
2.75
3
[]
no_license
#include<stdio.h> #include<conio.h> #include<string.h> void main() { char a[40]; int i,l,lines=1; scanf("%s",&a); for(i=0;a[i]!='\0';i++) { if(a[i]=='.') { lines++; } } printf("%d",lines); getch(); }
Markdown
UTF-8
3,135
3.9375
4
[]
no_license
--- title: 算法练习08 用栈实现队列 top: false date: 2019-08-05 21:09:40 updated: 2019-08-05 21:09:42 tags: - LeetCode - 栈 - 队列 categories: 算法 --- 用栈实现队列 <!-- more --> ## 题目 在组内面试反馈的邮件中看到了用栈实现队列这样一道题目,觉得自己如果面试遇到这个题目还是有点懵的,所以特地上网上找了一下,在Leetcode上找到了这道题目[LeetCode 232 用栈实现队列](https://leetcode-cn.com/problems/implement-queue-using...
C#
UTF-8
777
2.515625
3
[ "MIT" ]
permissive
using System; using System.Globalization; using System.Runtime.Serialization; namespace MyParcelApi.Net.Models { [DataContract] public class DateTimeStartEnd { [DataMember(Name = "date", EmitDefaultValue = false)] public string DateRaw { get; set; } public DateTime Date ...
Java
UTF-8
3,374
2.46875
2
[]
no_license
package uy.edu.fing.mina.fsa.logics.quineMcCluskey; /* Copyright (c) 2009 the authors listed at the following URL, and/or the authors of referenced articles or incorporated external code: http://en.literateprograms.org/Quine-McCluskey_algorithm_(Java)?action=history&offset=20090311182700 Permission is hereby grant...
C++
UTF-8
615
2.734375
3
[ "MIT" ]
permissive
#include <vector> using namespace std; class Solution { public: int distributeCookies(vector<int> &cookies, int k) { int N = cookies.size(), mask = (1 << N) - 1; vector<int> dp(1 << N, INT_MAX), count(1 << N); dp[0] = 0; for (int i = 0; i < 1 << N; ++i) { for (int j = 0; j < N; ++j) { if ((i >> j...
C#
UTF-8
1,287
2.65625
3
[]
no_license
using System.Diagnostics; using System.IO; using System.Text; namespace AppRunner.Utilities { public static class Shell { public static Executable RunCommandAsync(string fileName, string args, DataReceivedEventHandler eventhandler = null, ExecutionCompletedHandler completedHandler = null) { ...
Java
UTF-8
836
1.875
2
[]
no_license
package com.amap.api.mapcore.util; /* compiled from: SiteInfoBean */ public class O00o0 { private String O000000o; private String O00000Oo; private int O00000o; private String O00000o0; private String O00000oO; public O00o0(String str, String str2, String str3, int i, String str4) { ...