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
2,181
2.15625
2
[]
no_license
package com.sudoajay.whatsappstatus.BottomFragments.Local; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import androidx.viewpager.widget.ViewPager; import com.google.a...
Markdown
UTF-8
2,081
4.21875
4
[]
no_license
### 5.5.2 使用cin.get(char)进行补救 通常,逐个字符读取输入的程序需要检查每个字符,包括空格、制表符和换行符。cin所属的istream类(在iostream中定义)中包含一个能够满足这种要求的成员函数。具体地说,成员函数cin.get(ch)读取输入中的下一个字符(即使它是空格),并将其赋给变量ch。使用这个函数调用替换cin>>ch,可以修补程序清单5.16的问题。程序清单5.17列出了修改后的代码。 程序清单5.17 textin2.cpp ```css // textin2.cpp -- using cin.get(char) #include <iostream> int main() { ...
Java
UTF-8
791
3.53125
4
[]
no_license
package unit13; import java.util.Arrays; import java.util.Scanner; import java.io.File; import java.io.IOException; import static java.lang.System.*; public class NumberSort { //instance variables and other methods not shown private static int getNumDigits(int number) { int count = 0; int keepe...
Python
UTF-8
8,726
4.03125
4
[]
no_license
import pygame #Import pygame import time import random pygame.init() #After importing we need to initiate pygame. display_width = 900 ...
Java
UTF-8
3,898
3.1875
3
[]
no_license
package pl.edu.knbit.bitjava; import pl.edu.knbit.bitjava.model.Course; import pl.edu.knbit.bitjava.model.Student; import pl.edu.knbit.bitjava.model.dto.CourseDTO; import pl.edu.knbit.bitjava.services.CourseService; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; im...
C++
UTF-8
974
3
3
[]
no_license
#include "gameState.h" #include <iostream> void GameState::init() { zombies[0].init("Sally", "Librarian"); zombies[1].init("Milly", "Butcher"); zombies[2].init("Sam", "Tailor"); zombies[3].init("Spot", "T-Rex"); zombies[4].init("Fred", "Giant Spider"); } void GameState::start() { printf("The contestants are:\n"...
Java
UTF-8
369
2.171875
2
[]
no_license
package com.Game; import com.Audio.Audio; import com.FileIO.FileIO; import com.Graphic.Graphic; import com.KeyEvent.Input; public interface Game { public Input getInput(); public FileIO getFileIO(); public Graphic getGraphics(); public Audio getAudio(); public void setScreen(Screen screen); public Screen getCur...
Python
UTF-8
364
3.0625
3
[ "Apache-2.0" ]
permissive
# v['a'] = 1.0 # b = b - (b*v)*v >>> setitem(v, 'a', 1.0) # print(b) >>> b = add(b, neg(scalar_mul(v, dot(b,v)))) class Vec: # Operator overloading def __init__(self, labels, function): self.D = labels self.f = function def add(u, v): '''Returns the sum of the two vector...
Java
UTF-8
2,077
3.515625
4
[]
no_license
package _07_If_IfElse; import java.util.Scanner; public class Advance_1_Alisveris { public static void main(String[] args) { /* * SORU 4 * * Kullanicidan aldigi urunun adedini ve liste fiyatini alin, * kullaniciya musteri karti olup olmadigini sorun * ...
SQL
UTF-8
545
3.34375
3
[]
no_license
CREATE DATABASE chat; USE chat; DROP TABLE IF EXISTS users; CREATE TABLE users ( user_id INT AUTO_INCREMENT, user_name VARCHAR(25), PRIMARY KEY (user_id) ); DROP TABLE IF EXISTS messages; CREATE TABLE messages ( id INT AUTO_INCREMENT, text VARCHAR(300), user_id INT NOT NULL, room_name varchar(25) ...
Java
UTF-8
1,471
2.21875
2
[]
no_license
package model; public class Penjualanmodel { private int id; private String nama; private String status; private String alamat; private String jumlah; private String tanggal; public Penjualanmodel( String nama, String status, String alamat, String jumlah, String tanggal) { this.na...
PHP
UTF-8
2,129
3.21875
3
[]
no_license
<?php declare(strict_types=1); namespace Ajthenewguy\Php8ApiServer\Traits; use Ajthenewguy\Php8ApiServer\Exceptions\SystemInterfaceException; trait SystemInterface { public static int $return_status = 0; /** * Execute an external program. * Capture result to an array and return it. * * ...
Java
UTF-8
8,671
1.515625
2
[ "Apache-2.0" ]
permissive
/******************************************************************************* * Copyright (c) 2023 Tremolo Security, Inc. * * 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 * * htt...
C#
UTF-8
3,093
3.359375
3
[]
no_license
using System; using System.Linq; using System.Collections.Generic; using System.Diagnostics; namespace LeetCode { public class Solution2 { private static Dictionary<string,bool> charMapMain = new Dictionary<string,bool>(); public int LengthOfLongestSubstring(string s) { Stopwatch stopWatch = new St...
Markdown
UTF-8
3,477
3.234375
3
[ "CC-BY-4.0" ]
permissive
--- layout: post title: "Enforcing Mandatory Comments in C#" date: 2015-07-10 00:47:07 tags: vs-studio project comments conventions --- Making C# documentation mandatory for all public members is easy. Builds will stop any code without standard comments dead in their tracks. Too much code to update everything at on...
Java
UTF-8
421
3.796875
4
[]
no_license
/* * Pertemuan 02b: Aritmatika dengan OOP */ class AritmatikaOOP{ int a; int b; public int kali(int a, int b){ int c = a*b; return c; } public int bagi(int a, int b){ int c = a/b; return c; } public int tambah(int a, int b){ int c = a+b; ...
Markdown
UTF-8
557
2.546875
3
[]
no_license
Build the image from the Dockerfile ```docker build -t grafana:{version} .``` If you do not have image modifications than just pull the official Grafana image docker pull grafana:{version} Set the right tag to push to the repository ```docker tag {repo}/grafana:{version} {aws_account_id}.dkr.ecr.{region}.amazona...
Java
UTF-8
317
1.710938
2
[]
no_license
package com.hrpasquati.cursomc.cursomc.repositoyOuDAO; import com.hrpasquati.cursomc.cursomc.domain.Endereco; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository public interface EnderecoRepository extends JpaRepository<Endereco, Integer> { }
TypeScript
UTF-8
467
3.234375
3
[]
no_license
interface ParseResult<T> { success: boolean; data: T; } export const parser = (contents: string): ParseResult<string[]> => { const lines = contents.split('\n'); const parsableLines = lines.filter(line => !line.startsWith('#')); const words: string[] = parsableLines.map(line => { return line.replace(/[^a-...
SQL
UTF-8
8,225
2.953125
3
[]
no_license
-- Generated by Oracle SQL Developer Data Modeler 20.2.0.167.1538 -- at: 2020-10-09 14:55:56 MESZ -- site: Oracle Database 12cR2 -- type: Oracle Database 12cR2 -- predefined type, no DDL - MDSYS.SDO_GEOMETRY -- predefined type, no DDL - XMLTYPE CREATE TABLE animals ( animal_i...
Java
UTF-8
1,000
2.46875
2
[]
no_license
package forum; public class Message { private int id; private int s_id; private int r_id; private String title; private String message; private int s_status; private int r_status; public int getId() { return id; } public void setId(int id) { this.id = id; } public int getS_id() { return s_id; } pub...
Java
UTF-8
1,433
3.484375
3
[]
no_license
/** * Description * * Classe répertoriant les méthodes de test de mouvement */ /** * @author Maxime Caron * */ public final class Move { /** *Vérifie si un mouvement est horizontal * * @param p1 * @param p2 * @return true si le mouvement est horizontal, false sinon */ static boolean ...
Python
UTF-8
1,220
2.859375
3
[]
no_license
import numpy as np import os from scipy.io import loadmat import pandas as pd import time start_time = time.time() pressure_mat_path = "E:/PycharmProjects/wide_scope/sensor_pressure.mat" raw_data = loadmat(pressure_mat_path) # loadmat() 之后得到的是一个dict # dict_keys(['__header__', '__version__', '__globals__', 'sensor_pre...
Java
UTF-8
2,590
2.21875
2
[]
no_license
package com.saimadhu.mychatapp; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; import android.widget.Toolb...
Java
UTF-8
475
2.4375
2
[ "MIT" ]
permissive
package com.algolia.search.exceptions; /** * Exception thrown when an error occurs during the retry strategy. For example: All hosts are * unreachable. */ public class AlgoliaRetryException extends AlgoliaRuntimeException { public AlgoliaRetryException(String message, Throwable cause) { super(message, cause)...
C#
UTF-8
1,186
3.484375
3
[]
no_license
using System; namespace TechReturners.Exercises { public interface ICat { bool IsAsleep { get; set; } string Setting { get; set; } string Eat { get; set; } int AverageHeight { get; set; } void GoToSleep(); void WakeUp(); } public abstract class TypeCat :...
Java
UTF-8
3,834
2.015625
2
[]
no_license
package com.ogc.standard.ao.impl; import java.math.BigDecimal; import java.util.List; import java.util.Map; import org.apache.commons.collections.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annota...
JavaScript
UTF-8
930
2.90625
3
[]
no_license
import React, { Component } from 'react'; import './App.css'; import ValidationComponent from './ValidationComponent/ValidationComponent' class App extends Component { state = { text: 'test', textLengthStatus: 'Too short!' } textChangeHandler = ( event ) => { this.setState( {text: event.target.value...
Ruby
UTF-8
1,079
2.53125
3
[]
no_license
require "http" require_relative "../../models/serializers" module TvShowQueries @@API_KEY = 'da4c6ba6f06724d02816bdcefb12c87b' def tv_show_by_id(id:) url = "https://api.themoviedb.org/3/tv/#{id}?api_key=#@@API_KEY&language=en-US" response = HTTP.get(url) return Serializers.serialize_j...
C#
UTF-8
1,111
3.421875
3
[ "MIT" ]
permissive
namespace P01.MarketStore.Core { using System; public class PayDesk { public static void PrintPurchaseValue(decimal purchaseValue) { string message = $"Purchase value: ${purchaseValue}"; Console.WriteLine(message); } public static void PrintDiscoun...
Java
UTF-8
828
2.015625
2
[]
no_license
package com.dkswjdals89.krakensearch.domain.history; import com.dkswjdals89.krakensearch.constant.SearchType; import com.dkswjdals89.krakensearch.domain.BaseTimeEntity; import com.dkswjdals89.krakensearch.domain.account.Account; import lombok.*; import javax.persistence.*; @Builder @AllArgsConstructor @NoArgsConstru...
Python
UTF-8
1,965
3.234375
3
[]
no_license
import unittest from User import User from hashlib import md5 class UserTestCase(unittest.TestCase): def test_basic(self): u = User('user1', 'ashgdhsfv', email='user1@gmail.com') self.assertEqual(u.username, 'user1') self.assertEqual(u.email, 'user1@gmail.com') self.assertNotEqual(...
Python
UTF-8
722
3.75
4
[]
no_license
#import the pandas library and aliasing as pd import pandas as pd import numpy as np data = {'x' : 10., 'y' : 11., 'z' : 12.} s = pd.Series(data) print s data = {'a1' : 10, 'a2' : 11, 'a3' : 12} s = pd.Series(data) print s["a1":"a2"] data = {'a' : 0., 'b' : 1., 'c' : 2.} s = pd.Series(data,index=['b','c','d','a']) pr...
Java
UTF-8
717
2.125
2
[ "MIT" ]
permissive
package app.projectma.WsConfig; import org.springframework.context.event.EventListener; import org.springframework.stereotype.Component; import org.springframework.web.socket.messaging.SessionConnectedEvent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @Component public class WebSocketEventListener { ...
Java
UTF-8
1,098
2.5
2
[]
no_license
package com.chowhound.chowhound.models; import com.chowhound.chowhound.ChowhoundApplication; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import java.util.ArrayList; import java.util.Li...
Python
UTF-8
1,385
3.703125
4
[]
no_license
# pay attention on infinity 'inf' +infinity = float('inf'), -infinity = float('-inf') # In Java, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY def peak_finding(alist): """ a brute force method """ i = 0 length = len(alist) while i < length: if i ==0 and alist[i]>alist[i+...
Markdown
UTF-8
2,055
2.921875
3
[]
no_license
--- layout: mechanics title: Sprint Review order: 90 --- The Sprint Review is an inspect-adapt point at the end of the Sprint. During the Sprint Review, customers and stakeholders examine what the teams built during the Sprint and discuss changes and new ideas. Together the Teams, Product Owner and users/customers/sta...
PHP
UTF-8
416
2.765625
3
[]
no_license
<?php namespace Interfaces; /** * Interface EntityInterface * @package Interfaces */ interface EntityInterface { /** * @param $contentTypeId * @param $entry * @return mixed */ public function renderTemplate(); /** * @return mixed */ public function toArray(); /**...
Java
UTF-8
876
2.421875
2
[]
no_license
package alt.flex.server.internal; import io.netty.channel.Channel; import java.util.Iterator; import java.util.TimerTask; import alt.flex.protocol.FlexProtocol.Response; import alt.flex.protocol.FlexProtocol.ResponseType; /** * * @author Albert Shift * */ public final class HeartBreathSender extends TimerTask...
TypeScript
UTF-8
1,552
2.59375
3
[ "MIT" ]
permissive
import { Request, Response } from 'express'; import { getRepository } from 'typeorm'; import * as Yup from 'yup'; import User from '../models/User'; import CreateUserService from '../services/CreateUserService'; export default class UsersController { // eslint-disable-next-line class-methods-use-this public asyn...
Java
UTF-8
958
2.609375
3
[ "MIT" ]
permissive
package com.example.twitter.service.tweet; import java.util.List; import com.example.twitter.dto.TweetDTO; /** * Service to manage operations over Tweets. * Allows to save, get and validate Tweets * @author alvaro * */ public interface TweetService { /** * Returns the Tweet (if exists) given an ID * @para...
Java
UTF-8
1,285
3.234375
3
[]
no_license
package demo; /** * */ /** * @author Phan Toan * */ public class OperatorsDemo { /** * Demo operators */ public static void main(String[] args) { int num1 = 37; int num2 = -9; int num3 = 12; int num4 = 6; boolean b = true; System.out.printf("a:%d a++:%d a:%d\n", num1, num1+...
Java
UTF-8
1,510
1.921875
2
[]
no_license
package com.youyisi.admin.application.invitefriendactivity.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.youyisi.admin.application.invitefriendactivity.InviteFriendActivityService; import com.youyisi.admin.domain.invitefriendactivi...
Java
UTF-8
3,524
1.789063
2
[ "Apache-2.0" ]
permissive
package org.jfrog.hudson.pipeline.common.types.builds; import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; import org.jfrog.hudson.pipeline.common.types.buildInfo.BuildInfo; import org.jfrog.hudson.pipeline.common.types.deployers.CommonDeployer; import org.jfrog.hudson.pipeline.common.types.res...
Python
UTF-8
6,600
2.734375
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
from nltk import FreqDist, ConditionalFreqDist, ConditionalProbDist, \ DictionaryProbDist, DictionaryConditionalProbDist, LidstoneProbDist, \ MutableProbDist, MLEProbDist, UniformProbDist, HiddenMarkovModelTagger from nltk.tag.hmm import _log_add from hadooplib.mapper import MapperBase from hadooplib.util impo...
C#
UTF-8
11,234
2.8125
3
[]
no_license
using System; using System.Collections.Generic; using System.Diagnostics; using System.Text; namespace amongus.Model { class AmongUsModel { private AmongUsTable _table; private Int32 _gameTime; public Int32 GameTime { get { return _gameTime; } } public AmongUsTable ...
C#
UTF-8
5,162
2.953125
3
[]
no_license
using Mythigine; using System; using System.Collections.Generic; using System.ComponentModel; using static AnimalsOutput.Enums; namespace AnimalsOutput { class Program { private static GenePool dna; private static List<Animal> animals; private static DNAController dnacontroller = DNACo...
PHP
UTF-8
1,551
2.546875
3
[]
no_license
<?php /** * * @author Complete with your name <andyouremail@debserverp4.com.ar> */ class Financial_Model_AccountType extends ZFModel_ParentModel { public function __construct(array $options=null) { parent::__construct($options); $this->setDbTable('Financial_Model_DbTable_AccountType'); } /** ...
JavaScript
UTF-8
693
2.5625
3
[]
no_license
// Contains test data var randomNaughtyString = require('naughty-string-validator'); exports.email = (faker.internet.email()).toLowerCase(); exports.password = faker.internet.password(); exports.url = faker.internet.url(); exports.invalidPassword = faker.internet.password(4); exports.randomNumber = faker.random.number(...
Java
UTF-8
3,637
2.046875
2
[]
no_license
package com.quickblox.sample.videochat.java.activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import androidx.appcompat.app.AppCompatActivity; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentPagerAdapt...
Python
UTF-8
1,776
2.75
3
[]
no_license
# -*- coding: utf-8 -*- from pprint import pprint import time import matplotlib.pyplot as plt import numpy as np from sklearn.cluster import AgglomerativeClustering from sklearn.neighbors import kneighbors_graph # ==================================================== # data # =======================================...
Java
UTF-8
3,466
2.421875
2
[]
no_license
package com.example.triary_app; import java.util.ArrayList; import java.util.List; import android.app.ListActivity; import android.content.Intent; import android.content.res.Resources; import android.database.Cursor; import android.graphics.Typeface; import android.graphics.drawable.ColorDrawable; import android.os.B...
Markdown
UTF-8
2,453
2.75
3
[]
no_license
Secdrop ======= A secure, easy-to-use, iOS-compatible drop box that makes use of both symmetric (first stage is AES-256, encrypted in-browser) and asymmetric encryption (GPG public-key for second stage, performed on server side). As first-stage encryption is performed within the browser via CryptoJS (256-bit AES), an...
C++
UTF-8
893
2.890625
3
[]
no_license
#ifndef ALGORITHM_PRIORITY_QUEUE_TEST_H #define ALGORITHM_PRIORITY_QUEUE_TEST_H #include <iostream> //#include "../../algorithm/queue/priority_queue_based_on_heap.h" #include "../../algorithm/queue/priority_queue_based_on_vector.h" namespace myalgorithm { using std::cout; using std::endl; void testPrior...
Go
UTF-8
553
3.203125
3
[]
no_license
package main import "fmt" func paincRoutine() { fmt.Println("-> start paincRoutine") error := fmt.Errorf("custom") // panic will break a application, is like throw Error in other lang panic(error) } func rescueRoutine() { fmt.Println("-> start rescueRoutine") rescued := recover() if rescued != nil { fmt.P...
Java
UTF-8
9,595
1.953125
2
[]
no_license
package com.google.firebase.messaging; import android.graphics.Bitmap; import android.text.TextUtils; import android.util.Log; import com.google.android.gms.common.internal.Preconditions; import com.google.android.gms.internal.firebase_messaging.zzk; import com.google.android.gms.tasks.Task; import com.google....
JavaScript
UTF-8
12,888
2.953125
3
[]
no_license
//GLOBAL VARIABLES----------------------------------------- //Require modules and constants //Discord.js client module and instance. const Discord = require('discord.js'); //Fs required for managing decoupled files. const fs = require('fs'); //Requiring the module to manipulate arrays more easily. const arrayMove = ...
Go
UTF-8
1,181
3.34375
3
[]
no_license
package day05 import ( "fmt" "sort" "github.com/nktori/AdventOfCode2020/utils" ) func Solve() { utils.PrintDay(5, "Binary Boarding") input := utils.ParseStrings("/inputs/day05/day05.txt") fmt.Println("Problem 1:", problem1(input)) fmt.Println("Problem 2:", problem2(input)) } func problem1(input []string) int...
JavaScript
UTF-8
9,160
2.84375
3
[]
no_license
"use strict"; // This shows the first time a user signs in // It steps through the sign up process // to get user's profile info import React from 'react'; import {View, ScrollView, Text, Image, Linking} from 'react-native'; // import { // Step, // Stepper, // StepLabel, // } from 'material-ui/Stepper'; // imp...
Python
UTF-8
3,151
2.59375
3
[]
no_license
from result_module import ResultModule import unittest import time list_lengths_map = [{'au': 1, 'bi': 2, 'ceu': 2, 'cký': 3, 'dem': 3, 'do': 2, 'fa': 2, 'gi': 2, 'je': 2, 'jo': 2, 'lo': 2, 'ma': 2, 'mí': 2, 'na': 2, 'ne': 2, 'o': 1, 'po': 2, 'pou': 2, 'rma': 3, 'sex': 4, 'sm': 2, 'sro': ...
PHP
UTF-8
5,484
3.140625
3
[]
no_license
<?php /** * Implementation: * $object->addEventListener('delete', $this); * or * SERIA_EventDispatcher::addClassEventListener("classname", "eventname", "classEventListener"); */ // EXPERIMENTAL abstract class SERIA_EventDispatcher implements SERIA_NamedObject { private static $eventHooks = arr...
Java
UTF-8
4,055
2.0625
2
[]
no_license
package um.edu.uy.interfaz.administrador; import java.io.IOException; import java.net.URL; import java.time.LocalDate; import java.util.Calendar; import java.util.Date; import java.util.ResourceBundle; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; i...
Java
UTF-8
1,017
3.515625
4
[]
no_license
package shashank; import java.util.Scanner; public class WeekDay_Q5Feb03 { void dayOfWeek(int day) { if (day%7==0 && day!=0) day=7; else day=day%7; switch(day) { case 1: System.out.println("The day is Sunday"); break; case 2: System.out.println("The day is Monday"); ...
Java
UTF-8
8,151
2.140625
2
[]
no_license
package reverblabs.apps.aura.ui.adapters.playlist; import android.content.Context; import android.database.Cursor; import android.os.Bundle; import android.provider.MediaStore; import android.util.Log; import android.view.LayoutInflater; import android.view.MenuInflater; import android.view.MenuItem; import ...
Markdown
UTF-8
733
2.65625
3
[]
no_license
My name is Arman Kaliakyn id: 190103486. I am a 2nd year student at Sdu. Lab5 My project has 4 pages.First page home,about,portfolio and contact.In my project I used extends and a controller. ![Снимок экрана (84)](https://user-images.githubusercontent.com/70448295/108623082-d426ea00-745e-11eb-8e19-20c9951cf0fd.png) ![...
C++
UTF-8
479
2.9375
3
[]
no_license
#include<cstdio> using namespace std; int main() { int t; scanf("%d",&t); for(int i=1;i<=t;i++){ int h,m,s,hh,mm,ss; scanf("%d %d %d",&h,&m,&s); scanf("%d %d %d",&hh,&mm,&ss); m+=s/60;s%=60; mm+=ss/60;ss%=60; h+=m/60;m%=60; hh+=mm/60;mm%...
Java
ISO-8859-1
1,329
2.40625
2
[]
no_license
package Servlets; import java.io.IOException; import javax.servlet.ServletContext; 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 javax.servlet...
JavaScript
UTF-8
195
2.84375
3
[]
no_license
/* * 37. Default Parameters One Debug */ function isEqualTo(number = 10,compare){ console.log(number); console.log(compare); return number == compare; } console.log(isEqualTo(11));
Java
UTF-8
3,258
3.796875
4
[]
no_license
package com.cardGame; public class Card implements Comparable<Card>{ private Suite cardSuite; private byte cardValue; public Card(int cardSuite, int cardValue){ switch (cardSuite){ case 1: this.cardSuite = Suite.CIRCLE; break; case 2: ...
Python
UTF-8
572
3.671875
4
[]
no_license
""" Selection Sort p. 157 """ array = [7, 5, 9, 0, 3, 1, 6, 2, 4, 8] # Swap 사용.ver ''' for i in range(len(array)): min_index = i for j in range(i+1, len(array)): if array[min_index] > array[j]: min_index = j array[min_index], array[i] = array[i], array[min_index] # swap ''' # no swap.v...
Java
UTF-8
1,303
2.625
3
[]
no_license
package jp.co.kin.common.encode; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; import org.springframework.stereotype.Component; import jp.co.kin.common.log.Logger; import jp.co.kin.common.log.LoggerFactory; import jp.co.kin.common.type.Charset; /** ...
JavaScript
UTF-8
856
2.796875
3
[]
no_license
import React from 'react' import Task from './Task' //Using an Array before // const tasks = [ // {id: 1, // text: "Panera Bread Jam Session", // day: "Today", // remainder: true}, // {id: 2, // text: "Burger Interview", // day: "next monday", // remainder: true}, // ] //Now...
C#
UTF-8
448
2.84375
3
[ "MIT" ]
permissive
namespace Newtonsoft.Json { /// <summary> /// Specifies whether to ignore empty arrays /// </summary> public enum EmptyArrayHandling { /// <summary> /// Ignore empty array when deserializing (use object current array). /// </summary> Ignore = 0, /// <summary>...
Markdown
UTF-8
4,847
2.65625
3
[]
no_license
--- description: "Steps to Prepare Speedy Refried Beans - Quick Stovetop Recipe" title: "Steps to Prepare Speedy Refried Beans - Quick Stovetop Recipe" slug: 570-steps-to-prepare-speedy-refried-beans-quick-stovetop-recipe date: 2020-12-21T14:25:47.590Z image: https://img-global.cpcdn.com/recipes/45b3dfa02713a364/680x48...
PHP
UTF-8
1,260
2.703125
3
[]
no_license
<?php namespace AppBundle\Entity; use AppBundle\Custom\Entry\AbsEntry; /** * PioneerparkSetting */ class PioneerparkSetting extends AbsEntry { /** * @var integer */ private $id; /** * @var string */ private $settingKey; /** * @var string */ private $settingVa...
C
UTF-8
6,687
3.171875
3
[]
no_license
// Author: Eric Kalosa-Kenyon // // This program times matrix multiplication using each loop ordering and reports // timing results. // // Takes: // n - command line input, size of matrices to multiply // Returns: // stdio - timing results // // Sources: // 1. http://www.programmingsimplified.com/c-program-m...
TypeScript
UTF-8
5,533
2.5625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
import { Subscription } from 'rxjs'; import { IAppEventLoggerOptions } from './types'; import AppEventBus from './app-event-bus'; import { AppEventTypes, AppEventTypeAnimationFrame, AppEventTypeWindowResize, AppEventTypeRendererGeometryUpdate, AppEventTypeKeyDown, AppEventTypeKeyUp, AppEventTypeMouseDow...
C++
UTF-8
1,730
2.515625
3
[ "MIT" ]
permissive
#pragma once #include "Engine/Core/EngineCommon.hpp" #include <map> namespace Profiler { struct Measurement; } class ProfilerReportEntry { private: static constexpr int CHILD_STR_INDENT = 1; public: ProfilerReportEntry( const String& name ); ~ProfilerReportEntry(); void PopulateTreeR( Profiler::Measu...
Java
UTF-8
504
2.625
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package solvedRight; /** * * @author Irfan Assidiq */ public class SampleOne { public static void main(String [] ar){...
PHP
UTF-8
207
3.4375
3
[]
no_license
<?php namespace Generator; class TriangularNumberGenerator { public static function gen($n) { for ($i = 0; $i <= $n; $i++) { yield ($i * ($i + 1)) / 2; } } }
Markdown
UTF-8
11,182
2.6875
3
[ "BSD-2-Clause" ]
permissive
% Gravitation % CEA Explorer et comprendre l'Univers % 12 octobre 2020 --- theme: beige transition: linear --- ## Pourquoi les planètes du système solaire bougent-elles sur des orbites elliptiques? --- ### Galilée *(1564 — 1642)* La gravité agit de la même façon sur tous les corps à la surface de la Terre. --- <f...
Python
UTF-8
3,713
2.59375
3
[]
no_license
import logging, time class DexTrader: def __init__(self,exchange,web3_providor): self.client = exchange self.w3 = web3_providor self.account = self.client.account def AmountSlippage(self,pair_contract,slippage): first_token = self.w3.toChecksumAddress(pair_contract.functions.to...
Markdown
UTF-8
20
2.546875
3
[]
no_license
# github tugas push
Java
UTF-8
264
1.78125
2
[]
no_license
package cn.jokang.algorithms.leetcode.test; import cn.jokang.algorithms.leetcode.ThreeSum; import org.junit.Test; public class ThreeSumTest { @Test public void test() { ThreeSum s = new ThreeSum(); s.threeSum(new int[]{-1, 0, 1, 2, -1, -4}); } }
PHP
UTF-8
1,133
2.609375
3
[]
no_license
<?php if (! function_exists('style')) { /** * 样式别名加载(支持批量加载,后期可拓展为自动多文件压缩合并) * @return string */ function style() { $styleArray = array_map(function ($aliases) { $cssUrl = asset_static($aliases); return HTML::style($cssUrl); }, func_get_args()); ...
JavaScript
UTF-8
849
3.984375
4
[]
no_license
// Square that changes size when you scroll the page // Wraz ze skrollowaniem strony zmniejsza się lub zwiększa wielkość czarnego kwadratu. const square = document.createElement("div"); document.body.appendChild(square); let grow = true; // flaga let size = 100; // wielkość kwadratu square.style.width = size + "px...
Swift
UTF-8
1,925
2.71875
3
[]
no_license
import Foundation extension Array where Element == Blocker.Rule { var compress: Self { self .filter { $0.trigger == .all || $0.trigger == .script } + self .filter { $0.trigger != .all && $0.trigger != .script } ...
C++
UTF-8
501
3.265625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { int n; //size of array cin >> n; int arr[n]; // taking input in arr for (int i = 0; i < n; i++) { cin >> arr[i]; } int max = arr[0], min = arr[0]; for (int i = 1; i < n; i++) { if (max < arr[i]) ...
Java
UTF-8
247
1.820313
2
[]
no_license
package common; public class Constants { public static String finalProfileDataTextFile = System.getProperty("user.dir")+"/src/Resources/FinalProfileData.txt"; public static String dataPropertiesFile = "src/Resources/data.properties" ; }
Go
UTF-8
287
3.625
4
[]
no_license
package main import "fmt" func main() { i := 1 for i < 5 { fmt.Println(i) i++ } for j := 1; j < 10; j++ { fmt.Println(j) } for { fmt.Println("loop") i++ if i > 10 { break } } for k, v := range []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10} { fmt.Println(k, v) } }
Ruby
UTF-8
715
2.65625
3
[]
no_license
require 'test_helper' class CartTest < ActiveSupport::TestCase # test "the truth" do # assert true # end fixtures :products def new_cart_with_one_product(product_name) cart = Cart.create cart.add_product(products(product_name).id) cart end test "cart should create a new line item" do ca...
C++
UTF-8
2,798
2.875
3
[ "MIT" ]
permissive
// // Created by flipback on 11/16/19. // #include <string> #include <stdexcept> #include "EncapsPacket.h" #include "utils/Buffer.h" using eipScanner::utils::Buffer; namespace eipScanner { namespace eip { EncapsPacket::EncapsPacket() : _command{EncapsCommands::NOP} , _length{0} , _sessionHandle{0} , _statusC...
Java
UTF-8
10,269
2.546875
3
[]
no_license
package ru.berserk.client; import javax.imageio.ImageIO; import javax.swing.*; import java.awt.*; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import static ru.berserk.client.Main.main; // Created by StudenetskiyA on 29.01.2017. public class UnitLabel extends JLabel { st...
Swift
UTF-8
1,859
3.109375
3
[]
no_license
// // Bombe.swift // Mnigma // // Created by Leo Mehlig on 2/19/15. // Copyright (c) 2015 Leo Mehlig. All rights reserved. // import Foundation class Bombe { func decodeText(encodedText: String, guessedWords: [String]) -> (decodedText: String, usedEnigma: Enigma)? { let unmatchingWords = unmatchingWor...
C++
UTF-8
1,566
2.53125
3
[ "BSD-3-Clause" ]
permissive
#include "func_thread.h" #include "info_router.h" FuncThread::FuncThread(std::shared_ptr<InfoRouter>& router): _func_router(router) { } FuncThread::~FuncThread() { } void FuncThread::Run() { while (!_stop) { auto t = Pop(); if (t) { if (CallFunc(t->_func_name, t->_func_param_ret))...
Java
UTF-8
1,882
2.28125
2
[]
no_license
package fr.afpa.formation; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfig...
JavaScript
UTF-8
384
3.046875
3
[]
no_license
function Grid() { } Grid.prototype.generate = function () { var board = []; for (var i = 0; i < 8; i++) { board.push([]); for (var j = 0; j < 8; j++) { board[i].push(bombOrEmpty()); } } return board; }; function bombOrEmpty() { return Math.random() > 0.9 ? 'bomb'...
TypeScript
UTF-8
449
2.765625
3
[]
no_license
import express from "express" import getCity from "../services/getCity" import getWeatherCity from "../services/getWeatherCity" const route = express.Router() /** * route that returns current weather by city */ route.get("/:city?", async(req, res) => { try { const city = await getCity(req.params.city) con...
Python
UTF-8
438
2.859375
3
[]
no_license
import bpy def create_material(name, color, alpha): """Create material with color""" material = bpy.data.materials.new(name) material.diffuse_color = color material.alpha = alpha return material def set_material(object, material): """Set material at object""" obj_data = object.data i...
C++
UTF-8
795
2.59375
3
[]
no_license
/* * File: engine.h * Author: spink * * Created on 29 January 2015, 08:09 */ #ifndef ENGINE_H #define ENGINE_H #include <define.h> #include <map> namespace captive { namespace engine { class Engine { public: Engine(std::string libfile); virtual ~Engine(); bool init(); bool install(uint8_t ...