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
PHP
UTF-8
1,650
2.953125
3
[]
no_license
<?php include_once("model/Table.class.php"); class BlogEntryTable extends Table { public function saveEntry($title, $entry) { $sql = "insert into blog_entry(title, entry_text) values(?, ?)"; $data = array($title, $entry); $stmt = $this->makeStatement($sql, $data); return $this->db->lastIn...
JavaScript
UTF-8
3,135
3.203125
3
[]
no_license
import React, { Component } from "react"; import "../styles/CreatePage.css"; class CreatePageComp extends Component { constructor(props) { super(props); //Houseing User Input Data this.state = { img_src: "", roverName: "", roverStatus: "", render: true }; //Place Binding He...
Python
UTF-8
2,135
2.75
3
[]
no_license
import sys import os import glob from PIL import Image import pathlib #Load sprites sprites = {} for filename in glob.glob("./sprites/*.png"): im = Image.open(filename) splits = filename.split("/") name = splits[-1][:-4] sprites[name] = im # print (str(im.size)) visualization = {} visualization["S"] = "brick" vi...
C#
UTF-8
1,004
2.671875
3
[ "Artistic-2.0" ]
permissive
using System.Linq; using System.Threading.Tasks; using AGS.API; namespace DemoGame { public static class Rooms { public static IRoom SplashScreen { get; set; } public static Task<IRoom> EmptyStreet { get; set; } public static Task<IRoom> BrokenCurbStreet { get; set; } public static Task<IRoom> TrashcanStree...
Java
UTF-8
7,107
2.765625
3
[]
no_license
/* * Brandon Izor * CS350 * Project5 * A class launched by MainWindow to display a dialog box * and create and return a CDriver object * or edit an existing CDriver object and return it */ import java.awt.Container; import java.awt.Font; import java.awt.event.*; import javax.swing.*; public c...
JavaScript
UTF-8
1,733
3.09375
3
[]
no_license
var GameState = require('../gameState.js'); var CardMovement = require('../cardMovement.js'); var GameRules = require('../gameRules.js'); var CardData = require('../cardData.js'); var assert = require('chai').assert; describe('Card Movement Logic', function() { beforeEach(function() { game = new GameState(); ga...
JavaScript
UTF-8
5,210
3.375
3
[]
no_license
// Żeby nie srać globalnymi zmiennymi po glownym scopie // zamykamy wszystko w funkcji którą od razu wykonujemy // Elementu 'document' bedziemy zapewne uzywac w srodku wiec // wrzucamy go jako argument, i przekazujemy w ostatniej linii // pliku, wtedy ładnie sie zminimalizuje var GAME = (function(document, undefined) ...
PHP
UTF-8
3,043
2.765625
3
[]
no_license
<?php namespace Oniric85\UsersService\Service\Domain; use Doctrine\ORM\EntityManagerInterface; use Oniric85\UsersService\Entity\User; use Oniric85\UsersService\Exception\Application\EmailAlreadyUsedException; use Oniric85\UsersService\Exception\Application\NotFromSwitzerlandException; use Oniric85\UsersService\Messag...
C#
UTF-8
869
2.578125
3
[]
no_license
using Dji.Network.Packet.DjiPackets.Base; using Dji.Network.Packet.Extensions; using System; namespace Dji.Network.Packet.DjiPackets.Drone { public class DjiFramePacket : DjiPacket { private byte[] _frameData; public static readonly byte[] END_OF_FRAME_UPDATE_DELIMITER = new byte[] { 0x00, 0x...
Java
UTF-8
5,404
2.4375
2
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ui; /** * * @author vvtvo */ public class GioiThieuJDialog extends javax.swing.JDialog { /** * Creates new form G...
PHP
UTF-8
1,766
2.75
3
[]
no_license
<?php namespace Dplus\Filters\Min; // Dplus Model use InvLotMaster; use InvWhseLotQuery, InvWhseLot; // ProcessWire Classes use ProcessWire\WireData, ProcessWire\WireInput, ProcessWire\Page; // Dplus Filters use Dplus\Filters\AbstractFilter; /** * Wrapper Class for adding Filters to the InvLotMaster class */ class L...
Java
UTF-8
983
2.78125
3
[]
no_license
package com.johnfreier.mail.storage; public interface SMTPStorage { /** * Set whom the email is from. * * @param from */ void setFrom(String from); /** * Set the recipient of the email. * * @param to */ void setTo(String to); /** * Set t...
PHP
UTF-8
1,151
2.640625
3
[ "Apache-2.0" ]
permissive
<?php namespace Bookboon\JsonLDClient\Serializer; use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; use DateTimeInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; class NullableDateTimeNormalizer implements DenormalizerInterface { private DateTimeNormalizer $dateTimeNorma...
JavaScript
UTF-8
258
2.703125
3
[]
no_license
function list() { var l = 8; var result = new Array(l); var a = arguments.pop(); for(var i = l; i != 0; i--) { if(i == a) { result[i - 1] = 1; a = arguments.pop(); } else { result[i - 1] = 0; } } outlet(0, result); }
C
UTF-8
520
3.09375
3
[]
no_license
#pragma once #include <stddef.h> typedef char SeqStactType; typedef struct SeqStact { SeqStactType* data; size_t size; size_t capacity;//data指向内存中能最大容纳的元素的个数MAX_SIZE的替代品 }SeqStact; //栈初始化 void SeqStactInit(SeqStact* stack); //销毁栈 void SeqStactDestroy(SeqStact* stack); //入栈 void SeqStactPush(SeqStact* sta...
C++
UTF-8
905
3.421875
3
[ "BSD-3-Clause" ]
permissive
#include "head.h" /** https://leetcode.com/problems/reverse-linked-list Reverse a singly linked list. */ // refer to: https://discuss.leetcode.com/topic/17916/8ms-c-iterative-and-recursive-solutions-with-explanations // modified /** * 单链表倒置 */ /** * */ struct ListNode { int val; ListNode *next; ListNo...
Python
UTF-8
1,024
3.3125
3
[]
no_license
import sys count = 0 while True: line = sys.stdin.readline() n = int(line) if n == 0: break count = count + 1 print("Case %d:"%(count)) nos = [] for i in range(n): nos.append(int(sys.stdin.readline())) sums = [] for i in range(len(nos)): for j in range(i+1, len(nos)): sums.append(nos[i] + nos[j...
Markdown
UTF-8
3,572
2.84375
3
[]
no_license
## 1. API Description This API (QueryCdbDatabaseTables) is used to query the database table information of Cloud Database instance. Domain for API request: <font style='color:red'>cdb.api.qcloud.com </font> ## 2. Input Parameters The following request parameter list only provides API request parameters. Common reques...
Java
UTF-8
2,673
2.359375
2
[]
no_license
package com.org.util; import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.Map; import com.relevantcodes.extentreports.ExtentReports; import com.relevantcodes.extentreports.ExtentTest; import com.relevantcodes.extentreports.LogStatus; import org.testng.*; import org.testng.xml.Xml...
Java
UTF-8
698
2.328125
2
[]
no_license
package ch.unibas.dmi.dbis.fds; public class Configuration { /** * true: "DEBUG" mode * false: "PRODUCTION" mode */ private static final boolean DEBUG_MODE = true; public static final int INITIAL_NODES; public static final int NETWORK_BITS; public static final int DEFAULT_FINGER_U...
Java
GB18030
465
3.109375
3
[]
no_license
package Math.Util; import java.util.ArrayList; public class Average { public double average(ArrayList<Double> al)//ֵ { double ave=0.0; int i=0; while(i<al.size()) { ave+=al.get(i); i++; } ave=ave/al.size(); return ave; } public double variance(ArrayList<Double> al,double u)//㷽 { double o = ...
Python
UTF-8
881
3.765625
4
[]
no_license
class Node: def __init__(self, data): self.data = data self.next = None class LinkedList: def __init__(self): self.head = None def insert(self, data): if self.head: temp = self.head self.head = Node(data) self.head.next = temp el...
C#
UTF-8
1,734
2.734375
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using LDGJ45.Core.Messaging; using LDGJ45.Core.World.Messages; namespace LDGJ45.Core.World { public sealed class GameObject : IDisposable { private readonly List<Component> _components = new List<Component>(); private readonly IPublisher _publis...
Python
UTF-8
3,906
3
3
[]
no_license
#Import TfIdfVectorizer from scikit-learn from sklearn.feature_extraction.text import TfidfVectorizer import data_loaders import pandas as pd from sklearn.feature_extraction.text import CountVectorizer from sklearn.metrics.pairwise import cosine_similarity import numpy as np import utils from sklearn.metrics.pairwise i...
JavaScript
UTF-8
2,114
3.5
4
[]
no_license
//HW lesson 2 slide 8 //1 const objPhone = { product: 'iPhone' }; //2 objPhone.price = 1000; objPhone.currency = 'dollar'; //3 objPhone.details = { model: 'iPhone7', color: 'Black' }; // HW lesson 2 slide 10 //1 let string = 'i am in the easycode'; let newStr = ''; for (let i = 0; i < string.length; i++)...
C++
GB18030
920
3.359375
3
[]
no_license
//4.дһ򣬿һֱռַ СдַӦĴдַյǴдַ, //ӦСдֲַ #define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h> #include<stdlib.h> #define isSmallLetter(ch) ((ch) <='z' && (ch) >= 'a' ) //궨 inline int isBigLetter(char ch) //ԵһδֱӲ룬 { return ch <= 'Z' && ch >= 'A'; } int main5() { char ch; printf("һַ\n"); while ((ch = getchar()) != EOF)...
Java
UTF-8
1,341
3.46875
3
[]
no_license
package tictactoe.game.player; import tictactoe.game.Board; import tictactoe.game.utils.PlayerType; import java.util.Scanner; import java.util.regex.PatternSyntaxException; class User extends Player { User(PlayerType type, char character) { super(type, character); } private String[] checkCords(...
C++
UTF-8
252
2.5625
3
[]
no_license
#if !defined(TRIANGLE_H) #define TRIANGLE_H namespace triangle { enum class flavor{equilateral, isosceles, scalene}; flavor kind(double side_1, double side_2, double side_3, double tolerance = 1e-5); } // namespace triangle #endif // TRIANGLE_H
Python
UTF-8
905
2.5625
3
[]
no_license
import matplotlib.pyplot as plt import scratch sc = scratch.Scratch() x = [] y = [] plt.ylim(0, 3.5) lines, = plt.plot(x, y) stopflag = False while stopflag == False: message = sc.receive() for k, v in message['sensor-update'].items(): print(k, v) if k == 'data': a = v.split(' '...
Markdown
UTF-8
803
2.578125
3
[]
no_license
# parallelpi Parallel implementation of estimating pi using PCJ library. PCJ is a Java library for parallel computing in PGAS (Partitioned Global Address Space) paradigm. #Requirements: Java 11 is required. #To load java 11 on HPC $module load Java/11.0.2 #To run it on laptop/desktop $javac -cp .:pcj-5.1.0.jar P...
Ruby
UTF-8
752
2.796875
3
[]
no_license
require 'sinatra' require 'sinatra/reloader' require 'yahoofinance' # require 'pry' get '/' do erb :index end # get '/stock?stock_name=' do # erb :error # end get '/stock' do stock = params[:stock_name].upcase info = YahooFinance::get_standard_quotes(stock) @symbol = info[stock].symbol @change = info[stock].c...
TypeScript
UTF-8
532
3.296875
3
[ "Apache-2.0" ]
permissive
type EventHandler = { (...args: any[]): void }; export interface ILiteEvent { on(handler: EventHandler): void; off(handler: EventHandler): void; } export class LiteEvent implements ILiteEvent { private handlers: EventHandler[] = []; on(handler: EventHandler): void { this.handlers.push(handler); } off(handle...
JavaScript
UTF-8
2,507
2.578125
3
[ "MIT" ]
permissive
import markdown from 'markdown-in-js' import withDoc, { components } from '../../../lib/with-doc' import { arunoda } from '../../../lib/data/team' import { TerminalInput } from '../../../components/text/terminal' import { Code } from '../../../components/text/code' import { InternalLink } from '../../../components/tex...
Python
UTF-8
5,340
2.515625
3
[]
no_license
import sys from flask import Flask, jsonify, request, render_template, redirect import blockchain # Instantiate the Node import convolutional_neural_network_predict app = Flask(__name__) @app.route('/', methods=['GET']) def home(): return redirect("/account", code=302) @app.route('/uploading', methods=['GET'])...
Python
UTF-8
4,291
2.515625
3
[]
no_license
#!/usr/bin/python from bs4 import BeautifulSoup from validate_email import validate_email import argparse import os import util # Url to subdir mapping. URL_SUBDIR_MAP = { 'https://www.cics.umass.edu/people/graduate-students': 'grad', ('https://www.cics.umass.edu/people/graduating_phds' '?field_graduati...
Python
UTF-8
679
2.75
3
[ "MIT" ]
permissive
class SpecialType: def __init__(self, name: str): """A class for generating custom types. :param name: The name of the constant/type :type name: str """ self.name = name def __repr__(self): return self.name __str__ = __repr__ # Classes MISSING = SpecialTy...
Markdown
UTF-8
5,581
3.125
3
[ "MIT" ]
permissive
--- title: "Why data science?" date: 2018-07-20 category: personal tags: [education] excerpt: "The motivation behind my decision to pivot my career to data science" --- If you've followed my blog for a while, you'd have seen that I'm fascinated by how data analytics has changed the way people do their jobs. One of the...
Java
UTF-8
1,513
3.234375
3
[]
no_license
public class LocalData { private String hr; private String mn; private String cap; public LocalData() { this.hr = "00"; this.mn = "00"; this.cap = "0"; } public LocalData(String hour, String minute, String capacity) { this.hr = hour; this.mn = minute; this.cap = capacity; } ...
Markdown
UTF-8
44,096
2.703125
3
[]
no_license
{"changed":true,"filter":false,"title":"README.md","tooltip":"/README.md","value":"CodeInstitute Sjong Wu Portfolio\n\nThe website will be a showcase on my aspirations to become an allround fullstack developer freelancer with marketing and video editing skills.\nI will showcase my portfolio and projects and highlight m...
Java
UTF-8
3,835
2.640625
3
[]
no_license
package TestSuite; import org.testng.annotations.Test; import io.restassured.RestAssured; import io.restassured.response.Response; import static io.restassured.RestAssured.when; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import java.text.DateFormat; import java.text.Simpl...
Go
UTF-8
390
2.53125
3
[ "Apache-2.0" ]
permissive
package main import ( "flag" "strconv" _ "github.com/chrislusf/glow/driver" "github.com/chrislusf/glow/flow" ) func main() { flag.Parse() flow. New(). TextFile("data.txt", 1). Map(func(line string) int { value, _ := strconv.Atoi(line) return value }). Reduce(func(x int, y int) int { return ...
Python
UTF-8
747
3.234375
3
[]
no_license
def find_jail(cell, line): n = 10 * (line - 1) + cell d = (n > 0) * 2 - 1 return n, d def jail(player): if player.card_of_freedom > 0: player.card_of_freedom -= 1 else: player.move(*find_jail(player.cell, player.line), delay=0.5) pay = 50000 if player.mo...
C
UTF-8
533
3.671875
4
[ "MIT" ]
permissive
/* This program display`s the name and address to the user on the screen * asking user for name and the address * Author: Iosif Bogdan Dobos, C16735789. * Date: 20.09.2016 **/ #include <stdio.h> int main() { char name[10]; char address[10]; printf("What is your name: \n"); scanf("%s" , name); ...
Java
UTF-8
1,005
2.40625
2
[]
no_license
package ar.edu.itba.paw.model; public class CommentEpisode { private User commenter; private String body; private Episode episode; private CommentEpisode parent; private int points; public User getCommenter() { return commenter; } public void setCommenter(User commenter) { ...
Java
GB18030
2,414
1.960938
2
[]
no_license
package com.example.sdau_news_bottom; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import org.json.JSONArray; import ...
Python
UTF-8
10,129
2.84375
3
[ "MIT" ]
permissive
# -*- coding: utf-8 -*- __author__ = 'fgh' import unittest import mock from mock import patch from mock import Mock from mock import call from system import ensureExist class UtilsSystemTestCase(unittest.TestCase): ################################################################################################ ...
Java
UTF-8
2,619
2.109375
2
[]
no_license
package com.example.administrator.kib_3plus.ui.DialogFragment; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.DialogFragment; import android.support.v7.widget.GridLayoutManager; import an...
C++
UTF-8
527
2.53125
3
[]
no_license
#ifndef EXTRAEDIT_H #define EXTRAEDIT_H #include <iostream> #include <fstream> #include <vector> using namespace std; class ExtraEdit { public: ExtraEdit(); void deleteExtra(); /// Here we open and close the extra file without ios::app, this removes all lines in the file vo...
Java
UTF-8
3,056
2.140625
2
[]
no_license
package com.huatuo.customer.domain; import java.math.BigDecimal; import com.huatuo.customer.base.domain.AbstractEntity; public class DtPackage extends AbstractEntity { /** * */ private static final long serialVersionUID = 141241251251251L; /** * 团队套餐id */ private String teamPackageId; /** * 团队ID ...
Markdown
UTF-8
2,979
3.859375
4
[]
no_license
# A Bit About JavaScript and The DOM ## Setup * `package.json`, `.eslintrc`, `.gitignore`, `.travis.yml`, `lib` folder * `package.json` scripts for testing (see classwork example) ## Objective Use `jest` to write tests that prove the following. ## 1. Object Prototype Given the following class: ```js class Animal...
JavaScript
UTF-8
13,429
2.5625
3
[]
no_license
/***************** Google Map API ******************/ // //function initialize() { // var latlng1 = new google.maps.LatLng(38.824771, 141.586855); // var latlng2 = new google.maps.LatLng(38.814585, 141.567160); // var latlng3 = new google.maps.LatLng(38.824771, 141.586855); // // var opts1 = { // zoom: 13, //...
C#
UTF-8
1,636
3.640625
4
[ "MIT" ]
permissive
using System; using System.Text; namespace DataStructureReview { public class BinaryTree { private Node head = null; private int count = 0; public Node Head { get { return head; } } public int Count { get { return count; } } public BinaryTree(int data) { ...
TypeScript
UTF-8
778
3.015625
3
[]
no_license
interface IProduto { nome: string; preco: number; descricao?: string; dataCadastro: Date; } const vestidoZara: IProduto = { nome:'Vestido Zara', preco: 49.90, descricao: 'Vestido em perfeitas condições de uso, azul com bolinhas', dataCadastro: new Date("6/5/2021"), } const camisa...
SQL
UTF-8
398
3.5625
4
[]
no_license
-- // Use the table function in SQL with LATERAL and TABLE keywords. -- // CROSS JOIN a table function (equivalent to "join" in Table API). SELECT a, word, length FROM MyTable, LATERAL TABLE(split(a)) as T(word, length) -- // LEFT JOIN a table function (equivalent to "leftOuterJoin" in Table API). SELECT a, word, len...
Java
UTF-8
2,080
1.984375
2
[]
no_license
package cn.aegisa.bai.mg.service.impl; import cn.aegisa.bai.mg.service.AppService; import cn.aegisa.bai.mg.vo.base.*; import cn.aegisa.bai.model.AppProperty; import cn.aegisa.bai.model.BannerImg; import cn.aegisa.spring.boot.mybatis.component.service.ICommonService; import lombok.extern.slf4j.Slf4j; import org.springf...
C++
UTF-8
1,283
2.53125
3
[]
no_license
#include <algorithm> #include <iomanip> #include <istream> #include <map> #include <ostream> #include <set> #include <sstream> #include <utility> #include <vector> using namespace std; // Solution template generated by caide class Solution { public: void solve(std::istream& in, std::ostream& out) { int T;...
Java
UTF-8
1,618
3.625
4
[]
no_license
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode() {} * TreeNode(int val) { this.val = val; } * TreeNode(int val, TreeNode left, TreeNode right) { * this.val = val; * this.left = left; * ...
Markdown
UTF-8
2,152
2.671875
3
[]
no_license
# :wave: Hello, folks! ## :question: Who am I? <p align='center'> I am Diahan Caroll Hudgson and I'm web developer, with knowledge and experience, working in web technologies, delivering quality work. I'm passionate about creating and developing web interfaces. </p> *** ## :chart_with_upwards_trend: GitHub Sta...
C#
UTF-8
4,028
2.875
3
[]
no_license
using System; using System.Collections; using System.Collections.Generic; using System.Reflection; using UnityEngine; using System.Linq; public static class GameUtils { public static int GameLength = 5; public static float GetVictoryAmountForGameLength(List<Vector2> data) { var amount = data.Firs...
JavaScript
UTF-8
2,097
2.703125
3
[]
no_license
import Parse from "./client-setup"; /** * Accepts or Rejects a game request * * @param {Object} obj * @param {string} obj.gameID * @param {boolean} obj.accept * @returns {Promise<any>} */ export async function respondToRequest({gameID, accept}) { return await Parse.Cloud.run("requestResponse", {gameID, accept...
Java
UTF-8
2,717
2.015625
2
[]
no_license
/* * */ package com.library.constants; import org.springframework.web.bind.annotation.RequestMapping; /** * The Class RequestMappingConstants. */ public class RequestMappingConstants { /** * This block provides constants for {@link RequestMapping} urls related to * {@link bookController}. */ public stat...
Java
UTF-8
532
2.0625
2
[ "MIT" ]
permissive
package io.github.lionell.machines.checker.service; import io.github.lionell.machines.checker.model.Submission; import org.springframework.context.ApplicationEvent; /** * Created by lionell on 5/9/16. * * @author Ruslan Sakevych */ public class SubmissionEvent extends ApplicationEvent { private Submission sub...
Java
UTF-8
586
2.15625
2
[]
no_license
package org.garpesa.services.consumer.controller; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @Path("/consumers") public class ConsumerController { private static final Logger LOGGER = ...
Java
UTF-8
13,618
2.453125
2
[]
no_license
package ie.gmit.sw; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.PriorityQueue; import java.util.Queue; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.ut...
Markdown
UTF-8
1,682
3.328125
3
[]
no_license
# what is this? the simplest microservices example, running a flask container and a mongodb container. ## what happens when you run docker-compose up? ## running `docker-compose up` kicks off a sequence of events. #### 1) docker-compose yml #### the docker daemon starts with `docker-compose.yml`. this file describes ...
C
UTF-8
2,781
3.59375
4
[]
no_license
#include <stdio.h> #include <string.h> #define FDT '\0' typedef unsigned int ushort; typedef char* str; ushort obtenerSiguienteEstado(ushort eActual, char caracter); void esPalabra(str cad, ushort *octales, ushort *decimales, ushort *hexadecimales, ushort *cantNoRec); ushort columna(char car); int main(int argc, ch...
Markdown
UTF-8
9,798
2.59375
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: Gérer l’accès en lecture public pour les conteneurs et les blobs titleSuffix: Azure Storage description: Découvrez comment autoriser l’accès anonyme aux conteneurs et aux objets Blob et comment utiliser un programme pour y accéder. services: storage author: tamram ms.service: storage ms.topic: how-to ms.date...
SQL
WINDOWS-1251
1,300
2.6875
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /sql/msp/view/v_msp_file_record_state.sql =========*** Run *** = PROMPT ===================================================================================== PROMPT *** Create view...
Python
UTF-8
917
4.0625
4
[]
no_license
def getClosestPoints(points): minDistance = points[0].getDistanceToOrigin() minKey = 0 for i in points: distance = points[i].getDistanceToOrigin() #print(i, 'distance: ', distance) if distance < minDistance: minDistance = distance minKey = i return points[minKey] def main(): numPoints = int(raw_in...
Java
UTF-8
591
2.171875
2
[]
no_license
package com.happylifeplat.transaction.core.helper; import java.nio.ByteBuffer; /** * <p>Description: .</p> * <p>Company: 深圳市旺生活互联网科技有限公司</p> * <p>Copyright: 2015-2017 happylifeplat.com All Rights Reserved</p> * SpringBeanUtils * @author yu.xiao@happylifeplat.com * @version 1.0 * @date 2017/5/27 11:56 * @since...
Markdown
UTF-8
1,645
2.984375
3
[ "LicenseRef-scancode-dbad-1.1" ]
permissive
# Module Learning Process ## Learning pyramid > >The learning pyramid is a group of popular learning models. >It represenetations relating different degrees of rention induced from varois type of learning. > ![pyramid](pyramid.jpeg) ### Passive Learning It's a beginning, but as you can see on the pyramid, it's onl...
Java
UTF-8
1,178
3
3
[]
no_license
/** * Clase: Pais.java * * @version: 0.1 * * Fecha de Creación: 27/02/2020 * * Fecha de modificación: * * @author: 92531165 * * Copyright: CECAR * */ package edu.cecar.modelo; /** * Clase que modela los paises a nivel * mundial * */ public class Pais { private String n...
C++
UHC
776
3.046875
3
[]
no_license
// ǥ //https ://www.acmicpc.net/problem/1717 #define MAX 10000007 #include<iostream> #include<stdio.h> using namespace std; int parent[MAX]; int find(int x) { if (parent[x] == x) { return x; } return parent[x] = find(parent[x]); } void m_union(int x, int y) { x = find(x); y = find(y); if (x != y) { par...
Python
UTF-8
801
2.78125
3
[]
no_license
import numpy as np from collections import deque from utils import read_lines_str values = read_lines_str("AOC2022/aoc06/input.txt") def get_starter_pack(line): d = deque(maxlen=4) for ch_idx, ch in enumerate(line): d.append(ch) if len(d) == 4: s = set(d) if len(s...
Java
UTF-8
424
2.25
2
[]
no_license
package com.vsevolod.swipe.addphoto.constant; /** * Created by vsevolod on 8/4/17. */ public class Millisecond { private static final int SEC = 1000; private static final long MINUTE = SEC * 60; public static final long HOUR = MINUTE * 60; public static final long DAY = HOUR * 24; public static ...
Java
UTF-8
198
1.820313
2
[]
no_license
package com.codeanhcuong.laptop; public class No2 extends Laptop { public No2(String name, String origin, int cost) { super(name, origin, cost); // TODO Auto-generated constructor stub } }
C++
UTF-8
1,721
3.0625
3
[]
no_license
#include "LeqExpression.hpp" #include "Misc_Classes/Type.hpp" #include "Misc_Classes/RegisterPool.hpp" #include "Misc_Classes/UsefulFunctions.hpp" #include <string> #include <iostream> extern int label_num; extern PrimitiveType* bool_type; extern RegisterPool register_pool; LeqExpression::LeqExpression(Expression *lef...
Java
UTF-8
9,511
1.726563
2
[]
no_license
/* * _ _ ___ ___ _ _ * | \| | __/ __| __| | |__ * | .` | _|\__ \/ _` | '_ \ * |_|\_|_| |___/\__,_|_.__/ * * Copyright (c) 2014-2016. The NFSdb project and its contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Licens...
Java
UTF-8
2,795
2.40625
2
[]
no_license
package net.weswaas.oniziacuhc.commands.player; import net.weswaas.oniziacuhc.OniziacUHC; import net.weswaas.oniziacuhc.commands.UHCCommand; import net.weswaas.oniziacuhc.stats.PlayerData; import net.weswaas.oniziacuhc.stats.PlayerDataManager; import net.weswaas.oniziacuhc.stats.SQLManager; import org.bukkit.Bukkit; i...
C++
UTF-8
2,979
2.875
3
[]
no_license
//CompositeNode.cpp #include "CompositeNode.h" #include "SDL2/SDL.h" #include <SDL2/SDL_ttf.h> #include "LTexture.h" #include "common.h" #include "commonSDL.h" #include <iostream> #include <algorithm> CompositeNode::CompositeNode(std::string name) : MenuNode(name) { m_selectedChild = m_children.begin(); } CompositeNo...
PHP
UTF-8
831
2.640625
3
[ "Apache-2.0" ]
permissive
<html> <head> <title>Database users</title> </head> <body> <?php $servername= "localhost"; $username ="root"; $pwd = ""; $conn=mysqli_connect($servername,$username,$pwd); if (!$conn) die("could not connect:".mysqli_error($conn)); $sql="create database Emperial"; if (!mysqli_query($conn,$sql)) die("could not create da...
JavaScript
UTF-8
508
4.53125
5
[]
no_license
// Super Duper Easy Make a function that returns the value multiplied by 50 and increased by 6. If the value entered is a string it should return "Error". // // Note: in C#, you'll always get the input as a string, so the above applies if the string isn't representing a double value. //solution function problem(x){ ...
JavaScript
UTF-8
920
2.84375
3
[ "MIT" ]
permissive
const fs = require('fs'); const path = require('path'); const wayCopy = path.join(__dirname, 'files-copy'); const way = path.join(__dirname, 'files'); fs.mkdir(wayCopy, { recursive: true }, errorHandler); directoryCleanUp(wayCopy); makeCopy(); function makeCopy() { fs.readdir(way, { withFileTypes: true }, (err, fi...
C#
UTF-8
1,254
3.59375
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace task1 { class Program { static void Main(string[] args) { int n = Convert.ToInt32(Console.ReadLine()); // string s = Console.ReadLine(); //Readin...
Markdown
UTF-8
1,151
2.703125
3
[]
no_license
SQL systems provide concepts like schemas and namespaces to enforce security and prevent accidental overwite of data. Phoenix 4.7 introduces a way to map Phoenix tables to HBase namespaces, allowing admins to enforce access controls using standard HBase ACLs. To use this feature, phoenix.connection.isNamespaceMapping...
Markdown
UTF-8
2,196
3.1875
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: Setting up Local NuGet Feeds description: How to create a local feed for NuGet packages using folders on your local network author: JonDouglas ms.author: jodou ms.date: 12/06/2017 ms.topic: conceptual --- # Local feeds Local NuGet package feeds are simply hierarchical folder structures on your local networ...
Java
UTF-8
1,543
2
2
[]
no_license
package cn.fengwoo.sealsteward.entity; import java.util.List; public class ExamineUpdateData { /** * sealId : 4c1f302ba6234a6bb86c2efcf2cd66d9 * list : [{"approveLevel":"43cdeef2b274455ea0e03c78259a575b","approveType":"4c1f302ba6234a6bb86c2efcf2cd66d9","approveUser":"78c396f1aed245ec9dae37f5fd9648df"}] ...
Java
UTF-8
6,382
3.65625
4
[]
no_license
package niuke; import java.util.Stack; /** * @author atom.hu * @version V1.0 * @Package niuke * @date 2020/9/30 22:45 * @Description ListNodeSolution * 链表 */ public class ListNodeSolution { /** * @param l1 ListNode类 * @param l2 ListNode类 * @return ListNode类 */ public ListNode mergeT...
C++
UTF-8
7,507
3.234375
3
[]
no_license
/** * @file Catalogo.cpp * @author jrbalsas@ujaen.es * * @date 16 de octubre de 2015, 10:45 */ #include <stdexcept> #include <cstdlib> #include <iostream> #include <fstream> #include "Catalogo.h" #include "busqueda.h" #include "ExNoEncontrado.h" /**Constructor por defecto*/ Catalogo::Catalogo():_numEjemplare...
Java
UTF-8
380
2.0625
2
[]
no_license
package com.frameworkrpc.exception; public class MyRpcInvokeException extends RuntimeException { public MyRpcInvokeException() { super(); } public MyRpcInvokeException(String message, Throwable cause) { super(message, cause); } public MyRpcInvokeException(String message) { super(message); } public My...
Swift
UTF-8
802
2.75
3
[]
no_license
import ChaCha public struct TimeAndRandom: XIDPrivate { static let id: UInt8 = 0b011_00000 public let description: String init(unchecked description: String) { self.description = description } public init(nanosecondsSince1970: Timestamp = .now) { var rng = ChaCha() ...
JavaScript
UTF-8
327
2.78125
3
[]
no_license
class Size { constructor(width=50, height=50){ this.width = width; this.height = height; } SquareSize = (factorSize) => { this.width = factorSize; this.height = factorSize; } Radius = (radius) => { this.raidus = radius; } } export defaul...
Java
UTF-8
857
1.90625
2
[]
no_license
package org.jetbrains.jet.lang.descriptors.annotations; import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.lang.resolve.constants.CompileTimeConstant; import org.jetbrains.jet.lang.types.JetType; import java.util.List; /** * @author abreslav */ public class AnnotationDescriptor { private JetTyp...
Python
UTF-8
904
3.875
4
[]
no_license
class TreeNode: def __init__(self, a_name, a_parent, some_children): self.name = a_name self.parent = a_parent self.children = some_children def add_child(self, a_child): self.children.append(a_child) def print_pre_order(self): print(self.name) if len(self....
Java
UTF-8
1,203
3.546875
4
[]
no_license
package Pontoo_MK2; import java.util.ArrayList; /** * Pontoo_MK2 * Super class for all users including players and dealer * object holding player cards and hand total * @author 18025316 * Scott Kinsmnan * 17/10/2020 */ public abstract class User { private ArrayList<Card> hand; private int playerTotal;...
Python
UTF-8
2,494
2.890625
3
[ "MIT" ]
permissive
import cv2 import numpy as np import handTrack MOVEMENT_BINARY_LOWER = 40 MOVEMENT_BINARY_UPPER = 255 MOVEMENT_THRESHOLD = 0.01 MOVE_REQUIRED = 5 STILL_REQUIRED = 5 MAX_MOVE_RECALL = MOVE_REQUIRED + STILL_REQUIRED prev_frame = None move_ratios = [] def get_movement_ratio(frame): """ Get the movement ratio ...
PHP
UTF-8
1,800
2.71875
3
[]
no_license
<?php namespace AppBundle\Manager; use AppBundle\Entity\Price; use AppBundle\Repository\PriceRepository; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class PriceManager { /** @var EntityManagerInterface */ private $entityManager; /** @var Pri...
Ruby
UTF-8
3,083
3.046875
3
[]
no_license
class StatsRepo def self.get_stats CSV.read("./data/RegularSeasonDetailedResults.csv", headers: true).map do |g| GameStats.new(winning_team_id: g[2], losing_team_id: g[4], location: g[6], winning_stats: { score: g[3], ...
Python
UTF-8
2,271
2.890625
3
[ "Apache-2.0" ]
permissive
import random from fireo.fields import TextField, DateTime, NumberField from fireo.models import Model class NextFetchModel(Model): name = TextField() age = NumberField() order_num = NumberField() created_on = DateTime(auto=True) # Sample Data for testing age_list = [20, 18, 23, 17, 25, 26, 27] fo...
Java
UTF-8
5,198
2.296875
2
[]
no_license
package org.analytik.data.model; import java.io.Serializable; import java.math.BigDecimal; import java.math.BigInteger; import java.util.Date; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.JoinColumn; import java...