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
315
2.21875
2
[]
no_license
package part05.async.svc; import part05.async.domain.Currency; import part05.async.svc.impl.ExchangeRateServiceSimulator; public interface ExchangeRateService { static ExchangeRateService instance() { return new ExchangeRateServiceSimulator(); } double getRate(Currency from, Currency to); }
Java
UTF-8
1,528
2.40625
2
[ "Apache-2.0" ]
permissive
/* * Copyright (C) 2012 Dominik Schürmann <dominik@dominikschuermann.de> * * 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 * * Unles...
Python
UTF-8
1,486
2.8125
3
[]
no_license
import os import string import operator spam_path = "hw5_spam_dist/dist/spam/" ham_path = "hw5_spam_dist/dist/ham/" spam_emails = [] ham_emails = [] print("asdf") for spam_email in os.listdir(spam_path): print(spam_email) f = open(spam_path + spam_email, 'r', errors='ignore') spam_emails.append(f.read()) fo...
PHP
UTF-8
525
3.03125
3
[]
no_license
<?php echo "Merhaba Dünya!"; # buradan sonrası açıklama satırıdır $tarih="01.05.2010"; // satırın sadece bu kısmı açıklama satırıdır # bu satırın tamamı açıklama satırıdır // bu satırın da tamamı açıklama satırıdır /* Bu kısımda ise birden fazla satır açıklama satırı olarak tanımlanmıştır */ echo...
Java
UTF-8
1,257
3.703125
4
[]
no_license
package com.example.suanfa.tree; /** * @author: luozijian * @date: 2022/6/3 * @description: 计算节点数 */ public class CountNode { /** * 普通计算树节点的方法 * @param root * @return */ public int countNodes(TreeNode root){ if(root == null) { return 0; } return 1 + ...
Java
UTF-8
3,750
2.84375
3
[]
no_license
import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.chart.LineChart; import javafx.scene.chart.NumberAx...
C#
UTF-8
2,949
2.625
3
[ "MIT" ]
permissive
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. namespace System.Formats.Cbor { public partial class CborReader { /// <summary>Reads the next data item as the start of an array (major type 4).</summary> ///...
PHP
UTF-8
78
2.90625
3
[]
no_license
<?php $texte= two("salut"); function two($a){ return $a; } echo $texte; ?>
Markdown
UTF-8
3,011
2.59375
3
[]
no_license
# webpack基础用法 ## entry 用来指定打包的入口 - 参考模块依赖图 * 单入口:entry 是一个字符串 * 多入口:entry 是一个对象 ```js entry: './src/index.js' entry: { index: './src/index.js', search: './src/search.js' } ``` ## output 用来指定打包的输出 - 告诉 webpack 如何将编译后的文件输出到磁盘 ```js output: { filename: '[name].js', // 通过占位符确保文件名称的唯一 path: __dirname + '/dis...
Python
UTF-8
985
3.40625
3
[]
no_license
''' Chinese Communist Party -- Jack Lu, Vincent Lin SoftDev2 pd8 K #19: Ready, Set, Math! 2019-04-16 ''' def union(a, b): ''' only one occurance of each element in result''' lst = [] lst = [x for x in a if x not in lst] [lst.append(x) for x in b if x not in lst] return lst def intersection(a, b): ...
Markdown
UTF-8
1,475
2.734375
3
[ "MIT" ]
permissive
# SliceMap.jl [![Build Status](https://github.com/mcabbott/SliceMap.jl/workflows/CI/badge.svg)](https://github.com/mcabbott/SliceMap.jl/actions?query=workflow%3ACI) This package provides some `mapslices`-like functions, with gradients defined for [Tracker](https://github.com/FluxML/Tracker.jl) and [Zygote](https://g...
Python
UTF-8
2,206
2.625
3
[]
no_license
import unittest from pisak import switcher_app from gi.repository import GObject, Clutter class SwitcherAppTest(unittest.TestCase): def test_context(self): """ Context for a dummy application. """ class DummyApp(object): pass app = DummyApp() switcher_app...
Markdown
UTF-8
3,771
3.28125
3
[]
no_license
# 클래스타입 구성파일 * xml 파일 형식의 구성파일(ApplicationContex.txml) 과 동일한 역할을 하는 자바 클래스 파일 * 클래스에 @Configuration 어노테이션 추가하여 Spring 이 해당 클래스를 구성파일로 인식하도록 설정 ### bean 등록 * 객체 생성자 메서드 정의(메서드 명 = bean id) 후 @Bean 어노테이션 추가 * 의존성 주입 : 객체 생성자 메서드 내에서 생성자나 setter로 협력객체(bean 등록 메서드 호출) 주입 ```java //applicationContext.xml <bean id="foo" cla...
Java
UTF-8
314
1.789063
2
[]
no_license
package com.fzy.admin.fp.member.sem.repository; import com.fzy.admin.fp.common.spring.base.BaseRepository; import com.fzy.admin.fp.member.sem.domain.StoredAliSwitch; public interface StoredAliSwitchRepository extends BaseRepository<StoredAliSwitch>{ StoredAliSwitch findByMerchantId(String merchantId); }
Python
UTF-8
127
3.28125
3
[]
no_license
class Test: def __init__(self): print('constructor') def m1(self,x): print('The value of x:',x) t=Test() t.m1(10)
Java
UTF-8
587
2.140625
2
[]
no_license
package sen.com.openglcamera.offscreen; import android.opengl.GLES20; import android.opengl.GLSurfaceView.Renderer; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; public class OffScreenRenderer implements Renderer{ @Override public void onSurfaceCreated(GL10 gl, ...
PHP
UTF-8
2,786
2.53125
3
[ "MIT" ]
permissive
<?php namespace Database\Seeders; use App\Models\User; use Illuminate\Database\Seeder; use Spatie\Permission\Models\Permission; class RolePermissionSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { $supperAdminRole = User::create...
Java
UTF-8
526
2.09375
2
[]
no_license
package com.travely.travely.domain; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) public class StoreImg { private Long storeIdx; private Long storeImgIdx; private String storeImgUrl; ...
Markdown
UTF-8
5,550
2.875
3
[]
no_license
五十七 第 十 章 六月六日断肠时 另一名会中弟子,用手一推老瞎婆炊火杖所着树之另一面,轰地一声,应手而倒,一棵树如斧削般去了半边。 两个人所施为的,系当分之世已绝传的无上神功,怎会不令内园各接待的一流高手,瞠目结舌,半响才轰起一阵彩声。 驼子瞠目大喝:“瞎婆子!你取巧,并没照我这办法做。” “驼鬼!你能隔水除蛟,我自当以真气腐物,你如不能,我亦不屑。” 两人在争执中,青娘子田媚却与活骷髅在低声暗语,大家全注视着二人,谁也没听到说什么。 六指魔婆看了碧涛神鳌一眼说: “老怪物!你恐怕没能为争取第一把交椅,但你那高傲神态,似又不甘人下,今宵如何?” 碧...
Markdown
UTF-8
2,181
3.03125
3
[]
no_license
<h1 align="center">Job Search App</h1> <p align="center">Job marketplace for University students, convenient and easy to use.</p> <p align="center"><img src="public/img/readme/job-search-demo-admin-panel.gif" alt="job search admin panel gif"></p> ## Table of Contents - [Basic Overview](#basic-overview) - [Getting Star...
Java
UTF-8
17,115
2.265625
2
[ "BSD-3-Clause" ]
permissive
/** * Processor of TSQL2 on a Relational Database System * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE. * It is also available through the world-wide-web at this URL: * http://www.opensource.org/licenses/bsd-license.php * * @copyrigh...
Shell
UTF-8
455
3.296875
3
[]
no_license
#!/bin/bash source ./CONFIG.sh OUT="out/classes" rm -rf "$OUT" mkdir -p $OUT if [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then CP="$LIB" elif [ "$(expr substr $(uname -s) 1 10)" == "Linux" ]; then CP="$LIB" fi find . -name "*.java" | xargs javac -cp "$CP" -d $OUT -sourcepath $SRC mkdir -p "out/lib/"...
TypeScript
UTF-8
107
2.78125
3
[ "MIT" ]
permissive
export interface IValueObject<T> extends Readonly<{ type: string; value: T; }> { toString(): string; }
Java
UTF-8
3,231
2.578125
3
[]
no_license
package com.epam.newsmanagement.common.entity; import org.junit.Assert; import org.junit.Test; import java.util.ArrayList; import java.util.List; /** * Testing entity {@link NewsInfo} */ public class NewsInfoTest { /** * testing methods for variable news */ @Test public void testNews(){ ...
JavaScript
UTF-8
1,130
2.71875
3
[]
no_license
var PriorityTypes = require('./priority-types'); var moment = require('moment'); var _ = require('lodash'); function Task(name, dueDate, priority, status, percentComplete, id) { var self = this; self.TITLE = name; self.DUE_DATE = dueDate; self.PRIORITY = priority; self.STATUS = status || 'Not Started'; self.PE...
Java
UTF-8
606
2.453125
2
[]
no_license
package modelo; import java.util.ArrayList; import java.util.List; public class RegistroCompra { private List<Factura> facturalist; public RegistroCompra() { this.facturalist= new ArrayList<Factura>(); // TODO Auto-generated constructor stub } public void guardarCompra(Factura f) { this.facturalist.a...
JavaScript
UTF-8
2,272
2.578125
3
[]
no_license
import React, { useState } from "react"; import UserTable from "./tables/UserTable"; import AddUserForm from "./forms/AddUserForm"; import EditUserForm from "./forms/EditUserForm"; const App = () => { const usersData = [ { id: 1, race: "10km", fname: "Tania", lname: "Harding", gender: "Female", age: "33", code: ...
Python
UTF-8
1,601
2.53125
3
[]
no_license
import os import pyodbc import pandas as pd import numpy as np from dotenv import load_dotenv load_dotenv() # Database configuration # server = os.getenv('SERVER') # database = os.getenv('DB_NAME') # username = os.getenv('DB_USERNAME') # password = os.getenv('DB_PASSWORD') #connect to the Database # connection = py...
Java
UTF-8
134
1.960938
2
[]
no_license
package it.polimi.ingsw.client.network; /** * Enum to return the network choice */ public enum NetworkTypeEnum { RMI, SOCKET }
Swift
UTF-8
2,595
3.046875
3
[]
no_license
// // Movie.swift // UpcomingMovies // // Created by Rodolfo Roca on 6/27/19. // Copyright © 2019 Rodolfo Roca. All rights reserved. // import Foundation struct Movie: Decodable { var id: Int var title: String var popularity: Double? var releaseDate: Date? var runtime: Int? var userScore: ...
Java
UTF-8
2,027
2.390625
2
[]
no_license
package com.mycompany.webapp.dao; import java.util.List; import org.apache.ibatis.annotations.Mapper; import com.mycompany.webapp.dto.Review; @Mapper public interface ReviewDao { public static List<Review> selectAll() { // TODO Auto-generated method stub return null; } public static int inser...
JavaScript
UTF-8
791
3.03125
3
[]
no_license
var isValidBST = function(root) { if (!root) return true if (!root.left && !root.right) return true if (root.left == null) { return root.right.val > root.val && isValidBST(root.right) } else if (root.right == null) { return root.left.val < root.val && isValidBST(root.left) } retu...
JavaScript
UTF-8
957
2.6875
3
[]
no_license
//将数据库中的图片上传到七牛云服务器中 //引入上传方法 const unload = require('./unload'); //引入nanoid获取唯一key值 const nanoid = require('nanoid') module.exports = async (key,dataWay)=>{ //1.获取数据库图片链接 const movies = await dataWay.find({$or:[ {[key]:''}, {[key]:null}, {[key]:{$exists:false}} ]}); for (let i = 0; i < mov...
Java
UTF-8
3,392
2.65625
3
[]
no_license
package ru.job4j.quartz; import org.quartz.*; import org.quartz.impl.StdSchedulerFactory; import java.io.InputStream; import java.sql.*; import java.time.LocalDateTime; import java.util.Properties; import static org.quartz.JobBuilder.*; import static org.quartz.TriggerBuilder.*; import static org.quartz.SimpleSchedu...
JavaScript
UTF-8
2,178
3.140625
3
[]
no_license
import React, { Component } from "react"; import socketIOClient from "socket.io-client"; const endpoint = "http://192.168.1.50:4001" //change IP address to local machine's IP const socket = socketIOClient(endpoint); class App extends Component { constructor() { super(); this.state = { people: [], ...
Python
UTF-8
245
3.59375
4
[]
no_license
def pattern(): print("Height of the pyramid : ", end = "") h = int(input()) print() while(h): for i in range(h): print('*', end = " ") print() h -= 1 if __name__ == '__main__': pattern()
TypeScript
UTF-8
2,056
2.546875
3
[ "MIT" ]
permissive
import { ResourceType } from "@models/Resource"; import { initialResourceState, resourceReducer, resourceSaga, ResourceStoreState } from "@store/resource"; import { connectRouter, routerMiddleware } from "connected-react-router"; import { createBrowserHistory } from "history"; import { merge, throttle } from "lodash"; ...
Java
UTF-8
567
2
2
[ "Apache-2.0" ]
permissive
package gank.sin.me.gk.dagger.module; import android.content.Context; import javax.inject.Named; import dagger.Module; import dagger.Provides; import gank.sin.me.gk.dagger.ApplicationContext; import gank.sin.me.gk.db.GankDB; /** * Created by sin on 2016/8/19. */ @Module public class DBModule { @Provides ...
Java
UTF-8
2,343
1.578125
2
[]
no_license
package com.rbcodebase.app; import android.app.Application; import com.crashlytics.android.Crashlytics; import com.facebook.react.ReactApplication; import com.oblador.vectoricons.VectorIconsPackage; import com.facebook.reactnative.androidsdk.FBSDKPackage; import com.microsoft.codepush.react.CodePush; import com.githu...
JavaScript
UTF-8
813
2.875
3
[]
no_license
// Generated by CoffeeScript 1.3.3 (function() { define(function() { var Vector; return Vector = { dotProduct: function(v1, v2) { return v1[0] * v2[0] + v1[1] * v2[1]; }, scale: function(s, v) { return [v[0] * s, v[1] * s]; }, length: function(v) { return...
Java
UTF-8
16,862
2.390625
2
[]
no_license
package database; import exceptions.AccessDeniedException; import exceptions.WrongFileException; import message.builder.IMessageBuilder; import message.builder.JSONMessageBuilder; import net.UserType; import structures.Password; import structures.ResultInfo; import java.io.*; import java.sql.*; import java.text.Parse...
Python
UTF-8
5,834
2.875
3
[]
no_license
# Python version import sys print('Python: {}'.format(sys.version)) # scipy import scipy print('scipy: {}'.format(scipy.__version__)) # numpy import numpy print('numpy: {}'.format(numpy.__version__)) # matplotlib import matplotlib print('matplotlib: {}'.format(matplotlib.__version__)) # pandas import panda...
Markdown
UTF-8
3,383
2.984375
3
[]
no_license
<!DOCTYPE html> <html> <body> <h1>这是一个标题</h1> <h2>这是一个标题</h2> <h3>这是一个标题</h3> <h1>Test</h1> <hr style="height:5px;border:none;border-top:50px solid #2894ff;" /> <hr style=" height:2px;border:none;border-top:2px dotted #185598;" /> <h3>Test 1</h3> <?php // echo "<div style='background:#ff0000; width:300px; height:30...
Java
UTF-8
614
2.296875
2
[]
no_license
package finalproject.service; import java.util.List; import javax.inject.Inject; import org.springframework.stereotype.Service; import finalproject.data.entities.Customer; import finalproject.data.repository.CustomerRepository; @Service public class CustomerService { @Inject CustomerRepository cu...
Java
UTF-8
932
2.40625
2
[]
no_license
package com.tom.example1.config; import org.slf4j.MDC; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import java.util.concurrent.Callable; import java.util.concurrent.Future; /** * MyThreadPoolTaskExecutor 将父线程的trackId传递下去给子线程即可 * * @author TomLuo * @date 2023年03月06日 21:55 */ public f...
Markdown
UTF-8
355
3.265625
3
[]
no_license
# Description Create a function that will return `true` if the input is in the following date time format `01-09-2016 01:20` and `false` if it is not. This Kata has been inspired by the Regular Expressions chapter from the book Eloquent JavaScript. --- ## Solution ```js const dateChecker = (date) => /\d{2}-\d{2}-\...
Markdown
UTF-8
1,038
2.90625
3
[ "MIT" ]
permissive
# General | Security | File Uploads <br> ### Only allow authorised users to upload files. todo: complement description <br> ### Always disallow upload of executable files. TODO: Add description <br> ### Always validate uploaded files against a list of allowed extensions allow. TODO: Add description <br> ##...
Markdown
UTF-8
1,537
3.125
3
[]
no_license
Problems with Divine Justice ============================ Christianity claims that God is just. Setting universalism (i.e. the theory that all are ultimately saved, that none go to hell) and annihilationism (i.e. the theory that those who do not go to heaven do not go to hell either, but rather are annihilated) aside,...
C#
UTF-8
4,841
2.625
3
[ "Apache-2.0" ]
permissive
// This file constitutes a part of the SharpMedia project, (c) 2007 by the SharpMedia team // and is licensed for your use under the conditions of the NDA or other legally binding contract // that you or a legal entity you represent has signed with the SharpMedia team. // In an event that you have received or obtained ...
Markdown
UTF-8
6,925
3.359375
3
[ "MIT" ]
permissive
--- layout: post title: Outfit Suggestion --- In this quarter, KeFan Ping and I completed an Outfit Recommendation application that can recommend daily wear for users. Please refer to this [repo link](https://github.com/KefanPing/Outfit_Recommendation_Project) for details. This blog is a reflection on this outfit reco...
PHP
UTF-8
1,476
2.65625
3
[]
no_license
<?php use Illuminate\Database\Seeder; class PositionTableSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { $poses = [ 'deps' => [ 'Директор', 'Заместитель директора', ], ...
Java
UTF-8
73,449
1.585938
2
[]
no_license
/* Elijah Gonzales 725000232 Josiah Hamid-Khani 725003646 Joseph Hernandez 825002632 CSCE 313-505 October 10, 2018 parserGrammarParser.java */ // Generated from H:/Java\parserGrammar.g4 by ANTLR 4.7 import org.antlr.v4.runtime.atn.*; import org.antlr.v4.runtime.dfa.DFA; import org.antlr.v4.runtime.*; import...
Ruby
UTF-8
2,860
4.40625
4
[]
no_license
# PSEUDOCODE # write a method that takes a string as a parameter and creates # a fake name by swapping the first and last name # changing all the vowels to the next vowel # and changes each consonant to the next consonant in the alphabet # create method called name_generator # add parameter called (name) def name...
Java
UTF-8
202
1.632813
2
[]
no_license
package com.nyd.application.api.call; import com.nyd.application.model.mongo.AddressBook; public interface AddressBookService { public void save(AddressBook addressBook) throws Exception; }
Python
UTF-8
10,668
2.640625
3
[ "MIT" ]
permissive
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Oct 4 11:49:47 2019 @author: kenneth """ from __future__ import absolute_import import numpy as np from Utils.utils import EvalC from Utils.Loss import loss from Utils.kernels import Kernels class KLR(EvalC, loss, Kernels): def __init__(self, ker...
PHP
UTF-8
8,726
2.78125
3
[]
no_license
<?php include 'connection.php'; //sender's id $id = $_GET['id']; //This query fetches the account number, name and balance of sender using their id $senderquery = " select account_number,name,balance from customers where id='$id' "; $query2 = mysqli_query($con,$senderquery); $res2 = mysqli_fetch_array($query2); $sende...
C#
UTF-8
939
2.8125
3
[]
no_license
// Serialization of an object - BLOB (Binary Large Object). The object should be // streamed to a text file. Show also the retrieval of the object from that file and // conversion back to its original form. using System; using System.Collections.Generic; using System.Linq; using System.IO; using System.Test; names...
Java
UTF-8
258
1.625
2
[]
no_license
package com.fossil.wearables.fsl.shared; public class PinType { public static final int TYPE_PIN_ADD = 1; public static final int TYPE_PIN_DELETE = 3; public static final int TYPE_PIN_EDIT = 2; public static final int TYPE_PIN_SYNCED = 0; }
Python
UTF-8
1,183
3.3125
3
[]
no_license
class Solution: def swimInWater(self, grid): """ :type grid: List[List[int]] :rtype: int """ def dfs_visit(x, y, visit, depth): if not (0 <= x < n) or not (0 <= y < n): return False if (x, y) in visit: return False ...
Python
UTF-8
1,832
2.515625
3
[ "MIT" ]
permissive
#!/usr/bin/env python import jinja2 import json import yaml import argparse import copy import os hostAction = False parser = argparse.ArgumentParser( description='Ansible inventory from jinja2 template') parser.add_argument('--list', dest='listAction', action='store_true', help='list all hos...
Python
UTF-8
2,041
2.703125
3
[]
no_license
import json import csv import cv2 from rdkit.Chem import Draw from rdkit import Chem from tqdm import tqdm from utils import * from pqdm.processes import pqdm def write_smiles_and_imgs(smiles_dict_train, smiles_dict_val, smiles, idx): smiles_dict = None if idx >= 1980000: mode = 'val' idx -= 19...
Markdown
UTF-8
602
2.53125
3
[]
no_license
# JS_30_challenge Based upon wesbo's [30-day JS challenge](https://javascript30.com/). His [repo](https://github.com/wesbos/JavaScript30) I downloaded his entire repo, removed all the solutions, then redid the directories to no longer have spaces. Removing solutions: ```shell rm */'index-FINISHED.html' ``` [Renami...
JavaScript
UTF-8
1,444
3.59375
4
[]
no_license
/** * Helper functions to deal with Date and time */ /** * @typedef {Object} TimeAgoResult * @property {number} type * @property {number} value */ /** * interval types */ export const interval = { Now: 0, Second: 1, Minute: 2, Hour: 3, Day: 4, Month: 5, Year: 6 }; /** * Returns interval type and valu...
Python
UTF-8
6,857
2.65625
3
[]
no_license
##################################################################### # Example : load, display and cycle the ** left or right only ** image from a # for a set of rectified stereo images from a directory structure # of left-images / right-images with filesname DATE_TIME_STAMP_{L|R}.png # optionally load available IM...
Python
UTF-8
254
2.84375
3
[]
no_license
from csv import reader,DictReader # with open("employee.csv")as f: # data_reader=reader(f) # for row in data_reader: # print(row) with open("employee.csv")as f: data_reader=DictReader(f) for row in data_reader: print(row)
Markdown
UTF-8
384
2.796875
3
[]
no_license
# Arduino-Digital-Hourglass Simple hourglass using tilt switch and Arduino. This project represent a digital hourglass that turns on an LED every ten minute. In the circuit is used tilt switch which helps the arduino to restart the hourglass **Arduino circuit of the project:** ![alt tag](https://github.com/KSamardzh...
JavaScript
UTF-8
2,090
2.734375
3
[]
no_license
export const filterFun = (toFilter, property, query) => { if (query == "") return toFilter; return toFilter.filter((element) => { if (element.hasOwnProperty(property)) { if (Array.isArray(element[property])) return element[property].includes(query); return ele...
PHP
UTF-8
6,486
2.609375
3
[]
no_license
<?php error_reporting(0); session_start(); /*For Server --------------*/ $db_host = "localhost"; $db_user = "root"; $db_password = ""; $db = "lottery"; date_default_timezone_set('Asia/Manila'); $current_date = date('Y-m-d H:i:s'); $admin_url="http://localhost/JustGrab"; $client_url=""; $image_url="http:/...
C#
UTF-8
980
2.953125
3
[ "Apache-2.0" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AskTheCode.PathExploration.Heuristics { public sealed class FixedIntervalSmtHeuristic : SimpleSmtHeuristic { private readonly int interval; public FixedIntervalSmtHeur...
Markdown
UTF-8
5,094
2.625
3
[]
no_license
[![Documentation Status](https://readthedocs.org/projects/tiva-ssd1306-driver/badge/?version=latest)](https://tiva-ssd1306-driver.readthedocs.io/en/latest/?badge=latest) # tiva_SSD1306_Driver Driver for the SSD1306 OLED controller for the TivaC. ## Features - Flexible font types(any font that has ttf convertible by...
JavaScript
UTF-8
1,102
2.65625
3
[]
no_license
// const db = require('./models') const {db , Vegetable, Gardener, Plot} = require('./models') db.sync({force: true}) .then(() => { console.log('Database synced!') Vegetable.create({name : 'Carrot', color: 'Orange', planted_on: new Date(Date.now())}) Vegetable.create({name : 'Lettuce', color: 'Green', pla...
Python
UTF-8
164
4.15625
4
[]
no_license
def main(): n = int(input("Digite o número: ")) if n % 2 == 0: print("O número é par!") else: print("O número é ímpar!") main()
TypeScript
UTF-8
1,141
2.578125
3
[]
no_license
import { Injectable, Logger } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; import { Model } from 'mongoose'; import { IUser } from '../interfaces/user.interface'; import { User } from '../models/user.model'; @Injectable() export class UserRepository { private logger: Logger = new Logger('U...
PHP
UTF-8
1,027
3.015625
3
[ "MIT" ]
permissive
<?php namespace cwreden\requestLimiter; class Configuration { /** * @var int */ private $limit; /** * @var int */ private $limitAuthenticated; /** * @var int */ private $resetInterval; /** * Configuration constructor. * @param int $limit * @p...
Markdown
UTF-8
2,233
2.625
3
[]
no_license
--- book: author: Annemarie Selinko cover_image_url: https://images-na.ssl-images-amazon.com/images/I/81FRzK3pj6L.jpg goodreads: '84049' isbn10: '8493388335' isbn13: '9788493388331' publication_year: '1951' spine_color: '#cf785d' tags: - german - historical-fiction title: Désirée plan: date_adde...
Java
UTF-8
1,032
2.265625
2
[]
no_license
package ru.workout.domainlayer.service; import java.util.List; import javax.inject.Inject; import javax.inject.Named; import io.reactivex.Single; import io.reactivex.schedulers.Schedulers; import ru.workout.domainlayer.model.pojosforapi.ApiCar; import ru.workout.domainlayer.repository.ICarsRepository; public class ...
Python
UTF-8
3,031
3.5
4
[]
no_license
import time hg_score = 0 words = {'class' : '설계도' , 'instance' : 'A a = new A()', 'overriding' : '메소드 OOOOO'} def hangmanGame(): global life, unknown, user_input, checked_letter, hg_score message= ' JAVA 용어 맞추기 게임 ' print('='*((100-len(message))//2) + message + '='*((100-le...
Markdown
UTF-8
402
3.03125
3
[]
no_license
# eoslog Simple log formatter with standard (non-go) log levels ## Usage ```go import ( log "github.com/MeowWolf/eoslog" ) log.Trace.Printf("...") log.Debug.Printf("...") log.Info.Printf("...") log.Warn.Printf("...") log.Error.Printf("...") log.Critical.Printf("...") ``` The individual levels are just `Logger`s u...
Go
UTF-8
1,910
2.765625
3
[]
no_license
package main import ( "bytes" "crypto/sha256" "encoding/gob" "encoding/hex" "fmt" "log" ) const subsidy = 10 // Transaction represents a transaction type Transaction struct { ID []byte Vin []TXInput Vout []TXOutput } // IsCoinbase checks whether the transaction is coinbase func (tx *Transaction) IsCoinb...
Markdown
UTF-8
8,105
3.359375
3
[]
no_license
# Project 2-Stock Tutorial ## Team: [Shahid Hussain](https://github.com/shahidlashari), [Norberto Mantohac](https://github.com/NMantohac), [Narayan Poudel](https://github.com/naryan), [Ujwal Kashyap](https://github.com/usualketchup) ## URL Links 1) GitHub: https://github.com/shahidlashari/project_2_stockTutorial ...
Markdown
UTF-8
203
2.796875
3
[]
no_license
Write a program to find count of the most frequent item of an array. Assume that input is array of integers. Ex.: input array: [3, -1, -1, -1, 2, 3, -1, 3, -1, 2, 4, 9, 3] ouptut: key -1 occurs 5 times
Java
UTF-8
788
3.734375
4
[]
no_license
import java.util.Vector; public class FamilyTree { //using vectors so number of children can change String name; //Vector of family trees Vector<FamilyTree> children; FamilyTree parent; //constructor public FamilyTree(String name) { this.name = name; this.children = new Vector(); this.parent = null; ...
Markdown
UTF-8
3,931
2.578125
3
[]
no_license
print("this website will give you informatio about a country of your choice") print("choose your country") print("make sure the country starts with a capital letter") input=input() if input=="Afghanistan": print("continent:asia capital:Kabul language:Dari population:31.11 million size:647,00...
Shell
UTF-8
838
3.390625
3
[]
no_license
#!/bin/bash -x declare -A Test count=0 valid=true read -p "enter the value for a" a read -p "enter the value for b" b read -p "enter the value for c" c Test[1]=$(( ($a + $b) * $c )) Test[2]=$(( ($a * $b) + $c )) Test[3]=$(( $c + ($a / $b) )) Test[4]=$(( ($a % $b) + $c )) while [ $valid ] do if [ $count -le 4 ] the...
C
UTF-8
662
3.03125
3
[]
no_license
#include <stdlib.h> #include <stdio.h> int comp(const void*a, const void*b) { return *(int*)a - *(int*)b; } int main() { int N, M; int coins[100000]; scanf("%d%d", &N, &M); for(int i=0; i<N; i++){ scanf("%d", &coins[i]); } qsort(coins, N, sizeof(int), comp); int i, j; fo...
Python
UTF-8
82
3.8125
4
[]
no_license
num = int(input('Enter Numbers:- ')) for i in range(num): print(i, end=" ")
Java
UTF-8
3,731
2.09375
2
[]
no_license
package com.peeplotech.studygroup.lecturer; import androidx.appcompat.app.AppCompatActivity; import androidx.cardview.widget.CardView; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.content.Intent; import android.graphics.Bitmap; import androi...
Java
UTF-8
9,007
2.4375
2
[]
no_license
/* * Copyright 2014 EUROPEAN DYNAMICS SA <info@eurodyn.com> * * Licensed under the EUPL, Version 1.1 only (the "License"). * You may not use this work except in compliance with the Licence. * You may obtain a copy of the Licence at: * https://joinup.ec.europa.eu/software/page/eupl/licence-eupl * * Unless requir...
Java
UTF-8
4,411
2.359375
2
[]
no_license
package com.twotowerstudios.virtualnotebookdesign.PageActivityMain; import android.content.Context; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.DialogFragment; import android.support.v7.widget.Toolbar; import android.text.method.ScrollingMovementMethod; import an...
Python
UTF-8
1,705
3.09375
3
[]
no_license
""" Simple shakedown of grammar.py features, one by one. """ import nose import logging logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.WARNING) log = logging.getLogger(__name__) ## Ridiculous path hack so that this can work both within and ## outside of nosetests, loca...
Python
UTF-8
29,921
3.453125
3
[]
no_license
from random import randint from time import sleep print "Choose your Pokemon:" print "Grass Type:" print "1. Bulbasaur 2. Chikorita 3. Victreebel" print "Flying Type:" print "4. Spearow 5. Butterfree 6. Pidgeotto" print "Ground Type:" print "7. Onix 8. Sandshrew 9. Geodude" print "Ghost Type:" print "10. Haun...
Java
UTF-8
2,520
2.546875
3
[]
no_license
package org.servlets.garits.Accounts; import java.util.ArrayList; public class Customer { public Customer(String email, String name, String address, String tel, String post_code, String fax) { this.email = email; this.name = name; this.address = address; this.tel = tel; th...
JavaScript
UTF-8
1,872
2.703125
3
[]
no_license
const app = require('./app'); const http = require('http'); // let env = process.env.NODE_ENV || 'development'; // console.log(`Server is running in ${env} mode`); //This portion of code is required only for SSL/HTTPs requests to handle const port = normalizePort(app.get("port") || '3000'); app.set('port', port); ...
Java
UTF-8
4,866
1.734375
2
[ "Apache-2.0" ]
permissive
/* * (c) Copyright 2019 Palantir Technologies Inc. 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 * * Unless ...
Ruby
UTF-8
679
2.65625
3
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference", "BSD-2-Clause" ]
permissive
require 'socket' describe 'IPSocket#getaddress' do describe 'when given a hostname' do it 'returns the IP address of the hostname' do addr = IPSocket.getaddress('localhost') %w{127.0.0.1 ::1}.include?(addr).should == true end end describe 'when given an IP address' do it 'returns the IP...
Java
UTF-8
1,310
2.875
3
[]
no_license
package homework_one; public class Entity { private String name; private String surname; private Integer age; private String mail; private String password; private Role role; public Entity(Role role) { this.role = role; } public String getName() { return name; ...
PHP
UTF-8
3,102
2.515625
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php final class DiffusionInlineCommentController extends PhabricatorInlineCommentController { protected function newInlineCommentQuery() { return new DiffusionDiffInlineCommentQuery(); } protected function newContainerObject() { return $this->loadCommit(); } private function getCommitPHID() { ...
Java
UTF-8
2,825
3.40625
3
[]
no_license
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.LinkedList; import java.util.Queue; import java.util.StringTokenizer; //private static ArrayList<Integer>[] list;  class Pairs{ int screen = 0; int clipboard = 0; int co...
JavaScript
UTF-8
2,585
2.65625
3
[]
no_license
import React from 'react' import Aux from '../../hoc/Auxy' import Burger from '../../components/Burger/Burger' import BuildControls from '../../components/Burger/BuildControls/BuildControls' import Modal from '../../components/Burger/UI/Modal/Modal' import OrderSummary from '../../components/Burger/OrderSummary/OrderSu...
JavaScript
UTF-8
2,380
2.796875
3
[]
no_license
import React, {useState, useContext} from 'react'; import { GlobalContext } from "../Context/GlobalState"; export const SumarTransaccion = () => { const [descripcion, setDescripcion] = useState(""); const [categoria, setCategoria] = useState(""); const [monto, setMonto] = useState(""); const [fechaCre...