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
Markdown
UTF-8
361
2.765625
3
[ "MIT" ]
permissive
# tiempo-perfecto This JavaScript project allows users to create a schedule as a JSON string and plug the string into a parser which then displays their schedule in an informative, easy-to-read format. [Create a schedule](https://smittycraft.github.io/tiempo-perfecto/creator/) or [view the schedule](https://smittycra...
Markdown
UTF-8
3,307
3.0625
3
[]
no_license
## CSCI 2020u Final Project - Computer Vision Deep Learning Demo by Tamilselvan Balasuntharam, Harrish Thasarathan, Tommy Turcotte and Spencer Denford https://github.com/Harry-Thasarathan/Java-Project.git ### Introduction: Here we present our final project for csci2020u, a computer vision and deep learning applic...
Java
UTF-8
781
3.109375
3
[]
no_license
import java.io.*; import java.util.*; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n=Integer.parseInt(br.readLine()); StringBuffer sb = new StringBuff...
C#
UTF-8
8,614
3.484375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading; namespace RoverOnMars { /// <summary> /// Class that contains the questions to set up the Rover class. /// </summary> class RoverQuestions { /...
JavaScript
UTF-8
550
2.75
3
[]
no_license
$.ajax({ type: "GET", url: "/get_feeds", }).done(function (data) { var container=document.getElementsByClassName("container")[0]; var feeds = JSON.parse(data); console.log(feeds) feeds.forEach(element => { var div = docume...
Java
UTF-8
5,744
2.140625
2
[]
no_license
package com.android.liyun.adapter; import android.content.Context; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseExpandableListAdapter; import android.widget.ExpandableListView; import android.widget.ImageView; impo...
JavaScript
UTF-8
1,119
2.796875
3
[]
no_license
// const categoriesContainer = document.getElementById('categories-container') // const recipesContainer = document.getElementById('recipes-container') // const categoryForm = document.getElementById("form-container") // const recipeForm = document.getElementById("form-container") const base_url = "http://127.0.0.1:300...
C++
UTF-8
185
2.84375
3
[]
no_license
#include "Triangulo.h" Triangulo::Triangulo(float base,float altura) { this->base=base; this->altura=altura; } float Triangulo::calcularArea() { return (base*altura)/2; }
C#
UTF-8
30,079
2.6875
3
[ "MIT" ]
permissive
using System.Threading.Tasks; using FluentAssertions; using FluentAssertions.Execution; using FluentAssertions.Primitives; using Microsoft.Playwright; using PlaywrightContrib.Extensions; using PlaywrightContrib.FluentAssertions.Internal; namespace PlaywrightContrib.FluentAssertions { /// <summary> /// Contains...
Markdown
UTF-8
9,833
2.921875
3
[]
no_license
# AdvancedDesign ## Projects: 1. Counterfeit/Bootleg/Appropriation 2. Remix 3. Subjective Dictionary 4. Process Book ## Rough Project Descriptions ### 1. Counterfeit/Bootleg/Appropriation This project will run for the next several weeks (8/26–9/30), it has several parts. Each part is its own “sub project” — meaning a...
Python
UTF-8
16,410
2.5625
3
[]
no_license
# -*- coding: utf-8 -*- """SOAP wrapper for CFME. Enables to operate Infrastructure objects. It has better VM provisioning code. OOP encapsulated. """ from suds import WebFault from utils import lazycache from utils.conf import cfme_data from utils.db import cfmedb from utils.log import logger from utils.soap import ...
C++
UTF-8
4,084
3.875
4
[ "WTFPL" ]
permissive
#include <iostream> #include <vector> #include <string> #include <math.h> //! One Dimensional Array Class class oneDimArray { public: //! Basic Constructor /* Should be _generally_ avoided */ oneDimArray (); //! One Dimensional Array Constructor /* Generates a vector given a size (type in...
JavaScript
UTF-8
4,552
3.203125
3
[]
no_license
// <⚠️ DONT DELETE THIS ⚠️> import "./styles.css"; // <⚠️ /DONT DELETE THIS ⚠️> const KEYLISTPENDING = "PENDING"; const KEYLISTFINISHED = "FINISHED"; let listPending = []; let listFinished = []; const formAddTask = document.querySelector(".form-add-task"); const inputAddTask = document.querySelector("input"); const u...
Java
UTF-8
4,782
1.859375
2
[]
no_license
/* *********************************************************************** * * project: org.matsim.* * Controler.java * * * *********************************************************************** * * ...
Java
UTF-8
847
2.65625
3
[]
no_license
package com.opdapp.model; import javax.persistence.*; @Entity public class Strength { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int strengthId; @ManyToOne @JoinColumn(name = "unitId") private StrengthUnit strengthUnit; private double strengthAmount; public Str...
C#
UTF-8
1,253
3.546875
4
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Linq; namespace LeetCode.Leets { class LevelOrderBottomSln : ISolution { public IList<IList<int>> LevelOrderBottom(TreeNode root) { IList<IList<int>> result = new List<IList<int>>(); if (root == null) return ...
Java
UTF-8
847
2.171875
2
[]
no_license
package com.nuts.demo.password; import com.nuts.framework.PlatformAPI; import com.nuts.framework.base.Response; import com.nuts.framework.exception.UserInfoException; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; /** * Created by hsha on 2018/3/30 13:40 */ @Cont...
JavaScript
UTF-8
3,618
2.53125
3
[]
no_license
/* eslint-disable no-unused-vars */ import './contact.css'; import React, { useState } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faPhone, faEnvelope } from '@fortawesome/free-solid-svg-icons' import { useForm } from 'react-hook-form'; const encode = (data) => { return Ob...
Markdown
UTF-8
2,508
2.671875
3
[ "MIT" ]
permissive
--- title: "Oruxmaps - 地圖、行跡、GPS,一手搞定" date: "2019-12-06" permalink: "2019-12-06-ourxmaps" --- # Oruxmaps - 地圖、行跡、GPS,一手搞定 ![](https://i.imgur.com/1Lhbgmd.png) > 本教學僅適用 android 手機喔~ 嗨大家,今天來跟大家推薦登山的新好伙伴 -- Oruxmpas 大家是否曾在山上拿著手上的地圖、指北針、GPS 看著遠方並思索著: - 我已經印了 10 張 A4 的地圖了,為什麼還是看不到對面的山頭是什麼!! - 探勘掏出 GPS 還要跟地圖來個交叉比對三百回合!...
Python
UTF-8
1,137
4
4
[]
no_license
# a nicer implementation def mergeSort(array): """ mergesort O(n log n) - time complexity O(n) - space complexity """ # base case if len(array) <= 1: return array # get midpoint midpoint = len(array)//2 # split left and right half of array call recursively left = me...
C
UTF-8
634
3.078125
3
[]
no_license
#include "math.h" #include "stdio.h" #include "8slgq.c" main() { int i, j; double u, v, w; double x[11], y[11], z[11][11]; for (i = 0; i <= 10; i++) { x[i] = 0.1 * i; y[i] = x[i]; } for (i = 0; i <= 10; i++) for (j = 0; j <= 10; j++) { z[i][j] = exp(-(x[i] ...
Java
UTF-8
417
1.703125
2
[]
no_license
package com.tohier.cartercoin.listener; import com.tohier.cartercoin.bean.UserShareOptionRanking; import java.util.ArrayList; /** * Created by Administrator on 2016/12/8. */ public interface ShareOptionRankingListener { void successRanking(ArrayList<UserShareOptionRanking> list); void fail(S...
Java
UTF-8
719
2.046875
2
[]
no_license
package com.bosch.ubk.test.sample.host.internal.api.impl; import org.junit.Assert; import org.junit.Test; public class LongRunningLRuntimeImplTest { @Test public void hardToTest() { LongRunningRuntimeImplUncleaned testObj = new LongRunningRuntimeImplUncleaned(); Assert.assertNotNull(testObj.getPath()); } ...
Java
UHC
411
3.234375
3
[]
no_license
package chapter14; import java.util.Scanner; public class NumberEx2 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner s = new Scanner(System.in); System.out.println("ڸ Էϼ."); //ڰ Ƿ ȯ Ұ Էϸ ߻ int input = s.nextInt(); System.out.println(input); } }
Markdown
UTF-8
1,345
2.609375
3
[]
no_license
# Toscana Data source: https://raw.githubusercontent.com/pcm-dpc/COVID-19/master/dati-json/dpc-covid19-ita-regioni.json Delta days analysis (j): 12 Analyses for other values of j for 2020-04-15 are avalable [here](../2020-04-15/README.md) Analyses for Toscana for previous dates are avalable [here](../README.md) ##...
Java
UTF-8
1,364
2.53125
3
[]
no_license
package com.crane.instafoll.machine.states; import com.crane.instafoll.machine.Machine; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.telegram.telegrambots.meta.api.objects.Update; import static com.crane.instafoll.Bot.getUserName; import static com.crane.instafoll.machine.states...
Python
UTF-8
253
2.9375
3
[]
no_license
A, B, C, X, Y = map(int, input().split()) best = 10**9 for c in range(max(X, Y)*2+1): a = X-c b = Y-c if a < 0: a = 0 if b < 0: b = 0 p = A*a + B*b + C*c*2 if p < best: best = p print(best)
Python
UTF-8
299
3.109375
3
[]
no_license
import random def select_random_sample(count): random_indices = random.sample(range(0, income.shape[0]), count) return income.iloc[random_indices] random.seed(1) random_sample = [select_random_sample(100)["median_income"].mean() for _ in range(1000)] plt.hist(random_sample, 20) plt.show()
PHP
UTF-8
1,098
2.734375
3
[]
no_license
<?php include "class.phpmailer.php"; // require_once('/home/appuser/php_lib/class.phpmailer.php'); $mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch $mail->IsSMTP(); // telling the class to use SMTP try { $mail->Host = "smtp.optus.com.a...
JavaScript
UTF-8
3,344
2.640625
3
[ "Apache-2.0" ]
permissive
const areaList = [{ name: '广东省', id: 1, parentId: 0 }, { name: '广州市', id: 2, parentId: 1 }, { name: '花都区', id: 3, parentId: 2 }, { name: '白云区', id: 4, parentId: 2 }, { name: '天河区', id: 5, parentId: 2 }, { name: '从化区', id: 6, parentId: 2 }, { name: '黄浦区', id: 7, parentId: 2 }] ...
PHP
UTF-8
1,534
2.53125
3
[ "MIT" ]
permissive
<?php namespace App\Console\Commands; use App\Customer; use App\Loan; use App\LoanSchedule; use App\Notifications\LoanAdvice; use Carbon\Carbon; use Illuminate\Console\Command; use Illuminate\Notifications\Notifiable; class EmailAdvice extends Command { use Notifiable; /** * The name and signature of th...
Markdown
UTF-8
1,845
2.71875
3
[]
no_license
# 스프링프레임워크 공부 기록 ✅ 인프런 강좌를 듣고 배운 내용을 요약, 정리하고 있습니다. ✅ 스프링 프레임워크, 스프링부트, JPA를 활용한 개발 내용을 포함하고 있습니다. ## 1. 스프링 핵심 원리 기본편 👉 출처 : [스프링 핵심 원리 - 기본편 (김영한) ](https://www.inflearn.com/course/%EC%8A%A4%ED%94%84%EB%A7%81-%ED%95%B5%EC%8B%AC-%EC%9B%90%EB%A6%AC-%EA%B8%B0%EB%B3%B8%ED%8E%B8/) > 스프링 입문자가 예제를 만들어가면서 스프링의 핵심 원리를 이해...
Markdown
UTF-8
5,021
3.140625
3
[]
no_license
### CST356 Week 5 Lab - Rachel Soderberg ##### Exercise 1 ###### 1. Create a new MVC project for this lab. Copy code from last week's lab as a starting point. ###### 2. Create a separate “repository” class with an associated interface for storing data in the database. Unlike the example, for the lab you can use a si...
Java
UTF-8
1,652
3.265625
3
[]
no_license
import com.pi4j.io.gpio.*; /** * A class used to check if a bumper has made contact with anthing. It is very similar to Class Button but it uses * PULL_UP instead of PULL_DOWN. * * @author Harry Schneider (HS308) * @version 1.0 */ public class Bumper { // The bumper instance is an input pin. private Gpi...
SQL
UTF-8
675
3.234375
3
[]
no_license
drop table if exists house; drop table if exists house_keeper; create table if not exists house_keeper ( id varchar (36) primary key, first_name varchar (255) not null, last_name varchar (255) not null, age integer not null, level integer not null default 1, status varchar not null default 'ACT...
TypeScript
UTF-8
2,662
2.65625
3
[ "MIT" ]
permissive
import * as SockJS from 'sockjs-client'; import * as Stomp from 'stompjs/lib/stomp'; interface TokenInfo { access_token: string expires_in: number refresh_token: string token_type: string } function apiFetch(...args) { let [url, options] = args; options.credentials = 'same-origin'; options.headers = { ...opti...
Java
UTF-8
1,016
1.835938
2
[ "Apache-2.0" ]
permissive
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 商品咨询信息 * * @author auto create * @since 1.0, 2023-01-17 15:17:44 */ public class ItemConsultInfo extends AlipayObject { private static final long serialVersionUID = 6728841296971122972L; ...
C#
UTF-8
1,028
3.859375
4
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Linq; namespace GenericSwapMethodString { public class Launcher { public static void Main() { int inputStringsCount = int.Parse(Console.ReadLine()); IList<Box<string>> list = new List<Box<string>>(); ...
Python
UTF-8
1,274
2.90625
3
[]
no_license
# A dictionary of movie critics and thier ratings of a small set of movies critics= { 'Lisa Rose' : {'Lady in the Water' : 2.5,'Snakes on a Plane' : 3.5,'Just My Luck' : 3.0 ,'Superman Returns' : 3.5, 'You,Me and Dupree' : 2.5 , 'The Night Listener' : 3.0}, 'Gene Seymour' : { 'Lady in the Water' : 3...
Swift
UTF-8
9,007
2.71875
3
[ "Apache-2.0" ]
permissive
// // StoreAPI.swift // // Generated by openapi-generator // https://openapi-generator.tech // import Foundation #if canImport(AnyCodable) import AnyCodable #endif open class StoreAPI { /** Delete purchase order by ID - parameter orderId: (path) ID of the order that needs to be deleted - pa...
Java
UTF-8
988
1.882813
2
[ "Apache-2.0" ]
permissive
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 内部开放给金融云端用于查询pid下面所有小程序的详细信息 * * @author auto create * @since 1.0, 2022-09-04 22:04:30 */ public class AlipayOpenMiniCloudDetailQueryModel extends AlipayObject { private static final long s...
JavaScript
UTF-8
2,303
2.703125
3
[]
no_license
//使用nodejs 的MySQL库,直接管理MySQL数据库 //2015/12/12 @chaimol //使用连接池方法连接数据库 var mysql = require('mysql'); var pool = mysql.createPool({ host: '127.0.0.1', user: 'root', password: '', port: '3306', database: 'phplesson1' }); pool.getConnection(function(err, connection) { //查询全部 // connection.que...
Java
UTF-8
5,911
2.015625
2
[ "BSD-3-Clause", "Apache-2.0", "MPL-2.0" ]
permissive
// *** WARNING: this file was generated by pulumi-java-gen. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package com.pulumi.aws.connect.inputs; import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import java.lang.String; import java.util.Map; import java....
Java
UTF-8
1,058
3.78125
4
[]
no_license
package algorithm.structs; /** * created 4/16/2021 10:34 AM * * @author luowen <loovien@163.com> */ public class SingleDirectLink { static class Node { public Node next; public String value; public Node(String value) { this.value = value; } } public static...
Python
UTF-8
8,018
2.609375
3
[]
no_license
import tkinter as tk from tkinter import * from tkinter import filedialog import mysql.connector from mysql.connector import Error import tkinter.font as font import csv from PIL import ImageTk, Image from functools import partial import os from load_database import load_image_database import shutil names = [] def sho...
Markdown
UTF-8
9,172
3.015625
3
[]
no_license
# Sikorka Sikorka is an Ethereum based system that allows for deployment of decentralized blockchain contracts on locations in the real world. This is achieved by a combination of hardware beacons, a mobile application and ethereum smart contracts. In the end any user can deploy a contract on a specific real world loc...
Markdown
UTF-8
8,652
2.8125
3
[ "CC-BY-4.0" ]
permissive
24 Microbial Symbioses Background Most microorganisms live together in interacting communities in the environment. These inter-microbial relationships form the base of the (and sometimes the entire) food web. Microbes can exhibit any and all of the possible relationships with other microbes. Some common relationship...
Shell
UTF-8
2,339
4.0625
4
[]
no_license
#!/usr/bin/env bash # # Credit to: # https://github.com/alebcay/pushblast if [[ $1 = "" ]] ; then echo "usage: pushblast \"command_to_be_executed\"" exit 1 fi if [ ! -d ~/.config/pushblast/lib ] ; then mkdir -p ~/.config/pushblast/lib fi if [ ! -e ~/.config/pushblast/lib/pushbullet ] ; then echo "Downloadi...
C#
UTF-8
1,955
2.859375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using DataLayerCommon.Addresses; using DataLayerCommon.Phones; using DataLayerCommon.Places; using static CommonData.Enums.AddressEnums; using static CommonData.Enums.PhoneEnums; using static CommonData.Enums.PlaceEnums; namespace DataLayerRetrieval.P...
Java
UTF-8
574
3.203125
3
[]
no_license
/** * */ package homework.symbol; /* * @author winy * @date 2019年3月17日 */ public enum Symbol { I(1), V(5), X(10), L(50), C(100), D(500), M(1000); private int val; private Symbol(int val) { this.val = val; } public int getVal() { return val; } ...
Python
UTF-8
876
3.875
4
[ "MIT" ]
permissive
# spelare name, email, latest score, high score class Player: def __init__(self, name, email): self.__name = name self.__email = email self.__latest_score = 0 self.__high_score = 0 def set_last_score(self, score): self.__latest_score = score if score > self.__hi...
Python
UTF-8
530
3.984375
4
[ "MIT" ]
permissive
def voto(age): from datetime import date this_year = date.today().year player_age=this_year-age if (this_year-age)<16: return f'Você tem {player_age} anos.\nVocê ainda não tem idade para votar.' elif (this_year-age)>18: return f'Você tem {player_age} anos. \nVocê já tem idade para vo...
Java
UTF-8
5,514
3.03125
3
[ "Apache-2.0" ]
permissive
package cn.com.lemon.annotation; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.LinkedList; import java.util.List; /** * Java reflection utility classes * <p> * * @author shellpo shih * @ver...
JavaScript
UTF-8
3,265
2.53125
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* Copyright 2019 Adobe Inc. All rights reserved. This file is licensed to you 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 a...
Ruby
UTF-8
440
3.3125
3
[ "MIT" ]
permissive
def qsort(arr) return arr unless arr.length > 1 pivot = arr[0] i = 0 left = [] right = [] while (i = i + 1) < arr.length if arr[i] < pivot left.push arr[i] else right.push arr[i] end end left = qsort left right = qsort right left.push pivot i = -1 while (i = i + 1) < righ...
JavaScript
UTF-8
473
2.75
3
[]
no_license
function extractMenuCategory(menuList){ var categories=Array.from(new Set(menuList.map((val)=>{ return val.category }))) var items=categories.map((val)=>{ return menuList.filter(item=>{ return item.category===val }) }) items.sort((item1, item2) => item1.timesta...
Shell
UTF-8
215
2.59375
3
[ "Apache-2.0" ]
permissive
#!/bin/sh set -o nounset set -o errexit STARTUP_DIR="$( cd "$( dirname "$0" )" && pwd )" mkdir -p /data-logs/seldon-server ln -snv /data-logs/seldon-server /apps/tomcat7/logs/ /apps/tomcat7/bin/catalina.sh run
Python
UTF-8
552
3.328125
3
[]
no_license
class Solution: def sortedSquares(self, A: List[int]) -> List[int]: x, mid = min([(abs(x), i) for (i, x) in enumerate(A)]) ans = [] ans.append(x ** 2) i, j = mid - 1, mid + 1 inf = float('inf') while i >= 0 or j < len(A): left, right = A[i] if i >= 0 else ...
JavaScript
UTF-8
3,984
2.5625
3
[]
no_license
// npm modules // ‾‾‾‾‾‾‾‾‾‾‾‾ // const Sql = require('./sql.js') const inquire = require('inquirer') const mysql = require('mysql') const Table = require('cli-table2') const colors = require('colors') // global variables // ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ const connection = mysql.createConnection({ host: 'localhost', ...
C#
UTF-8
1,115
2.59375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using LeanKit.API.Client.Library; using LeanKit.API.Client.Library.TransferObjects; namespace LeanKitQuery { public class ListBoardIDsQuery : ILeanKitQuery { public int RunQuery(ILeanKitApi client, ...
TypeScript
UTF-8
2,002
2.875
3
[ "MIT" ]
permissive
import { options, LANDSCAPE, PORTRAIT, UP, DOWN, LIGHT, DARK } from '.' const mediaQuery = (input, returnType: StringConstructor | ObjectConstructor = String) => { let generated = returnType === String ? '' : {} if (typeof input[0] === 'string') { input = [input] } for (const value of input) {...
Java
UTF-8
3,973
1.78125
2
[]
no_license
/* * Copyright 2001-2007 The European Bioinformatics Institute. * * 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 require...
C++
UTF-8
1,818
2.78125
3
[]
no_license
#include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; typedef struct _Node { int num, cost; } Node; int n, m, first, last, result = 0; vector<vector<Node>> arr, parent; vector<int> cnt, last_dist, visit; void Function() { queue<Node> pq; pq.push({first, 0}); ...
PHP
UTF-8
3,919
2.609375
3
[]
no_license
<?php Core::load('CMS.Fields'); class Component_Nodus_Fields_ItemsMultilink_Type extends CMS_Fields_AbstractField implements Core_ModuleInterface { static $items = array(); public function items($data) { if (!isset($data['selector'])) { return false; } $selector = trim($data['selector']); if (!isset(s...
Java
UTF-8
312
1.921875
2
[]
no_license
package com.pharm.service.interfaces.manager; import com.pharm.model.Manager; import java.util.List; public interface ManagerService { List<Manager> findAll(); Manager findById(Long id); Manager create(Manager manager); Manager update(Manager manager); Manager delete(Manager manager); }
TypeScript
UTF-8
1,170
3.234375
3
[]
no_license
export interface NamesAndMapAndList<P, T extends { [index: string]: P }> { map: { [U in keyof T]: U }; list: P[]; names: string[]; } export function toNamesAndMapAndList<P, T extends { [index: string]: P }>(data: T): NamesAndMapAndList<P, T> { const map: { [U in keyof T]: U } = ...
Markdown
UTF-8
8,256
2.953125
3
[ "CC-BY-4.0", "OFL-1.1", "MIT" ]
permissive
_model: page --- _template: page-with-toc.html --- title: Translation Guide --- description: Our translation files are hosted and managed on [Transifex](https://www.transifex.com). It's very easy to sign up for an account and start translation CC services into another language. --- body: CC applications such as CC Sea...
TypeScript
UTF-8
4,294
2.625
3
[]
no_license
import { Router } from 'express'; import * as coffeeService from "../service/CoffeeService"; import { Coffee } from "./../model/coffee"; import {log} from "./../utils/Logger"; export const coffeeRouter = Router(); var path = require('path'); var scriptName = path.basename(__filename); coffeeRouter.get('/', async (req,...
Java
UTF-8
11,666
1.796875
2
[]
no_license
package com.example.mijin.hue.Day; /** * Created by mijin on 2017-11-26. */ import android.content.ContentValues; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.os.AsyncTask; import android.os.Bundle; import android.support.v7.app.Aler...
PHP
UTF-8
283
2.6875
3
[ "BSD-3-Clause" ]
permissive
<?php namespace app\board\entities; interface AdInterface { /** * @return string */ public function getFullName(); /** * @return int */ public static function type(); /** * @return string */ public function getMainPhoto(); }
C
UTF-8
368
2.5625
3
[]
no_license
#include<stdio.h> #include<string.h> int main(){ int n,i,count=0; scanf("%d",&n); char str[101],S[101]; char tem,tab[256]={0}; scanf("%s",str); for(i=0;i<n;i++){ str[i]=tolower(str[i]); tem=str[i]; if(tab[tem]==0){ tab[tem]=1; count++; } } if(count==26) printf("YES...
Java
UTF-8
291
2.84375
3
[]
no_license
package br.com.teste.dias.semana.interno; public class EnumInternoTeste { public static void main(String[] args) { EnumInterno enumInterno = new EnumInterno(); enumInterno.setDia(EnumInterno.DiaSemana.QUARTA.getValor()); System.out.println(" Dia: " + enumInterno.getDia()); } }
Java
UTF-8
7,405
2.15625
2
[ "Apache-2.0" ]
permissive
package net.sf.webdav.methods; import java.io.PrintWriter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.sf.webdav.IMimeTyper; import net.sf.webdav.ITransaction; import net.sf.webdav.IWebdavStore; import net.sf.webdav.StoredObject; import net.sf.webdav.Webdav...
Markdown
UTF-8
112,131
2.75
3
[ "CC-BY-4.0" ]
permissive
--- id: EntitySelectionClass title: EntitySelection --- Una entity selection es un objeto que contiene una o más referencias a [entidades](ORDA/dsMapping.md#entity) pertenecientes a la misma [Dataclass](ORDA/dsMapping.md#dataclass). Una entity selection puede contener 0, 1 o X entidades de la dataclass -- donde X pue...
Java
UTF-8
857
2.390625
2
[ "Apache-2.0" ]
permissive
package hx.codeReviewer.lang.wm.ast; import com.wm.lang.flow.FlowLoop; /** * * @author Xiaowei Wang * @version 1.1 * * This class represents flow element com.wm.lang.flow.FlowLoop. * */ public class ASTFlowLoop extends AbstractFlowElement { public ASTFlowLoop(ASTPackage _package, AST...
JavaScript
UTF-8
1,597
2.609375
3
[]
no_license
import Resolver from "./Resolver"; import Route from "./Route"; export default class Router { /** * @param {Route[]} routes * @param {object} options * @returns {boolean|Route} */ constructor(routes = [], options = {}) { this.setRoutes(routes); this.setOptions(options); ...
Shell
UTF-8
716
3.296875
3
[]
no_license
#!/bin/bash # Realizando backup cp /home/george/git/bentham/bin/run_tests.sh backTemp scriptDeTestes='#!/bin/bash i=0 files=() CIRCLE_NODE_TOTAL=1 CIRCLE_NODE_INDEX=0 for file in $(find target/test-classes -name "*Test.class" | grep -v ConsultasSQLDBTest | sort) do if [ $(($i % $CIRCLE_NODE_TOTAL)) -eq $CIRCLE_NOD...
Java
UTF-8
3,072
2.03125
2
[]
no_license
package cn.springboot.model.simple; import java.math.BigDecimal; import java.util.Date; public class Toilet { private Long pkId; private String address; private String longitude; private String latitude; private Boolean checkStatus; private String description; private String pictureU...
Python
UTF-8
5,950
3.078125
3
[ "MIT" ]
permissive
''' read_ground_trips.py Put ground trips into the truth table for evaluation ''' import pandas as pd import numpy as np def read_trips_file(filename): df = pd.read_csv(filename, sep='\t') df_new = df[(df['Trip Rating'] == '3') | (df['Trip Rating'] == '2')] return df_new def process_values(df): ...
Markdown
UTF-8
6,994
3.203125
3
[]
no_license
# 初识计算机和Java语言 ## 计算机的体系结构 ### 计算机的基本概念 - 计算机(Computer)俗称电脑,是现代一种用于高级计算,使用非常广泛 的设备,主要由计算机硬件和计算机软件两个部分组成。 - 计算机硬件是客观存在的各种计算机相关设备,而计算机的软件是用于 控制各种硬件设备完成各种功能。 ### 常见的主要硬件 计算机硬件(Computer Hardware)主要包括:中央处理器(CPU)、内存、 硬盘、输入输出设备、主板、机箱和电源等辅助设备。 CPU - 中央处理器(英文Central Processing Unit) - 是计算机中最核心的部件,类似于人的大脑 - 是一台计算机运算核心和控制核心...
C#
UTF-8
790
3
3
[ "BSD-3-Clause" ]
permissive
using System; using SharpRomans.Support; namespace SharpRomans { public partial class NumeralOutOfRangeException : ArgumentOutOfRangeException { public NumeralOutOfRangeException() { } public NumeralOutOfRangeException(string message) : base(message) { } public NumeralOutOfRangeException(string message, Exc...
PHP
UTF-8
3,981
2.546875
3
[ "MIT" ]
permissive
<?php namespace Boo\Persona; use GuzzleHttp\Client; use GuzzleHttp\Handler\MockHandler; use GuzzleHttp\HandlerStack; use GuzzleHttp\Middleware; use GuzzleHttp\Psr7\Response; use PHPUnit_Framework_TestCase; class VerifierTest extends PHPUnit_Framework_TestCase { protected $responses = [ 'valid' ...
JavaScript
UTF-8
2,178
2.734375
3
[ "MIT" ]
permissive
import { useEffect, useState } from 'react'; import { Redirect } from 'react-router-dom'; import { loadFromLocalStorage, saveToLocalStorage } from '../../utils/localStorage'; import { Container, Content, Text, SubText, Form, Input, TotalText, PlaceOrderButton, } from './styles'; function ConfirmOr...
Java
UTF-8
1,456
1.570313
2
[ "Apache-2.0" ]
permissive
/* * Copyright (c) 2014. igitras.com * * 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 agreed ...
Java
UTF-8
290
1.984375
2
[]
no_license
package pe.edu.upc.prueba.services; import java.util.Optional; import pe.edu.upc.prueba.entities.Resident; public interface ResidentService extends CrudService<Resident, Long> { Optional<Resident> auth(String email, String password); Optional<Integer> authToken(String token); }
C++
UTF-8
6,725
3.53125
4
[]
no_license
#include <iostream> #include <cstdio> #include <stdlib.h> #include <time.h> #define Tam 12 using namespace std; void Leitura(); void ordenar(int); // metodo que é chamado no switch void bubble(); void Insert(); void Seletion(); void Count(); void CountDistr(); void Shell(); void MergeSort(); double T; //Variavel que a...
Java
ISO-8859-1
2,103
3.9375
4
[ "MIT" ]
permissive
import java.util.ArrayList; import java.util.Scanner; public class Gato extends Animal { Scanner ler = new Scanner(System.in); public Gato() {}; public Gato(String nome, int idade, boolean vacinado, String genero) { setNome(nome); setIdade(idade); setVacinado(vacinado); setGenero(genero); } ArrayList...
Java
UTF-8
14,330
1.90625
2
[]
no_license
package com.augurit.awater.dri.installRecord.rest; import com.augurit.agcloud.common.controller.BaseController; import com.augurit.agcloud.opus.common.domain.OpuOmOrg; import com.augurit.agcloud.opus.common.domain.OpuOmUser; import com.augurit.agcloud.opus.common.domain.OpuOmUserInfo; import com.augurit.agcloud.org.re...
Java
UTF-8
4,957
3.40625
3
[]
no_license
package com.song.demo.event; import java.util.Collection; import java.util.EventListener; import java.util.EventObject; import java.util.HashSet; import java.util.Iterator; /** * java事件处理机制(自定义事件) * java中的事件机制的参与者有3种角色: * 1.event object:事件状态对象,用于listener的相应的方法之中,作为参数,一般存在与listerner的方法之中 * 2.event source:具体的事件源,比...
Python
UTF-8
340
2.515625
3
[]
no_license
import cv2 image_file = "Image/study_image.jpg" original = cv2.imread(image_file, cv2.IMREAD_COLOR) gray = cv2.imread(image_file,cv2.IMREAD_GRAYSCALE) unchange = cv2.imread(image_file, cv2.IMREAD_UNCHANGED) cv2.imshow("imread_color", original) cv2.imshow("image_gratscale", gray) cv2.imshow("imread_unchange",uncha...
Python
UTF-8
387
3.921875
4
[]
no_license
# Bar plots With Percentages # Will use catplot() as it will be a categorical analysis. import matplotlib.pyplot as plt import seaborn as sns # Use the survey_data DataFrame and sns.catplot() to create a bar plot with "Gender" on the x-axis # and "Interested in Math" on the y-axis. sns.catplot(data=survey_data, x='G...
C
UTF-8
481
3.359375
3
[]
no_license
#include "stack.h" #include "tree.h" void push(stack *s, node* x) { s->a[s->i]= x; (s->i)++; } /* the caller should check that the stack is not empty before calling pop() */ node* pop(stack *s) { tree t = s->a[s->i - 1]; (s->i)--; return t; } int empty(stack *s) { return s->i == 0; } int full(stack *s) { retur...
Python
UTF-8
716
2.84375
3
[]
no_license
import base64 import binascii import dateutil.parser # Decode an uplink message payload from a buffer # From base64 payload to hex to string decoder def decoder(payload): messageByte = base64.b64decode(payload) return messageByte.decode('utf-8') # Convert bytes in hexadecimal to string def hex_to_string(p...
Java
UTF-8
1,087
2.46875
2
[]
no_license
package webfrontend.restful_newsticker.view; import java.awt.BorderLayout; import javax.swing.JDialog; import javax.swing.JEditorPane; import javax.swing.JScrollPane; import webfrontend.WebFrontend; public class ArticleDialog extends JDialog { private JEditorPane htmlpane; private JScrollPane scrollpane; publ...
Java
UTF-8
1,257
2.40625
2
[]
no_license
package servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import dao.BookDAO; import se...
Python
UTF-8
556
4.875
5
[ "MIT" ]
permissive
# comparison operators temperature = 35 if temperature > 30: print("It's a hot day.") else: print("It's not a hot day.") # exercise - If name is less than 3 characters long # name must be at least 3 characters # otherwise if it's more than 50 characters long # name can be maximum of 50 characters # other...
Java
UTF-8
1,536
2.203125
2
[]
no_license
package mx.unam.ciencias.is.mapeobd; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Table; /** * * @aut...
Markdown
UTF-8
1,516
3.03125
3
[ "Apache-2.0" ]
permissive
# Vert.x Concurrent [![Build Status](https://travis-ci.org/rworsnop/vertx-concurrent.svg?branch=master)](https://travis-ci.org/rworsnop/vertx-concurrent) A selection of utilities from java.util.concurrent, in Vert.x-aware, non-blocking form. See the [api docs](http://rworsnop.github.io/vertx-concurrent/apidocs/) ##...
Python
UTF-8
308
3.046875
3
[]
no_license
D1={'a':10,'b':20,'c':30,'d':40} D2={'c':12, 'e':15, 'f':18} D={} for each in D1.keys(): if each in D2: D.setdefault(each,D1[each]+D2[each]) else: D.setdefault(each,D1[each]) for each in D2.keys(): if each not in D: D.setdefault(each,D2[each]) print (D)
Java
UTF-8
2,409
2.421875
2
[]
no_license
package com.example.web; import com.example.domain.model.EmployeeEntity; import com.example.domain.model.MappingHelper; import com.example.domain.repository.EmployeeRepository; import com.example.domain.service.BenchmarkService; import lombok.RequiredArgsConstructor; import org.springframework.http.ResponseEntity; imp...