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
Shell
UTF-8
6,214
3.65625
4
[]
no_license
#! /bin/bash #db配置参数 db_name="iwg_asset_db" db_pwd="zte" db_port=3306 db_path="./data/db" db_image="mariadb" #web配置参数 web_name="iwg_asset_web" web_port=5000 web_logs_path="./data/logs" web_data_path="./data/records" web_image="iwg_asset" shell_dir=$(realpath "$(dirname "$0")") cd "${shell_dir}" ####################...
JavaScript
UTF-8
5,451
3.203125
3
[ "Apache-2.0" ]
permissive
import * as Config from "./config.js"; const yyyymmdd = (date) => { if (!date) date = new Date(); const yyyy = date.getFullYear().toString(); const mm = (date.getMonth() + 1).toString(); // getMonth() is zero-based const dd = date.getDate().toString(); return ( yyyy + "-" + (mm[1] ? mm : "0" + mm[0]) + ...
PHP
UTF-8
1,655
2.546875
3
[]
no_license
<?php namespace Dontdrinkandroot\GitkiBundle\Tests\Acceptance\Command; use Dontdrinkandroot\GitkiBundle\Command\SearchCommand; use Dontdrinkandroot\GitkiBundle\Tests\Acceptance\KernelTestCase; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Component\Console\Tester\CommandTester; /** * @author P...
C
UHC
493
4.34375
4
[]
no_license
#include <stdio.h> int main() { int total2 = 0, total3 = 0; // 2 3 for (int i = 1; i <= 500; i++) // 1 500 ݺ { if (i % 2 == 0) // i 2 0̸ 2 ̹Ƿ տ ش. total2 += i; if (i % 3 == 0) // total3 += i; } printf(": %d \n", total2 - total3); // 2 հ 3 return 0; }
Java
UTF-8
1,509
2.453125
2
[]
no_license
/** * (c) planet-ix ltd 2005 */ package com.ixcode.bugsim; import static com.ixcode.framework.io.IO.tryToClose; import java.util.Properties; import java.io.InputStream; import java.io.IOException; import static java.lang.Thread.currentThread; /** * Description : ${CLASS_DESCRIPTION} */ public class BugsimVersio...
C++
UTF-8
842
2.625
3
[ "MIT" ]
permissive
#include "common/types.h" #include "utils/file.h" #include "utils/utils.h" #define DEBUG_LEVEL 5 #include "common/debug.h" static const std::string snafuDigits = "=-012"; static int64_t snafu2Dec(const std::string &snafu) { int64_t ret = 0; for (auto c : snafu) { ret = 5 * ret + snafuDigits.find(c) - 2; } ...
C++
UTF-8
2,085
2.578125
3
[]
no_license
#include <cmath> #include <Util/exceptions.h> #include "scene.h" #include "sphere.h" using namespace Ray; using namespace Util; //////////// // Sphere // //////////// void Sphere::init( const LocalSceneData &data ) { // Set the material pointer if( _materialIndex<0 ) THROW( "negative material index:...
Markdown
UTF-8
966
2.671875
3
[]
no_license
# Article D341-14-1 I. - Lorsque le bénéficiaire ne respecte pas, sur l'ensemble de son exploitation, les obligations définies au 2° de l'article D. 341-10, le préfet applique des réductions au montant total des paiements annuels mentionnés à l'article D. 341-21, selon les modalités définies aux articles D. 615-57 à D...
SQL
UTF-8
698
3.015625
3
[]
no_license
DROP TABLE IF EXISTS users; DROP TABLE IF EXISTS projects; DROP TABLE IF EXISTS blogs; DROP TABLE IF EXISTS papers; CREATE TABLE users ( id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT UNIQUE NOT NULL, password TEXT NOT NULL ); CREATE TABLE projects ( id INTEGER PRIMARY KEY AUTOINCREMENT, titl...
Java
UTF-8
4,164
2.3125
2
[]
no_license
package com.moying.energyring.Model; import java.util.List; /** * Created by waylen on 2017/3/17. */ public class AllPerson_Model { /** * IsSuccess : true * Msg : 操作成功 * Data : [{"RowNum":1,"TargetID":17,"StartDate":"2017-03-15 00:00:00","EndDate":"2017-03-20 23:59:00","UserID":2066,"ProjectName...
C#
UTF-8
934
2.859375
3
[ "Unlicense" ]
permissive
namespace DailyCodingProblems { using Base; using System; using System.Collections.Generic; using System.Threading.Tasks; public class Program { public static async Task Main(string[] args) { var puzzles = new List<IPuzzle>() { //new Puzz...
Python
UTF-8
396
3.640625
4
[]
no_license
# програма для підрахунку для годиника # від кількості хвилин N = int(input("Введіть кількість хвилин, відрахованих після півночі: ")) # скількі хвилин в цьому дні N = int(N % 1440) # скільки годин h = N // 60 # скільки хвилин m = N % 60 print(h,":",m)
JavaScript
UTF-8
924
2.53125
3
[ "MIT" ]
permissive
const token = getToken() if (!token && to.name !== LOGIN_PAGE_NAME) { // 未登录且要跳转的页面不是登录页 next({ name: LOGIN_PAGE_NAME // 跳转到登录页 }) } else if (!token && to.name === LOGIN_PAGE_NAME) { // 未登陆且要跳转的页面是登录页 next() // 跳转 } else if (token && to.name === LOGIN_PAGE_NAME) { // 已登录且要跳转的页面是登录页 next({ name: ho...
Java
UTF-8
337
2.796875
3
[]
no_license
package kafka.utils; public class Three<F,S,T> { private F f; private S s; private T t; public Three(F f, S s, T t) { this.f = f; this.s = s; this.t = t; } public F F() { return f; } public S S() { return s; } public T T() { r...
Python
UTF-8
647
3.953125
4
[]
no_license
alphabet = ["a", "b", "c", "d", "e", "", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"] vowels = ["a", "e", "i", "o", "u"] for i in range(len(alphabet)): # max length is alphabet, if you put vowels it goes out of nums if alphabet[i] in vowels: # no need to che...
Java
UTF-8
3,346
3.453125
3
[]
no_license
package dlithe.batch2.internship.DLitheBatchTwoInternship; import java.util.Arrays; public class Dealer implements DealerOperations { Bike[] stock; public Dealer(){} public Dealer(Integer size) {stock=new Bike[size];}//5 @Override public void addToStock(Bike object) { // TODO Auto-generated method s...
Markdown
UTF-8
2,181
3.75
4
[]
no_license
## 495. 提莫攻击(中等) 日期: >2020/12/19(第一次刷) 题目 >在《英雄联盟》的世界中,有一个叫 “提莫” 的英雄,他的攻击可以让敌方英雄艾希(编者注:寒冰射手)进入中毒状态。现在,给出提莫对艾希的攻击时间序列和提莫攻击的中毒持续时间,你需要输出艾希的中毒状态总时长。 你可以认为提莫在给定的时间点进行攻击,并立即使艾希处于中毒状态。 示例1: >输入: [1,4], 2 输出: 4 原因: 第 1 秒初,提莫开始对艾希进行攻击并使其立即中毒。中毒状态会维持 2 秒钟,直到第 2 秒末结束。 第 4 秒初,提莫再次攻击艾希,使得艾希获得另外 2 秒中毒时间。 所以最终输出 4 秒。 示例2: >输入: [1...
Python
UTF-8
2,908
2.78125
3
[]
no_license
#!/usr/bin/python from Recorder import Recorder from SpeechToText import speech_to_text from TextTranslator import translate_text from Tkinter import * #from Tkinter import ttk import ttk filename = '/tmp/recorder.wav' context = {} def start(*args): # print(fromOptions[fromLanguage.get()]) context['recorder'] = R...
JavaScript
UTF-8
1,704
2.515625
3
[]
no_license
import React from 'react'; import './about.styles.css'; export const About = () => { return ( <div id="about" className="container"> <h1>About Us</h1> <span className="material-icons icon-2" >restaurant</span> <p> <b>parambariyam</b> means traditional and true to its name, the recepies ...
PHP
UTF-8
353
2.546875
3
[]
no_license
<?php namespace hr\sofascore\dz3\htmllib; /** * Predstavlja option element. */ class HTMLOptionElement extends HTMLElement { /** * Stvara option element. * @param $children HTMLCollection|null */ public function __construct(HTMLCollection $children = null) { parent::__construct("opt...
C#
UTF-8
1,528
3.125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConfiguringAssemblies { class Product { public Int32 ProductId { get; set; } public String ProductName { get; set; } public Double ProductPrice { get; set; } public Int32 StockCount ...
C
UTF-8
5,022
2.578125
3
[]
no_license
/* Sort code for HAGAR, the NaI gamma detector * * Author: Philip Adsley * * This code also functions as a template for gamma sort codes for K600 experiments. * * */ #include "GammaData.h" #include "ScintillatorSort.h" #include <math.h> #include <stdlib.h> #include <TRandom3.h> extern int ADCModules; exter...
C++
UTF-8
591
2.8125
3
[]
no_license
#include<iostream> using namespace std; int main() { int t; cin >> t; while (t--) { int n; int feedback[21]; int tscore = 0, kscore = 0; cin >> n; for (int i = 0; i < n; i++) { cin >> feedback[i]; if (feedback[i] == 1) kscore++; else if (feedback[i] == 2) tscore++; else if (feedback[i] ...
Markdown
UTF-8
9,725
2.671875
3
[]
no_license
<audio title="050 _ 大杀器Lotus Notes 和被收购的莲花公司" src="https://static001.geekbang.org/resource/audio/ad/2b/ad3cd04f87c36410f7d6fc8922bfd02b.mp3" controls="controls"></audio> <p>莲花公司在电子表格市场大获成功,但并不甘于局限在电子表格软件里。1984年,公司CEO吉姆 · 曼兹(Jim Manzi)秘密开始了一项影响深远的开发计划:基于莲花公司的设计,委托Iris公司开发一个“大杀器”,也就是后来长期独霸企业协同市场的Lotus Notes系统。</p> <p>Ir...
JavaScript
UTF-8
10,890
2.921875
3
[]
no_license
var count = 1; var checkout = 1; var edit_exp_id = 1; var edit_inc_id = 1; var date = new Date() var current_date = date.getMonth() + 1 var income_date = date.getMonth() + 1 $("#add").on('click', function(){ $("#category").append(` <label for="recipient-name" class="col-form-label">Enter your new category :</la...
Java
ISO-8859-1
10,630
2.28125
2
[]
no_license
package Telas; import servicos.ServicoProcedimento; import javax.swing.JButton; import javax.swing.GroupLayout.Alignment; import javax.swing.LayoutStyle.ComponentPlacement; import javax.swing.GroupLayout; import java.awt.Color; import java.awt.Font; import java.awt.event.ActionListener; import java.awt.event...
Python
UTF-8
978
2.546875
3
[ "Unlicense" ]
permissive
from __future__ import annotations from mechanics.events.src.Event import Event from mechanics.events import EventsChannels from typing import TYPE_CHECKING if TYPE_CHECKING: from game_objects.items import Item class ItemDroppedEvent(Event): channel = EventsChannels.DropChannel def __init__(self, item: It...
Markdown
UTF-8
3,506
3.609375
4
[ "MIT" ]
permissive
--- navigation_title: "Colour contrast for graphical objects" position: 5 --- # Colour contrast for graphical objects **The term "graphical object" typically applies to stand-alone icons and to information graphics. The visual complexity of such objects often requires some differentiation with regards to contrast. Th...
Java
UTF-8
2,882
2.59375
3
[]
no_license
/** * Java Image Science Toolkit * --- * Multi-Object Image Segmentation * * Copyright(C) 2012, Blake Lucas (img.science@gmail.com) * All rights reserved. * * Center for Computer-Integrated Surgical Systems and Technology & * Johns Hopkins Applied Physics Laboratory & * ...
JavaScript
UTF-8
496
2.578125
3
[]
no_license
const http = require("http"); const app = http.createServer(); app.on("request", (request, response) => { const { url, method } = request; console.log("请求方式", method); console.log("请求路径", url); // 设置响应头 防止中文乱码 response.setHeader("content-type", "text/html;charset=utf-8"); // response.end("666"); re...
JavaScript
UTF-8
1,366
3.21875
3
[ "MIT" ]
permissive
$("document").ready(function(){ let canvasPixel = $('#pixelCanvas'); //Making the grid function makeGrid() { // Selecting size input const inputHeight = $('#inputHeight').val(); const inputWidth = $('#inputWidth').val(); //Making existing grid empty canvasPixel.empty(); //creating new grid...
Shell
UTF-8
1,882
3.46875
3
[]
no_license
#!/bin/bash shopt -s expand_aliases source ~/.bash_aliases # ----------------------------------------------------- # argument parcing # ----------------------------------------------------- while [[ ${1} ]]; do case "${1}" in --RCODE) RCODE=${2} shift ;; --RWD_MAIN) RWD_MAIN=${2} shift ...
Python
UTF-8
4,319
2.640625
3
[]
no_license
from collections import defaultdict import string f = open("in.txt", "r") productii = dict() for i in f.readline().split(): productii.update({i: []}) for i in f.readlines(): i = i.split() for j in range(1, len(i)): productii.setdefault(i[0], []).append(i[j]) # ----- PASUL 1 i) for i i...
Python
UTF-8
252
2.84375
3
[]
no_license
class Room: def __init__(self, game, shape, doors, x, y): self.game = game self.shape = shape self.width = shape['width'] self.height = shape['height'] self.x = x self.y = y self.doors = doors
Python
UTF-8
1,049
3.484375
3
[ "MIT" ]
permissive
import re class Tokenizer: def __init__(self): self.token_table = { "NUMBER": r"([0-9]+\.)?[0-9]+", "+": r"\+", "-": r"-", "*": r"\*", "/": r"/", "LBRA": r"\(", "RBRA": r"\)", "SEPARATOR": r"( |\n)" } ...
C++
UTF-8
435
2.671875
3
[]
no_license
// point.h // Point class definition. // Vladimir Rutsky <altsysrq@gmail.com> // 09.09.2009 #ifndef POINT_H #define POINT_H #include "point_fwd.h" namespace cg { struct point_4f { float x, y, z, w; point_4f() : x(0.0f), y(0.0f), z(0.0f), w(1.0f) {} point_4f( float newX, float newY...
Go
UTF-8
1,653
3.015625
3
[]
no_license
package parser import ( "crawler/src/engine" "crawler/src/model" "fmt" "reflect" "regexp" ) var regexs = map[string]*regexp.Regexp{ "Age": regexp.MustCompile(`<td><span class="label">年龄:</span>(.+)</td>`), "Sex": regexp.MustCompile(`<td><span class="label">性别:</span><span field="">(.+)</span></td...
Java
UTF-8
936
2.390625
2
[]
no_license
package cn.dao.impl; import java.sql.ResultSet; import java.sql.SQLException; import cn.bean.Emoji; import cn.bean.PageBean; import cn.dao.EmojiDao; import cn.dbc.BaseDao; public class EmojiDaoImpl extends BaseDao<Emoji> implements EmojiDao { @Override public Emoji findById(Emoji emoji) { Str...
JavaScript
UTF-8
4,303
2.671875
3
[]
no_license
// NOTE: The contents of this file will only be executed if // you uncomment its entry in "assets/js/app.js". // To use Phoenix channels, the first step is to import Socket, // and connect at the socket path in "lib/web/endpoint.ex". // // Pass the token on params as below. Or remove it // from the params if you are n...
TypeScript
UTF-8
727
3.109375
3
[]
no_license
import { MutiMap } from "../Map/index"; export class EventEmitter{ private eventMap = new MutiMap<string, (...params:Array<any>) => void>(); addListener(eventName: string, listener: (...any:Array<any>)=> any){ this.eventMap.add(eventName, listener); } removeListener(eventName: string, listen...
C++
UTF-8
4,012
3.1875
3
[]
no_license
#ifndef POSITION_H #define POSITION_H /*! * \brief Espace de nom de Guillaume Jouret & Guillaume Walravens. */ namespace GJ_GW{ /*! * \brief Classe représentant la \ref Position d'une case du \ref Board. * * Une position est atteignable par son abscisse et son ordonnée. */ class Position{ friend class Bric;...
Java
UTF-8
677
3.734375
4
[]
no_license
package CH16_Thread; public class Test01 { public static void main(String[] args) { Food worker1 = new Food(); Phone worker2 = new Phone(); worker1.start(); worker2.start(); for(int i=1; i<=1000; i++){ System.out.println("WATCHING TV : "+ i); ...
Java
UTF-8
1,044
2.234375
2
[]
no_license
package com.zy.alg.demo; import com.zy.alg.service.NaiveBayes; import com.zy.alg.service.NaiveBayesImpl; import com.zy.alg.util.CategoryCorpusInfo; import com.zy.alg.util.FileReader; import java.util.List; /** * @author zhangycqupt@163.com * @date 2018/08/26 21:24 */ public class NaiveBayesTrainDemo ...
Python
UTF-8
1,522
2.96875
3
[ "MIT" ]
permissive
# -*- coding:utf-8 -*- import numpy as np import tensorflow.keras as keras import matplotlib.pyplot as plt from matplotlib import style # This is used for converting 1D label to nD one-hot label def check_label(label, num_classes): if len(label.shape) == 1 and num_classes >=2: return keras.utils.t...
Swift
UTF-8
3,287
2.5625
3
[]
no_license
// // gameViewController.swift // garbage // // Created by Maoko Furuya on 2018/01/26. // Copyright © 2018年 Maoko Furuya. All rights reserved. // import UIKit class gameViewController: UIViewController { var timer : Timer = Timer() var point : Int = 0 @IBOutlet var pointLabel : UILabel!...
C
GB18030
429
3.796875
4
[]
no_license
////дһӡarrݣʹ±꣬ʹָ롣(һά) //#include <stdio.h> //#include <stdlib.h> // //void myPrint(int* arr, int size) { // for (int i = 0; i < size; i++) { // printf("%d\n", *(arr + i)); // } //} // //int main() { // int arr[] = {2000, 2001, 2002, 2003}; // int len = sizeof(arr) / sizeof(arr[0]); // myPrint(arr, len); // // system("...
Java
UTF-8
331
2.703125
3
[]
no_license
import org.junit.*; import static org.junit.Assert.*; public class TheEasyChaseTest { @Test public void test() { TheEasyChase chase = new TheEasyChase(); assertEquals("BLACK 2", chase.winner(2, 1, 1, 2, 2)); assertEquals("WHITE 1", chase.winner(2, 2, 2, 1, 2)); assertEquals("BLACK 6", chase.winner(3, 1, 1, 3...
Java
UTF-8
1,095
3.65625
4
[]
no_license
package com.zh.pattern.design.behaviourMode.memento; /* * 备忘录模式:在不破坏封装性的前提下,捕获一个对象的内部状态,并在该对象外保存这个状态,这样以后可将此对象恢复成原来的状态。 * * 原发器类(Originator):创建一个备忘录对象,使用备忘录存储它的内部状态。 负责人类(CareTaker):负责保存好备忘录对象,不能检查或操作备忘录的内容。 备忘录类(Memento):将原发器的内部状态存储起来,原发器根据需要决定备忘录存储原发器的哪些内部状态。 * */ public class Client22 { publ...
C++
UTF-8
869
2.53125
3
[]
no_license
#ifndef LOGINDATAPROVIDER_H #define LOGINDATAPROVIDER_H #include <QByteArray> #include <QString> namespace ForumHandler { class ILoginDataProvider { public: virtual ~ILoginDataProvider() {}; virtual QByteArray getData() = 0; virtual void setParams(QString, QString, QString) = 0; }; class LoginDataP...
Java
UTF-8
2,154
2.453125
2
[ "Apache-2.0" ]
permissive
package com.jun.converter.util; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.TypeDescriptor; import org.springframework.core.convert.converter.Converter; import org.springframework.core.convert.converte...
SQL
UTF-8
1,249
3.546875
4
[]
no_license
DROP TABLE IF EXISTS employees; DROP TABLE IF EXISTS departments; DROP TABLE IF EXISTS titles; DROP TABLE IF EXISTS salaries; DROP TABLE IF EXISTS dept_manager; DROP TABLE IF EXISTS dept_emp; CREATE TABLE "employees" ( "emp_no" VARCHAR PRIMARY KEY, "birth_date" DATE, "first_name" VARCHAR, "last_name" V...
C#
UTF-8
507
2.9375
3
[ "MIT" ]
permissive
namespace Patching_Auxilary { using HarmonyLib; using System.Collections.Generic; using System.Reflection; class Foo { } class Bar { } class Example { // <yield> static IEnumerable<MethodBase> TargetMethods() { // if possible use nameof() or SymbolExtensions.GetMethodInfo() here yield return Access...
C++
UTF-8
2,490
2.671875
3
[ "MIT" ]
permissive
// // main.cpp // cart-pole // // Created by Dmitry Alexeev on 04/06/15. // Copyright (c) 2015 Dmitry Alexeev. All rights reserved. // #include "smarties.h" #include "../cart_pole_cpp/cart-pole.h" #include <iostream> #include <cstdio> inline int app_main( smarties::Communicator*const comm, // communicator with...
Java
UTF-8
2,824
1.960938
2
[]
no_license
package com.bg.plzSeatdown.admin.controller; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotat...
Java
UTF-8
2,323
2.09375
2
[ "Apache-2.0" ]
permissive
/* * * Copyright (c) 2017 Rabitka Framework * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
Python
UTF-8
3,770
2.671875
3
[]
no_license
import tkinter as tk from tkinter import messagebox import sqlite3 from tkinter.ttk import * import cv2 as cv import numpy as np import os import mask_check # the other code that will check the mask # connect to the database of employees conn = sqlite3.connect(r'C:\Users\komsi\Desktop\Projects\Employee_Data...
Markdown
UTF-8
1,217
2.828125
3
[ "MIT" ]
permissive
--- layout: post title: Hitting with a man on second --- ## What to do? I grew up in a baseball family. Baseball was (and is) a huge deal in my family. My brother is a private instructor and baseball coach even. He's also the one that got me a ticket to game 5 of the 2017 World Series. It was epic. I told my brother a...
Python
UTF-8
226
3.484375
3
[]
no_license
A=int(input()) B=int(input()) C=int(input()) X=int(input()) count = 0 for i in range(A+1): for j in range(B+1): for k in range(C+1): sum = 500*i + 100*j + 50*k if X==sum: count+=1 print(str(count))
Python
UTF-8
777
2.875
3
[ "MIT" ]
permissive
from uuid import uuid1 from random import randint class User: __slots__ = ("username", "avatar", "color", "uuid", "group_id", "websocket") def __init__(self, username, avatar, color, group_id=None): self.username = username + f"#{randint(1000, 9999)}" self.avatar = avatar self.color =...
Python
UTF-8
14,489
2.828125
3
[]
no_license
__author__ = 'dlonardoni' # # Utilities and statistic procedure # import time import networkx as nx import pylab as plt import numpy as np import numpy.random as rnd import scipy.stats from scipy.spatial.distance import pdist, squareform ''' ******** Utility procedures ******** ''' def Save_Traces...
C#
UTF-8
3,419
2.671875
3
[]
no_license
// C# port of md5main.c https://sourceforge.net/projects/libmd5-rfc/ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Tool { class Program { private static readonly string usage = @"Usage: md5main --test # run the self-test (A.5 of RFC 1321) md5ma...
PHP
UTF-8
1,140
2.640625
3
[ "MIT" ]
permissive
<?php /** * Created by PhpStorm. * User: lets * Date: 16/11/2018 * Time: 10:33 */ namespace App\Repositories; use App\Base\Repository; use App\Models\Product; use App\Traits\UploadableTrait; class ProductsRepository extends Repository { use UploadableTrait; protected function getClass() { ...
Markdown
UTF-8
644
2.65625
3
[]
no_license
# Inventory-Management-System * This System helps to manage Inventory of any Shop. * It provides User of the System with several options like add, delete, view and edit Information of the product. * The System has a simple to use GUI. * Inventory is connected with a billing System. * So whenever a bill is made, All th...
Markdown
UTF-8
692
3.140625
3
[]
no_license
# KeyValueStore A simple flask REST service to store key value pairs. ## Functions • get: To fetch the value of a Key • set: To set a Key Value pair • search: To search if a Key starts or ends with a pattern ### Local development • To run the project via Docker, run the following commands: 1. docker build -...
JavaScript
UTF-8
7,696
3.125
3
[]
no_license
$(document).ready(function() { var commentSort = 'recent'; // This represents two values. 'recent' or 'flags' var lastCommentId = null; // Listen for User tools selection. $('#show-comments').on('click', function() { $('#users').html(''); $('#search-url').show(); $('#search-comments').show(); ...
Java
UTF-8
1,673
2.0625
2
[]
no_license
/** * Copyright Trimble Inc., 2014 - 2015 All rights reserved. * * Licensed Software Confidential and Proprietary Information of Trimble Inc., * made available under Non-Disclosure Agreement OR License as applicable. * * Product Name: * * * Module Name: * com.neural.fragment * * File name: * ...
C#
UTF-8
787
3.171875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace OOPSDemo1 { class StudentDemo { static void Main() { Students s1 = new Students(101, "Marry"); //s1.Name = "Steve"; //complilation error ...
JavaScript
UTF-8
554
2.796875
3
[]
no_license
const fs = require('fs') fs.readFile('package.json', 'utf-8', (error, contenido) => { if(error) throw new Error(`Error en lectura: ${error}`) console.log('package.json: lectura exitosa') let info = {} info.contenidoStr = contenido, info.contenidoObj = JSON.parse(contenido), info.size = conteni...
C
UTF-8
8,721
2.828125
3
[]
no_license
#include "sae_par.h" #include "cupid.h" #include <limits.h> int cupidRFillClumps( int *ipa, int *out, int nel, int ndim, int skip[ 3 ], int dims[ 3 ], int peakval, int *status ){ /* *+ * Name: * cupidRFillClumps * Purpose: * Identify clumps by filling in the volume enclosed by the mark...
JavaScript
UTF-8
179
2.53125
3
[ "Apache-2.0", "MIT" ]
permissive
var tap = require('../tap'); tap.count(1); var arr = [{a:1}, {a:6},{a:2}, {a:4}] arr.sort(function(a, b) { console.log(a, b); return a.a - b.a }) arr.sort(); tap.ok(true);
Python
UTF-8
10,576
3.1875
3
[]
no_license
import sys, random # BioE 131 Assignment 4, Michael Vredenburgh --- From command line -h for help # Analyzes amino acid frequency in a gene, and displays those frequencies, as # well as generate new sequences with similar frequencies from that of the input sequence. class InputFASA: fileName = "" myRawFile = ...
Markdown
UTF-8
1,354
2.734375
3
[ "MIT" ]
permissive
################################# # How to generate documentation # ################################# The flux-python-api documentation is generated with Sphinx, which is built within this directory as part of the code repository and therefore requires no installation on the client end. The master documentation file ...
Python
UTF-8
657
3.234375
3
[]
no_license
import os from mutagen.mp3 import MP3 from tqdm import tqdm import sys def calcTotalLength(path): totalLength = 0 iterator = tqdm(os.listdir(path)) for no, file in enumerate(iterator): if file.split('.')[-1] == "mp3": try: audio = MP3(path + '/' + file) totalLength = totalLength + audio.info.lengt...
Shell
UTF-8
1,152
3.9375
4
[ "MIT" ]
permissive
#!/bin/bash # Copyright (c) ben@diraux.com HELP='convert a written text in a spocken mp3 file' USAGE='<text file> [voice]' file_input="$1" voice_input="$2" voice_default="Petra" warn () { echo "$@" 1>&2; } die () { echo "$@" 1>&2; exit 1; } usage () { die "usage '$(basename $0)': $USAGE" ; } [ -n "$file_input"...
Python
UTF-8
3,511
2.53125
3
[]
no_license
import torch import torch.nn as nn from torch.nn import Parameter from torch_geometric.nn.inits import glorot, zeros from torch_scatter import scatter_add from torch_sparse import spspmm, coalesce from torch_geometric.utils import remove_self_loops from torch_geometric.utils import add_remaining_self_loops from torch_g...
Java
UTF-8
2,083
2.0625
2
[]
no_license
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
JavaScript
UTF-8
1,527
4.78125
5
[]
no_license
/* Array: Binary Search (non recursive) Given a sorted array and a value, return whether the array contains that value. Do not sequentially iterate the array. Instead, ‘divide and conquer’, taking advantage of the fact that the array is sorted . */ // if n is the number of elements // then a normal se...
JavaScript
UTF-8
503
3.515625
4
[]
no_license
// Input: [2, 6, 4, 8, 10, 9, 15] // Output: 5 var findUnsortedSubarray = function(nums) { var be = nums.length - 1, en = nums.length - 1; var sorted = nums.slice(0).sort((a,b) => { return a-b; }); for(let i=0; i<nums.length;i++){ if(sorted[i] != nums[i]){ be = i; break; ...
C++
UTF-8
3,456
2.921875
3
[ "Apache-2.0", "BSD-2-Clause", "LGPL-2.0-or-later", "MIT" ]
permissive
#include "ImageFlipper.hpp" #include <FAST/Data/Image.hpp> namespace fast { ImageFlipper::ImageFlipper() { createInputPort<Image>(0); createOutputPort<Image>(0); createBooleanAttribute("vertical", "Vertical", "Flip vertical", false); createBooleanAttribute("horizontal", "Horizontal", "Flip horizontal...
C#
UTF-8
1,800
2.828125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using 在线考试系统.Dal; using System.Windows.Forms; namespace 在线考试系统.Bll { class CourseBll { static CourseDal course = new CourseDal(); /// <summary> /// 获取科目信息 /// <...
Java
UTF-8
2,010
2.984375
3
[]
no_license
package kernel.stackvm; public class Bytecode { public static class Instruction { public final String name; // E.g., "iadd", "call" public int n = 0; public Instruction(String name) { this(name,0); } public Instruction(String name, int nargs) { ...
Java
UTF-8
251
1.523438
2
[]
no_license
package com.zzl.sso.service; import com.zzl.common.pojo.TaotaoResult; import com.zzl.pojo.TbUser; public interface UserRegisterService { public TaotaoResult checkDate(String param,Integer type); public TaotaoResult register(TbUser tbUser); }
Markdown
UTF-8
4,467
3.5
4
[]
no_license
# shiyan3 接口及异常处理 ### 实验目的 1.掌握Java中抽象类和抽象方法的定义; 2.掌握Java中接口的定义,熟练掌握接口的定义形式以及接口的实现方法 3.了解异常的使用方法,并在程序中根据输入情况做异常处理 ### 实验内容 1.某学校为了给学生提供勤工俭学机会,也减轻授课教师的部分压力,准许博士研究生参与课程的助教工作。此时,该博士研究生有双重身份:学生和助教教师。 2.设计两个管理接口:学生管理接口和教师管理接口。学生接口必须包括缴纳学费、查学费的方法;教师接口包括发放薪水和查询薪水的方法。 3.设计博士研究生类,实现上述的两个接口,该博士研究生应具有姓名、性别、年龄、每学期学费、每月薪水等属性。(...
C
UTF-8
4,776
3.65625
4
[]
no_license
//Singly Circular linked List without menu driven switch cases #include<stdio.h> #include<stdlib.h> typedef struct Node { int Data; struct Node *Next; }NODE,*PNODE,**PPNODE; /* typedef struct Node NODE; typedef struct Node* PNODE; typedef struct Node** PPNODE; */ /////////////////////////////////////////////////...
Java
UTF-8
2,855
2.859375
3
[ "MIT" ]
permissive
/* * Copyright 2017 Turn s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
Python
UTF-8
326
4.53125
5
[]
no_license
#Exercicio 10 do site Python Brasil #Faça um Programa que peça a temperatura em graus Celsius, transforme e mostre em graus Farenheit. #Formula => tf = (tc * (9/5)) + 32 tc = input("Digite uma temperatura em graus celsius ") tf = (float(tc) * (9/5)) + 32 print("A conversao de {}ºC e igual a {:.0f}ºF".format(tc, tf...
C#
UTF-8
10,224
2.90625
3
[ "MIT" ]
permissive
using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Net.Http; using System.Text; namespace NHLStats { public class Schedule { public string totalItems { get; set; } public string totalEvents { get; set; } public string totalGames { get; set; } ...
C++
UTF-8
278
2.8125
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include "quick_sort.cpp" using namespace std; int main() { int arr[10] = { 12, 2, 23, 11, 33, 50, 21, 1, 34, 2 }; cout << 10 << endl; int* j = partion(arr, arr + 9); cout << j[10] << endl; }
Java
UTF-8
4,246
2.140625
2
[]
no_license
package cn.com.gome.page.field; import cn.com.gome.page.core.PageConfig; import cn.com.gome.page.core.PageService; import cn.com.gome.page.field.domain.PageDomainProvider; import cn.com.gome.page.plugins.style.StylePlugin; import cn.com.gome.page.utils.BeanUtils; import javax.servlet.http.HttpServletRequest; import ...
Markdown
UTF-8
1,084
3.3125
3
[ "MIT" ]
permissive
# anseml ![](https://github.com/akarpovskii/anseml/workflows/Clojure%20CI/badge.svg) ANSEML is ANother S-Expression Markup Language inspired by XML format. The library provides a simple API to work with documents and a tool to convert the document to HTML format. The document format is pretty straightforward. - Each ...
C#
UTF-8
5,128
2.921875
3
[]
no_license
using Matrices; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using UsefulStaticMethods; using ActionSet; namespace SearchAbstractDataTypes { [Serializable] public class SearchNodeAsString { //Internal fields private SearchNode ...
PHP
UTF-8
790
2.671875
3
[ "Apache-2.0" ]
permissive
<?php /** * @author Masaru Yamagishi <m-yamagishi@infiniteloop.co.jp> * @copyright 2020- Masaru Yamagishi */ declare(strict_types=1); namespace Tests\Bleeding\Console; use Bleeding\Console\Command; use Tests\TestCase; /** * @package Tests\Bleeding\Console * @coversDefaultClass \Bleeding\Console\Command * @im...
JavaScript
UTF-8
1,163
2.734375
3
[ "MIT" ]
permissive
// @flow const { assert } = require("chai"); const { Memory } = require("../../../lib/interpreter/runtime/values/memory"); const { createAllocator } = require("../../../lib/interpreter/kernel/memory"); describe("kernel - memory management", () => { const memory = new Memory({ initial: 100 }); describe("memory a...
Python
UTF-8
3,564
3.109375
3
[]
no_license
import time import cv2 import mss import numpy as np from directInput import PressKey, ReleaseKey, W, A, S, D # Define part of the screen to capture # GTA V resolution must be 1024x768 and placed at top left of screen. HEIGHT = 768 WIDTH = 1024 monitor = {'top': 40, 'left': 0, 'width': WIDTH, 'height': HEIGHT} # Defi...
Java
UTF-8
1,771
1.992188
2
[ "CDDL-1.1", "Apache-2.0", "CDDL-1.0" ]
permissive
package com.ucar.datalink.manager.core.web.dto.group; import java.util.Date; /** * group视图类. * Created by csf on 2017/2/22. */ public class GroupView { private Long id; private String groupName; private String groupDesc; private Date createTime; private Date modifyTime; private String...
Swift
UTF-8
2,087
2.671875
3
[]
no_license
// // LoginViewController.swift // TopWalker // // Created by Hassan Amjad on 4/27/21. // import UIKit import Parse class LoginViewController: UIViewController { @IBOutlet weak var usernameField: UITextField! @IBOutlet weak var passwordField: UITextField! override func viewDidLoad() { ...
Markdown
UTF-8
19,174
3.203125
3
[ "Apache-2.0" ]
permissive
# Docker Swarm Tutorial > **Note:** This tutorial uses Docker Machine to simulate multiple machines on your desktop. There's an easier way to learn swarm mode, and that is using [Play with Docker](http://training.play-with-docker.com/swarm-mode-intro/). This tutorial is preserved for legacy reasons, and also in case yo...
Python
UTF-8
2,907
3
3
[]
no_license
import torch import torch.nn as nn EPS=1e-12 """ Scale-invariant-SDR (source-to-distortion ratio) See "SDR - half-baked or well done?" https://arxiv.org/abs/1811.02508 """ def sisdr(input, target, eps=EPS): """ Scale-invariant-SDR (source-to-distortion ratio) Args: input (batch_size, ...
PHP
UTF-8
1,474
2.671875
3
[ "MIT" ]
permissive
<!DOCTYPE html> <?php include 'dbconnection.php'; // configure path to store the photo $target_path = "flag/"; $target_path = $target_path . basename($_FILES['flag']['name']); $idC = mysqli_real_escape_string($conn, $_POST['idCountry']); // update the country to add the flag path $sqlFlag = "UPDATE country SET ...
JavaScript
UTF-8
396
2.65625
3
[]
no_license
/** * Created by lekanterragon on 6/29/17. */ var data1 = [ ['', 'First Name', 'Last Name', 'Email'], ['2012', 10, 11, 12] ], container1 = document.getElementById('example'), settings1 = { data: data1 }, hot1; hot1 = new Handsontable(container1, settings1); data1[0][1] ...