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
Python
UTF-8
2,592
2.703125
3
[]
no_license
import avians.nn.common as anc import os def single_model_ocr(input_file, model_file): ## TODO write a function to return text from models and input pass def prepare_text_images(image_arr, stats_arr, ...
C++
UTF-8
1,084
2.84375
3
[ "MIT" ]
permissive
#ifndef CONTOUR_H #define CONTOUR_H #include <GL/glew.h> #include <string> #include "shader_primitive.h" #include "color.h" using namespace std; namespace glot { /** \brief curve: a contour to plot * * This class takes a function that accepts two doubles, * interprets it as a scalar field, and then plots ...
C#
UTF-8
454
2.640625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _1 { class InsuranceParcelDecorator : AbstractParcelDecorator { public InsuranceParcelDecorator(AbstractParcel parcel) : base(parcel.Name + " зі страховкою", parcel) { ...
Java
UTF-8
1,317
2.859375
3
[]
no_license
package hyppypotku.hyppypotku.gfx; import java.awt.image.BufferedImage; /** * Luokan tehtävänä hallinnoida pelin objekteja. */ public class Assets { public static BufferedImage hpfull, hpzero, stickman, blockman, roundfull, roundempty, background, mainMenuBackground, tutorialBackground; /** ...
C#
UTF-8
8,691
3.09375
3
[ "MIT" ]
permissive
// This is an open source non-commercial project. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com /* NumberRange.cs -- */ #region Using directives using System; using System.Collections; using System.Collections.Generic; #endregion namespace ManagedCl...
Java
UTF-8
2,385
2.78125
3
[]
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 view; import controller.DatabaseController; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt...
Markdown
UTF-8
2,415
2.765625
3
[ "MIT" ]
permissive
# 如何用C++实现一个简易数据库 *基于cstack/db_tutorial C语言版本* * KCNyu * 2022/2/2 作为笔者写的第一个系列型教程,还是选择基于前人的教程经验以及添加一些自己个人的探索。也许有很多纰漏之处,希望大家指正。 ## 1. 数据库是什么? 数据库是“按照数据结构来组织、存储和管理数据的仓库”。是一个长期存储在计算机内的、有组织的、可共享的、统一管理的大量数据的集合。使用者可以对其中的资料执行新增、选取、更新、刪除等操作。 ## 2. SQL是什么? SQL ***(Structured Query Language:结构化查询语言)*** 是一种特定目的程式语言,用于管理关系数据库管理系...
Markdown
UTF-8
356
2.765625
3
[]
no_license
--- date: "2015-01-01T13:09:13-06:00" title: macoroni --- Macaroni is dry pasta shaped like narrow tubes. Made with durum wheat, macaroni is commonly cut in short lengths; curved macaroni may be referred to as elbow macaroni. Some home machines can make macaroni shapes, but like most pasta, macaroni is usually made co...
C#
UTF-8
1,447
3.078125
3
[]
no_license
using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SopromatLib { public class BaseRectangle : BaseShape { private float Width, Height; public BaseRectangle(float width, float height) : base($"Прям...
C#
UTF-8
1,112
2.546875
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(SpriteRenderer))] public class Parallax : MonoBehaviour { public float ParallaxMagnitude; public Camera Cam; private float SpriteLength; private float SpriteLeft; void Sta...
C#
UTF-8
2,406
2.515625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Reflection; using Docu.Documentation; using Docu.Documentation.Comments; using Docu.Parsing.Model; namespace Docu.Tests { internal static class TestExtensions { public static IList<Namespace> ...
C++
UTF-8
2,123
3.796875
4
[]
no_license
/* First take a couple of examples and find their preorder and inorder.Soon you'll be able figure out the pattern which ig you already have done. Next 1) Pick an element from Preorder. Increment a Preorder Index Variable (preIndex ) to pick next element in next recursive call. 2) Create a new tree node with the da...
Java
UTF-8
436
3.015625
3
[]
no_license
package data; public class IntDirectionDataPair { private final DataPair<Integer, String> intDirectionPair; public IntDirectionDataPair(int directionInt, String direction){ intDirectionPair = new DataPair<Integer, String>(directionInt, direction); } public int getDirectionInt (){ retu...
PHP
UTF-8
3,291
2.5625
3
[ "MIT" ]
permissive
<?php /** * Copyright (c) 2018 Alma / Nabla SAS * * THE MIT LICENSE * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation * the rights to us...
JavaScript
UTF-8
5,436
2.515625
3
[]
no_license
/** * Player Model */ function Player(name, tint) { var self = game.add.sprite(spawnlocs[0], spawnlocs[1], 'dude'); this.self = self; var movespeed = 300; var fireRate = 1000; var nextFire = 0; var keys; this.setup = function () { game.physics.p2.enable(self); self.physic...
Java
UTF-8
3,101
3.625
4
[]
no_license
public class StringPracticeProgram2 { public String Str10="Strings Are Immutable"; public String Str11="Strings Are Immutable"; public String Str13="Integers Are not Immutable"; public static void main(String[] args) { String str1="Testprogram";//substring System.out.printl...
PHP
UTF-8
2,788
3.28125
3
[]
no_license
<?php /** * Modèle de la table location. * Ce modèle est la réplique de la table. * Ici je la déclare * Le mot clé extends permet de dire que la classe users hérite de la classe database */ class location extends database { /** * Déclaration des champs de la table en attribut. * Dans une classe les v...
C#
UTF-8
6,052
2.921875
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Net; using System.Net.Sockets; using System.IO; namespace Server { pub...
Python
UTF-8
9,372
2.53125
3
[ "MIT" ]
permissive
#!/usr/bin/env python3 # burnin-drive # # usage: burnin-drive [-h] [-d DIR] [-l LOG] [-y] [-m | -r] drive # # Burnin a drive with SMART tests and badblocks # # positional arguments: # drive # # optional arguments: # -h, --help show this help message and exit # -d DIR, --dir DIR specify the output direct...
Java
UTF-8
876
2.1875
2
[]
no_license
package com.csv.csv.domain; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import lombok.NonNull; import org.hibernate.validator.constraints.Length; import javax.validation.constraints.Email; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.Patt...
Python
UTF-8
1,642
2.53125
3
[]
no_license
"""analyzing EIA data """ from climate.eia import base as b from functools import cached_property import pandas as pd from typing import List, Dict class GenFuel(b.GenFuel): def __init__(self, loc: str): super().__init__(loc=loc) @cached_property def df_nys(self) -> pd.DataFrame: return ...
C
UTF-8
973
3.46875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#pragma once #include <libmath/Math.h> typedef struct { double x; double y; double z; } Vec3f; static inline Vec3f vec3f_norm(Vec3f vector) { double length = sqrt(vector.x * vector.x + vector.y * vector.y + vector.z * vector.z); vector.x /= lengt...
Java
UTF-8
4,423
2.6875
3
[]
no_license
package hu.oe.nik.szfmv.automatedcar.model; import hu.oe.nik.szfmv.automatedcar.model.objects.CrossWalk; import hu.oe.nik.szfmv.automatedcar.model.objects.NpcCar; import hu.oe.nik.szfmv.automatedcar.model.objects.NpcPedestrian; import hu.oe.nik.szfmv.automatedcar.model.objects.ParkingPlace; import hu.oe.nik.szfmv.auto...
C++
UTF-8
1,044
2.859375
3
[]
no_license
#ifndef __MODEL_ACTION_HPP__ #define __MODEL_ACTION_HPP__ #include "Stream.hpp" #include "model/BuildingAction.hpp" #include "model/BuildingType.hpp" #include "model/MoveAction.hpp" #include "model/Resource.hpp" #include "model/Specialty.hpp" #include <optional> #include <sstream> #include <stdexcept> #include <string...
JavaScript
UTF-8
2,150
3.046875
3
[ "MIT" ]
permissive
'use strict'; const utils = require('./utils'); /** * A wrapper to collect errors * @class */ class Errors extends Error { constructor() { super(); this.isOvt = true; this.hasErrors = false; this.name = 'ValidationError'; this._errors = {}; } /** * reset errors */ reset() { ...
C
UTF-8
370
3.59375
4
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <time.h> /** * main - Entry point * * Return: Always 0 (Success) */ int main(void) { int i; int a = 0; int b; for (i = 0; i < 10; i++) { for (a = a; a < 10; a++) { if (i != a) { putchar(i + '0'); putchar(a + '0'); if (i != 8 || a != 9) { putchar(','); putchar(' '); ...
PHP
UTF-8
1,085
2.59375
3
[ "MIT" ]
permissive
<?php namespace Payum2\Heartland\Soap\Base; /** * This class is generated from the following WSDL: * https://heartlandpaymentservices.net/BillingDataManagement/v3/BillingDataManagementService.svc?xsd=xsd0 */ class RegisterTokenToAdditionalMerchant { /** * request * * The property has the followi...
Python
UTF-8
1,177
3.84375
4
[]
no_license
# Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def __init__(self): self.ans = None def find_lowest_common_ancestor(self, node: 'TreeNode', a: 'TreeNode', b: 'TreeNode') -> 'TreeNod...
Java
UTF-8
1,631
2.34375
2
[]
no_license
package ir.abrstudio.negarkhaneh; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import com.bumptech.glide.Glide; import java.util.List; public class ImagesAdapter extend...
Java
UTF-8
473
3
3
[]
no_license
package cz.itstep; import java.util.Scanner; public class WhileExample1 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (true) { System.out.print("vstup: "); String input = scanner.nextLine(); if ("x".equals(input)) {...
Python
UTF-8
103
3.609375
4
[]
no_license
# Getting the last # character of a string str = 'Hello, World!' # ^ print(str[-1])
Java
UTF-8
5,178
2
2
[ "Apache-2.0" ]
permissive
package com.jd.management.condition; import java.io.Serializable; import java.lang.String; /** * 资源 * @org ${entityMeta.projectMeta.domainName} * @author jiaodong * @Date 2017-01-06 15:05:16 */ public class ResourcesCondition implements Serializable { private static final long serialVersionUID = 1L; /** ...
Java
UTF-8
1,193
2.015625
2
[]
no_license
package net.sunwukong.www.api.config; import com.sdkinfo.www.setting.dialect.Props; import java.util.Properties; /** * @author swk * @Description :配置文件 * @Date 2018/8/1321:38 * @Email :ideacoding@163.com * @Version 1.0 **/ public class SwkConfig { /** * FTP地址 */ public stat...
Java
UTF-8
894
2.59375
3
[]
no_license
package cn.idea360.demo.enums; import lombok.Getter; import java.io.Serializable; import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** * 二维码状态 */ @Getter //@JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum QrCodeEnum implements Serializable { NOT_SCAN(1, "未被扫描"), SCANNED(2, ...
Java
UTF-8
859
1.851563
2
[]
no_license
package com.example.demojersey; import com.example.demojersey.common.UserSvcConfigBean; import com.example.demojersey.services.HelloService; import com.example.demojersey.services.ReverseService; import com.example.demojersey.services.UserService; import org.glassfish.jersey.media.multipart.MultiPartFeature; import or...
Rust
UTF-8
646
2.609375
3
[ "MIT" ]
permissive
mod rodio; use crate::source::Source; #[derive(Debug)] pub struct Player { #[cfg(target_arch = "wasm32")] backend: (), #[cfg(not(target_arch = "wasm32"))] backend: rodio::Rodio, } impl Player { pub fn new() -> Option<Self> { Backend::new().map(|backend| Player { backend }) } pub ...
Java
UTF-8
1,036
2.375
2
[]
no_license
package Day15; import Day8.ChromeBrowser; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Action; import org.openqa.selenium.interactions.Actions; import java.util.concurrent.TimeUnit; ...
Go
UTF-8
2,017
3.359375
3
[]
no_license
package parser import ( "fmt" "strconv" "strings" "unicode" ) type Member struct { Name string Coeff float64 Exp int Operand string } type Equation struct { LMembers []Member RMember Member } func parseMember(str string, memberPos int) (Member, error) { var member Member var err error str = s...
Python
UTF-8
1,900
2.9375
3
[]
no_license
""" 监控代码:监控服务器的内存、cpu、网络、磁盘等。与租车系统部署到一起 """ from asyncio import sleep from datetime import datetime import psutil print(psutil.cpu_percent()) # 获取cpu的信息 print(psutil.virtual_memory()) # 虚拟的内存 print(psutil.virtual_memory().percent) # 虚拟内存的百分比 print(psutil.disk_usage("d:/")) # 租车系统所在的磁盘 print(psutil.disk_usage("d:/...
Shell
UTF-8
268
3.203125
3
[ "MIT" ]
permissive
#!/bin/bash if [ $# -lt 1 ]; then echo -e "\e[31mUsage: $0 [cmd]\e[m" exit 1 fi show-versions if [[ "${INPUT_DANGERFILE}" == '' ]]; then DANGERFILE_ARGS='' else DANGERFILE_ARGS="--dangerfile ${INPUT_DANGERFILE}" fi danger-swift $@ $DANGERFILE_ARGS
Java
UTF-8
3,087
2.3125
2
[]
no_license
package com.tdc.poa.integration; import static org.junit.Assert.assertEquals; import java.util.HashSet; import java.util.Set; import javax.inject.Inject; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.transaction.api.annotation.TransactionMode; import org.jboss.arquillian.tra...
C++
UTF-8
1,562
3.15625
3
[]
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE426_Untrusted_Search_Path__char_popen_83_bad.cpp Label Definition File: CWE426_Untrusted_Search_Path.label.xml Template File: sources-sink-83_bad.tmpl.cpp */ /* * @description * CWE: 426 Untrusted Search Path * BadSource: Don't specify the full path in the OS...
Java
UTF-8
1,141
1.898438
2
[]
no_license
package rta.ae.sharekni; import android.annotation.TargetApi; import android.graphics.Color; import android.os.Build; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.Toolbar; import android.widget.TextView; import rta.ae.sharekni.R; public class Destination...
PHP
UTF-8
1,142
2.828125
3
[ "Apache-2.0" ]
permissive
<?php $base_url = 'https://kodecentral.com'; // basic xml header info echo '<?xml version="1.0" encoding="UTF-8"?>'.PHP_EOL. '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . PHP_EOL; foreach ($urls as $url) { echo '<url>' . PHP_EOL; echo '<loc>'.$base_url.$url.'</loc>' . PHP_EOL; echo '<ch...
JavaScript
UTF-8
2,321
3.0625
3
[]
no_license
let newBtn = document.getElementsByClassName('buttonNew') let div = null let arr = [] localStorage.clear(); function addNote() { document.getElementById('noteField').style.visibility = 'visible' let newNote = document.createElement('div'); document.getElementById('noteList').appendChild(newNote) ...
Markdown
UTF-8
1,210
2.75
3
[ "MIT" ]
permissive
# Weld CDI and Jetty There may be issues with Jetty and Weld. This is the minimal working setup. There is no special configuration in `web.xml` but `jetty-web.xml` is required. Because `jetty-web.xml` may be needed only for development purposes, but not for production (we might want to deploy it to Tomcat for exampl...
Java
UTF-8
564
2.125
2
[]
no_license
package com.uiu.helper.KidsHelper.mvp.model.response; import com.google.gson.annotations.SerializedName; import com.uiu.helper.KidsHelper.mvp.model.Setting; import java.util.List; public class GetSettingsResponse extends BaseResponse { @SerializedName("setting") public Setting settings; public Setting g...
Java
UTF-8
3,433
3.46875
3
[]
no_license
package com.company.producerconsumer; public class Main { public static final int N_OF_RESOURCES_TOTAL = 5; public static void main(String[] args) { ResourceHolder resourceHolder = new ResourceHolder(); Producer producer = new Producer(resourceHolder); Consumer consumer = new Consume...
SQL
UTF-8
997
3.203125
3
[]
no_license
# A table for mapping variations to variation_sets CREATE TABLE IF NOT EXISTS variation_set_variation ( variation_id int(10) unsigned NOT NULL, variation_set_id int(10) unsigned NOT NULL, PRIMARY KEY (variation_id,variation_set_id), KEY variation_set_idx (variation_set_id,variation_id) ); # A table containing vari...
Java
UTF-8
9,492
1.96875
2
[ "BSD-3-Clause" ]
permissive
/* * Copyright (c) 1998-2018 John Caron and University Corporation for Atmospheric Research/Unidata * See LICENSE for license information. */ package ucar.nc2.ft.coverage; import java.util.Arrays; import org.junit.Assert; import org.junit.Test; import org.junit.experimental.categories.Category; import org.slf4j.Log...
C++
UTF-8
403
2.609375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { int r, n; cin >> r >> n; vector<int> used(r, 0); while (n--) { int num; cin >> num; used[num - 1] = 1; } bool empty = false; for (int i = 0; i < r; i++) { if (used[i] == 0) { empty = true; cout << i + 1 << endl; ...
Markdown
UTF-8
1,364
3.109375
3
[]
no_license
--- layout: default title: Logging into GitLab using LDAP --- ## Logging into GitLab using LDAP Recently, we deployed a GitLab instance, and my colleague discovered that when he logged in using our LDAP service account credentials, he ended up logging in as me; i.e., two different LDAP users with two pairs of usernam...
PHP
UTF-8
2,124
2.546875
3
[]
no_license
<?php namespace App\Http\Controllers\Api; use App\Access\Repository\User\UserRepository; use App\Exceptions\Api\ApiException; use App\Http\Controllers\Controller; use App\Http\Requests\Api\User\UserLoginRequest; use App\Modules\Enums\ErrorCode; use Illuminate\Http\Request; use Illuminate\Support\Facades\Log; /** * ...
Shell
UTF-8
1,382
3.34375
3
[ "BSD-3-Clause" ]
permissive
#!/bin/bash # This script is meant to be called by the "script" step defined in # .travis.yml. See http://docs.travis-ci.com/ for more details. # The behavior of the script is controlled by environment variabled defined # in the .travis.yml in the top level folder of the project. # License: 3-clause BSD set -e set -v...
Java
UTF-8
1,456
3.265625
3
[]
no_license
/** * This is the assignment of finding many genes in DNA for * Java programming: solving problems with software course. * @author Hsingyi Lin * @version 08/29/2019 */ import edu.duke.*; import java.io.File; public class Part2 { public double cgRatio(String dna) { int countCG = 0; int star...
SQL
UTF-8
277
3.640625
4
[]
no_license
SELECT cohorts.name AS cohort, SUM(completed_at - started_at) AS total_duration FROM assistance_requests JOIN students ON students.id = assistance_requests.student_id JOIN cohorts ON cohorts.id = students.cohort_id GROUP BY cohorts.name ORDER BY total_duration ASC ;
Rust
UTF-8
13,132
2.53125
3
[]
no_license
extern crate rand; extern crate input; use input::Key; use rand::Rng; use std::fs::File; use std::io::Read; use utils::*; const PC_START: usize = 0x200; static FONTSET: [u8; 80] = [ 0xF0, 0x90, 0x90, 0x90, 0xF0, // 0 0x20, 0x60, 0x20, 0x20, 0x70, // 1 0xF0, 0x10, 0xF0, 0x80, 0xF0, // 2 0xF0, 0x10, 0...
Swift
UTF-8
562
3.1875
3
[]
no_license
// // ColorPalette.swift // Yelp // // Created by Hector Monserrate on 19/09/14. // Copyright (c) 2014 CodePath. All rights reserved. // import Foundation enum ColorPalette { case Red, Gray, White func get(alpha: CGFloat = 1.0) -> UIColor { switch self { case .Red: ...
TypeScript
UTF-8
2,578
2.71875
3
[]
no_license
import { Component, OnInit } from "@angular/core"; import * as _ from "lodash"; @Component({ selector: "my-app", templateUrl: "./app.component.html", styleUrls: ["./app.component.css"] }) export class AppComponent implements OnInit { name = "Angular"; trs = []; directions = ["t", "r", "b", "l"]; data = [...
C
UTF-8
1,254
2.53125
3
[]
no_license
#include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/Xos.h> #include <X11/Xatom.h> #include <stdio.h> #define DUMP_ERR printf static void draw(Display *display, Window win, GC gc, int width, int height); int main() { Display *display; int screennum; int width; int height; Atom protocols...
Python
UTF-8
2,569
3.03125
3
[ "MIT" ]
permissive
import gym from gym import spaces from gym.utils import seeding import numpy as np class DeepSeaEnv(gym.Env): def __init__(self, n=20, random=True): self._size = n self._move_cost = 0.01 / (n - 1) self._goal_reward = 1. self._column = 0 self._row = 0 self.seed() ...
PHP
UTF-8
4,204
2.75
3
[]
no_license
<?php ob_start(); //========================================= // Class Management //========================================= include_once 'App Code/Class_People.php'; $c_People = new Class_People(); include_once 'App Code/Class_Object.php'; $c_Object = new Class_Object(); //========================================...
Markdown
UTF-8
4,066
2.875
3
[ "MIT" ]
permissive
--- page_type: sample languages: - csharp products: - azure - azure-storage - dotnet-core description: "A simple sample project to help you get started using Azure Storage with .NET Core and C# as the development language." --- ## Azure SDK Versions To use the latest Azure SDK version [storage-blobs-dotnet...
Java
UTF-8
1,974
3.40625
3
[]
no_license
package ic.doc.co575; import java.util.Random; public class ExpressionFactory { public static Expression randomExpression(int maxDepth) { Random random = new Random(); if (maxDepth == 0) { return new NaturalNumber(random.nextInt(9) + 1); //the reason for which the return ha...
C++
UTF-8
6,436
2.59375
3
[]
no_license
/** * Chad Manning's file for Iron Curtain * @author: Chad Manning * Course: CMPS 3350 * Instructor: Gordon Griesel */ #include <GL/glx.h> #include <X11/Xlib.h> #include <stdio.h> #include <cmath> #include <ctime> #include <cstdlib> #include "core.h" #include "chadM.h" #include "fonts.h" extern Global& gl; extern ...
JavaScript
UTF-8
213
4.09375
4
[]
no_license
// Write a function that takes a number as argument // Round the number to the 2nd digit after the comma // Return the rounded number const round = num => { return num.toFixed(2) }; console.log(round(32.12397));
Markdown
UTF-8
3,194
3.015625
3
[]
no_license
# Pokedex A Pokedex implementation by various contributors. Welcome to our Pokedex. We collaborate on this fun project to build one of the best Pokedexes in the world. It's Open Source and it's free! We at Refocus give this task to our prospective team-mates. It's not easy, it is challenging at it's best and you'll ha...
Java
UTF-8
375
1.835938
2
[]
no_license
package com.yzcx.api.vo.highchat; import com.fasterxml.jackson.annotation.JsonInclude; /** * Created by LiuDongguang on 2017/5/24. * 子标题 */ @JsonInclude(JsonInclude.Include.NON_NULL) public class Subtitle { private String text; public String getText() { return text; } public void setText(...
Java
UTF-8
6,442
2.234375
2
[]
no_license
package test; import static org.junit.Assert.*; import java.awt.Point; import java.util.HashMap; import java.util.Map; import org.junit.Before; import org.junit.Test; import elements.Investigator; import elements.Monster; import enums.FieldTyps; import enums.MonsterNames; import enums.Path; import e...
C++
UTF-8
1,955
3.203125
3
[]
no_license
/************************************************************************* > File Name: thread-safe-counter.cpp > Author: Jason > Mail: jie-email@jie-trancender.org > Created Time: 2017年03月27日 星期一 18时36分52秒 ************************************************************************/ #include <iostream> #include <mut...
Python
UTF-8
5,632
3.296875
3
[]
no_license
import os import time import numpy as np import matplotlib.pyplot as plt from scipy.cluster.vq import kmeans2 from sympy import symbols, Eq, solve from scipy.optimize import minimize, fsolve from scipy.integrate import trapz from src.utils import get_project_root root = get_project_root() class FourthLab: def ...
Python
UTF-8
6,731
2.828125
3
[]
no_license
#!/usr/bin/python import tkinter as tk import os class Application(tk.Frame): def __init__(self, master=None): tk.Frame.__init__(self, master) self.pack() self.checkFiles() self.findSettings() self.createSettings() self.createFunctions() # Menu System def ...
Java
UTF-8
415
1.671875
2
[]
no_license
package com.techsignage.techsignmeetings.Models; import com.google.gson.annotations.SerializedName; /** * Created by heat on 3/10/2017. */ public class WF_POI { @SerializedName("POI_ID") public String POI_ID; @SerializedName("POI_NAME_E") public String POI_NAME_E; @SerializedName("POI_NAME_A"...
PHP
UTF-8
2,808
2.5625
3
[]
no_license
<?php namespace App\Http\Controllers; Use Illuminate\Http\Request; use App\Reservation; use App\ConferenceRoom; use Carbon\Carbon; class ReservationController extends Controller { public function index(){ return Reservation::whereDate('start_time_date', Carbon::today())->get(); } public functio...
Markdown
UTF-8
1,217
3
3
[]
no_license
# Report on the memory line test This is a report on the file scad/test-memory-line.scad as of revision c7d5a33b9fb6b9c075aeb098dcb14b1a78f85e44 and prepared with MadFadLab's LaserScript cutter. Brass strips are from Albion Alloys, labelled 6mm * 0.8mm * 305mm and 12mm * 0.4 * 305mm. 12mm strip is 12.1mm and 6mm str...
Python
UTF-8
298
3.03125
3
[]
no_license
# -*- coding: utf-8 -*- S = list(input()) K = int(input()) for i in range(len(S)): if S[i] == 'a': continue d = ord('z') - ord(S[i]) + 1 if K >= d: S[i] = 'a' K -= d # print(K, d) if K > 0: j = ord(S[-1]) + K % 26 S[-1] = chr(j) print(''.join(S))
Java
UTF-8
594
2.140625
2
[]
no_license
package com.example.quitquick; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentPagerAdapter; public class SliderPagerAdapter extends FragmentPagerAdapter { public SliderPagerAdapter(@NonNull FragmentManag...
PHP
UTF-8
738
2.765625
3
[ "MIT" ]
permissive
<?php require_once 'validador_acesso.php'; // Para recuperar os dados obtidos via requisição http inseridos na url de valida_login, é bem simples, basta: /* echo $_GET['email']; echo "<br>"; echo $_GET['senha']; echo "<pre>"; print_r($_GET); echo "</pre>"; */ /* echo "<pre>"; print_r($usuarios_app); ech...
Ruby
UTF-8
912
3.5625
4
[]
no_license
# method removed:)- class Double @@methods_removed = [] def self.methods_removed @@methods_removed end def self.method_removed(name) p @@methods_removed << name end def happie end def birthday end end p Double.new.self.method_removed(progton) # singleton method:)- class Extra @@...
Java
UTF-8
7,808
2.421875
2
[]
no_license
package internet.smtp; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.InetSocketAddress; import java.net.Socket; import java.util.List; import javax.net.ssl.SSLException; import javax.net.ss...
Python
UTF-8
382
2.640625
3
[]
no_license
from abc import ABC, abstractmethod import pandas as pd class DataSource(ABC): @abstractmethod def get_features(self) -> pd.DataFrame: """ Gets the features for the dataset """ pass @abstractmethod def get_label(self) -> pd.Series: """ Gets...
Python
UTF-8
275
2.984375
3
[]
no_license
for tc in range(1, int(input())+1): s = [input() for _ in range(5)] l = [len(i) for i in s] ml = max(l) temp = "" for c in range(ml): for r in range(5): if l[r] > c: temp += s[r][c] print("#{} {}".format(tc, temp))
Java
UTF-8
4,387
2.984375
3
[]
no_license
package edu.upenn.cis.cis455.crawler.info; import edu.upenn.cis.cis455.crawler.queue.ReadyQueueInstance; import java.io.Serializable; import java.net.MalformedURLException; import java.net.URL; public class URLInfo implements Serializable { private String hostName; private int portNo; private String file...
Java
UTF-8
4,309
2.546875
3
[]
no_license
package control; import com.google.gson.*; import comm.*; import javafx.application.Platform; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.control.*; import model.*; import view.PlayerWindow; import comm.Receptor.OnMessageListener; public class PlayerController implements OnM...
Python
UTF-8
271
3.78125
4
[]
no_license
# saludo1 = "hello" # print (saludo) # print("hola") saludo = input("escribe un saludo: ") print(saludo) age = input("ingresa tu edad: ") # age = int(input("ingresa tu edad: ")) tambien puede ser asi para convertir el dato en int new_age = int(age) + 50 print(new_age)
Java
UTF-8
1,310
2.3125
2
[]
no_license
package com.shape100.gym.adapter; import android.annotation.SuppressLint; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import com.shape100...
TypeScript
UTF-8
334
2.59375
3
[]
no_license
export interface Ratio { diameters: Diameter[]; kind: string; _id: string; value: number; widthId: string; } export interface Diameter { ratios?: Ratio[]; kind: string; _id: string; value: number; ratioId?: string; } export interface Width { ratios?: Ratio[]; kind: string; _id: string; val...
Java
UTF-8
1,640
2.6875
3
[]
no_license
package com.cookandroid.mobileprogramming; import java.util.Calendar; import java.util.GregorianCalendar; import android.app.Activity; import android.app.DatePickerDialog; import android.os.Bundle; import android.view.View; import android.widget.DatePicker; import android.widget.TextView; public class Main...
Java
UTF-8
7,276
2.671875
3
[]
no_license
package com.crtvu.dto; public class FinalPoint { private int id; private String name; private int mid; private int year; private double point; private double point1; private double point11; private double point12; private double point13; private double point14; private doubl...
SQL
UTF-8
415
3.609375
4
[]
no_license
create table doc_tag ( doc_id bigint not null, tag_id bigint not null, primary key (doc_id, tag_id) ) engine=InnoDB; create table tag ( id bigint not null, value varchar(255), primary key (id) ) engine=InnoDB; alter table doc_tag add constraint doc_tag_fk_tag foreign key (tag_id) references tag (id...
C#
UTF-8
20,627
2.84375
3
[ "MIT" ]
permissive
using System; using System.Linq; using Xunit; namespace VersionTools.Lib.Test { public class SemverTest { public class Parse_method { [Fact] public void should_parse_a_normal_version_without_prerelease_and_build_info() { var semver = Semver.Parse("1.2.3"); ...
Python
UTF-8
172
3.71875
4
[]
no_license
C_temperature = float(input("섭씨 온도를 입력해주세요: ")) F_temperature = C_temperature * 9/5 + 32 print("화씨 온도는 ", F_temperature, "입니다.")
Python
UTF-8
691
2.53125
3
[]
no_license
import pandas as pd import plotly import plotly.graph_objs as go def multiDScatterPlot(): col_list = ["age", "freetime", "goout", "studytime"] data = pd.read_csv("student-mat.csv", usecols=col_list) markercolor = data['age'] figure = go.Scatter3d(x=data['freetime'], y=data['goout'], z=data['study...
Java
UTF-8
1,856
2.1875
2
[]
no_license
package edu.multi.member; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @Controller public class Membe...
Java
UTF-8
12,393
2.1875
2
[]
no_license
package com.development.georgemcl.binaryapp; import android.content.Context; import android.content.SharedPreferences; import android.graphics.Color; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.FloatingActionButton; import android.support.v4.app.Fragment;...
Markdown
UTF-8
1,890
2.6875
3
[]
no_license
--- layout: gym title: Gym permalink: /gym/ hero-banner: media: video: image: /assets/image/gym-hero.jpg title: In Struggle There's Growth description: cta: text: link: row-banner: image: /assets/image/gym-row.jpg title: Our Gym description: Level Ground M...
C++
UTF-8
567
3.09375
3
[]
no_license
#ifndef DEQUE_H #define DEQUE_H #include <string> struct deque { struct iterator { }; struct const_iterator { }; deque(); deque(deque const& other); deque& operator=(deque const& other); size_t size() const; bool empty() const; void clear(); std::string& back(); std::string const& back() const; ...
TypeScript
UTF-8
678
2.75
3
[]
no_license
import { Action, ActionReducer } from '@ngrx/store'; import { State } from './state'; import { TransferStateAction } from './state-transfer.actions'; export function stateTransferReducer (reducer: ActionReducer<State>): ActionReducer<State> { return function (state: State, action: Action) { if (action.typ...
Java
UTF-8
11,045
2.78125
3
[]
no_license
package gameplay; import controllers.ControllerGroup; import controllers.character.VillainController; import helpers.Directions; import helpers.GeneralHelpers; import helpers.TextColors; import models.artefact.Artefact; import models.character.villains.Villain; import models.character.villains.VillainClass; import mod...
C
UTF-8
1,331
4.0625
4
[]
no_license
/*Escreva uma especificação de tipos abstratos de dados (TAD) para os números complexos, a + bi, onde abs(a + bi) => sqrt(a^2 + b^2) (a + bi) + (c + di) => (a + c) + (b + d)i (a + bi) * (c + di) => (a * c – b * d) + (a * d + b * c)i –(a + bi) => (-a) + (-b)i. */ #include <stdio.h>...