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
JavaScript
UTF-8
234
2.59375
3
[]
no_license
d3 = require('d3') module.exports.expScale = function expScale(a,b,c,exp,round){ var out = d3.scaleLinear() .domain([0, c]) .range([a, b]) .clamp(true) if (round) return Math.round(out(exp)) else return out(exp); }
C#
UTF-8
3,234
4.0625
4
[]
no_license
using System; using System.Collections.Generic; using System.Text; namespace Data_Structures { class Program { static void Main(string[] args) { /*take word and revers inputed word * take input and display input in reverse * create separate method for resers...
Markdown
UTF-8
2,031
2.84375
3
[]
no_license
--- date: 2018-03-01T00:00:00+11:00 lastmod: 2018-03-01T00:00:00+11:00 title: Hold out your hand, and join our UNIHACK Fam ❤ authors: ["sophia"] categories: - Press tags: - Agile cover: image: https://miro.medium.com/fit/c/1400/420/1*ohg9MMhVKknFw-tvfyH7lg.jpeg style: half slug: 43160/UH-recruitment-campaig...
Java
UTF-8
274
2.71875
3
[]
no_license
package observer; public class Ammo { private int ammo; public Ammo() { } public Ammo(int ammo) { this.ammo = ammo; } public void setAmmo(int ammo) { this.ammo = ammo; } public int getAmmo() { return ammo; } }
Java
UTF-8
279
2.34375
2
[ "MIT" ]
permissive
package net.scratchforfun.gamedev; import java.awt.*; /** * Created by Magnus on 05/10/2014. */ public class Player { public Image texture; public int posX; public int posY; public Player(){ texture = TextureManager.loadTexture("player"); } }
PHP
UTF-8
834
2.8125
3
[]
no_license
<?php include('./classes/Student.php'); $student = new Student(); $students = $student->fetch_report_data(); ?> <?php include_once('./header.php') ?> <div class="container"> <table class="table table-striped"> <thead> <tr> <th>Year</th> <th>Number Of Students</th>...
Markdown
UTF-8
1,584
3.046875
3
[]
no_license
# Normes de codification utilisées # ## Fichiers sources ## - Les fichiers sources sont tous enregistrés selon le suffixe `.java`. (Les fichiers `.class` ne sont pas inclus dans le dépôt.) - Une classe seulement par fichier source. - Les imports sont au début du fichier avant la classe. ## Classes ## - Les noms ...
PHP
UTF-8
3,038
2.59375
3
[]
no_license
<?php session_start(); include("functions.php"); chkSsid(); //$_SESSION["lid"]の有無を判定(ログインの後か前か判定) if(!isset($_SESSION["lid"]) || $_SESSION["lid"]=="" ){ $a = "ゲスト";//ログイン前ならゲスト表記 }else{ $a = $_SESSION["lid"];//ログイン後なら$_SESSION["lid"]を表記 } ?> <!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <titl...
Java
UTF-8
445
2.1875
2
[]
no_license
package my.orm.hiber; import org.hibernate.Session; import my.orm.datasets.UserDataSet; public class HibernateUserDataSetDAO { private Session session; public HibernateUserDataSetDAO(Session session) { this.session = session; } public void save(UserDataSet dataSet) { session.s...
C++
UTF-8
275
2.59375
3
[]
no_license
/* * 1057.cpp * * Created on: 2018. 11. 15. * Author: paul */ #include <iostream> using namespace std; int main(){ int n, kn, imn; cin >> n >>kn>>imn; int cnt=0; while(kn!=imn){ kn = kn/2+kn%2; imn = imn/2+imn%2; cnt++; } cout <<cnt; return 0; }
Markdown
UTF-8
1,237
3.0625
3
[]
no_license
# Landing Page Project ## Table of Contents * [Instructions](#instructions) * [ProjectNotes](#projectnotes) ## Instructions The starter project has some HTML and CSS styling to display a static version of the Landing Page project. You'll need to convert this project from a static project to an interactive ...
C#
UTF-8
6,792
2.671875
3
[]
no_license
using MenuItemHelperNS; namespace ModelsClassLibrary.ModelsNS.SharedNS.MenuItemHelperNS { public class SystemPurchaseOrders : IOrdersInfo { public SystemPurchaseOrders( decimal systemOpenPurchaseOrdersInMoney, double systemOpenPurchaseOrdersInQuantity, decimal syst...
Go
UTF-8
1,409
3.53125
4
[]
no_license
//author xinbing //time 2018/8/28 14:18 //数字工具 package utilities import ( "fmt" "strconv" "math" ) var fmtStrings = []string{ //第一个是补位 "%0.0f","%0.1f","%0.2f","%0.3f","%0.4f","%0.5f","%0.6f","%0.7f","%0.8f","%0.9f","%0.10f", } func Round(f float64, precision int) float64 { if precision <= 0 { return math.Rou...
Java
UTF-8
192
1.953125
2
[]
no_license
package com.atguigu.mybatis.mapper; import java.util.List; import com.atguigu.mybatis.entities.Dog; public interface DogMapper { public List<Dog> getDogByName(String dogName); }
Java
UTF-8
9,176
1.976563
2
[]
no_license
package com.scenetec.upf.operation.repository.codedictionary; import com.scenetec.upf.operation.model.domain.codedictionary.CodeDictionaryDO; import org.apache.ibatis.annotations.*; import org.springframework.stereotype.Repository; import com.github.pagehelper.Page; import java.util.Map; import java.util.List; /** *...
C++
UTF-8
1,678
3.125
3
[ "MIT" ]
permissive
#include "status.h" #include <stdio.h> #include <iostream> #include <string> #include <cassert> using namespace std; namespace pytorch { namespace ctc { Status::Status(pytorch::ctc::Code code, string msg) { assert(code != pytorch::ctc::OK); state_ = new State; state_->code = code; state_...
C#
UTF-8
1,064
2.546875
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraControl : MonoBehaviour { //customization [SerializeField] private GameObject attachTarget; [SerializeField] private Vector3 camOffSet = new Vector3(0f, 1.6f, 0f); [SerializeField] private float ...
JavaScript
UTF-8
3,333
2.609375
3
[]
no_license
var express = require('express'); var router = express.Router(); // Require controller modules. var incident_controller = require('../controllers/incidentController'); var person_controller = require('../controllers/personController'); var vehicle_controller = require('../controllers/vehicleController'); /// INCIDENT...
JavaScript
UTF-8
3,391
2.609375
3
[ "MIT" ]
permissive
class snakeObjekt { constructor(){ this.cellsCout = 1; this.cells=[]; this.step = 5; this.cellWH = 5; this.maxW=100; this.score=0; this.bgColor=["radial-gradient(circle,#424242 40%,#ffde00 50%,#212121 60%)","radial-gradient(circle,#ff3d00 30%,#424242 40%,#ffff00 50%,#212121 60%)"]; ...
Markdown
UTF-8
196
2.5625
3
[ "MIT" ]
permissive
--- layout: page title: Repos permalink: /repos/ --- {% for repository in site.github.public_repositories %} * [{{ repository.name }}]({{ repository.html_url }}){:target="_blank"} {% endfor %}
Python
UTF-8
1,390
2.90625
3
[]
no_license
# -*- coding: utf-8 -*- __all__ = ['xml2elem', 'strptime'] ############################## # xml2elem implementations import sys from xml.dom.minidom import parseString class minidom_xml2elem(object): def __init__(self, root): if isinstance(root, basestring): self.root = parseStr...
JavaScript
UTF-8
1,430
3.578125
4
[]
no_license
function computerPlay() { let numberOfChoices = 3; choice = function() { return Math.floor(Math.random() * Math.floor(numberOfChoices)); }; switch (choice()) { case 0: return "rock"; break; case 1: return "paper"; break; case 2: return "scissors"; break; } }...
Java
UTF-8
211
1.8125
2
[]
no_license
package com.hexagonal.shop.domain; import com.hexagonal.shop.domain.core.Product; import java.util.List; public interface PriceArchive { void save(double price, List<Product> products, long timestamp); }
C++
UTF-8
1,957
2.671875
3
[ "Apache-2.0" ]
permissive
#include "stdafx.h" #include "ReLexer.h" #include "ReToken.h" #include "ReInputStream.h" #include "ReIdentifierReader.h" #include "ReNumberReader.h" #include "ReOperatorReader.h" #include "RePunctReader.h" #include "ReStringReader.h" #include "ReSyntaxException.h" #include "ReCompareOperatorReader.h" #includ...
C++
UTF-8
1,532
3.15625
3
[]
no_license
/* * weapon.h * * Created on: 2016年1月8日 * Author: olivia.long * TAPD: * Description: * */ #ifndef SRC_PATTERNS_STRATEGY_WEAPON_H_ #define SRC_PATTERNS_STRATEGY_WEAPON_H_ #include <iostream> using namespace std; class WeaponBehavior { public: WeaponBehavior(){} virtual ~WeaponBehavior...
C
UTF-8
132
3.171875
3
[]
no_license
#include<stdio.h> int sum(int x) { int s; for(s=0;x>0;s=s+x%10,x=x/10); return s; } void main() { printf("%d\n",sum(143)); }
Markdown
UTF-8
1,689
2.6875
3
[ "MIT" ]
permissive
# Rendez-vous geolocalise ## Description > Énoncé disponible [ici](https://www.labri.fr/perso/zemmari/pam/Projet2017.pdf) Le projet a pour but le développement d’une application permettant d’organiser des rendez-vous géolocalisés. __Le fonctionnement de l'application est le suivant :__ - Au lancement, l’utilisateur...
PHP
UTF-8
475
2.5625
3
[ "Apache-2.0" ]
permissive
<?php namespace app\index\controller; use think\Controller; class IndexController extends Controller { public function index() { $path = "application\\index\\controller\\index.php"; // 定义输出文字 $html = "<p>我是 [path] 文件的index方法</p>"; // 调用temphook钩子, 实现钩子业务 hook('temphook'...
Python
UTF-8
2,410
3.265625
3
[]
no_license
import logging from flask import json def get_appliance_info_followup(api_auth, parameters, contexts): """ Allows users to get detailed information about a particular appliance,in cases where there are multiple appliances of the same model. In order to do this, we only retrieve a single option number...
JavaScript
UTF-8
1,265
3.359375
3
[]
no_license
const inquirer = require('inquirer'); const Engineer = require('./lib/Engineer'); const Manager = require('./lib/Manager'); const Intern = require('./lib/Intern'); const promptUser = () => { return inquirer.prompt([ { type: 'input', name: 'name', message: 'What is the name of ...
Python
UTF-8
4,291
2.515625
3
[]
no_license
def test_add_liquidity(t, chain, utils, omg_token, exchange_factory, omg_exchange, assert_tx_failed): deadline = chain.head_state.timestamp + 300 assert exchange_factory.getExchange(omg_token.address) == omg_exchange.address assert utils.remove_0x_head(omg_exchange.tokenAddress()) == omg_token.address.hex()...
Markdown
UTF-8
4,347
3
3
[ "MIT", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
# machinae This is the documentation for [machinae][ma], a generic state machine intended to be primarily used in game development. In addition to this book you can find a list of the items in the [API documentation][ap]. [ma]: https://github.com/rustgd/machinae [ap]: https://docs.rs/machinae You'll mostly need the...
C++
UTF-8
1,669
2.65625
3
[]
no_license
#include <iostream> #include <algorithm> #include <cstring> #include <cstdio> using namespace std; struct Persist_Tree{ struct Node{ int l,r,lnum,rnum,li,ri; }; Node node[2000000]; int used; int pos[100001]; void build(int i,int l,int r){ node[i].l=l,node[i].r=r; node[i]....
Markdown
UTF-8
861
2.65625
3
[]
no_license
# ALttPRSpriteRandomizer Script for use with [ALttPEntranceRandomizer](http://github.com/KevinCathcart/ALttPEntranceRandomizer) (*"ALttPER"*) to add random sprites to game files ## Setup * Needs [python](https://www.python.org/downloads/) * Needs [*ALttPER*](http://github.com/KevinCathcart/ALttPEntranceRandomizer) pyt...
Markdown
UTF-8
7,774
3.21875
3
[ "MIT" ]
permissive
--- title: Menggunakan UUID (Universally Unique Identifier) di PHP / Laravel author: Yoga Hanggara extends: _layouts.post section: content categories: [php, laravel-5, laravel-4, basic, uuid, database] date: 2015-07-31 --- ## Problem 1: Tebak-Tebak Berhadiah Selama ini, kita sering menggunakan _Auto-Increment Integer...
Python
UTF-8
3,348
3.15625
3
[ "MIT" ]
permissive
import math import numpy as np from io import TextIOWrapper, FileIO from pathlib import Path from imageio import imread, imwrite from typing import List from .binary_manipulation import substitute_lsb, extract_lsb, message_to_binary from .utils import image_needed_size def encode( input_message: TextIOWrapper, ...
JavaScript
UTF-8
1,137
2.78125
3
[ "MIT" ]
permissive
const moment = require('moment') const r2 = require('r2') const _ = require('lodash') const Promise = require('bluebird') module.exports = async function (req, res) { const app = this; let foodsToAvoid = [] let pastFiveBirthdays = [] for (var i = 0, years = 5; i < years; i++) { let birthday = moment(req....
Python
UTF-8
2,665
4.65625
5
[]
no_license
#DAY 6 TASK #1)Write a program to loop through a list of numbers and add +2 to every value to elemenys in list n = [1,2,3,4,5,6,7] for i in n: i += 2 print(i) """ 2)Write a program to get the below pattern 54321 4321 321 21 1 """ rows = int(input("Enter the number of rows: ")) for i in ra...
Python
UTF-8
678
3.328125
3
[]
no_license
# Definition for a binary tree node. from functools import lru_cache class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: @lru_cache(None) def rob(self, root: TreeNode) -> int: if root is None: return 0 ...
SQL
ISO-8859-1
1,841
2.546875
3
[]
no_license
INSERT INTO Pregunta VALUES ('Tengo nombre de animal, cuando la rueda se pincha me tienes que utilizar', 'El len', 'El felino', 'El gato', 'El perro', '20','Comunicacion'); INSERT INTO Pregunta VALUES ('Todos me quieren para descansar si ya te lo he dicho!! no pienses ms', 'La mesa', 'La cama', 'La v...
Markdown
UTF-8
3,785
2.796875
3
[]
no_license
--- description: "recipe for Beef-Rice-Cheese Casserole | how to cook Beef-Rice-Cheese Casserole" title: "recipe for Beef-Rice-Cheese Casserole | how to cook Beef-Rice-Cheese Casserole" slug: 127-recipe-for-beef-rice-cheese-casserole-how-to-cook-beef-rice-cheese-casserole date: 2020-04-26T13:25:13.367Z image: https://i...
Python
UTF-8
237
2.59375
3
[]
no_license
#making necessry imports import requests #Loop for 3 synchronous http calls for n in range(0,3): r=requests.get('https://webhook.site/#/10c68a23-5b6a-4f00-938a-a74d8d4a653a') print(r.headers['date'])
JavaScript
UTF-8
783
3.15625
3
[]
no_license
exports.convertDate = function(date){ let tgl = date.split(' ') let newDateFormat = '' if(tgl[1] == 'Jan') newDateFormat = '01' else if(tgl[1] == 'Feb') newDateFormat = '02' else if(tgl[1] == 'Mar') newDateFormat = '03' else if(tgl[1] == 'Apr') newDateFormat = '04' else if(tgl[1] == 'May'...
PHP
UTF-8
3,566
2.59375
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use App\Http\Resources\NoteResource; use App\Models\Note; use http\Exception; use Illuminate\Http\Request; use Validator; class NoteController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\JsonResponse */ p...
Shell
UTF-8
1,609
3.90625
4
[ "Apache-2.0" ]
permissive
#!/bin/bash -e # # Capture SOAP traffic between web client and vpxd on 127.0.0.1:8085. # # Caveats: tested with VCSA 6.0, unlikely to work for other versions. # set -e cache_deb() { wget $1 ar x *.deb data.tar.gz tar zxf data.tar.gz rm -f data.tar.gz rm -f *.deb } dirname="$(dirname $0)" basename="$(basena...
Java
UTF-8
5,352
2.640625
3
[]
no_license
package ac.bali.serial; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.HashSet; import java.util.Set; import javax.comm.CommPort; import javax.comm.CommPortIdentifier; import javax.comm.PortInUseException; import javax.comm.SerialPort; import javax.comm.Unsupporte...
C#
UTF-8
3,489
2.734375
3
[]
no_license
namespace Glean.Core.Columns { using System; using System.Globalization; using Glean.Core.Enumerations; public class DateColumn : BaseColumn<DateTime?> { private const string DefaultOutputFormat = "yyyy-MM-dd"; private readonly string[] inputFormats; private readonly DateT...
Python
UTF-8
286
3.9375
4
[]
no_license
#!/usr/bin/env python from sum import * print("Calling fortran with ints") isum = sum_of_int(1,2) print("Integer sum is: ", isum) dsum = sum_of_double(1,2) print("Double sum of ints is: ", dsum) dsum = sum_of_double(0.5,2.5) print("Double sum of doubles is: ", dsum) print("Done")
Markdown
UTF-8
2,029
2.65625
3
[ "MIT" ]
permissive
# Registration Control Registration control introduces the concept of selective registration of services. Registration control can especially be useful in test projects where mock services are used. There are two ways to control service registration. A service attributed as live service does not get called when the a...
Markdown
UTF-8
1,940
2.90625
3
[]
no_license
# Password Generator ## Summary An employee with access to sensitive data wanted a way to randomly generate passwords based on specific criteria. Starter code was given for an HTML and CSS style page, the javascript needed to run in a browswer was necessary to create this project. <br> <br> ## Site Picture ![Site](As...
PHP
UTF-8
1,755
2.828125
3
[]
no_license
<?php/* session_start(); include("dbConnect.php"); $EmailId = $_SESSION['EmailId']; $request = "select * from report where email_id = '$EmailId' "; $details = mysqli_query($conn,$request); $data=""; if (mysqli_num_rows($details) > 0) { $data.="<table> <tr> <th> Table1 name </th...
Python
UTF-8
619
2.546875
3
[]
no_license
import QLS.AST.Widget.widget_interface as w from QL.AST.Expressions.Types import * class Radio(w.IWidget): def __init__(self, option1, option2, default=""): self.option1 = option1 self.option2 = option2 self.default = default def string_presentation(self, level=0): s = " " ...
Java
UTF-8
1,691
2.984375
3
[]
no_license
package org.academiadecodigo.bootcamp.filipejorge.uberlisbondriver.cars; import org.academiadecodigo.bootcamp.filipejorge.uberlisbondriver.cars.graphics.ColorUber; import org.academiadecodigo.simplegraphics.graphics.Color; /** * Created by Filipe Jorge <Academia de Código_> on 02/02/16. */ public enum CarType { ...
Markdown
UTF-8
3,193
3.34375
3
[ "MIT" ]
permissive
# Voucher Code Generator Generate unique, random, and hard to guess coupon / voucher codes. Use cases: promo codes, loyalty coupons, gift vouchers, in-app purchases, referral links ### Installation Just use go get. ```go go get -u github.com/AmirSoleimani/VoucherCodeGenerator@v1.0.1 ``` ### Tested in the following ...
Java
UTF-8
8,094
3.234375
3
[ "MIT" ]
permissive
package bomberman; import java.util.ArrayList; import java.util.HashSet; /** * Class containing all game map data. * @author David Benes */ public class GameMap { private final int xSize; private final int ySize; private final HashSet<Player> players; private final HashSet<Bomb> bo...
C
UTF-8
986
3.6875
4
[]
no_license
#include <stdio.h> #include <stdlib.h> int main() { int every_number[28123], sum_of_divisors[28123], abundant[28123]; // amiable numbers int i, j; // for loops and number of primes int sum = 0; printf("Start\n"); for(i = 0; i < 28123; i = i+1) { every_number[i] = i; sum_of_divisors[i] = 1; for(j = 2; j ...
JavaScript
UTF-8
217
2.59375
3
[]
no_license
process.stdin.on('data', function(chunk){ for(var i = 0 ; i < chunk.length; i ++){ //console.log(chunk[i]); if(chunk[i] == 46){ chunk.write("!", i, 1); } } console.log(chunk); }); //process.stdin.resume();
Python
UTF-8
746
2.8125
3
[]
no_license
from db import db class RoleModel(db.Model): __tablename__ = 'roles' ROLES = ["admin", "user"] # Atributos del Usuario id = db.Column(db.Integer, primary_key=True) role_type = db.Column(db.String(80), unique=True) def __init__(self, role_type): self.role_type = role_type def js...
C++
UTF-8
840
2.9375
3
[]
no_license
// // cScreen.hpp // Frogger // // Created by Kristine Laranjo on 4/22/16. // Copyright © 2016 Kristine Laranjo. All rights reserved. // // This will be my super class. /* When speaking about screens, I mean Menu screen, Config screen, Game screen, etc... Those screens you find in every games. The problem her...
Java
UTF-8
2,747
3.546875
4
[]
no_license
package year2019; /* 题目描述 Z国的货币系统包含面值1元、4元、16元、64元共计4种硬币,以及面值1024元的纸币。现在小Y使用1024元的纸币购买了一件价 值为N (0 < N \le 1024)N(0<N≤1024)的商品,请问最少他会收到多少硬币? 输入描述: 一行,包含一个数N。 输出描述: 一行,包含一个数,表示最少收到的多少枚硬币。 输出结果应该是不唯一,因为 64 元可以换成16元和 4 元的硬币 姑且认为在能召开的情况下,返回最小个数 备注: 对于100%的数据,N (0 < N \le 1024)N(0<N≤1024)。 分析: remain = 1024 - N 因为零钱存在着...
Java
UTF-8
3,754
2.203125
2
[]
no_license
package app.controller; import java.util.HashMap; import java.util.List; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.web.bind.annotation.GetMapping;...
C++
UTF-8
737
2.765625
3
[]
no_license
#ifndef SERVER_GAME_LEVELS_EXCEPTIONS_NOMORELEVELSEXCEPTION_H_ #define SERVER_GAME_LEVELS_EXCEPTIONS_NOMORELEVELSEXCEPTION_H_ #include <exception> #include <string> namespace server { namespace game { namespace levels { namespace exceptions { /** * Excepcion que indica que no existen mas niveles. ...
Java
UTF-8
320
2.046875
2
[]
no_license
package com.atguigu.bookstore.Test; import java.sql.Connection; import org.junit.Test; import com.atguigu.bookstore.Utils.JDBCUtils; public class TestJDBCUtils { @Test public void TestJDBC(){ Connection conn = JDBCUtils.getConnection(); System.out.println(conn); JDBCUtils.closeConnection(conn); } }
PHP
UTF-8
2,619
2.8125
3
[]
no_license
<?php /** * This file is part of the Small Neat Box Framework * Copyright (c) 2011-2012 Small Neat Box Ltd. * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. */ namespace phpmailer\email; use snb\email\EmailAbstract; use snb\config\ConfigInterface; ...
Java
UTF-8
4,671
1.9375
2
[]
no_license
package stayabode.foodyHive.models; import java.io.Serializable; import java.util.ArrayList; import java.util.List; public class Orders implements Serializable { String name; String description; String count; String chefName; String orderId; String image; String deliveredDate; String a...
Python
UTF-8
601
3.046875
3
[]
no_license
# Реализуйте функцию mirror_matrix(), которая принимает двумерный список (матрицу) # и изменяет его (по месту) таким образом, что правая половина матрицы # становится зеркальной копией левой половины, # симметричной относительно вертикальной оси матрицы. # Если ширина матрицы — нечётная, то "средний" столбец не ...
Java
UTF-8
909
2
2
[ "Apache-2.0" ]
permissive
package br.edu.utfpr.pb.trabalhofinalweb1.config; import br.edu.utfpr.pb.trabalhofinalweb1.model.User; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.domain.AuditorAware; import org.springframework.data.jpa.repository.con...
C
UTF-8
1,956
3.890625
4
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<string.h> #define bool int #define true 1 #define false 0 //é igual ao exercicio 19 typedef struct nodo{ int n; struct nodo *next; }nodo; typedef struct fila{ nodo *first; nodo *last; } fila; void listar(fila *f); void pop(fila *f, int *c); bool push(fila *f, ...
TypeScript
UTF-8
1,251
3.640625
4
[ "MIT" ]
permissive
/** * @author Richard Davey <rich@photonstorm.com> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * @ignore */ function P0 (t: number, p: number): number { const k = 1 - t; return k * k * k * p; } /** * @ignore */ function P...
Java
UTF-8
569
1.65625
2
[]
no_license
package com.zhang.upms.rpc.api; import com.zhangle.common.base.BaseService; import com.zhang.upms.dao.model.UpmsUserOrganization; import com.zhang.upms.dao.model.UpmsUserOrganizationExample; /** * UpmsUserOrganizationService接口 * Created by shuzheng on 2017/12/17. */ public interface UpmsUserOrganizationService extend...
Markdown
UTF-8
1,213
3.1875
3
[ "MIT" ]
permissive
## http.zlib An abstraction layer over the various lua zlib libraries. ### `engine` <!-- --> {#http.zlib.engine} Currently either [`"lua-zlib"`](https://github.com/brimworks/lua-zlib) or [`"lzlib"`](https://github.com/LuaDist/lzlib) ### `inflate()` <!-- --> {#http.zlib.inflate} Returns a closure that inflates (un...
Markdown
UTF-8
596
2.671875
3
[]
no_license
# 7 States you can have with other characters, as well as governments The higher your state with someone / an entity the more information you have about their characteristics and respective states with other characters / governments. The player's own 1. Enemy - You know nothing and get attacked on sight 2. Distrus...
Markdown
UTF-8
10,708
3.125
3
[]
no_license
# 设计文档 [TOC] ## 需求 设计一个扣费服务管理的后台系统,需要具备功能: - 查看扣费服务列表 - 开通扣费服务 - 关闭扣费服务 原型参考微信支付扣费服务。 ## 模型设计 ### 总体思路 将商户与用户对扣费服务的约定抽象为**代扣协议(Contract)**。 同一商户对不同用户提供的扣费服务通常具有相同的属性,为了方便审核/管理/风控,抽象出**代扣方案(Plan)**,包括扣费用途、扣费限额等。 商户需要先向平台报备**代扣方案**,经过审批后,基于代扣方案补充签约周期等属性派生**代扣协议**,与用户签约代扣协议。 协议过期、解约、吊销后即失效,商户可以凭有效代扣协议发起扣费。 ###...
Markdown
UTF-8
14,769
2.765625
3
[]
no_license
# Service层接口说明文档 - 更新时间:2019/09/20 [TOC] # 简介 欢迎使用CAS统一认证平台。 本文档主要描述CAS统一认证平台的Service层相关技术内容。 ## 请求格式 - **请求格式为http://{ip}:{port}/{path}** | 参数 | 说明 | | ---- | ------------------------- | | ip | Service程序运行的服务器IP | | port | Service程序运行的端口 | | path | Service调用路径 | ## 文档阅读说明 ...
Swift
UTF-8
3,505
2.8125
3
[]
no_license
// // Execute1.swift // TestCoreData // // Created by Sergey Garazha on 8/1/18. // import CoreData class Test1 { let q1 = DispatchQueue(label: "com.test.db1", qos: DispatchQoS.default) let q2 = DispatchQueue(label: "com.test.db2", qos: DispatchQoS.default) let applicationDocumentsDirectory = FileM...
PHP
UTF-8
5,033
2.734375
3
[]
no_license
<?php class AppModel extends Model { var $export_file = 'files/export.csv'; // var $useDbConfig = 'test'; // kontroluje, jestli se jedna o obycejneho uzivatele a jestli nevyzaduje pristup // k datum jineho uzivatele function checkUser($user, $checked_id) { if ($user['User']['user_type_id'] == 3) { if ($che...
Ruby
UTF-8
1,205
3.609375
4
[]
no_license
# frozen_string_literal: true require './lib/connect_four' # class handles switching between players class TwoPlayerGame PLAYER_1 = 0 PLAYER_2 = 1 def initialize(game = ConnectFour.new, player_1 = PLAYER_1, player_2 = PLAYER_2, current_player = PLAYER_1) @game = game @player_one = player_1 @player_...
Java
UTF-8
228
2.640625
3
[]
no_license
package com.mishadoff.algo.matrix; /** * @author mishadoff */ public class Matrix<T> { private T[][] data; public Matrix(int n, int m) { } public void setData(T[][] data) { this.data = data; } }
C#
UTF-8
560
2.875
3
[]
no_license
using System; using System.Security.Cryptography; using System.Text; namespace Enyim.Caching.Memcached.KeyTransformers { /// <summary> /// A key transformer which converts the item keys into their SHA1 hash. /// </summary> public sealed class SHA1KeyTransformer : IMemcachedKeyTransformer { string IMe...
Python
UTF-8
1,445
2.875
3
[]
no_license
f1 = open("family.ged", "r") f2 = open("answer.txt", "w") base = {} for line in f1.readlines(): words = line.split(" ") if len(words) >= 3: s1 = words[1] s2 = words[2] if s2[0] == "I": key = words[1] if s1 == "GIVN": name = words[2] if s1 == "SUR...
Java
UTF-8
2,929
2.4375
2
[]
no_license
package com.shcepp.shdippsvr.sys.util.mail; import kr.pe.kwonnam.slf4jlambda.LambdaLogger; import kr.pe.kwonnam.slf4jlambda.LambdaLoggerFactory; import javax.mail.Message; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; import...
Python
UTF-8
3,818
3.5
4
[ "MIT" ]
permissive
import sqlite3 from db import db # class UserModel: class UserModel(db.Model): # tells SQLAlchemy it's something to save/add to db """ This is not a resource because the API cannot receive data into this class or send as a JSON representation. It is a helper used to store data about the user & contain...
JavaScript
UTF-8
2,662
2.53125
3
[]
no_license
require("./config/config.js"); const path = require("path"); const bodyParsers = require("body-parser"); const express = require("express"); const http = require("http"); const socketIO = require("socket.io"); const {generateMessage, generateLocationMessage} = require("./utils/message.js"); const {isRealString} = req...
Java
UTF-8
421
2.125
2
[]
no_license
package com.users.demo.dao; import com.users.demo.entities.Customer; import org.springframework.stereotype.Repository; import java.util.Collection; import java.util.List; @Repository public interface CustomerDao { List getAllCustomers(); Customer getCustomerById(int id); void deleteCustomerById(int id); ...
Markdown
UTF-8
1,612
3.40625
3
[]
no_license
# 1541 - 잃어버린 괄호 <hr/> ## 1. 문제 설명 세준이는 양수와 +, -, 그리고 괄호를 가지고 길이가 최대 50인 식을 만들었다. 그리고 나서 세준이는 괄호를 모두 지웠다. 그리고 나서 세준이는 괄호를 적절히 쳐서 이 식의 값을 최소로 만들려고 한다. 괄호를 적절히 쳐서 이 식의 값을 최소로 만드는 프로그램을 작성하시오. [잃어버린 괄호](<https://www.acmicpc.net/problem/1541>) ------ ## 2. 입력 첫째 줄에 식이 주어진다. 식은 ‘0’~‘9’, ‘+’, 그리고 ‘-’만으로 이루어져 있고, 가장 ...
Java
UTF-8
3,947
2.640625
3
[]
no_license
package cn.com.example.customermanagement.utils; import com.google.gson.*; import com.google.gson.internal.bind.DateTypeAdapter; import java.io.Reader; import java.lang.reflect.Type; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Date; import java.util.List; /** * JSON转换工具类 * * @author li...
Java
UTF-8
433
2.546875
3
[]
no_license
package com.redwood.wiki.parser; import com.redwood.wiki.utilities.ParseUtility; public class SuperScriptParser implements Parseable { private static final String REG_EXPR = "\\^.+?\\^"; /** * replace ^superscript^ * with {SUP()}superscript{SUP} */ public String parseToTiki(String toParse) { return Par...
C#
UTF-8
5,398
2.671875
3
[]
no_license
using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Threading.Tasks; using IdentityModel; using IdentityServer.Data; using IdentityServer.Models; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.Logging; namespace IdentityServer { public class SeedUsers ...
C++
UTF-8
1,308
3.609375
4
[]
no_license
#pragma once #include <mutex> #include <queue> #include <condition_variable> #include <limits> template <typename Value, size_t MaxCapacity = std::numeric_limits<size_t>::max()> class Queue { public: Queue() {} Queue(const Queue&) = delete; Queue& operator=(const Queue&) = delete; Queue(Queue&& othe...
C#
UTF-8
2,054
2.828125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; namespace MassSpecStudio.Core.DataProvider { public static class XicHelper { public static void GetIntensities(IList<double> mzValues, IList<double> intensityValues, double rt, double mass1, double mzTolerance, List<double> msLevelXVals, List<doub...
C#
UTF-8
2,931
3.34375
3
[]
no_license
using AssignmentThree.Enemies; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AssignmentThree { class Player { private string name; private int lvl = 1; private int hp = 200; private int maxHp = 200;...
Markdown
UTF-8
1,112
2.578125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
# FitMiddleware Simply Middleware Implementation. ## Installation ``` composer require fitdev-pro/middleware ``` ## Usage Base usage ```php <?php $hundler = new MiddlewareHundler(new Resolver(), new Queue()); $hundler->append(Foo/Bar/SomeClass::class); $hundler->append(function ($input, $output, $nex...
C++
UTF-8
7,377
2.71875
3
[]
no_license
/* * Copyright (c) 2018-2021 Steven Varga, Toronto,ON Canada * Author: Varga, Steven <steven@vargaconsulting.ca> */ #ifndef H5CPP_SALL_HPP #define H5CPP_SALL_HPP #include <hdf5.h> #include "H5config.hpp" #include "H5Iall.hpp" #include "H5meta.hpp" #include <initializer_list> #include <array> namespace h5::impl ...
Java
UTF-8
1,944
2.296875
2
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
package com.ctrip.zeus.model.tools; public class CheckSlbreleaseResponse { private Integer m_code; private String m_status; private String m_commitId; public CheckSlbreleaseResponse() { } protected boolean equals(Object o1, Object o2) { if (o1 == null) { re...
Java
UTF-8
1,323
2.21875
2
[]
no_license
package jp.co.gfam.gits.integration.dao.impl; import java.sql.Connection; import java.sql.DriverManager; import java.util.List; import jp.co.gfam.gits.integration.dao.UserCriteria; import jp.co.gfam.gits.integration.dao.UserDaoImpl; import jp.co.gfam.gits.integration.entity.User; import org.junit.After; i...
Ruby
UTF-8
996
2.609375
3
[]
no_license
# This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). # # Examples: # # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) # Ch...
JavaScript
UTF-8
3,794
2.5625
3
[ "MIT" ]
permissive
import React, { Component } from 'react'; import JourneyService from './journey-service'; import JourneyDetailsService from './journey-details-service'; import EditJourneyDetail from './EditJourneyDetail'; import EditJourneyMilestones from './EditJourneyMilestones'; class JourneyDetails extends Component { state =...
C++
UTF-8
930
2.53125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef pair<int, int> pi; /* Disjoint-Set */ int n, m; const int maxN = 1e5; int link[maxN+1], sz[maxN+1]; int numComponent, sizeLargest; int find(int x) { while(x != link[x]) x = link[x]...
PHP
UTF-8
2,712
2.84375
3
[]
no_license
<?php namespace Zeeml\MachineLearning\Tests\Traits; use PHPUnit\Framework\TestCase; use Zeeml\Algorithms\Prediction\Linear\LinearRegression; use Zeeml\Algorithms\Prediction\Logistic\LogisticRegression; use Zeeml\MachineLearning\Traits\MLHash; class MLHashTest extends TestCase { protected $class; public func...
Java
UTF-8
1,463
2.46875
2
[]
no_license
import java.util.*; import Jakarta.util.FixDosOutputStream; import java.io.*; /** production [ AST_Modifiers ] UnmodifiedTypeDeclaration ::ModTypeDecl * * @layer<preprocess> */ public class ModTypeDecl { // returns true only for Ute public boolean isExtension() { return ( ( UnmodifiedTypeDecl...