language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
Java
UTF-8
463
2.46875
2
[]
no_license
package br.edu.opi.manager.office_io.exceptions; import br.edu.opi.manager.project_patterns.exceptions.ConflictsRuntimeException; public class CreateFileRuntimeException extends ConflictsRuntimeException { public CreateFileRuntimeException() { super("Não foi possível gerar arquivo no momento: disco temporário che...
Markdown
UTF-8
445
2.90625
3
[]
no_license
--- title: js中 整数、浮点数的范围 date: 2016-07-17 23:00:14 tags: - JS --- 浮点数范围: ``` as large as ±1.7976931348623157 × 10的308次方 as small as ±5 × 10的−324次方 ``` 精确整数范围: ``` The JavaScript number format allows you to exactly represent all integers between −9007199254740992 and 9007199254740992 (即正负2的53次方) ``` 数组索引还有位操作: ```...
Python
UTF-8
4,326
2.90625
3
[]
no_license
import csv from counter import Counter from pprint import pprint def group_by_country(list_of_dicts): result = {} for input_dict in list_of_dicts: cc = input_dict['Country Code'] if cc not in result.keys(): result.update({cc : {input_dict['Indicator Name'] : input_dict}}) e...
Python
UTF-8
837
2.921875
3
[]
no_license
import time import pyautogui pyautogui.FAILSAFE= False import turtle turtle.setworldcoordinates(0, -1080, 1920, 0) turtle.speed(3) turtle.pensize(15) turtle.color("#44ebb6") turtle.st() turtle.shape("square") def chaap(): turtle.down() def no_chaap(): turtle.up() def bhaga_turtle(x,y): x*=1920/88 ...
Java
UTF-8
542
2.109375
2
[]
no_license
package com.login; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class DeleteServlet extends HttpServlet { protected void doGet(HttpServletRequest ...
SQL
UTF-8
3,348
3.40625
3
[]
no_license
CREATE TABLE core.dd_documents ( id uuid DEFAULT public.uuid_generate_v4() NOT NULL, c_first_name text, c_last_name text, c_middle_name text, d_birthday date, c_city_reg text, c_street_reg text, c_house_reg text, c_premise_reg text, c_city_life text, c_street_life text, c_house_life text, c_premise_life te...
Python
UTF-8
874
4.1875
4
[]
no_license
#!/usr/bin/python3 """ Modulo for determing if a coordenate belong to an area """ def check_interval(value, interval): "check if value is in the interval" return value >= interval[0] and value <= interval[1] def create_interval(value, dimension): "create a list of coordenates" dimension /= 2 ret...
Markdown
UTF-8
3,723
2.625
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: Azure Maps에서 확대/축소 수준 및 타일 그리드 | Microsoft Docs description: Azure Maps에서 확대/축소 수준 및 타일 그리드에 대해 알아봅니다. services: azure-maps keywords: '' author: jinzh-azureiot ms.author: jinzh ms.date: 05/07/2018 ms.topic: article ms.service: azure-maps documentationcenter: '' manager: timlt ms.devlang: na ms.cu...
C++
UTF-8
18,422
2.5625
3
[ "MIT" ]
permissive
#include "gamemodel.h" GameModel::GameModel(QObject *parent) : QObject(parent) { isBookOpened = false; meetNpc = 0; player = std::make_shared<Player>(); map = std::make_shared<GameMap>(); database.connect("data"); database.loadMap(map); database.loadPlayer(pl...
C#
UTF-8
2,916
2.84375
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; using AuiSpaceGame.Model; namespace AuiSpaceGame.Model { public class Asteroid : Animation, INotifyPropertyChanged { private double speed; private do...
Java
UTF-8
469
1.953125
2
[]
no_license
package by.it.akhmelev.project06.java.conrollers; import by.it.akhmelev.project06.java.beans.Ad; import by.it.akhmelev.project06.java.dao.Dao; import javax.servlet.http.HttpServletRequest; import java.util.List; public class CmdIndex extends Cmd { @Override public Cmd execute(HttpServletRequest req) throws E...
C
UTF-8
928
3.046875
3
[]
no_license
/* ** check_numbers.c for checks of numbers in /home/pab/Documents/PSU_2015_navy_bootstrap/ex_2 ** ** Made by Pablo Berenguel ** Login <pablo.berenguel@epitech.net> ** ** Started on Wed Feb 3 09:15:36 2016 Pablo Berenguel ** Last update Wed Feb 3 14:33:18 2016 Pablo Berenguel */ #include <stdlib.h> #include "./...
PHP
UTF-8
853
2.8125
3
[]
no_license
<?php /** * Created by PhpStorm. * User: david * Date: 29/08/2018 * Time: 11:42 */ namespace Tests\AppBundle\Service; use AppBundle\Service\Slugger; use PHPUnit\Framework\TestCase; class SluggerTest extends TestCase //Test { public function testSlugify() { // Test avec minuscules $slugge...
Python
UTF-8
377
3.015625
3
[]
no_license
import math def solve(N, S, K): visited = set() now = S ans = 0 while now not in visited: print(now) if now == 0: return ans visited.add(now) delta = math.ceil((N - now) / K) ans += delta now = (now + delta * K) % N return -1 T = int(input()) for _ in range(T): N, S, K = (...
Python
UTF-8
562
2.921875
3
[ "MIT" ]
permissive
import sys sys.path.append('./strategies') from pairsClasses import Dealer from pairsClasses import SimpletonStrategy from alexStrategies import FixFoldStrategy from alexStrategies import RatioFoldStrategy PLAYERS = 2 for N in range(22,33,2): print("N = "+str(N)) losses = [0]*PLAYERS for i in range(10000...
Java
UTF-8
266
1.6875
2
[ "MIT" ]
permissive
package io.github.mikolasan.petprojectnavigator; import android.view.View; interface PetDialogListener { // you can define any parameter as per your requirement void techCallback(View view, String result); void typeCallback(View view, String result); }
PHP
UTF-8
2,460
2.734375
3
[ "MIT" ]
permissive
<?php namespace Omneo\Concerns; use Omneo; use Illuminate\Support\Arr; use GuzzleHttp\Psr7\Response; use Illuminate\Support\Collection; trait MutatesResponses { /** * Transform the given entity with the given transformer. * * @param array $data * @param string|callable $transformer *...
Ruby
UTF-8
941
3.203125
3
[]
no_license
require 'open-uri' require 'json' class GamesController < ApplicationController def new @grid = generate_grid(10) end def score @result = '' word = params[:word] if letters_found_in_grid?(word, params[:grid]) @result = english_word?(word) ? 'valid word' : 'not english' else @resu...
Java
UTF-8
753
2.203125
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 controllers; import daos.StatusDAO; import java.sql.Connection; import java.util.List; /** * * @author BINTANG...
Python
UTF-8
187
3.5
4
[]
no_license
a=int(input("please enter first number")) b=int(input("please enter second number")) def sub(a,b): return a-b def multiply(a,b): return a*b print(sub(a,b)) print(multiply(a,b))
Python
UTF-8
3,258
2.578125
3
[]
no_license
import pygame import os import threading from properties import * from widgets import widget___tiled_map from threading import Thread from sprites.sprite import Sprite from sprites.sprite___deer import DeerSprite from sprites.sprite___wolf import WolfSprite from sprites.sprite____eagle import EagleSprite from sprites.s...
C++
UTF-8
16,429
2.625
3
[]
no_license
#ifndef __PCL_LIST_H__ #define __PCL_LIST_H__ #ifndef __PCL_H__ # error Do not include this file directly. Include "PCL.h" instead #endif ///! //*!===========================================================================! //*! PCL stands for Portable Class Library and is designed for development //*! of app...
Java
UTF-8
441
2.390625
2
[]
no_license
package cn.wsg.oj.leetcode.problems.p1600; import cn.wsg.oj.leetcode.problems.base.Solution; /** * 1691. Maximum Height by Stacking Cuboids (HARD) * * @author Kingen * @see <a href="https://leetcode-cn.com/problems/maximum-height-by-stacking-cuboids/">Maximum * Height by Stacking Cuboids </a> */ public class S...
Java
UTF-8
1,255
2.28125
2
[ "Apache-2.0" ]
permissive
/** * Copyright 2019 The JoyQueue Authors. * * 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...
Java
UTF-8
19,003
1.539063
2
[]
no_license
/* * Copyright (c) 2005-2011 Grameen Foundation USA * All rights reserved. * * 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 ...
JavaScript
UTF-8
2,899
2.546875
3
[ "MIT" ]
permissive
/** * Implement Gatsby's Node APIs in this file. * * See: https://www.gatsbyjs.org/docs/node-apis/ */ // You can delete this file if you're not using it // exports.onCreateNode = ({ node, getNode }) => { // // console.log('node -> ', node); // const fileNode = getNode(node.parent) // if (fileNode) // ...
Java
UTF-8
874
4
4
[]
no_license
package com.java.learning.leetcode.problems.sortlist.maximumgap; import java.util.Arrays; /** * https://leetcode-cn.com/problems/maximum-gap/ * 给定一个无序的数组,找出数组在排序之后,相邻元素之间最大的差值。 * <p> * 如果数组元素个数小于 2,则返回 0。 */ public class Solution1 { public int maximumGap(int[] nums) { int length = nums.le...
JavaScript
UTF-8
20,088
2.625
3
[]
no_license
// Core JQuery and Angular file // Global variables var geolocation; // Location based on the user's IP address var allCurrInfo; // The current JSON data returned by the Ticketmaster API var months = {"1": "January", "2": "February", "3": "March", "4": "April", "5": "May", "6": "June", "7": "July", "8": ...
Java
UTF-8
426
2.796875
3
[]
no_license
package com.jda.Algorithmprograms; import com.jda.utility.Utility; /** * @author 1022279 * */ public class MergeSort { /** * @param args */ public static void main(String[] args) { Utility utility = new Utility(); String[] arr = utility.getStringArray(); int low =0; int high = arr.length-1; utility...
C++
UTF-8
372
3
3
[]
no_license
#include "memath.h" #include <iostream> #include <string> using namespace std; //memath::memath() //{ // cout << "This is a constructor"<<endl; //}; memath::addition(int a, int b){ return a +b; }; memath::multiplication(int a, int b){ return a*b; }; memath::division(int a, int b){ return a/b; }; me...
C#
UTF-8
4,334
3.046875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Movilway.Cache { public interface ICache { /// <summary> /// Agrega el Objeto en cache /// </summary> /// <typeparam name="T"></typeparam> /// <...
PHP
UTF-8
542
3.015625
3
[]
no_license
<!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <title></title> <!-- passare come argomento in GET una mail e stampare un div che contenga OK se contiene un punto e una chiocciola; KO altrimenti --> <?php $mail = $_GET['mail'] ; $dot = strpos($mail, '.'); ...
PHP
UTF-8
2,049
2.859375
3
[]
no_license
<?php /* * 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. */ /** * Description of clsTratamiento * * @author Dell */ class clsTratamiento extends Conexion { //put your code h...
Python
UTF-8
827
2.984375
3
[]
no_license
from collections import defaultdict, deque def read_int(): return int(input().strip()) def read_ints(): return list(map(int, input().strip().split(' '))) def solve(): N, M = read_ints() out_degree = [0]*N max_path = [0]*N G = defaultdict(list) for _ in range(M): x, y = read_int...
JavaScript
UTF-8
739
4.1875
4
[]
no_license
// find the wealthiest person from a 2d array and return a string with index and amount function findWealthiestPerson(arr){ let amount; let resultIndex; for(let i=0; i<arr.length; i++){ let currentAmountValue = 0; for(let j=0; j<arr[i].length; j++){ currentAmountValue += arr[i][...
PHP
UTF-8
2,790
2.828125
3
[]
no_license
<?php namespace App\Command; use App\Enumerator\UserRoles; use App\Repository\UserRepository; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component...
C++
UTF-8
1,766
2.859375
3
[ "MIT" ]
permissive
#pragma once #include <string> #include <vector> #include <memory> #include <unordered_map> #include "../io/io_writer.h" namespace cminus::logic{ struct runtime; } namespace cminus::logic::naming{ class parent; class object{ public: virtual ~object() = default; virtual parent *get_naming_parent() const = ...
Python
UTF-8
329
3.015625
3
[]
no_license
#!/usr/bin/env python3 def main(): count=0 inputList = [ int(input()) for i in range(4) ] for i in range(inputList[0]+1): for j in range(inputList[1]+1): if 0 <= (inputList[3]-(500*i+100*j))/50 <= inputList[2]: count=count+1 print(count) if __name__ == '__main__': ...
TypeScript
UTF-8
1,229
2.5625
3
[]
no_license
import { PersonasService } from '../../personas.service'; import { Persona } from '../../persona.model'; import { Component, OnInit } from '@angular/core'; import { LoggingService } from '../../LoggingService.service'; @Component({ selector: 'app-formulario', templateUrl: './formulario.component.html', styleUrls...
Markdown
UTF-8
1,993
3.21875
3
[]
no_license
# Production Problem 10: A/B Testing on the Cheap ## The Problem Locate an interface component on a website that you use frequently that you think could be improved. The improvement should be minor. Take a screenshot of the interface on both a mobile and desktop device. Then, sketch or illustrate your alternate/"b" ...
Java
UTF-8
1,661
2.46875
2
[]
no_license
package com.byheetech.freecall; import android.content.Intent; import android.os.CountDownTimer; import com.byheetech.freecall.activity.MainActivity; import com.byheetech.freecall.base.BaseActivity; public class WelcomeActivity extends BaseActivity { private MyCountDownTimer timer; @Override protected v...
Markdown
UTF-8
785
3.28125
3
[ "MIT" ]
permissive
# 5.5 [Break 与 continue](https://github.com/Unknwon/the-way-to-go_ZH_CN/blob/master/eBook/05.5.md) `break` 语句退出循环。 一个 break 的作用范围为该语句出现后的最内部的结构,它可以被用于任何形式的 for 循环(计数器、条件判断等)。 但在 switch 或 select 语句中(详见第 13 章),break 语句的作用结果是跳过整个代码块,执行后续的代码。 关键字 `continue` 忽略剩余的循环体而直接进入下一次循环的过程,但不是无条件执行下一次循环,执行之前依旧需要满足循环的判断条件。 另外,关键字...
Shell
UTF-8
124
2.59375
3
[]
no_license
#!/bin/bash #comment out specific lines in a file echo "Enter filename:" read file sed -i '1,2 s/^/#/' $file cat $file
TypeScript
UTF-8
222
3.140625
3
[]
no_license
/** * Generate a random value between the two values provided */ export default function getRandomValue(min: number, max: number) { var difference = Math.abs(max - min); return Math.random() * difference + min; }
Markdown
UTF-8
1,546
3.28125
3
[ "Apache-2.0", "MIT" ]
permissive
# Types In PHP, data is stored in containers called zvals (zend values). Internally, these are effectively tagged unions (enums in Rust) without the safety that Rust introduces. Passing data between Rust and PHP requires the data to become a zval. This is done through two traits: `FromZval` and `IntoZval`. These trait...
C#
UTF-8
13,151
2.859375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Security.Cryptography; using System.IO; namespace Common.Security { /// <summary> /// Component handles encryption request specifically dealing with private key encryptions ///...
Python
UTF-8
6,476
3.78125
4
[]
no_license
''' Menu Padronizado. Função Cria menu com título, lista de submenus, lista de controles, explicação do menu ''' def menu(titulo: str = 'Insira o título deste menu'.title().upper(), lista_de_itens_submenus: list = [], lista_itens_controle: list = [], explicar: bool = True, explicacao: str = 'Informe...
Python
UTF-8
8,214
2.671875
3
[]
no_license
import copy from torch.nn import functional as F from torch.nn.modules.module import Module from torch.nn.modules.activation import MultiheadAttention from torch.nn.modules import LayerNorm class TransformerModel_Encoder(nn.Module): def __init__(self, ninp, nhead, nhid, nlayers, dropout=0.5,mask_future=False)...
C++
UTF-8
293
2.59375
3
[]
no_license
#include<stdio.h> #include<math.h> #include<string.h> #include<stdlib.h> #include<ctype.h> #include<time.h> int main() { unsigned long long num,sum; while(scanf("%llu",&num) == 1) { num = num + 1; sum = (num * num) / 2; sum = (sum - 3) * 3; printf("%llu\n",sum); } return 0; }
Python
UTF-8
230
2.984375
3
[]
no_license
from sys import argv script_name, first, second, third = argv print "The script is called: ", script_name print "Your first variable is: ", first print "Your second variable is: ", second print "Your third variable is: ", third
C
UTF-8
245
2.859375
3
[]
no_license
/*************************************** #Name : Return_Negative #Author : Luis Teixeira #Date : 29-11-2018 #E-Mail : filipe.teixeira.996@gmail.com *************************************************/ int makeNegative(int num) { return num > 0 ? num*(-1) : num; }
Java
UTF-8
6,672
2.578125
3
[]
no_license
package com.parkinglot; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import javax.websocket.server.PathParam; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.web.bind.annotation.GetM...
PHP
UTF-8
1,165
2.515625
3
[]
no_license
<?php include'/customers/9/3/c/battlelegends.fr/httpd.www/db/config.php'; /* PAGINATOR */ $sql2 = "SELECT COUNT(id) AS nbUsers FROM a_users"; $requsers = mysql_query($sql2) or die('Erreur SQL !<br />' . $sql2 . '<br />' . mysql_error()); $dataUsers = mysql_fetch_assoc($requsers); if (isset($_GET['p'])) { $cPage =...
Java
UTF-8
2,662
2.078125
2
[]
no_license
/** * Proyecto: IMSS - SSDC * * Archivo: CursoEntity.java * * Creado: Oct 13, 2011 * * Derechos Reservados de copia (c) - INAP / * * Instituto Mexicano del Seguro Social - 2011 */ package mx.gob.imss.cia.ssdc.cdv.integracion.entity; import java.io.Serializable; import java.util.List; imp...
Java
UTF-8
903
2.359375
2
[]
no_license
package com.example.demospringsecurity.account; import lombok.RequiredArgsConstructor; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.stereotype.Component; @Component @RequiredArgsConstructor public class AccountSupport implements Ap...
Java
UTF-8
3,205
3.53125
4
[]
no_license
package com.charles.graph; import java.util.ArrayList; import java.util.List; /** * * @author charleszuo@126.com * 图的邻接矩阵表示法 */ public class MatrixGraph { private String[] vertexs; private int[][] edges; private int numVertex; public static int INFINITY = 65535; private boolean[] visited; public ...
Java
UTF-8
328
2.328125
2
[]
no_license
package dao.definitions; import java.util.List; import model.Reaction; public interface ReactionDAO { public Reaction find(Integer id); public List<Reaction> list(); public void create(Reaction entity); public void update(Integer id, Reaction entity); public boolean remove(Integer id); ...
Java
UTF-8
4,887
2.390625
2
[]
no_license
package groovyjarjarantlr; import groovyjarjarantlr.ASdebug.IASDebugStream; import groovyjarjarantlr.collections.impl.BitSet; import java.util.Comparator; import java.util.List; import java.util.Map; public class TokenStreamRewriteEngine implements IASDebugStream, TokenStream { protected Map DW; protected int...
Java
UTF-8
651
1.703125
2
[]
no_license
package org.renhj.blog.mapper; import org.junit.Test; import org.renhj.blog.BlogApplicationTests; import org.renhj.blog.pojo.entity.PostEntity; import org.renhj.blog.pojo.vo.BlogsVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; imp...
C++
UTF-8
865
3.765625
4
[ "MIT" ]
permissive
// Pattern #include <iostream> using namespace std; int main() { int n, i, no; cin >> n; int row = 1; while (row <= n) { // 1. print spaces n-row times i = 1; while (i <= n - row) { cout << ' '; // Printing space i = i + 1; } ...
JavaScript
UTF-8
2,263
2.71875
3
[]
no_license
import React, { Fragment } from 'react'; class List extends React.Component { state = { isEdit: false, newData: { name: "", gender: "" }, } toggleRow = () => { var isEdit = this.state.isEdit this.setState({ isEdit: !isEdit }, console.log(isEdit)) } ...
Python
UTF-8
2,562
2.796875
3
[ "MIT" ]
permissive
# coding=utf-8 # # created by kpe on 09.Aug.2019 at 15:26 # from __future__ import absolute_import, division, print_function import os import re from urllib import request from urllib.request import urlretrieve from tqdm import tqdm def fetch_url(url, fetch_dir, check_content_length=False): """ Downloads ...
C#
UTF-8
8,288
2.625
3
[]
no_license
using System.Collections.Generic; using System.Linq; namespace UserApi.Domain.Aggregates.Users { public class User : Framework.Domain.SeedWork.AggregateRoot { #region Static Member(s) public static Framework.Result<User> Create (string username, string password, string emai...
C
UTF-8
2,644
2.890625
3
[]
no_license
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
JavaScript
UTF-8
614
2.953125
3
[]
no_license
function anyUserFieldContainsSearch(user, search) { const searchLower = search.toLowerCase() return ['name', 'surname', 'region', 'email', 'phone'].some(field => user[field].toLowerCase().includes(searchLower)) } function sortByField(a, b, {field, ascending}) { const ascendingMultiplier = ascending ? 1 : -1 re...
Go
UTF-8
793
3.421875
3
[]
no_license
package main import ( "bytes" "fmt" "strconv" "math" ) func main() { fmt.Println(byte()) } func reverse(x int) int { if x==0{ return 0 } if x<0 { num, err :=strconv.ParseInt(reverseStr(strconv.Itoa(-x)), 10, 64) if err!=nil{ return 0 } if num > math.MaxInt32{ return 0 } return -int(num) ...
Python
UTF-8
185
2.734375
3
[]
no_license
def minSubsequence(nums): nums.sort(reverse=True) tot, s = sum(nums), 0 for i, num in enumerate(nums): s += num if s > tot - s: return nums[:i+1]
C#
UTF-8
5,549
2.734375
3
[]
no_license
using System; using System.Diagnostics; using System.Net.Sockets; using System.Runtime.Serialization.Formatters.Binary; using System.Threading; using System.Threading.Tasks; using PostOffice; namespace ChatProject { public class TcpClientWrapper { #region Variables and Declarations private re...
PHP
UTF-8
1,243
2.765625
3
[]
no_license
<?php /** * Created by PhpStorm. * User: Yacine * Date: 01/11/2017 * Time: 23:46 */ namespace app\models; class MaladieChronique { private $idMaladie; private $maladie; private $patient; private $medecin; /** * @return int */ public function getIdMaladie() { return $...
C#
UTF-8
1,355
3.03125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; namespace DDD { public class MessageBus : IMessageBus { private readonly List<Route> routes = new List<Route>(); public void Publish(object message) { var messageType = message.GetType(); var ro...
Python
UTF-8
1,087
2.609375
3
[]
no_license
from flask import Flask from flask import abort from flask import render_template import data from work_with_data import sorted_hotels_by_price from work_with_data import get_tours_by_departure app = Flask(__name__) @app.route('/') def main(): hotels_by_price = sorted_hotels_by_price(data.tours) return ...
JavaScript
UTF-8
472
3.3125
3
[]
no_license
class food{ constructor(game) { this.game = game; this.x = 0; this.y = 0; this.grid = 20; this.update(); this.draw() } update(){ this.x = (Math.floor(Math.random() * (19 - 0)))*this.grid; this.y = (Math.floor(Math.random() * (19 - 0)))*this.gr...
Go
UTF-8
427
3.921875
4
[]
no_license
package main import "fmt" func add(x int, y int) int { return x + y } func multiply(x, y int) int { return x * y } // Multiple Results func swap(x, y string) (string, string) { return y, x } // Named return values func split(sum int) (x, y int) { x = sum * 4 / 9 y = sum - x return } func main() { fmt.Print...
Python
UTF-8
435
3.5
4
[]
no_license
import math def PegarEntrada(plano, coordenada): return float(input("Forneça a coordenada {} para o Plano {}: ".format(coordenada, plano))) planoA = PegarEntrada("A", "X"), PegarEntrada("A", "Y") planoB = PegarEntrada("B", "X"), PegarEntrada("B", "Y") preCalculo = (planoA[0]-planoB[0])**2 + (planoA[1]-planoB[1])...
Python
UTF-8
5,566
2.9375
3
[]
no_license
from scipy.optimize import leastsq, curve_fit from qchem_pytools import figure_settings import numpy as np import pandas as pd class leastsq_object: def __init__(self): print("Usage: specify model function as leastsq_object.model") print("The model should have parameters as an n-tuple, fo...
JavaScript
UTF-8
1,495
2.6875
3
[ "MIT" ]
permissive
const getGeometryFromImportedData = (data) =>{ if(data === undefined) return undefined; const parsedData = JSON.parse(data); if(parsedData === undefined) return undefined; if(parsedData.entities === undefined) return undefined; let geometry = []; for(let i=0; i<parsedData.entities.length; i++){...
Python
UTF-8
1,194
4.5
4
[]
no_license
# In this lets see about "Set Operations" in Python. # Python provides certain set Operation which is avaliable in mathematics such as # 1) union # 2) intersection # 3) difference # 4) symmetric difference # In this lets see about "intersection of two set" # The intersection of the two sets is give...
Swift
UTF-8
2,276
2.6875
3
[]
no_license
// // ClientService.swift // Foodly // // Created by Decagon on 6/8/21. // import Foundation import FirebaseAuth import FirebaseFirestore class Client { private init() {} static let shared = Client() func createUser<T: Encodable>(for encodableObject: T, in collect...
Java
UTF-8
725
2.65625
3
[]
no_license
import java.io.*; public class Test { public static void main(String args[]) throws IOException { String serverIP = "pyrite-n3"; if (args.length != 0) { serverIP = args[0]; // the ip from user input } /* c_int c = new c_int(); c.setValue(14); System.out.println(c.getValue()); System.o...
Java
UTF-8
2,017
3.0625
3
[]
no_license
package io.github.nosequel.aimbot.command; import io.github.nosequel.aimbot.AimbotHandler; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; public class AimbotC...
C#
UTF-8
1,229
2.65625
3
[]
no_license
using System.Collections.Generic; using Microsoft.AspNetCore.Mvc; using System; using System.Threading.Tasks; using DropdownApi.Data; using DropdownApi.Models; namespace DropdownApi.Controllers { [Route("api/[controller]")] [ApiController] public class Controller : ControllerBase { priva...
Java
UTF-8
1,185
2.5
2
[]
no_license
package br.com.nicolasg.DAO; import br.com.nicolasg.model.Usuario; import br.com.nicolasg.services.Conexao; import com.mysql.jdbc.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.logging.Level; import java.util.logging.Logger; //NES...
Java
UTF-8
831
2.078125
2
[]
no_license
package com.veritas.soft.controller; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; ...
Java
UTF-8
173
1.804688
2
[]
no_license
package com.agente; public class Actuador { public Actuador() { } public void mover(String origen, String destino) { } public void animar(int id) { } }
JavaScript
UTF-8
1,543
3.25
3
[]
no_license
"use strict"; function bigNum( numberList ) { // input validation if ( !Array.isArray( numberList ) ) { return 'Pateikta netinkamo tipo reikšmė.' } if ( numberList.length === 0 ) { return 'Pateiktas sąrašas negali būti tuščias.'; } const size = numberList.length; let big = ...
JavaScript
UTF-8
207
2.71875
3
[]
no_license
function Mostrar() { var clave = prompt("ingrese el número clave."); while( clave !="utn750") { clave=prompt("No es corrcta.Ingrese la clave."); } alert("la clave es correcta"); }//FIN DE LA FUNCIÓN
JavaScript
UTF-8
759
3.765625
4
[]
no_license
// Selektiere das Audio-Element und der Button let audio = document.querySelector('#yeah-audio'); let button = document.querySelector('#play-button'); // Füge einen Event-Listener hinzu, welcher auf den 'click'-Event hört button.addEventListener('click', playButton) // Definiere eine Funktion, welche beim Button-Klic...
C#
UTF-8
2,668
3.0625
3
[]
no_license
namespace SoftUniRssFeed { using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Xml.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; public class SoftUniRssFe...
C#
UTF-8
3,846
3.5625
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace RPN { // Format daty w liczbie to dd.mmyyyy np 18.02.1992 -> 18.021992 public static class NumberToDateTimeConverter { #region Data public static DateTime? Number...
SQL
UTF-8
360
2.65625
3
[]
no_license
CREATE TABLE `comments` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `page_id` int(11) NOT NULL, `comment_guid` varchar(256) DEFAULT NULL, `comment_name` varchar(64) DEFAULT NULL, `comment_email` varchar(128) DEFAULT NULL, `comment_text` mediumtext, `comment_date` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KE...
Markdown
UTF-8
641
3
3
[]
no_license
# 100-Python-Projects-Basic-to-Advance- | Day | Project name | Concept covered | |-----|---------------------|----------------------| | 1 | [Band Name Generator](https://github.com/AlpeshGo/100-Python-Projects-Basic-to-Advance-/blob/main/Day-1%20Project%201.py) | String Concatenation | | 2 | [Bill Spl...
Go
UTF-8
1,485
3.046875
3
[]
no_license
// redis.go package redis import ( "fmt" "github.com/garyburd/redigo/redis" ) const ( host = "192.168.99.100:6379" // 主机:端口 auth = "123456" // auth 密码 db = 1 // 数据库 ) const ( conn_err = "Connection to redis error" auth_err = "Auth redis error" select_err = "Select redis...
SQL
UTF-8
4,799
2.859375
3
[]
no_license
declare v_cnt NUMBER; v_cnt_conv NUMBER; v_cnt_prod NUMBER; record_count_mismatch exception; begin for i in ( SELECT BAB_COMP_CODE, BAB_DEPT_CODE, BAB_ACC_CODE, BAB_BANK_CODE, BAB_ACC_PREFIX, BAB_ACC_NUMBER, BAB_CURR_CODE, BAB_FXGAIN_DEPT_CODE, BAB_FXGAIN_ACC_CODE, BAB_...
C++
UTF-8
459
2.71875
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { int n, t; cin >> n >> t; vector<char> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 0; i < t; i++) { int j = 0; while (j < n - 1) { if (a[...
Markdown
UTF-8
1,923
3.140625
3
[ "LicenseRef-scancode-public-domain" ]
permissive
# Development See the [README](standards/README.md) in the `standards` directory for information about coding standards. ## Branches Major branches: * `master`: Contains the production ready code. * **NEVER** commit into `master`. **ONLY** pull requests from the `dev` branch and urgent hotfixes can be merged into...
Java
UTF-8
568
2.015625
2
[]
no_license
package hu.elte.inf.nfzjwg.FamilyToDo.service; import java.util.List; import org.springframework.stereotype.Service; import org.springframework.beans.factory.annotation.Autowired; import hu.elte.inf.nfzjwg.FamilyToDo.repository.ToDoRepository; import hu.elte.inf.nfzjwg.FamilyToDo.model.ToDo;; @Service public class ...
JavaScript
UTF-8
569
2.6875
3
[ "Apache-2.0" ]
permissive
import fs from 'fs'; import lineReader from 'readline'; export class FileReader { processFile(filePath, callBack) { if(typeof filePath !== 'string') throw "filePath Must be a string" this.readFromFile(filePath, callBack); } readFromFile(filePath, callBack) { let reader = lin...
Java
UTF-8
525
1.953125
2
[]
no_license
package net.threader.guildplus.controller; import net.threader.guildplus.model.Guild; import net.threader.guildplus.model.Invite; import org.bukkit.entity.Player; import java.util.Optional; import java.util.Set; import java.util.UUID; public interface InviteController { Set<Invite> getInvites(); Set<Invite> ...
Markdown
UTF-8
1,193
2.640625
3
[]
no_license
# Описание Вам предстоит выполнить несколько задач, которые распределены на 2 модуля `simple` и `medium` в модуле `simple` 13 задач, в каждом модуле есть файл `README.md` где подробно описаны задачи и методика тестирования # Как начать Вам необходимо сделать форк: ![](doc/fork.png) этого репозитория, реализовать ф...
Python
UTF-8
1,194
2.5625
3
[]
no_license
import requests import json import server from eeg_data.eeg_utils import simulate_eeg nbest = 3 # localhost = 'http://localhost:5000' # choose a port path2eeg = 'eeg_data/EEGEvidence.txt-high' simulator = simulate_eeg(path2eeg) # init r = requests.post(localhost + '/init', json={'nbest': nbest}) print r.status_code ...