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
TypeScript
UTF-8
573
2.828125
3
[ "MIT" ]
permissive
export class ResultHolder { constructor(readonly encryptedText: string, readonly keyhash: string, readonly toleranceDistance?: number, readonly salt?: Uint8Array, readonly iv?: Uint8Array) { } public getEncryptedText(): string { return this.encryptedText } public getKeyHash(): string { ...
C++
GB18030
1,196
2.53125
3
[]
no_license
/****************************************************************************** Ȩ (C), 2013 - 2014, Ĵʤɷ޹˾ ļ: wcmd.h ߡ: :1.0 ڡ:2013/05/22 : ҪWCmdӿ : ******************************************************************************/ #ifndef _WCMD_H_ #define _WCMD_H_ #include "../wdllimport.h" /...
Shell
UTF-8
1,357
3.203125
3
[ "MIT" ]
permissive
#!/bin/bash -e # Usage `./install_golang.sh && source ~/.bash_profile` GO_VERSION=1.10.1 PECO_VERSION=v0.5.3 GO_URL=https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz install_gvm() { echo "" } install_golang() { wget -O - ${GO_URL} | sudo tar zxC /usr/local cp ./.bash.d/go.sh ${HOME}/....
PHP
UTF-8
2,449
2.53125
3
[]
no_license
<?php /** * Created by PhpStorm. * User: Brad * Date: 5/22/14 * Time: 10:43 PM */ function getFriendBoothsSQL($pageUser, $pageNum, $howMany) { if ($_SESSION['username'] == $pageUser) { $sql = "SELECT b.`fkUsername`, b.`pkNumber`, b.`blurb`, b.`datetime`, b.`imageTitle`, b.`filetype`, b.`imageHeightP...
Markdown
UTF-8
634
2.828125
3
[]
no_license
# mi_card A mini project that shows user's personal card. For this project, I used Educaree informartion. Educaree is a starting company which I work on, and it made me excited to its card, even though it is not an official app. ## Getting Started To run this app, everything you have to do is to clone it, open it on...
TypeScript
UTF-8
452
3
3
[]
no_license
export class HttpResponseError { constructor(status? : number, errorMessage? : string, errorDescription? : string) { this.status = status; this.errorMessage = errorMessage; this.errorDescription = errorDescription; } public status : number; public errorMessage : string; publi...
JavaScript
UTF-8
2,355
2.703125
3
[]
no_license
import express from 'express' import cors from 'cors' import dotenv from 'dotenv' import mongoose from 'mongoose' import listEndpoints from 'express-list-endpoints' import designers from './data/designers.json' dotenv.config() // Mongoose set up const mongoUrl = process.env.MONGO_URL || "mongodb://localhost/project-m...
JavaScript
UTF-8
543
3.34375
3
[]
no_license
let DateObject = new Date(), currentDay = (DateObject.getDate() + 1 < 10)? `0${DateObject.getDate() + 1}`: DateObject.getDate() + 1, currentMonth = (DateObject.getMonth() + 1 < 10)? `0${DateObject.getMonth() + 1}`: DateObject.getMonth() + 1, currentYear = DateObject.getFullYear(); console.log(`${curre...
C++
GB18030
910
3.6875
4
[]
no_license
#include<iostream> #include<cstdio> /* A^Bλʾ ˵A^BĺǡABη Input ݰʵÿʵռһУABɣ1<=A,B<=10000A=0, B=0ʾݵĽ Output ÿʵA^BλʾÿռһС Sample Input 2 3 12 6 6789 10000 0 0 Sample Output 8 984 1 */ using namespace std; const int mod=1000; //λȡģ1000 int QuickPower(int x,int n){ int answer = 1; ...
Java
UTF-8
2,356
2.75
3
[]
no_license
package org.geogebra.common.kernel.geos; import org.geogebra.common.kernel.Construction; import org.geogebra.common.media.MediaFormat; import org.geogebra.common.media.MediaURLParser; /** * Class for representing playable media data. * * @author laszlo * */ public abstract class GeoMedia extends GeoWidget { /*...
Markdown
UTF-8
2,082
2.953125
3
[ "MIT" ]
permissive
--- title: Agaður vilji date: 02/08/2022 --- Einn versti óvinur vilja okkar eru tilfinningar okkar. Í síauknum mæli búum við í menningarumhverfi sem er fullt af myndum og tónlist sem geta haft bein áhrif á skynfæri okkar og vakið tilfinningar okkar – reiði, ótta eða girnd – án þess að við gerum okkur grein fyrir því...
Java
UTF-8
1,857
1.671875
2
[ "Apache-2.0" ]
permissive
package org.springdoc.core; import org.springdoc.api.ActuatorProvider; import org.springdoc.api.MultipleOpenApiResource; import org.springframework.beans.factory.ObjectFactory; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.Conditional...
Java
UTF-8
826
2.109375
2
[]
no_license
package com.wearezeta.auto.web.pages; import com.wearezeta.auto.common.driver.DriverUtils; import com.wearezeta.auto.common.driver.ZetaWebAppDriver; import com.wearezeta.auto.web.locators.WebAppLocators; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import java.util.concurrent.Futu...
Java
UTF-8
262
2.1875
2
[]
no_license
public class Constructor_2_3_18 { public Constructor_2_3_18 (){ System.out.println("yes constructor"); } public static void main(String[] args) { // TODO Auto-generated method stub Constructor_2_3_18 obj =new Constructor_2_3_18(); } }
C++
UTF-8
6,038
2.65625
3
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// -------------------------------------------------------------------------- // BcastClasses.cpp // -------------------------------------------------------------------------- // this file tests functions to broadcast and serialize classes. // -------------------------------------------------------------------------- ...
Python
UTF-8
58
3.453125
3
[]
no_license
str=input("enter the string") str1=str[1::2] print(str1)
Java
UTF-8
299
2.453125
2
[]
no_license
/** *file driver_proj0.java *author: Garrett Meyer *course: CMPT 220 *assignment: project 0 *due date: September 6 *version: 1.8 * *The file "driver_proj0" contains the words hello and world */ public class driver_proj0{ public static void main (String[] args){ System.out.println("Hello World!"); } }
C#
UTF-8
4,912
2.6875
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using ExpenseMonitor.Helpers; namespace ExpenseMonitor { public partial class frmDescription : Form { public frmDescription() { ...
Java
UTF-8
359
1.976563
2
[]
no_license
package com.neuedu.hismedicalsystem.model.mapper; import com.neuedu.hismedicalsystem.model.po.Dept; import java.util.List; public interface DeptMapper { public List<Dept> getDepts(Dept condition); public void delDept(String deptcode); public void addDept(Dept dept); public void updateDept(Dept dep...
Java
UTF-8
102
1.71875
2
[]
no_license
package net.ilbay.listener; public interface ConfirmationDialogListener { public void confirmed(); }
SQL
UTF-8
874
3.078125
3
[]
no_license
-- +migrate Up CREATE TABLE IF NOT EXISTS `auto_orders` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `created_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ); CREATE TABLE IF NOT EXISTS `through` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `date` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id...
PHP
UTF-8
2,205
2.59375
3
[]
no_license
<?php namespace Inkweb\ModuleBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Inkweb\EleveBundle\Entity\Eleve; use Symfony\Component\Validator\Constraints as Assert; /** * Note * * @ORM\Table(name="note") * @ORM\Entity(repositoryClass="Inkweb\ModuleBundle\Repository\NoteRepository") */ class Note { /** ...
Python
UTF-8
308
2.9375
3
[]
no_license
# -*- coding: utf-8 -*- n,k = map(int, input().split()) bp = [] for i in range(30): bp.append(1/2**i) res = 0 for i in range(1,n+1): if i>=k: res += 1/n continue x = i cnt = 0 while x<k: x *= 2 cnt += 1 res += bp[cnt]/n print("{:.12f}".format(res))
Java
UTF-8
3,496
1.804688
2
[]
no_license
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Java
UTF-8
4,068
2.96875
3
[]
no_license
package pl; import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.event.EventType; import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.Scene; import javafx.scene.control.*; import javafx.scene.input.MouseButton; import javafx....
Java
UTF-8
2,568
2.578125
3
[]
no_license
package service.impl; import dao.impl.HibernateGameDAO; import dao.impl.HibernateReviewDAO; import dao.interf.GameDAO; import dao.interf.ReviewDAO; import dao.interf.UserDAO; import model.Game; import model.Review; import model.User; import service.interf.ServiceUser; import java.util.ArrayList; import java.util.stre...
Python
UTF-8
1,375
3.140625
3
[ "MIT" ]
permissive
# -*- coding: utf-8 -*- """ created by huash06 at 2015-04-27 09:51 Sort a linked list using insertion sort. """ __author__ = 'huash06' import sys import os import datetime import functools import itertools import collections # Definition for singly-linked list. class ListNode: def __init__(self, x): se...
Ruby
UTF-8
426
2.828125
3
[]
no_license
require_relative '../setup' require_relative './exercise_1' require_relative './exercise_2' require_relative './exercise_3' require_relative './exercise_4' puts "Exercise 5" puts "----------" # Your code goes here ... total_rev = Store.sum(:annual_revenue) puts total_rev total_avg_rev = Store.average(:annual_revenue)...
Markdown
UTF-8
900
2.984375
3
[ "Apache-2.0" ]
permissive
--- layout: blog_full_layout title: Lori Now category: who image: --- I studied painting at Pratt Institute and have worked in special effects and animation in the commercial art world. My art inspires me to create innovative lessons and techniques, teaching that art is about growing through the process, not only ab...
JavaScript
UTF-8
3,149
2.59375
3
[]
no_license
import React from 'react' import { Text, View, Platform, StatusBar, StyleSheet, ImageBackground, ActivityIndicator, KeyboardAvoidingView } from 'react-native' import SearchInput from './src/components/SearchInput' import { fetchLocationId, fetchWeather } from './src/utils/api' import getWeatherImage f...
Java
UTF-8
1,813
2.21875
2
[]
no_license
/* Copyright (C) Atos Worldline $Id$ $Log$*/ package net.atos.odc.techforum.app.model; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) publ...
Java
UTF-8
275
2.140625
2
[]
no_license
package org.huigod.server.common; /** * 配置解析异常类 */ public class ConfigurationException extends Exception{ public ConfigurationException(String msg) { super(msg); } public ConfigurationException(String msg,Exception e) { super(msg, e); } }
Java
UTF-8
11,938
2.0625
2
[ "Apache-2.0" ]
permissive
/******************************************************************************* * Copyright 2015-2016 - CNRS (Centre National de Recherche Scientifique) * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for a...
Ruby
UTF-8
4,698
2.9375
3
[]
no_license
#!/usr/bin/env ruby require 'date' require 'optparse' require 'shellwords' class GitHubContributionsArtDrawer class << self def run!(args) new(args).run! end end def initialize(args) @args = args @input = STDIN @output = STDOUT @names = Deque.new @emails = Deque....
Java
UTF-8
383
2.34375
2
[]
no_license
package com.example.manuel.mvptest.main; /** * Defines the contract between the View (MainActivity) * and the Presenter (MainPresenter) */ public interface MainContract { interface MvpView{ void showSignInScreen(); void showSignUpScreen(); } interface Presenter{ void handleSignIn...
Java
UTF-8
605
1.960938
2
[]
no_license
package com.cryolite; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.slf4j.Logge...
Java
UTF-8
9,833
1.992188
2
[]
no_license
/* Copyright Header Check */ /* -------------------------------------------------------------------- */ /* */ /* OCO Source Materials */ ...
Markdown
UTF-8
2,172
3.046875
3
[ "MIT" ]
permissive
--- layout: post comments: true title: Noise tags: - Audio --- Noise is defined as unwanted sound. Techinically its a complicated concept, but I wanna talk about the cognitive concept of noise today. And especially acoustic noise. I have noticed that noise pollution is really high in Singapore. There is so much noise...
JavaScript
UTF-8
4,344
3.84375
4
[]
no_license
// Assignment code here // Get references to the #generate element var generateBtn = document.querySelector("#generate"); // Write password to the #password input function writePassword(pass) { var passwordText = document.querySelector("#password"); passwordText.value = pass; } // Add event listener to generate...
Java
UTF-8
1,015
2.84375
3
[]
no_license
package laba1.model; public class Room extends Entity{ private String name; private Integer size; private Integer freePlaces; public Room(Integer id, String name, Integer size, Integer freePlaces) { this.size = size; this.freePlaces = freePlaces; this.id = id; this.name...
PHP
UTF-8
1,531
2.734375
3
[ "MIT" ]
permissive
<?php use App\Channel; use Illuminate\Database\Seeder; use Illuminate\Support\Str; class ChannelsTableSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { Channel::truncate(); $title1 = 'Laravel'; $title2 = 'PHP Tes...
C++
UTF-8
6,935
3.453125
3
[]
no_license
/* * Implementation file for JumblePuzzle class. * Author: Jeremy Roy * NetId: 12jfr2 */ #include "stdafx.h" #include <string> #include "jumble.h" #include <cstdlib> #include <ctime> #include <iostream> using namespace std; //Exception class declaration BadJumbleException::BadJumbleException(const string& message) :...
C++
UTF-8
2,387
2.890625
3
[]
no_license
#include "../include/individual.h" Individual::Individual(int *_genome,int _rating) { genome2.resize(100); int *attributes[6]={&hp_points,&dmg_points,&defense_points,&speed_points,&crit_rate_points,&evasion_rate_points}; rating=_rating; memcpy(genome,_genome,6*(sizeof (int))); for(int r=0;r<rating;r++) { ...
Java
UTF-8
9,338
2.1875
2
[]
no_license
package com.secant.dcm.dump.object; import java.io.Serializable; import java.util.Date; /** * This class corresponds to the database table routing */ public class Routing implements Serializable { /** * This field corresponds to the database table routing * */ private static final long seria...
Java
UTF-8
1,159
2.484375
2
[]
no_license
package fcu.selab.progedu.data; import java.util.ArrayList; import java.util.List; public class Group { private String groupName; private String projectName; private int groupId; private String leaderUsername; private List<String> contributorId; public int getGroupId() { return groupId; } public...
Java
UTF-8
2,218
2.1875
2
[ "Apache-2.0" ]
permissive
/* * To change this template, choose Tools | Templates and open the template in the editor. */ package com.cybernostics.lib.resourcefinder.protocols.resloader; import com.cybernostics.lib.resourcefinder.ResourceFinder; import com.cybernostics.lib.resourcefinder.net.customurl.CustomURLScheme; import com.cybernostics....
Markdown
UTF-8
7,747
2.78125
3
[ "MIT" ]
permissive
## intent:affirm - yes - yep - yeah - indeed - that's right - ok - great - right, thank you - correct - great choice - sounds really good - thanks - true - Cool - Got ya ## intent:goodbye - bye - goodbye - good bye - stop - end - farewell - Bye bye - have a good one - bbye - ttyl - talk to you later - See ya - Bbye #...
Python
UTF-8
14,608
3.390625
3
[]
no_license
from TREE import TreeNode class ListNode(object): def __init__(self, val, next=None): self.val = val self.next = next class DLLNode(object): def __init__(self, item): self.val = item self.next = None self.prev = None # Definition for a Node. class RandomListNode: ...
Java
UTF-8
42,076
1.578125
2
[]
no_license
package com.ningpai.m.deposit.service.impl; import java.io.IOException; import java.math.BigDecimal; import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Random; imp...
Markdown
UTF-8
4,730
2.609375
3
[ "Apache-2.0" ]
permissive
--- title: "常见问题" --- ### 如何快速了解 KubeSphere 1、作为新手,如何快速了解 KubeSphere 的使用? 答:我们提供了多个快速入门的示例包括工作负载和 DevOps 工程,建议从 [快速入门](../../zh-CN/quick-start/quick-start-guide) 入手,参考 **快速入门** 并实践和操作每一个示例。 ### Multi-node 安装配置相关问题 2、[Multi-Node 模式](../installation/multi-node) 安装时,如果某些服务器的 **Ubuntu** 系统默认管理员用户为 `ubuntu`,若切换为 `root...
JavaScript
UTF-8
2,487
2.625
3
[]
no_license
import { useReducer, useEffect } from "react"; import axios from "axios"; const BASE_URL = "https://api.allorigins.win/raw?url=https://jobs.github.com/positions.json"; const ACTIONS = { MAKE_REQUEST: "make-request", GET_DATA: "get-data", ERROR: "error", UPDATE_HAS_NEXT_PAGE: "update_has_next_page"...
C#
UTF-8
1,947
3.96875
4
[]
no_license
using System; using System.Collections.Generic; namespace Questions { public class SearchInOrderedArray { public int Search(int[] array, int searchFor) { if(array == null || array.Length == 0) throw new ArgumentException("Invalid input", nameof(array)); ...
Markdown
UTF-8
4,082
2.515625
3
[]
no_license
# Algoritmi Colectie de algoritmi elementari, scrisi in C++ ## [Cautare Binara](https://github.com/ExplodingInsanity/Algoritmi/tree/master/cautare%20binara) Algoritm de cautare intr-un sir ordonat. Complexitate logaritmica Algoritmi scrisi pentru: * Cautare binara - Iterativa * Cautare binara - Recursiva * Cautarea bi...
TypeScript
UTF-8
1,199
2.640625
3
[]
no_license
import { ChangeDetectionStrategy , Component , EventEmitter , Input , OnInit , Output } from '@angular/core' import { Tile } from '../../world/model' import { TILE_WIDTH , TILE_HEIGHT } from '../../world/constants/visual' @Component( { selector: ...
Markdown
UTF-8
853
3.125
3
[]
no_license
# Introduction To Flutter Workshop > A workshop to serve as an introduction to Flutter, Dart and how to go about building your first application. ## Table of Contents * [🎯 Goals](#goals) * [⚡ Get Started](#get-started) * [🚀 How To Use This Workshop](#how-to-use-this-workshop) ​ ## 🎯 Goals - Learn what Flutter is ...
JavaScript
UTF-8
463
2.875
3
[]
no_license
export const loadstate = () => { try{ const localdata = localStorage.getItem('state'); if(localdata == null){ return undefined; } return JSON.parse(localdata); } catch(err){ return undefined; } } export const savestate = state => { try { c...
PHP
UTF-8
377
2.59375
3
[]
no_license
<?php function check_username_not_unique($user_name = '') { $sql = "SELECT COUNT(username) as num FROM the_user WHERE username='".trim($user_name)."'"; $query = mysql_query($sql) or die("ERROR : ".mysql_error()."$sql<br>"); $row = mysql_fetch_assoc($query); $total = $row['num']; if($total > 0) { r...
TypeScript
UTF-8
1,329
2.515625
3
[]
no_license
import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; import { retry, catchError } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) export class HttpService { constructor(private http:HttpClient) { ...
Java
UTF-8
388
2.015625
2
[]
no_license
package com.Federico.ProyectoFinal.Model; import java.util.List; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; @Repository public interface DaoOrdenRepuesto extends CrudRepository<OrdenRepuesto, Long>{ List<OrdenRepuesto> findByOrden(Orden orden); Orde...
TypeScript
UTF-8
202
2.59375
3
[]
no_license
import { FormControl } from "./form-control.decorator" export class Person { id: number; @FormControl({ type: 'text' }) name: string @FormControl({ type: 'number' }) age: number }
JavaScript
UTF-8
393
3.125
3
[]
no_license
var cities = [ { name: 'Los Angeles', temperature: 60.0, windSpeed: 4 }, { name: 'Atlanta', temperature: 52.0, windSpeed: 7 }, { name: 'Detroit', temperature: 48.0, windSpeed: 8}, { name: 'New York', temperature: 80.0, windSpeed: 6} ]; var newCities = cities.filter(function(element) { return elemen...
Java
UTF-8
7,861
2.1875
2
[]
no_license
package com.lastfmseach.stanislavsikorsyi.lastfmartistalbums.fragments; import android.app.Fragment; import android.app.FragmentTransaction; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView;...
Python
UTF-8
2,266
2.96875
3
[]
no_license
import pymongo from nltk.data import LazyLoader from nltk.tokenize import TreebankWordTokenizer from nltk.util import AbstractLazySequence, LazyMap, LazyConcatenation class MongoDBLazySequence(AbstractLazySequence): def __init__(self, host = "localhost", port = 27017, db = "test", collection =...
C#
UTF-8
3,899
2.75
3
[]
no_license
using System; using System.CodeDom.Compiler; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using CodeGuru.Exercises; using Microsoft.CSharp; using NUnit.Core; namespace NUnitExercises { public abstract class NUnitChallenge { ...
Java
UTF-8
284
2.203125
2
[]
no_license
package com.github.ompc.dragoon.cmd; /** * 延时命令 * @author vlinux * */ public class DelayCmd extends Cmd { /* * 延时毫秒数 */ private final long delay; public DelayCmd(long delay) { this.delay = delay; } public long getDelay() { return delay; } }
Markdown
UTF-8
1,920
2.765625
3
[]
no_license
# Title: Plotkin and Griffin accidentally showed us their cards in the hearing 🃏🃏🃏 # Author: fatedMercy # Post URL: [https://www.reddit.com/r/GME/comments/lpa0s3/plotkin_and_griffin_accidentally_showed_us_their/](https://www.reddit.com/r/GME/comments/lpa0s3/plotkin_and_griffin_accidentally_showed_us_their/) ...
Java
ISO-8859-1
3,226
2
2
[]
no_license
package org.test; import java.util.HashMap; import java.util.Map; import net.sf.json.JSONObject; import com.payu.sdk.PayU; import com.payu.sdk.PayUPayments; import com.payu.sdk.exceptions.ConnectionException; import com.payu.sdk.exceptions.InvalidParametersException; import com.payu.sdk.exceptions.PayUException; imp...
Markdown
UTF-8
4,404
3.25
3
[ "MIT" ]
permissive
--- title: How to Write a Reference Guide --- ## What is a Reference Guide? A Reference Guide is a nitty-gritty technical description of how some piece of Gatsby works. Reference Guides are most useful when you need detailed information about Gatsby's APIs or internals. Reference Guides contain information that many...
TypeScript
UTF-8
3,460
4.0625
4
[]
no_license
{ /** 基础*/ let x = 3; // 凡是和x 有关(运算 赋值 等)的类型都会推断为number 类型 // 相当于 let x1: number = 3; } { /** * 最佳通用类型 * 当需要从几个表达式中推断类型时候,会使用这些表达式的类型来推断出一个最合适的通用类型. * */ let x = [0, 1, null]; // 为了推断x的类型,我们必须考虑所有元素的类型。 这里有两种选择: number和null。 计算通用类型算法会考虑所有的候选类型,并给出一个兼容所有候选类型的类型。 // 所以相当于 let x1: Array<null ...
Swift
UTF-8
1,450
2.875
3
[]
no_license
// // Ticket.swift // Agile Suite // // Created by CS3714 on 12/2/20. // Copyright © 2020 Nathan Moeliono, Tommy Phan, Mariam Naseem. All rights reserved. // import Foundation import CoreData /* 🔴 Set Current Product Module: In xcdatamodeld editor, select Ticket and select Current Product Module from M...
Java
UTF-8
826
3.296875
3
[]
no_license
package com.DA.SynchronizedSample; /** * <类详细说明:多线程下的线程同步关键字synchronized> * * @Author: HuangHai * @Version: 2017-03-22 **/ public class SynchronizedCounter { private static int c = 0; public synchronized void increment() { c++; } public synchronized void decrement() { c--; } ...
Shell
UTF-8
245
2.984375
3
[]
no_license
#!/bin/bash TITLE=$1 DOUBLE_LINE="\n\n" COMPLETE_PATH="${HOME}/Notes/${TITLE}.md" touch "${COMPLETE_PATH}" || exit 1 printf "# ${TITLE}${DOUBLE_LINE}Tags: ${DOUBLE_LINE}\n" \ >> "${COMPLETE_PATH}" || exit 2 nvim "${COMPLETE_PATH}" exit 0
Markdown
UTF-8
2,663
3.0625
3
[]
no_license
# DescribeUsagePlanEnvironments ## 接口描述 用户在绑定了某个使用计划到环境后,可用此接口查询这个使用计划绑定的所有服务的环境​ ## 1、输入参数 以下请求参数列表仅列出了接口请求参数,其它参数可参考[公共请求参数](/document/api/213/6976)。 | 参数名称 | 是否必选 | 类型 | 描述 | | ----------- | ---- | ------ | ------------------------------- | | usagePlanId | 是 | String...
Java
UTF-8
1,110
1.90625
2
[]
no_license
package by.feedblog.api.configuration; import by.feedblog.api.interceptor.TokenInterceptor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.s...
Java
UTF-8
282
1.757813
2
[]
no_license
package com.dpplabs.project.cermatigithubuser.presentation.util; import android.support.v7.widget.RecyclerView; import android.view.View; public class NormalViewHolder extends RecyclerView.ViewHolder { public NormalViewHolder(View itemView) { super(itemView); } }
Markdown
UTF-8
668
2.984375
3
[]
no_license
# Employee-Summary ## Description This is the homework for week ten. The goal is to create a command line application that generates an HTML page after taking in information about team managers and members. It will basically create a roster with basic information, such as email, identification, and other specific inf...
PHP
UTF-8
4,056
2.671875
3
[]
no_license
<?php class roster { public function get_classInfo ($classNum) { switch ($classNum) { case 1: $className = 'Warrior'; $classColor = '#C79C6E'; $classIcon = 'http://wow.zamimg.com/images/classes/symbols/icon-warrior.png'; break; case 2: ...
Markdown
UTF-8
1,035
3.109375
3
[]
no_license
# itsTiny **A simple URL shrinker in Flask and Postgresql** ### [Demo](https://itstiny.herokuapp.com): https://itstiny.herokuapp.com ## Features * Shortens any valid URL * Stores the URL and Code pair in database to avoid repeating process * Displays click count * Admin panel for editing and adding custom parameter...
Markdown
UTF-8
895
3.25
3
[]
no_license
# Lab: React Game Guess Who - Harry Potter ### Learning Objectives - Be able to update state via a callback - Be able to update the screen on user input - Be able to integrate game logic into a React app ## Brief Your task is to build a single player game of Guess Who. The computer will choose a random character, a...
Markdown
UTF-8
10,711
2.6875
3
[]
no_license
## Project: Behavioral Cloning Project [![Udacity - Self-Driving Car NanoDegree](https://s3.amazonaws.com/udacity-sdc/github/shield-carnd.svg)](http://www.udacity.com/drive) Model Architecture --- I used Nvidia's end-to-end Self-Driving Deep Learning network for the Behavioral Cloning project. The network has 5 convo...
Swift
UTF-8
2,848
2.734375
3
[]
no_license
// // HeartIcon.swift // // // Created by Matěj Jirásek on 3/04/16. // // import UIKit @IBDesignable public class HeartIcon: AnimatedIcon { // MARK: - Inspectable properties @IBInspectable public var strokeColor: UIColor = .iconRedColor { didSet { layer.setNeedsDisplay() } ...
SQL
UTF-8
1,132
3.84375
4
[]
no_license
use ecommerce; -- TAREFAS -- 1. TRAGA EM UMA CONSULTA TODOS OS CLIENTES E OS ENDEREÇOS QUE ELES POSSUEM SELECT * FROM tb_cliente LEFT JOIN tb_cliente_endereco ON tb_cliente.ID_CLIENTE = tb_cliente_endereco.ID_CLIENTE; -- 2. TRAGA OS 5 PRIMEIROS PRODUTOS DA CADASTRADOS COM O NOME DE SEUS FORNECEDORES SELECT * FROM...
Java
UTF-8
1,498
3.171875
3
[]
no_license
import java.util.Scanner; public class ABM { public static Scanner scn= new Scanner(System.in); public static int multiOfsingle(int n,int d,int b){ int pow=1; int finalans=0; int carry=0; while(n!=0 || carry!=0) { int s=n%10; int ans=s*d+carry; ...
Ruby
UTF-8
384
2.65625
3
[]
no_license
module AnswersHelper ANSWER_HINTS = YAML.load_file("#{Rails.root}/config/one_maths_hints.yml")['hints'] def print_hint(hint) if hint_index?(hint) ANSWER_HINTS[hint.to_i] else hint end end protected def load_hints YAML.load_file("#{Rails.root}/config/one_maths_hints.yml")['hints'...
C++
UTF-8
5,403
3.921875
4
[]
no_license
//Nate Wood #include "proj05_functions.h" #include<iostream> using std::cout; using std::skipws; using std::endl; #include<string> #include<cmath> using std::pow; string lower_case(const string& s){ //takes all alphabetical characters in a string and makes them lowercase cout << skipws; string result = "";//st...
Python
UTF-8
476
2.734375
3
[ "Apache-2.0" ]
permissive
import pymongo # 指定数据库 client = pymongo.MongoClient('mongodb://localhost:27017/') db = client.test # 指定集合 collection = db.students # 即将插入的数据 student1 = { 'id' : '20180104', 'name' : '陈志远', 'age' : '24', 'gender' : 'male' } student2 = { 'id' : '20180105', 'name' : '陈志远', 'age' : '24', 'g...
Ruby
UTF-8
490
3.375
3
[]
no_license
class TextAnalyzer def initialize(filepath) @text = File.read(filepath) end def process operation = yield result = self.send(operation) puts "#{result} #{operation.to_s}" end def paragraphs @text.scan(/\n\n/).size + 1 end def lines @text.scan(/$/).size end def words @te...
Shell
UTF-8
1,397
3.75
4
[ "MIT" ]
permissive
#!/bin/bash # Entrypoint for utilizing as a worker pool instead of a web server # Based on configuration, can run multiple instances of a single worker process SUPERVISOR_CONF=/etc/supervisor/conf.d/worker.conf SERVICES_D=/etc/services.d # Signal to init processes to avoid any webserver startup export CONTAINER_ROLE...
C++
UTF-8
811
3.09375
3
[ "MIT" ]
permissive
#ifndef HW1_KEY_GEN_H_ #define HW1_KEY_GEN_H_ #include <stdint.h> #include "common/p_box.h" namespace hw1 { // Generates subkeys for each round. class KeyGen { public: // Args: // start_key: The initial 10-bit key, in an array of two uint8_ts. KeyGen(const uint8_t *start_key); // Resets the state of the ...
PHP
UTF-8
3,681
2.765625
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Torr\MenuBundle\Item; use Symfony\Contracts\Translation\TranslatableInterface; use Torr\Rad\Route\LinkableInterface; class MenuItem { // region Fields /** * The children of the menu item. * * @var self[] */ private array $children = []; /** * Whether the item i...
Go
UTF-8
30,684
3.234375
3
[ "MIT" ]
permissive
package genetic import ( . "gopkg.in/check.v1" // https://labix.org/gocheck "math/rand" "time" ) // Create a suite. type NeatNeuralNetSuite struct{} var _ = Suite(&NeatNeuralNetSuite{}) // Add the tests. func (s *NeatNeuralNetSuite) Test_NewNeatNeuralNet(c *C) { setMaxGeneId(0) c.Skip("This test has been ver...
Markdown
UTF-8
3,887
2.71875
3
[]
no_license
--- description: "La Recette Pas à Pas Gaufres" title: "La Recette Pas à Pas Gaufres" slug: 288-la-recette-pas-a-pas-gaufres date: 2020-08-30T20:38:04.292Z image: https://img-global.cpcdn.com/recipes/6f92b93d65cfa456/751x532cq70/gaufres-photo-principale-de-la-recette.jpg thumbnail: https://img-global.cpcdn.com/recipes/...
C++
UTF-8
16,932
2.96875
3
[]
no_license
const int ledPin = 8; const int buzzPin = 5; const int buzzFreq = 443; char alphabet[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ',', '.', '?', ' '}; void setup() { Serial.begin...
Java
UTF-8
2,312
2.890625
3
[]
no_license
import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; import javax.swing.JFrame; import javax.swing.JLabel; public class Board extends JFrame implement...
C#
UTF-8
1,462
2.609375
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Threading; namespace EasyGameServer { public partial class Form1 : Form { p...
Java
UTF-8
1,466
2.109375
2
[]
no_license
package br.com.lbr.beerApi.controller; import br.com.lbr.beerApi.dto.BreweryDTO; import br.com.lbr.beerApi.exception.BreweryAlreadyRegisteredException; import br.com.lbr.beerApi.exception.BreweryNotFoundException; import br.com.lbr.beerApi.service.BreweryService; import lombok.AllArgsConstructor; import org.springfram...
Java
UTF-8
258
1.890625
2
[]
no_license
package ru.otus.bookapp.domain; import lombok.Data; import lombok.RequiredArgsConstructor; /** * @author Aleksey.Potekhin * @date 23.06.2021 */ @Data @RequiredArgsConstructor public class Author { private final long id; private final String name; }
C++
UTF-8
1,437
2.859375
3
[]
no_license
#include <iostream> #include <fstream> using namespace std; bool in[51]; bool out[51]; bool p[51][51]; void pAns(int n, fstream& coutf){ for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ if(p[i][j]) coutf << "Y"; else coutf << "N"; ...
Markdown
UTF-8
884
2.6875
3
[]
no_license
# Warpath Hack iOS Cheats gift code gold redemption that work with mod Warpath Hack iOS Cheats gift code gold redemption that work with mod - Different Warpath gift code for redemption gold will affect different types of followers. For example, frost and graupel will change the attack power of all Warpath melee cards ...
JavaScript
UTF-8
4,517
2.96875
3
[ "LicenseRef-scancode-public-domain", "CC0-1.0" ]
permissive
/* Any copyright to this file is released to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ If you like this, you should donate to Peter O. (original author of the Public Domain HTML 3D Library) at: http://peteroupc.github.io/ */ /** * Contains constants for assigning semantics * to vertex...