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
24,861
2.640625
3
[ "BSD-3-Clause" ]
permissive
#Auhtor: YP #Created: 2018-07-08 #Last updated: 2019-03-06 #A set of helper functions used by GPS that act as an interface between the redis database and the master and work processes of GPS. #The "cat format" is an update introcued on 2019-03-06. The format refers to taking in arrays of pts (the parameter point values...
Python
UTF-8
152
3.328125
3
[]
no_license
p1, p2 = list(map(int, input().split())) n = int(input()) p = p1 / p2 sum = 0 for i in range(5): sum += (1 - p) ** i * p print('{:.3f}'.format(sum))
C#
UTF-8
2,322
2.625
3
[]
no_license
using System; using System.Threading.Tasks; using Azure.Identity; using Azure.Messaging.ServiceBus; using Azure.Security.KeyVault.Secrets; namespace ServiceBusQueueSender { /** * ServiceBus namespace: namespacericopegnata * ServiceBus queue: queuericopegnata */ public class Program { ...
Python
UTF-8
943
3.234375
3
[]
no_license
#!/usr/bin/python import json import os srcPath = os.environ["cnf"] + "/" dstPath = os.environ["HOME"] + "/" def main(): jsonRaw = getJson() jsonParsed = json.loads(jsonRaw) for link in jsonParsed["symlinks"]: src = srcPath + link["src"] if "dst" in link: dst = dstPath + link["dst"] el...
C++
UTF-8
2,038
2.890625
3
[]
no_license
#include "Header.h" int main() { setlocale(LC_ALL, "ru"); SetConsoleCP(1251); SetConsoleOutputCP(1251); book a1("О дивный новый мир", 2016); book a2("О дивный новый мир", 2016); book a3("Три товарища", 2016); book a4("Мастер и Маргарита", 2012); book a5("Финансист", 2015); multimap<string,...
C#
UTF-8
939
2.96875
3
[]
no_license
using System.Collections; using System.Collections.Generic; public class TileNeighborPrereq : TilePrereq { //Building prereqbuilding; System.Type prereqNeighbbuildingType; int num = 0; public TileNeighborPrereq(System.Type buildinga, int howmany) { //prereqbuilding = buildinga; pre...
Java
UTF-8
3,583
2.09375
2
[ "Apache-2.0" ]
permissive
package com.yapp.ios1.service.bucket; import com.yapp.ios1.controller.dto.bucket.BucketRequestDto; import com.yapp.ios1.mapper.BucketMapper; import com.yapp.ios1.model.bucket.Bucket; import com.yapp.ios1.validator.BucketValidator; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.spri...
Java
UTF-8
183
1.515625
2
[]
no_license
package br.edu.ifms.lpivlaboratorio04; import org.springframework.data.jpa.repository.JpaRepository; public interface ClienteResource extends JpaRepository<Cliente,Integer>{ }
Java
UTF-8
1,911
2.265625
2
[]
no_license
package com.backend.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bi...
Markdown
UTF-8
943
2.578125
3
[]
no_license
# Single-Page Application ## Inicializando a aplicação local Para download do projeto utilize o seguinte comando via terminal bash: $ git clone https://github.com/jozemaria/todo-react.git > Feito o download do projeto, confirmar se o Node está instalando na máquina, utilizando o `node -v` e o `npm -v`, instala...
Markdown
UTF-8
5,707
2.625
3
[ "MIT", "LicenseRef-scancode-public-domain", "CC0-1.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
# `alto2txt`: Extract plain text from digital newspaper OCR scans *Version extract_text 0.3.4* ![GitHub](https://img.shields.io/github/license/Living-with-Machines/alto2txt) ![PyPI](https://img.shields.io/pypi/v/alto2txt) [![DOI](https://zenodo.org/badge/259340615.svg)](https://zenodo.org/badge/latestdoi/259340615) [...
C
UTF-8
3,439
2.671875
3
[ "MIT" ]
permissive
/****************************************************************************** FFTLog-and-Beyond https://github.com/xfangcosmo/FFTLog-and-beyond by Xiao Fang ******************************************************************************/ #include <stdlib.h> #include <math.h> #include <complex.h> #include "utils.h" ...
Python
UTF-8
1,052
2.96875
3
[]
no_license
# 러시아 국기 같은 깃발 import sys sys.stdin = open("4613_input.txt", "r") T = int(input()) for TC in range(1, T+1): N, M = map(int, input().split()) Flag = [list(input()) for _ in range(N)] # 변경 최소값은 모든 칸의 수보다는 작으므로 # 최소값의 초기화를 모든 칸의 수로 minV = N*M # 하얀색으로 변경 W_chg = 0 for w in range(N-2): ...
Python
UTF-8
3,615
2.96875
3
[]
no_license
import platform if platform.system()=='Darwin': from tkinter import * else: from Tkinter import * import random finestra = Tk() w=500 h=500 tela = Canvas(finestra,width=w,height=h) tela.pack() def _centro(c): return ( (c[0]+c[2])/2, (c[1]+c[3])/2 ) def _distanzaQ(p1,p2): return (p1[0]-p2[0])**2 + (p1[1]-p...
Java
UTF-8
3,909
2.734375
3
[ "BSD-3-Clause" ]
permissive
/* * NameAndEntryTypeSearcher.java * --------------------------------- * Copyright (c) 2020 * RESOLVE Software Research Group * School of Computing * Clemson University * All rights reserved. * --------------------------------- * This file is subject to the terms and conditions defined in * file 'LICENSE.txt'...
Rust
UTF-8
7,507
2.53125
3
[]
no_license
use sdl2::render::{Canvas, RenderTarget}; use sdl2::event::Event; use sdl2::keyboard::Keycode; use sdl2::pixels::Color; use sdl2::rect::Rect; use std::fs::File; use std::io::Read; use std::time::{Duration, Instant}; extern crate env_logger; extern crate log; use crate::chip8::Chip8; use log::debug; use std::env; exter...
C++
UTF-8
1,046
3.3125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int Arr[100005]; int root(int i) { while(Arr[ i ] != i) //chase parent of current element until it reaches root { i = Arr[ i ]; } return i; } /*modified union function where we connect the elements by c...
C++
UTF-8
804
2.515625
3
[]
no_license
/////////////////////////////////////////////////////////// // cSpeed.h // Implementation of the Class cSpeed // Created on: 05-May-2010 3:28:58 AM // Original author: shawn.mcginnis /////////////////////////////////////////////////////////// #if !defined(EA_DBB8DA43_62AF_434c_83B7_A9C6B975B2E8__INCLUD...
Python
UTF-8
1,731
3.53125
4
[]
no_license
# id name email # 1 Bob Smith, bsmith@hotmail.com # 2 Sue Jones, suej@yahoo.com # 3 Joe James, joejames@gmail.com # define field descriptions widths # pad field descriptions to make header printing less complex field_width = (3, 10, 18) field_desc = ("id".ljust(field_width[0]), "name".ljust(field_width[1]), "e...
Java
UTF-8
577
2.359375
2
[]
no_license
package com.java.utils; import java.util.Date; import com.java.contants.SecurityConstants; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; public class Utils { public Utils() {} public String generatedResetPasswordToken(String email) { Date now = new Date(); String token = Jwts.buil...
C++
UTF-8
497
3.46875
3
[]
no_license
#include "Circle.h" #include <iomanip> #include <iostream> #include <sstream> #include <string> using namespace std; Circle::Circle(const string& color, double inRadius) : Shape(color) { radius = inRadius; } double Circle::area() const { return 3.141592654 * (radius * radius); } string Circle::toString() const...
JavaScript
UTF-8
3,348
3.109375
3
[ "MIT" ]
permissive
import { hasRelationship } from './hasRelationship' import { hasLoadableRelationship } from './hasLoadableRelationship' import { hasLoadedRelationship } from './hasLoadedRelationship' import { listRelationship } from './listRelationship' import { loadRelationship } from './loadRelationship' import { getRelationship } f...
Markdown
UTF-8
2,326
3.859375
4
[]
no_license
# Abbreviation > [문제출처](https://www.hackerrank.com/challenges/abbr/problem) ## 문제 ``` You can perform the following operations on the string, : Capitalize zero or more of 's lowercase letters. Delete all of the remaining lowercase letters in . Given two strings, and , determine if it's possible to make equal to a...
Python
UTF-8
1,129
3.765625
4
[]
no_license
# basics_python #find the value of a, b, c in the given array such that they add up to give value equal to the given target(here 0) return the list of lists wherein each list #contains the value of set a, b, c . class Solution: def threeSum(self, nums: List[int]) -> List[List[int]]: result=[] num...
Python
UTF-8
8,685
2.59375
3
[]
no_license
# Epipolar Stereopsis # Alex Barnett, Spring 2019 # Code sourced from Dr. Peters import numpy as np import cv2 filename1 = './images/stereo_0.png' filename2 = './images/stereo_1.png' def orb_detector(img): # Initiate ORB detector orb = cv2.ORB_create() # Find the keypoints with ORB kp = orb.detect(...
Markdown
UTF-8
4,355
3.390625
3
[]
no_license
# evesim evesim is a toy program to experiment with the probability of a particular Mitochondrial DNA lineage dominating a population. ## What? Mitochondrial DNA is only passed from a mother to her children. If a mother has no children, or only a son, her mitochondrial DNA line dies with her. There's a relatively re...
C++
UTF-8
1,040
2.5625
3
[]
no_license
// // particle.cpp // leap_ver2 // // Created by yoji yamaura on 2013/08/05. // // #include "particle.h" #include "ofMain.h" // コンストラクタ particle::particle(){ setInitialCondition(0, 0); damping = 0.06f; } // void particle::resetForce(){ frc.set(0,0); } // void particle::addForce(float x, float y){ ...
Markdown
UTF-8
4,691
3.171875
3
[ "Apache-2.0" ]
permissive
# liblily 适用于`linux`的协程库,使用`boost.context``[1.70.0]`。 编译器至少需要支持`C++11`。 ## 主要特性 ### go 模拟golang的`go`: ```C++ int i1 = 1024; go([i1](int i2){ std::cout << i1 + i2 << std::endl; }); ``` ### channel 模拟golang的`chan`: 使用`operator<<`将数据送入`channel`,使用`operator()`取出数据,或使用`operator>>`取出数据并赋值给一个变量。 ```C++ auto ticker...
C#
UTF-8
1,258
2.859375
3
[]
no_license
using HotelOrigin.Core.Domain; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HotelOrigin.Core.Repository { public class CustomerRepository { private static ObservableCollection<Custome...
Java
UTF-8
480
3.578125
4
[]
no_license
package lesson21; import java.util.Scanner; public class WhileScanner { public static void main(String[] args) { Scanner input = new Scanner(System.in); int age; System.out.println("Сколько тебе лет? "); age = input.nextInt(); while (age >= 18) { System.out.pri...
Markdown
UTF-8
7,357
2.578125
3
[]
no_license
## JPEG-Nachfolger: Einführung in das sparsame Bildformat WebP > WebP will die Komprimierung und Optimierung der Bilder im Web revolutionieren: Bessere Qualität wie JPEGs in kleinerer Dateigröße verpackt. Technikaffine Web-Nutzer haben sicherlich von [WebP](http://de.wikipedia.org/wiki/WebP) gehört – ein von Google [...
C++
MacCentralEurope
1,467
3.96875
4
[]
no_license
#include <iostream> #include <string> #include <cctype> using namespace std; int main() { cout << "Enter words (q to quit): " << endl; string word; int number_of_vowels = 0; int number_of_consonants = 0; int number_of_other = 0; do { cin >> word; cin.get(); if ( isalpha(word[0]) ) { if ( word[0] == 'a'...
Java
UTF-8
2,363
2.34375
2
[]
no_license
package es.fjtorres.pruebas.juan.ejemplo.servicios.impl; import java.io.Serializable; import org.springframework.transaction.annotation.Transactional; import es.fjtorres.pruebas.juan.ejemplo.comun.PageWrapper; import es.fjtorres.pruebas.juan.ejemplo.persistencia.modelo.AbstractModel; import es.fjtorres.pruebas.juan....
C++
UTF-8
5,995
2.5625
3
[]
no_license
#include "Branch.h" #include "BranchRegister.h" #include "Git.h" #include "Lista.h" #include "CommitBag.h" #include "CommitGraph.h" #include "BFS.h" #include <iostream> using UBfs::RecorridoAnchura; using UGit::Branch; using UGit::Git; using UGit::GitEvent; using UndavList::List; using UGitCommitGraph:...
Java
UTF-8
6,710
2.046875
2
[]
no_license
package hu.unideb.smartcampus.service.api.impl; import java.sql.Timestamp; import java.time.DayOfWeek; import java.time.LocalDate; import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; import java.util.Set; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; impo...
Java
UTF-8
3,354
2.015625
2
[]
no_license
package com.kt.managermode.controller.system; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import com.kt.managermode.bean.ResultUtilBeanSingle; import com.kt.managermode.bean.system.ServerResponse; import c...
C++
UTF-8
6,370
2.546875
3
[]
no_license
#include "CNF.h" using namespace Minisat; bool calculate_vertex_cover(int vertices_num,std::vector<int> edge,int k,std::vector<int> &vertex_cover) { Solver S; Var propositions[vertices_num][k]; for(int i = 0;i < vertices_num;i++) { for(int j = 0;j < k;j++) { propositions[...
Markdown
UTF-8
8,839
2.515625
3
[]
no_license
--- description: "Recipe of Favorite Breakfast hash" title: "Recipe of Favorite Breakfast hash" slug: 1036-recipe-of-favorite-breakfast-hash date: 2020-11-25T19:27:36.010Z image: https://img-global.cpcdn.com/recipes/15f272f65eb5d9b9/751x532cq70/breakfast-hash-recipe-main-photo.jpg thumbnail: https://img-global.cpcdn.co...
Java
UTF-8
2,663
1.882813
2
[]
no_license
package com.accp.domain; public class Vendor { private String supid; private String supcode; private String supname; private String address; private String scase; private String url; private String bank; private String banknum; private String way; private String grade; private String brand; p...
Swift
UTF-8
5,696
2.515625
3
[]
no_license
// // RolodexPageViewController.swift // Wizcard // // Created by Akash Jindal on 06/05/18. // Copyright © 2018 Akash Jindal. All rights reserved. // import UIKit protocol RolodexPageViewControllerDelegate{ func currentSelectedIndex(index : Int) } class RolodexPageViewController: UIPageViewContro...
Shell
UTF-8
719
3.203125
3
[]
no_license
#!/bin/bash #set -x # damit das Script LSB-konform ist . /etc/ha.d/pidfile.cfg KOMMANDO="$(echo "${@}" | awk '{print $NF}')" case ${KOMMANDO} in start) pid_beginn cat $(find /sys/ -type f | fgrep 'address' | fgrep "${1}") > ${PIDDATEI} ifdown ${1} ifconf...
C++
UHC
1,295
3.625
4
[]
no_license
#include <stdio.h> #include <iostream> //Ž ̿() int _BinSearch(int arr[], int left, int right, int data) { if (left <= right) { int middle = (left + right) / 2; if (data < arr[middle]) { return _BinSearch(arr, left, right - 1, data); } else if (data > arr[middle]) { return _BinSearch(arr, left, right -...
C
UTF-8
541
3.125
3
[]
no_license
#include <stdio.h> #include <assert.h> #include <stdlib.h> void swap_max(int [], int, int ); void ssort(int [], int); void swap_max(int a[], int n, int k) { int i=0; int z=a[k], c=0; for(i=k;i<=n-1;i++) { if(a[i]>z) { c=i; z=a[i]; ...
Python
UTF-8
10,885
2.609375
3
[ "MIT" ]
permissive
from __future__ import print_function from copy import deepcopy from random import seed, randint, shuffle import numpy as np from groupy.gbb import Gbb from groupy.box import Box from groupy.lattice import Lattice import pdb class Bilayer(): """Class for initializing a bilayer. """ def __init__(self...
PHP
UTF-8
1,744
2.671875
3
[]
no_license
<?php function email_av($email_avocat_rdv,$date_rdv){ global $conn; $e = array('email_avocat_rdv' => $email_avocat_rdv, 'date_rdv' => $date_rdv ); $sql = 'SELECT * FROM client WHERE email_avocat_rdv = :email_avocat_rdv && date_rdv=:date_rdv'; $req = $conn->prepare($sql)...
PHP
UTF-8
748
2.703125
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Dynamap\Mapping\Field; class DateTimeField implements DynamoDBField { /** @var string */ private $originalFieldType; public function __construct(string $originalFieldType) { $this->originalFieldType = $originalFieldType; } public function getD...
Python
UTF-8
5,208
2.875
3
[]
no_license
import requests import json import pandas as pd import math import datetime def write_json(D, filename): ''' Writes a dictionary D as a json file. ''' with open(filename, 'w') as json_file: json.dump(D, json_file, indent = 4, sort_keys=True) def hypercell_api(time_start, time_stop): ''' ...
Markdown
UTF-8
27,536
2.859375
3
[]
no_license
<p class="group-question"><strong>Group question:</strong> Q’uo, today we’ve been discussing the interaction and relationship between the universe and the seeker. We would like you to discuss how it is that the universe answers the seeker’s questions of identity, service and transformation and how it is that the seeker...
Java
UTF-8
2,280
1.921875
2
[]
no_license
package com.qintess.desafio0604.util; import java.util.Properties; import org.hibernate.SessionFactory; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.cfg.Configuration; import org.hibernate.cfg.Environment; import org.hibernate.service.ServiceRegistry; import com.q...
Java
UTF-8
5,684
2.484375
2
[]
no_license
/* * JBoss, Home of Professional Open Source. * Copyright 2013 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * 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 Licen...
Markdown
UTF-8
456
2.734375
3
[]
no_license
# Assignment1 ## Author Trent Geraty <br/> github username: **trentgeraty** ### user stories * AS A marketing agency <br/> I WANT a codebase that follows accessibility standards <br/> SO THAT our own site is optimized for search engines #### description I made a marketing tool landing page. With the knowledge I ...
C++
UTF-8
1,874
2.921875
3
[]
no_license
class Solution { public: vector<string> findWords(vector<string>& words) { vector <string> ans; unordered_map <char, int> hashmap; hashmap['a'] = 1; hashmap['s'] = 1; hashmap['d'] = 1; hashmap['f'] = 1; hashmap['g'] = 1; hashmap['h'] = 1; hashm...
PHP
UTF-8
6,627
3.09375
3
[]
no_license
<?php class HtmlTable{ /** @var current row count*/ private $row = 0; /** @var current collumn count*/ private $col = 0; private $colSize = 0; private $auto_grow = true; private $buffer = ''; private $autoFill = '&nbsp;'; private $rowAttributes = ''; private $rowAttributesSize = -1; private $colAttributes = ...
C++
UTF-8
6,198
3.53125
4
[]
no_license
/* * This file fully contains the methods necessary to run the popularityfinder * program, which finds actors of a certain popularity through k-core graph * decomposition. */ #include <algorithm> #include <string> #include <sstream> #include <iostream> #include <fstream> #include <unordered_map> #inclu...
TypeScript
UTF-8
176
2.875
3
[]
no_license
// import { hi } from './../m' let a = 10; //1111111 // console.log(hi) function fn (a:number , b:number) { return a + b } function fnThis() { // console.log(this) }
Java
UTF-8
2,698
2.53125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
package com.ml.core.impl; import java.sql.Timestamp; import java.util.Date; import java.util.List; import java.util.Map; import java.util.function.Predicate; import java.util.stream.Collectors; import org.apache.commons.lang.builder.ReflectionToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; imp...
Java
UTF-8
200
2.0625
2
[ "Apache-2.0" ]
permissive
package com.jambit.onboarding2020.tbrpg.domain.Player; public class PlayerDeadException extends EnemyDeadException { public PlayerDeadException(String message) { super(message); } }
Rust
UTF-8
1,210
3.59375
4
[]
no_license
#[derive(Debug)] pub enum ParseErrorKind { Expected(&'static str), SExpr, Integer, } pub type ParseResult<'a, T> = Result<(T, &'a str), ParseErrorKind>; pub trait Parse<'a>: Sized { fn parse(input: &'a str) -> ParseResult<Self>; } /// Skip spaces at the beginning of a string. pub fn skip_space(input:...
Python
UTF-8
344
3.09375
3
[]
no_license
def main(): a, b, c, d = map(int, input().split()) if b < c or d < a: print(0) elif a <= c <= d <= b: print(d-c) elif c <= a <= b <= d: print(b-a) elif a <= c <= b or c <= b <= d: print(b-c) elif c <= a <= d or a <= d <= b: print(d-a) if __name__ =...
C++
UTF-8
1,325
2.515625
3
[]
no_license
#pragma once #include "toolbox/gl_handles.hpp" #include <GL/glew.h> #include <glm/vec2.hpp> #include <glm/vec3.hpp> #include <glm/vec4.hpp> #include <glm/mat4x4.hpp> #include <string> class Shader { public: Shader( std::string const& vertexShaderFile, std::string const& fragmentShaderFile); ~Sh...
Python
UTF-8
391
3.546875
4
[]
no_license
nilai1 = int(input("masukan nilai praktek : ")) nilai2 = int(input("masukan nilai teori : ")) #if(kondisi): if (nilai1<=70): print("Anda Harus Ujian Praktik") elif(nilai2>=70) : print ("selamat anda lulus") elif(nilai2<=70) : print ("Anda harus ujian Teori") elif (nilai1>=70): print("selamat anda ...
Swift
UTF-8
894
2.6875
3
[]
no_license
// // ActionBeaconCell.swift // Beacon Handler Colocator // // Created by TCode on 26/02/2020. // Copyright © 2020 Crowd Connected. All rights reserved. // import Foundation import UIKit class ActionBeaconCell: UITableViewCell { @IBOutlet weak var descriptionLabel: UILabel! @IBOutlet weak var UUIDLab...
Java
UTF-8
1,830
3.203125
3
[]
no_license
package HashMap_Heap; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class All_anagram_in_a_String { public static ArrayList<Integer> findAnagrams(String s, String p) { ArrayList<Integer> arr = new ArrayList<>(); int[] charhash = new int[26]; for (char c : p.toCharArray()...
Ruby
UTF-8
639
4.3125
4
[]
no_license
# Each new term in the Fibonacci sequence is generated by adding the # previous two terms. By starting with 1 and 2, the first 10 terms # will be: # # 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... # # By considering the terms in the Fibonacci sequence whose values do # not exceed four million, find the sum of the even-val...
C++
UTF-8
954
2.984375
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; // int n, m; // vector<int> array_(100), ans; // void dfs(int op, int level, int sum) // { // if(level == n) // { // return; // } // if(op == 1) // { // sum += array_[level]; // ans.push_back(ar...
C#
UTF-8
1,637
2.953125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Xynapse.UI { public struct PxRect { public readonly int X, Y, W, H; public PxRect(int x, int y, int w, int h) { X = x; Y = y; W = w; H = h; } public PxRect(PxVector...
PHP
UTF-8
1,020
2.53125
3
[]
no_license
<?php session_start(); require("conexion.php"); $resultados_de_validacion = array( 'error' => 'NO', 'datos' => array() ); if(isset($_POST["idusuario"])) { $conn = getConnection(); $sql="SELECT * FROM establecimientos WHERE establecimientos.ID_USUARIO=:id_usuario...
Java
UTF-8
590
3.53125
4
[]
no_license
package Q11_20; import java.time.DayOfWeek; import java.time.LocalDate; import java.time.Month; public class Q19 { public static int countingSundays(int startYear, int endYear) { int result = 0; LocalDate start = LocalDate.of(startYear, Month.JANUARY, 1); while (start.getDayOfWeek() != DayOfWeek.SUNDAY) ...
JavaScript
UTF-8
1,613
2.546875
3
[]
no_license
const Sequelize = require("sequelize"); // creates new connection const sequelize = new Sequelize("sql7293249", "sql7293249", "q2KcEheqdN", { host: "sql7.freesqldatabase.com", dialect: "mysql" }); sequelize.authenticate() .then(() => console.log('Db Connected')) .catch(err => console.log('Error: ' + err)) //...
Java
UTF-8
3,044
1.835938
2
[]
no_license
package com.xianglin.appserv.common.dal.dataobject; import java.io.Serializable; import java.util.Date; public class AppPrizeUserRelDO extends PageReq implements Serializable { /** * */ private static final long serialVersionUID = 5889100777310306091L; private Long relId; private String partyid; private ...
Java
UTF-8
234,486
2.09375
2
[ "Apache-2.0" ]
permissive
//---------------------------------------------------- // The following code was generated by CUP v0.11a beta 20060608 // Wed Aug 27 06:45:31 BRT 2014 //---------------------------------------------------- import java_cup.runtime.*; import java.io.*; import java.util.*; import utils.SemanticManager; import utils.Obje...
C++
UTF-8
2,083
2.734375
3
[ "MIT" ]
permissive
#include <iostream> #include <cstdio> #include <vector> #include <unordered_map> #include <cassert> #include "./bf.h" bf::Interpreter::Interpreter(std::string code) { _code = code; _instruction_count = code.length(); _tape = std::vector<char>(1024, '\0'); _jmp_tb = std::unordered_map<int, int>(); i...
PHP
UTF-8
2,852
2.578125
3
[ "MIT" ]
permissive
<?php namespace AniketIN\Wallet\Models; use AniketIN\Wallet\Casts\Round; use Exception; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\DB; class Wallet extends Model { use HasFactory; protected $fillable = [ 'balance', ...
C++
UTF-8
13,416
2.53125
3
[]
no_license
#include "SolutionCalculator.h" #include "Mesh.h" #include "SteadyReader.h" #include "../Solver/HarmonicSolver.h" #include "../Inputs.h" #include <iostream> #include <fstream> #include <iomanip> #include <cmath> #include <valarray> using namespace std; SolutionCalculator::SolutionCalculator(Mesh*mp,SteadyReader*srp,...
C++
UTF-8
12,950
2.796875
3
[]
no_license
//Christian Bradford //C00223037 //Joint Assignment 2 #include "VoteCounter.h" void VoteCounter::Start() { char answer = 0; while (true) { std::cout << "Would you like to do a manual process or load a file? (m | l) "; std::cin >> answer; if (answer == 'l') { std::string filename = "../Data/Vote_Results...
Java
UTF-8
385
2.390625
2
[]
no_license
package Model; import utils.MyException; import utils.MyIDictionary; /** * Created by Wyking on 10/29/2016. */ public class VarExp extends Exp { String nm; public VarExp(String name){ nm = name; } int eval(MyIDictionary<String, Integer> tbl) throws Exception { return tbl.get(nm);...
C#
UTF-8
1,548
2.765625
3
[ "MIT" ]
permissive
using i5.Toolkit.Core.ServiceCore; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace i5.Toolkit.Core.Examples.ServiceExample { /// <summary> /// Demo service which demonstrates how a service can work /// </summary> public class DemoServic...
Markdown
UTF-8
7,694
3.171875
3
[ "Unlicense", "LicenseRef-scancode-proprietary-license" ]
permissive
# Albe Timeline <sup>4.0.0</sup> Albe Timeline is a simple yet highly customizable jQuery plugin that helps you render a responsive horizontal (or vertical) timeline from JSON data. The data will be automatically grouped by year and the events will be sorted by date. In addition, this plugin is able to handle almo...
C++
UTF-8
3,095
3.609375
4
[]
no_license
/**************************************************************************************************** 34. Search for a Range ----------------------------------------------------------------------------------------------------- Given an array of integers sorted in ascending o...
Shell
UTF-8
1,043
2.671875
3
[]
no_license
#!/bin/bash -ve # request memory for job (default 6G, max 72G) #$ -l mem=6G #$ -l rmem=6G # run time for job in hours:mins:sec (max 168:0:0, jobs with h_rt < 8:0:0 have priority) #$ -l h_rt=02:50:00 # -P molecol # -q molecol.q #$ -t 1000-16828 #$ -tc 30 #$ -cwd #$ -V module load apps/python/conda module load apps/pyt...
Java
UTF-8
805
3.21875
3
[]
no_license
package com.orilore.housework.live; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Live { public static void main(String [] args){ long a1=0; String birday="1991-08-26"; SimpleDateFormat s= new SimpleDateFormat("yyyy-MM-dd"); try{ Date d1 = s.parse(bir...
Python
UTF-8
6,813
3.015625
3
[ "MIT" ]
permissive
import sys, os import math import os.path from collections import OrderedDict import argparse import numpy as np import tiledb import random ltrdict = {'a':[1,0,0,0], 'c':[0,1,0,0], 'g':[0,0,1,0], 't':[0,0,0,1], 'n':[0,0,0,0], 'A':[1,0,0,0], 'C':[0,1,...
C
UTF-8
2,254
3.078125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "Funciones.h" #define Cant_Personas 20 int menu(void); typedef struct { char nombre[50]; int dni; int edad; int status; }ePersonas; int main() { ePersona ArrayPersona[Cant_Personas]; int dni; int...
Python
UTF-8
374
3.4375
3
[ "MIT" ]
permissive
L=raw_input("Please Enter the length of the layer (in m): ") A=raw_input("Please Enter the area of the wall (in m2): ") k=raw_input("Please Enter the condictivty of the layer (in W/(m*K)): ") print("\n you just said "+ "L= " + L+ " m "+ "A= " + A+ " m2 "+ "k= "+ k +" W/(m*K) \n") R=float(L)/(float(k)*float(A)) print(...
Shell
UTF-8
163
3.453125
3
[]
no_license
#!/bin/bash counter=0 for ((i=1;i<=100;i++)) do ans=$[$i%11] if [ $ans -eq 0 ] then twice[((counter++))]=$i fi done echo "Repeated Twice Numbers are: ${twice[@]}"
Python
UTF-8
1,782
2.75
3
[]
no_license
import re def readline(log_file): line = log_file.readline() if line == "": return None else: return re.sub(r"[\n\t\s]*", "", line) def is_read_type(line): return line.startswith('FLANKING') or line.startswith('SPANNING') or line.startswith('INREPEAT') # To define name and corresp...
Swift
UTF-8
1,171
2.625
3
[]
no_license
// // UIColor+HSB.swift // arkit-testing-2 // // Created by Nikita Arutyunov on 10/10/20. // Copyright © 2020 Nickaroot.ME. All rights reserved. // import UIKit extension UIColor { open var hue: CGFloat? { var value = CGFloat.leastNonzeroMagnitude getHue(&value, saturation: nil, brigh...
PHP
UTF-8
1,067
2.9375
3
[ "Apache-2.0" ]
permissive
<?php /** * This file is part of the GraphAware Reco4PHP package. * * (c) GraphAware Limited <http://graphaware.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace GraphAware\Reco4PHP\Result; class SingleScore { /...
C#
UTF-8
1,298
2.546875
3
[]
no_license
using ProjetSessionWebServ2.Models; using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace ProjetSessionWebServ2.DAL { public class SpectacleRepository : GenericRepository<Spectacle> { public SpectacleRepository(ApplicationDbContext context) : base(context) { } ...
Java
UTF-8
4,415
3.453125
3
[]
no_license
import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Scanner; public class VendingMachine { public static void main(String args[]) { VendingMachine vm = new VendingMachine(); Scanner scanner = new Scanner(System.in); boolean endProgramFla...
Python
UTF-8
1,802
3.640625
4
[]
no_license
import random class MarkovEngine: def __init__(self): self.states = {} #adds an occurence of a state to the engine def append_instance(self, state, next): found = False if state in self.states: follow = self.states.get(state) follow.append(next) else: self.states[state] = [next] #checks to see i...
C#
UTF-8
1,624
2.59375
3
[]
no_license
using UnityEngine; using System.Collections; public class AnimalUtilityGenerator : UtilityGenerator { private Animal animal; void Awake() { animal = GetComponent<Animal>(); } public override bool CheckSpecific(Desire desire, Animal checker) { if (desire == Desire.Mate) ...
Markdown
UTF-8
2,259
3.078125
3
[ "Apache-2.0" ]
permissive
## Overview This is a generated connector for [SupportBee API v1](https://supportbee.com/api) OpenAPI specification. SupportBee’s support ticket system enables teams to organize, prioritize and collaborate on customer support emails. ## Prerequisites Before using this connector in your Ballerina application, complet...
Java
UTF-8
548
2.390625
2
[]
no_license
package com.osreboot.ridhvl.action; import java.util.ArrayList; import java.util.Arrays; public final class HvlEvent2<A, B> { private ArrayList<HvlAction2<A, B>> actions; public HvlEvent2(){ actions = new ArrayList<>(); } public HvlEvent2(HvlAction2<A, B>[] actionArgs){ actions = new ArrayLis...
Java
UTF-8
487
1.90625
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 evaluatemetrics; /** * * @author daguaman */ class C3 extends C2{ private int num; private float p...
SQL
UTF-8
3,110
3.78125
4
[]
no_license
# http://www.w3resource.com/sql-exercises/sql-retrieve-exercise-24.php /* Write a SQL query to find all the details of 1970 winners by the ordered to subject and winner name; but the list contain the subject Economics and Chemistry at last. YEAR SUBJECT WINNER ...
Java
UTF-8
4,675
2.609375
3
[]
no_license
package com.jvirriel.demo.frontend.components.core; import com.vaadin.server.Resource; import com.vaadin.server.Sizeable; import com.vaadin.ui.Component; import com.vaadin.ui.TabSheet; /** * Clase <i>Builder</i> para crear un componente nativo de Vaadin del tipo TabSheet. * Para más información acerca de los método...
Python
UTF-8
7,435
2.53125
3
[]
no_license
#!/usr/bin/env python # -*- coding: UTF-8 -*- import cherrypy,settings,json,os,re,sqlite3,random from cherrypy.lib import auth_basic from cherrypy import expose,HTTPError from utils import * import os.path rank_zero_append_domains = [] class Domains(): exposed = True def __init__(self): self._init_database(...
Java
UTF-8
293
2.4375
2
[]
no_license
package com.iv.icourier.adapters; /** * Created by Andread on 02.06.2016. */ public class RecyclerItem { int id; String text; public RecyclerItem(int _id, String _text) { id = _id; text = _text; } public String getText() { return text; } }
C
UTF-8
661
4.375
4
[]
no_license
#include "stdio.h" /** * @brief Returns the single non-duplicated integer from an integer array * * @param arr: integer array, can be any lenght * @param size: size of the integer array * @return int: integer array of any length with all the elements with exactly 1 duplicate of itself, and a single non duplicate...