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
1,920
2.234375
2
[]
no_license
package com.demo.service; import java.io.IOException; import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; impor...
Java
UTF-8
2,259
2.265625
2
[]
no_license
package com.diki.idn.crudmovie.data; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.content.Context; import android.os.Bundle; import android.util.Log; import com.diki.idn.crudmovie.R; import c...
JavaScript
UTF-8
3,885
3.5625
4
[]
no_license
const createBtnRequest = function () { let name; let ownerName; let ownerBalance; let newBankAccount; const processBtnRequest = function () { ownerBalance = 0; let output = document.getElementById('accName'); let validName = false; ownerName = output.textContent...
C#
UTF-8
1,169
3
3
[]
no_license
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Web; using System.Web.UI; namespace WebSimplify.Helpers { public class HtmlStringHelper { public static string LineBreak = "<br>"; public static string GenerateHtmlText(List<string> text) {...
Java
UTF-8
4,544
3.671875
4
[]
no_license
import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Queue; import java.util.Set; /** * There are a total of n courses you have to take, labeled fr...
Markdown
UTF-8
1,641
2.640625
3
[]
no_license
# Getting-Cleaning_data_assignment Getting-and-Cleaning-Data-Assignment ==================================== Coursera Course: Getting and Cleaning Data Assignment Submission Files - [run_analysis.R](https://github.com/gopalkrishan77/Getting-Cleaning_data_assignment/blob/master/run_analysis.R) - [README.md](https://gi...
PHP
UTF-8
763
2.640625
3
[]
no_license
<?php //update.php header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: PUT'); header('Content-Type: application/json'); header('Access-Control-Allow-Headers: Access-Control-Allow-Origin, Access-Control-Allow-Methods, Content-Type, Authorization, X-Requested-With'); //initializing the base ...
PHP
UTF-8
916
2.984375
3
[]
no_license
<?php //include_once ('../function.php'); include_once $_SERVER['DOCUMENT_ROOT']. 'function.php'; /** /** * Check du formulaire d'inscription * @param : nom, prenom, email, telephon, login, mot de passe * @return : Message d'erreur si l'url n'est pas saisie correctement */ class Logs{ private $message; public...
C#
UTF-8
896
2.8125
3
[]
no_license
using System; using System.Linq; using ReactiveUI; using System.Text.RegularExpressions; using System.Drawing; namespace ReactiveExtensionExamples.ViewModels { public class ColorSlider : ReactiveObject { int _red; public int Red { get { return _red; } set { this.RaiseAndSetIfChanged (ref _red, value); } ...
Python
UTF-8
1,399
2.765625
3
[]
no_license
# initialize DB for Blockchain # https://www.christopherlovell.co.uk/blog/2016/04/27/h5py-intro.html import h5py import numpy as np # # To create new DB # hf = h5py.File('database.h5', 'w') # hf.create_dataset('block_chain_db', data=[], compression="gzip", chunks=True, maxshape=(None,)) # hf.close() class transact...
Java
UTF-8
779
2.359375
2
[]
no_license
package com.fyj.protobuf.nettybuf; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; public class TestClientHandler extends SimpleChannelInboundHandler<MyDataInfo.Person> { @Override protected void channelRead0(ChannelHandlerContext ctx, MyDataInfo.Person msg)...
Java
UTF-8
3,375
2.265625
2
[]
no_license
/** * */ package com.maohi.software.maohifx.samples.apachefop; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.net.URISyntaxException; import javax.xml....
JavaScript
UTF-8
574
2.640625
3
[ "MIT" ]
permissive
const amqp = require('amqplib'); async function consumer() { // 1. 创建链接对象 const connection = await amqp.connect('amqp://localhost:5672'); // 2. 获取通道 const channel = await connection.createChannel(); // 3. 声明参数 const queueName = 'helloworldQueue'; // 4. 声明队列,交换机默认为 AMQP default await ...
Java
UTF-8
485
2.140625
2
[]
no_license
package com.entity; public class Config { private String paraname; private String paravalue; public String getParaname() { return paraname; } public void setParaname(String paraname) { this.paraname = paraname == null ? null : paraname.trim(); } public String getParavalu...
Markdown
UTF-8
19,894
2.703125
3
[ "MIT", "CC-BY-4.0" ]
permissive
--- title: "Planning Step 4: Plan Application Security" author: rmcmurray description: "In this phase of building your website, consider the security needs of your ASP.NET application." ms.date: 04/14/2013 ms.assetid: fa53abca-5bda-4b1c-a35c-25610e76e78b msc.legacyurl: /learn/application-frameworks/scenario-build-an-as...
Python
UTF-8
18,534
2.65625
3
[]
no_license
import os import html import pymysql class Error(Exception): def __init__(self, e,msg): self.e = e self.msg = msg def __str__(self): return self.msg+':'+repr(self.e) class Model(object): """ python3 pymysql 操作MySQL数据库 """ config = { "host":'localhost', "user":'r...
Markdown
UTF-8
3,030
2.5625
3
[]
no_license
## Network ACL Is stateless ## Route propagation Allows a virtual private gateway to automatically propagate routes to the route tables. This means that you don't need to manually enter VPN routes to your route tables. It needs to enabled. ## Misc * There is no route connecting your VPC back to the on premis...
C++
UTF-8
1,750
3.3125
3
[]
no_license
// [contest] ABC 127 // [task] C // [URL] https://atcoder.jp/contests/abc127/tasks/abc127_c // [compiler] C++ 14 (GCC 5.4.1) // [status] https://atcoder.jp/contests/abc127/submissions/5817379 : TLE // [reference] // https://cpprefjp.github.io/reference/bitset/bitset.html #include <iostream> #include <bitse...
C++
UTF-8
664
3.21875
3
[]
no_license
class Solution { public: void rotate(vector<int>& nums, int k) { int size = nums.size(); if (k > size) { k = k % size; } if (k != 1){ /* 由于vector的insert的操作会使得迭代器失效,因此需要使用额外空间。 这里提高了代码空间复杂度 */ vector<int> extraSpa...
Python
UTF-8
1,351
3.015625
3
[]
no_license
import pandas as pd import matplotlib.pyplot as plt import csv import numpy as np import pandas from bokeh.plotting import figure, show from bokeh.io import output_file from bokeh.models import ColumnDataSource machines = pd.read_csv("MachineData.csv") machines.head() machines.shape print(machines) """type(False) bo...
TypeScript
UTF-8
1,245
2.65625
3
[ "MIT" ]
permissive
import { Injectable } from '@nestjs/common'; import { UserAlreadyRegisteredException } from '../../domain/exceptions/user.exception'; import { UserDto } from '../../presentation/dtos/user.dto'; import { UserModel } from '../models/user.model'; import { UserCRUDInfos } from '../interfaces/user.interface'; import { User...
Python
UTF-8
8,440
2.78125
3
[]
no_license
import os import cv2 import numpy as np from matplotlib import pyplot as plt from patchify import patchify from PIL import Image from sklearn.preprocessing import MinMaxScaler, StandardScaler # from tensorflow.keras.utils import to_categorical scaler = MinMaxScaler() def load_image(root_directory, patch_size=256): ...
PHP
UTF-8
566
2.609375
3
[]
no_license
<?php include("includes/header.php"); include("includes/navbar.php"); include("database/dbconfig.php"); if(!empty($_POST['cat_id'])) { $id = intval($_POST['cat_id']); $query = mysqli_query($con , "SELECT * FROM subcategory WHERE categoryid=$id"); ?> <option value="">Select Subcategor...
Python
UTF-8
4,505
3.28125
3
[ "MIT" ]
permissive
import logging import re from entity import Entity from entitylist import EntityList, KnnEntityList, PolynomialEntityList, \ ExponentialEntityList, SvrEntityList from errors import WarnValueError, KillValueError blank_matcher = re.compile("^\\s*$") logging.basicConfig() logger = logging.getLogger(__name__) cla...
Python
UTF-8
6,097
2.78125
3
[ "LicenseRef-scancode-warranty-disclaimer", "BSD-3-Clause" ]
permissive
# Path Planner # Tung M. Phan # May 15th, 2018 # California Institute of Technology import os import sys sys.path.append('..') import time import random import prepare.queue as queue import prepare.car_waypoint_graph as waypoint_graph import primitives.tubes import numpy as np if __name__ == '__main__': visualize ...
Java
UTF-8
972
3.78125
4
[]
no_license
public abstract class Poly { public Poly() {} public abstract double [] poly(); public abstract double f(double x); public abstract void printSolution(); } class Poly8 extends Poly{ @Override public double[] poly() { //inverse order return new double[]{ 3, 131, 514,...
Markdown
UTF-8
2,357
3.203125
3
[ "MIT" ]
permissive
# PHP-WordWrap ![GitHub](https://img.shields.io/github/license/kayw-geek/php-wordwrap)![php-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)![GitHub top language](https://img.shields.io/github/languages/top/kayw-geek/php-wordwrap) Word wrapping, with a few features. - force-break op...
Python
UTF-8
272
3.328125
3
[]
no_license
def sum_of_multiples(maxNum, factors): multiples = [] for factor in factors: if factor != 0: for num in range(factor, maxNum, factor): if num not in multiples: multiples.append(num) return sum(multiples)
C#
UTF-8
769
3.234375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FileReader.Readers { class Inverts : IReader { public string Name() { return "inverts"; } public string Read(string path) { ...
JavaScript
UTF-8
13,088
2.6875
3
[]
no_license
import React from 'react'; import ReactDOM from 'react-dom'; import AddAnswer from './AddAnswer'; import Modal from 'react-modal'; import MyStatefulEditor from './MyStatefulEditor'; export default class AddQuestion extends React.Component { constructor(props) { super(props); this.handleChangeSelect...
Java
UTF-8
23,036
2.265625
2
[]
no_license
package gingrasf.campsiteManager; import gingrasf.campsiteManager.persistence.AvailableDateLockRepository; import gingrasf.campsiteManager.persistence.CampsiteRepository; import gingrasf.campsiteManager.model.CampsiteAvailability; import gingrasf.campsiteManager.model.CampsiteReservation; import gingrasf.campsiteManag...
Java
UTF-8
1,564
2.453125
2
[]
no_license
package ohs.ml.neuralnet.layer; import ohs.math.VectorMath; import ohs.matrix.DenseMatrix; import ohs.matrix.DenseVector; public abstract class RecurrentLayer extends Layer { public static enum Type { LSTM, RNN } /** * */ private static final long serialVersionUID = 5913734004543729479L; ...
JavaScript
UTF-8
588
3.234375
3
[]
no_license
var Person = function(name){ this.name = name; this.orders = []; this.total = 0; //The individual tip gets defined from the mealModel; this.tip = null; } Person.prototype.addDishes = function(dish, quantity){ this.orders.push(dish); this.total += dish.price * quantity; } Person.prototype.getTotal = func...
C++
UTF-8
469
3.203125
3
[]
no_license
#if !defined(__DISPLY_LIST_H__) #define __DISPLY_LIST_H__ class RenderContext; /* Extremely simple display list implementation: each list node has a 'render()' function and a pointer to the next node */ namespace DisplayList { class Node { Node* next; public: Node() : next(0) {} virtual vo...
Markdown
UTF-8
4,162
3.15625
3
[ "MIT" ]
permissive
# API Documentation # Mete responds to several requests. The API is REST-like (but not entirely). ## / ## * `GET /` - the same as `GET /users` ### /audits ### * `GET /audits` - returns statistics about previous transactions; possible paramters are: * `start_date[year]` - `integer` * `start_date[month]` - `...
C++
UTF-8
1,642
2.890625
3
[]
no_license
#include "pch.h" #include "XStdUtil.h" #include <codecvt> std::wstring XStdUtil::xstring(const char* str) { std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> cvt; std::wstring value = cvt.from_bytes(str); return value; } std::string XStdUtil::xstring(const wchar_t* str) { std::wstring_convert<std::codecvt_utf...
C++
UTF-8
7,288
3
3
[]
no_license
/* * cm.std external library * Some small and complex essential methods for performing basic functions. * * cm-s (Charles Stevens) * Date created: July 5th * Revision: e061ad7 */ #include <iostream> #include <cstring> #include <cmath> using namespace std; struct SBUF { int *base10_counter = new int; flo...
Python
UTF-8
138
3.734375
4
[]
no_license
def calculate_age(year): age = 2018 - year return age year = int(raw_input("Enter year of birth: ")) print(calculate_age(year))
JavaScript
UTF-8
5,305
3.15625
3
[ "MIT" ]
permissive
import Color from '../index' // Controls for hex values for functions like lighten/darken/mix etc… // come from: // https://www.sassmeister.com/ describe('Construct', () => { test('Generates initial color models, from hex', () => { expect(new Color('#000').getColor().hex).toEqual('#000000') expect(new Color...
PHP
UTF-8
281
2.640625
3
[ "MIT" ]
permissive
<?php namespace Pirminis; final class Some extends Maybe { public function __construct($subject) { $this->subject = $subject; } public function is_some() { return true; } public function is_none() { return false; } }
Python
UTF-8
16,161
2.546875
3
[]
no_license
#-------------------------------------------------------------------------- # File and Version Information: # $Id: template!pyana-module!py 1095 2010-07-07 23:01:23Z ofte $ # # Description: # Pyana user analysis module pyana_fccd_delay: # Averages fccd images in bins of delay time, after selecting events based on ip...
Java
UTF-8
10,857
1.898438
2
[]
no_license
package cordova.plugin.LivePersonPlugin; import android.content.Context; import android.util.Log; import com.google.firebase.messaging.RemoteMessage; import com.liveperson.infra.model.MessageOption; import com.liveperson.infra.model.PushMessage; import com.liveperson.messaging.sdk.api.LivePerson; import com.liveperso...
C++
UTF-8
1,409
2.890625
3
[]
no_license
#include "doctest.h" #include "../game-source-code/BackEndSystems/UpdateGameObjectDisplay.h" #include "../game-source-code/FrontEndSystems/GameObject.h" #include "../game-source-code/FrontEndSystems/GraphicObject.h" #include <memory> TEST_CASE("1.0 The Sprite graphic is updated correctly according to the GameObject pr...
Markdown
UTF-8
3,494
3.109375
3
[ "MIT" ]
permissive
# TypeScript typings for Google Mirror API v1 Interacts with Glass users via the timeline. For detailed description please check [documentation](https://developers.google.com/glass). ## Installing Install typings for Google Mirror API: ``` npm install @types/gapi.client.mirror@v1 --save-dev ``` ## Usage You need to...
Java
UTF-8
337
1.539063
2
[]
no_license
package com.example.apblue.jpahibernateexamples.serviceImpl; import com.example.apblue.jpahibernateexamples.service.StaffService; import com.example.apblue.jpahibernateexamples.model.Staff; import org.springframework.stereotype.Service; @Service public class StaffServiceImpl extends BaseServiceImpl<Staff> implements ...
Python
UTF-8
752
3.0625
3
[]
no_license
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Mar 2 10:05:41 2019 @author: john """ from EvaluatedNetwork import EuclideanNetwork TestMap = EuclideanNetwork(8) TestMap.Connect(0,1,1) TestMap.Connect(1,2,1) TestMap.Connect(1,7,2) TestMap.Connect(7,4,1) TestMap.Connect(1,5,8) TestMap.Connect(2,3,...
SQL
UTF-8
3,388
4.5625
5
[]
no_license
--------------------------------- 문제 --------------------------------- 1) department_id가 60인 부서의 도시명을 알아내는 SELECT문장을 기술하시오 SELECT city FROM locations WHERE location_id = (SELECT location_id FROM departments WHERE department_id = 60); 2)사번이 107인 사원과 부서가같고,167번의 급여보다 많은 사원들의 사번,이름(f...
C
UTF-8
227
2.734375
3
[]
no_license
// function turns on the LED when the distance exceeds 100 meters. void led_out(unsigned char data) { if( data>=100) // checking if distance covered exceeded 100 meter {GPIO_PORTF_DATA_R |= 0x02} // turn on red led }
C++
UTF-8
4,686
2.8125
3
[]
no_license
#include "Common.h" #include "BuildOrderGoalManager.h" #include "BuildingManager.h" BuildOrderGoalItem::BuildOrderGoalItem(const MetaType & metaType, int count, int priority, bool blocking) : metaType(metaType), count(count), priority(priority), blocking(blocking) { if (priority != -1) return; // set priorities s...
Shell
UTF-8
1,338
2.84375
3
[]
no_license
# copy files git init . # Look at .gitignore git commit -am "Initial commit" echo "There are 9 planets in the solar system" > planets.txt git add planets.txt git commit -m "Stated number of planets" echo "There are 8 planets in the solar system" > planets.txt git add planets.txt git commit -m "Reduced number of pl...
C#
UTF-8
4,511
3.015625
3
[]
no_license
using System; using MySql.Data.MySqlClient; using System.Data.Common; namespace KPO_laba4 { class InsertDB: IDB { MySqlConnection connection; public InsertDB(MySqlConnection conn) { connection = conn; try { // Подключение к БД ...
Markdown
UTF-8
3,914
3.328125
3
[]
no_license
title: 工作和生活的游戏化 date: 2016-04-18 16:19:21 tags: [Work, Game] --- 今天会议的一个有趣的point,稍微记录一下: 很多人人愿意花时间到游戏中却不愿意花时间去更加努力地工作。游戏在人的工作和生活中不是必需的,但是为什么它这么吸引人? 简单来说有八大驱动力: - 史诗意义与使命感 - 进步与成就感 - 创意授权与反馈 - 所有权与拥有感 - 社交影响与关联性 - 稀缺性与渴望 - 未知性与好奇心 - 损失与逃避心 <!-- more --> 人生如戏,戏如人生。我觉得支持我们活着、工作和生活肯定也是这八个驱动力,有一点不一样的是游戏可以删档重来,人生不可以。可以...
Python
UTF-8
166
3.359375
3
[]
no_license
# Length of Last Word def lengthOfLastWord(self, s: str) -> int: words = s.split() if words == []: return 0 return len(words[-1])
C++
UTF-8
1,681
3.625
4
[ "MIT" ]
permissive
#pragma once #include <string> #include <cmath> template<typename T> struct Vec2 { T x, y; Vec2() : x{}, y{} {} Vec2(T x, T y) : x{x}, y{y} {} template<typename U> inline operator Vec2<U>() const { return Vec2<U>(x, y); } inline bool operator==(const Vec2<T>& other) const { return x == other.x && y == ot...
Python
UTF-8
3,416
2.953125
3
[ "MIT" ]
permissive
# -*- coding: utf-8 -*- """ Created on Thu Sep 25 15:41:33 2014 @author: dvalovcin """ import numpy as np from PyQt5 import QtWidgets, QtCore from ..curves.clickablePlotWidget import ClickablePlotWidget import pyqtgraph as pg class DoubleYPlot(ClickablePlotWidget): """ Often want to have a graph which has t...
C#
UTF-8
2,839
2.765625
3
[]
no_license
using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using AsteroidGame.VisualObjects.Interfaces; using AsteroidGame.Properties; namespace AsteroidGame.VisualObjects { class SpaceShip : ImageObject, ICollision { publi...
Python
UTF-8
853
3.5
4
[]
no_license
class Solution(object): def partition(self, s): """ :type s: str :rtype: List[List[str]] """ if len(s) == 0: return [] self.res = [] def dfs(s, res): if len(s) == 0: self.res.append(res[:]) return ...
Java
UTF-8
858
3.546875
4
[]
no_license
package recursive; import java.util.*; import java.util.Scanner; public class SortArray { public static void main(String[] args) { /* Type your code here. */ Scanner scnr = new Scanner(System.in); int element = scnr.nextInt(); int[] Myarr = new int[element]; for (int i = 0; i<element;i++) { ...
Python
UTF-8
1,043
3.8125
4
[]
no_license
#!/usr/bin/env python # *_* coding:utf-8 *_* # python learning, keep on! data=['0','1','2','3','4','5','6','7','8'] print(data) print(data[1]) print(data[2:5]) print(data[1:7:2]) print(data[5:]) print(data[-1]) print(data[-2:]) print(data[:3]) data.append('9') print(data) data.insert(2,'1.5')#插入 print(data) data[2]...
JavaScript
UTF-8
234
3.515625
4
[]
no_license
let prim = false; let arr = [1, 2,]; function changeValues (primArg, arrArg) { primArg = true; arrArg = arrArg.pop(); } console.log(prim, arr); changeValues(prim, arr); console.log(prim, arr); // false, [1, 2,] // false, [1,]
Java
UTF-8
7,651
2.609375
3
[]
no_license
package com.koumamod.prevail; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Arrays; import com.stericson.RootTools.RootTools; import android.app.AlertDialog; import android.app.ListActivity; import android.content.DialogInterface; import android.content.Intent; import andr...
Java
UTF-8
1,092
2.015625
2
[]
no_license
package com.devsawe.demo.Service; import com.devsawe.demo.authentication.CustomUserDetails; import com.devsawe.demo.entities.User; import com.devsawe.demo.repositories.UserRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.context.SecurityContextHolder; ...
Ruby
UTF-8
14,338
3.59375
4
[]
no_license
class Player attr_accessor :health, :items, :alive attr_reader :name def initialize(name) @name = name @health = 100 @items = [] @alive = true end def add_weapon(weapon) self.items.push(weapon) end def change_health(num) self.health += num ...
Java
ISO-8859-2
1,125
3.484375
3
[]
no_license
import javax.swing.JOptionPane; public class Main { public static void main(String[] args) { float idade = 0, media = 0; int sexo, masc = 0, fem = 0, fem3045 = 0, pessoas = 0; do { idade = Float.valueOf(JOptionPane.showInputDialog("Insira sua idade:\n" + "(Digitar 0 ou negativo encerra o programa)"));...
Python
UTF-8
395
3.5625
4
[]
no_license
def relation_to_luke(name): vals = { 'Darth Vader': 'father', 'Leia': 'sister', 'Han': 'brother in law', 'R2D2': 'droid' } return "Luke, I am your " + vals[name] + "." relation_to_luke("Darth Vader") # "Luke, I am your father." relation_to_luke("Leia") # "Luke, I am your sister." relation_to_luke("Han") # ...
JavaScript
UTF-8
5,001
2.5625
3
[ "MIT" ]
permissive
const { declare } = require("@babel/helper-plugin-utils"); function typeEval(node, params) { let checkType; if (node.checkType.type === "TSTypeReference") { checkType = params[node.checkType.typeName.name]; } else { checkType = resolveType(node.checkType); } const extendsType = resolveType(node.exten...
Python
UTF-8
8,448
2.984375
3
[]
no_license
"""Base Module. ConfigTemplate ^^^^^^^^^^^^^^ Base class for the config template object. This template will process the YAML files. Subclasses are: Config and Compose classes InspectTemplate ^^^^^^^^^^^^^^^ Base class for the Inspector template object. This template will process docker and git status for compose se...
Rust
UTF-8
1,626
3.1875
3
[]
no_license
/// /// Задача 15 /// /// https://projecteuler.net/problem=15 /// /// Начиная в левом верхнем углу сетки 2×2 и имея возможность двигаться только вниз или вправо, /// существует ровно 6 маршрутов до правого нижнего угла сетки. /// /// Сколько существует таких маршрутов в сетке 20×20? /// /// Решение через Центральный би...
Markdown
UTF-8
2,031
2.78125
3
[]
no_license
ETL Project Report Bic Vu EXTRACT Data was pulled from three separate sources, Kaggle, US Census Bureau and USDA. The Obesity CSV was shared with other team members while the Census data and USDA data on school lunch programs was pulled specific to my part of the analysis. The data was available in multiple formats...
C++
UTF-8
574
2.671875
3
[]
no_license
/* * version.hpp * * Created on: Feb 11, 2021 * Author: Nik Clark */ #include "packet_utils.hpp" namespace packet_utils { static constexpr uint16_t X25_INIT_CRC = 0xffff; static void crc_accumulate(uint8_t data, uint16_t *crcAccum) { uint8_t tmp; tmp = data ^ (uint8_t)(*crcAccum &0xff); tmp ^= (tmp<<...
Markdown
UTF-8
2,173
3.078125
3
[]
no_license
--- title: "Inner Garden: connecting inner states to a mixed reality sandbox" project: "inner" image-teaser: "teaser_inner-garden.gif" order: 8 layout: project --- Mindfulness, the act of paying a deliberate and non-judgmental attention to the present moment, has been shown to have a positive impact on a person's heal...
Java
UTF-8
246
1.765625
2
[]
no_license
package com.serialization; public class MenuChoice { public static final int ADDEMPLOYEE = 1; public static final int DISPLAY = 2; public static final int SAVE = 3; public static final int LOAD = 4; public static final int QUIT = 5; }
Go
UTF-8
4,529
2.96875
3
[]
no_license
package commands import ( "darthmaul/templates" "fmt" "os" "sync" ) var ( path string ) type createAppCMD struct { AppName string } func NewCreateAppCMD(appName string) Command { return &createAppCMD{ AppName: appName, } } func (c createAppCMD) Execute() (err error){ fmt.Println("Executing command creat...
Python
UTF-8
592
3.671875
4
[]
no_license
#coding: UTF-8 #Que hace import turtle def dibujarPoligono(lados,longitud,color,relleno): turtle.color(color) turtle.fillcolor(relleno) turtle.begin_fill() for i in range(lados): turtle.forward(longitud) turtle.left(360/lados) turtle.end_fill() def Main(): numeroLados=int(input("Ingrese el numer...
Java
UTF-8
1,819
2.4375
2
[ "Apache-2.0" ]
permissive
package com.wenyu.danmuku.render; import android.graphics.Canvas; import android.graphics.Rect; import android.util.Log; import com.wenyu.danmuku.interfaces.IDanMa; import java.util.Iterator; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingDeque; /** * Created by jiacheng.li on...
C++
UTF-8
719
2.546875
3
[]
no_license
/* * IPDispatcher.h * * Created on: Aug 25, 2011 * Author: pajace */ #ifndef IPDISPATCHER_H_ #define IPDISPATCHER_H_ #include <string> #include "IPaddress.h" using std::string; class IPDispatcher { public: static IPDispatcher* getInstance(); IPaddress getIPAddress(string); bool backIPAddress(string); b...
Java
UTF-8
1,239
2.90625
3
[]
no_license
package com.example.proxy; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Iterator; public class Client { public static void main(String[] args) { InvocationHandler handler = new InvocationHandler() { Image4K imag...
C++
UTF-8
2,276
2.5625
3
[]
no_license
//////////////////////////////////////////////////////////////////////////////////////// // Kara Jensen - mail@karajensen.com - SceneDataIDs.h //////////////////////////////////////////////////////////////////////////////////////// #pragma once /** * Avaliable meshes in the game */ namespace MeshID { enum ID ...
Java
UTF-8
426
3.046875
3
[]
no_license
import java.util.*; import java.io.*; import java.lang.*; class Program_10 { public static void main(String[] args) { char c = args[0].charAt(0); int c_; if((int)'A' <= (int)c && (int)c <= (int)'Z'){ c_ = (int)c + (int)'a'-(int)'A'; } else { c_ = (int...
JavaScript
UTF-8
798
2.921875
3
[]
no_license
const getTimePassed = (start, taskHrs, taskMin, taskSec) => { const date = parseInt((new Date().getTime()) / 1000) const end = date totalSec = end - start const hrs = parseInt(totalSec/3600) const min = parseInt((totalSec - (3600 * hrs))/60) const sec = (totalSec - (3600 * hrs) - (60 * min)) ...
Markdown
UTF-8
70,213
2.75
3
[]
no_license
# 设计模式 <nav> 软件设计原则<br/> &nbsp;&nbsp;&nbsp;&nbsp;<a href="#1-开闭原则">1. 开闭原则</a><br/> &nbsp;&nbsp;&nbsp;&nbsp;<a href="#2-里氏替换原则">2. 里氏替换原则</a><br/> &nbsp;&nbsp;&nbsp;&nbsp;<a href="#3-依赖倒置原则">3. 依赖倒置原则</a><br/> &nbsp;&nbsp;&nbsp;&nbsp;<a href="#4-单一职责原则">4. 单一职责原则</a><br/> &nbsp;&nbsp;&nbsp;&nbsp;<a href="#5-接口隔离原则">...
JavaScript
UTF-8
6,357
2.515625
3
[ "MIT", "Apache-2.0" ]
permissive
xdescribe('QiitaのStaticプロパティへのアクセス', function() { return it('指定のurlプロパティにアクセスした場合に値が一致する', function() { var Qiita, qiita, url; Qiita = require('qiita'); qiita = new Qiita(); url = "https://qiita.com/api/v1/users/h5y1m141@github/stocks"; return expect(qiita.parameter.stocks.url).toBe(url); }); })...
C#
UTF-8
14,742
2.546875
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Windows.Forms; using System.Xml.Serialization; namespace ModManagerCommon { [XmlRoot(Namespace = "http://www.sonicretro.org")] public class CodeList { static readonly XmlSerializer serializer = new XmlSerializer(typ...
Java
UTF-8
802
3.140625
3
[]
no_license
package Random; import java.util.Random; public class Randomizer { public static Random theInstance = null; public Randomizer(){ } public static Random getInstance() { if(theInstance == null) { theInstance = new Random(); } return theI...
Markdown
UTF-8
1,382
3.140625
3
[]
no_license
# CPSC353 ## Project 1 Text In Image Author: Thomas Ngo <br /> Instructor: Reza Nikoopour <br /> California University State, Fullerton ## Project Description The design of this program is divided into two main parts that are encode and decode. Following these main functions, there are also 3 helper functions that d...
C++
UTF-8
1,321
2.765625
3
[]
no_license
#include <iostream> #include "sphere.h" #include "circle.h" #include "polygon.h" #include "reuleauxtriangle.h" #include "geom.h" #include "reuleauxtetrahedron.h" #include "cube.h" ReuleauxTetrahedron::ReuleauxTetrahedron(Point3D vertices[4]) { vertices_ = vertices; } int ReuleauxTetrahedron::vertex...
Java
UTF-8
645
2.78125
3
[]
no_license
package com.codisimus.plugins.codsperms; /** * PermissionNode represents a Minecraft Permission node and it's value * * @author Codisimus */ public class PermissionNode { private final String name; private boolean value; public PermissionNode(String name) { this.name = name; value = tr...
Java
UTF-8
543
2.5
2
[ "Apache-2.0" ]
permissive
package ru.job4j.homeworks.tasks; import org.junit.Test; import static org.hamcrest.Matchers.is; import static org.junit.Assert.*; public class Task1110Test { Task1110 test = new Task1110(); @Test public void whenPutANumberThenReturnItTurnedAndInArray() { assertThat(test.makeArray(23434), is(new ...
Python
UTF-8
679
3.765625
4
[]
no_license
""" This solution is same as the first solution but did not use a helper function. """ class Node: def __init__(self, val=None, children=None): self.val = val self.children = children class Solution: def max_depth(self, root: "Node") -> int: # check if the node exist ...
Java
UTF-8
6,292
1.773438
2
[]
no_license
/** * SYMGF * Derechos Reservados Mauricio Lopez Barba * Este software es propiedad de Mauricio Lopez Barba, y no puede ser * utilizado, distribuido, copiado sin autorizacion expresa por escrito. * * @author Mauricio Lopez Barba * @version 2013-10 */ package com.flexwm.client.op; import com.symgae.shared.BmF...
C
UTF-8
281
3.03125
3
[]
no_license
/* used to change all characters in *s to lower case */ void locase(char *s); /* returns the size of the file indicated by *name */ int filesize(char *name); /* determines if the extension in *ext matches a lower case version *filename*/ int extMatch(char *filename, char *ext);
Java
UTF-8
4,136
2.8125
3
[]
no_license
package com.ekomera.gox.todoservice.database; import java.sql.CallableStatement; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import com.ekomera.gox.todoservice.models.User; public final class UserDataBase { private static Connect...
Python
UTF-8
1,472
2.96875
3
[ "MIT" ]
permissive
import tensorflow as tf import numpy as np tf.enable_eager_execution() width = 3 # 1.4031373262405396 total time for inital condition # 1.0077402591705322 best time def compute_ramp(y): g = tf.constant(9.8) dx = x[1] - x[0] # Fix the endpoints y = tf.concat([[1.0], y, [0.0]], axis=0) # Conser...
Python
UTF-8
950
3.796875
4
[]
no_license
import random user_action = input("Enter rock, paper, or scissors:") possible_actions = ["rock","paper","scissors"] computer_action = random.choice(possible_actions) lose_insult_list = ["wow u lost to a computer", "how r u gonna lost to a machine","stop losing"] win_insults = ["the computer let u win, you\'re welcome"...
Python
UTF-8
437
2.71875
3
[]
no_license
#!/usr/bin/python #coding=utf-8 # from random import * import random # l = [] # i = 0 # # while i <= 5: # i += 1 # b = random.randint(1, 33) # print b # l.append(b) # print l # l.sort() # a = random.randint(1,16) # l.append(a) # print l #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
Java
UTF-8
569
2.59375
3
[ "Apache-2.0" ]
permissive
package net.carti.participants; import org.junit.Test; /** * Add Description HERE * * @author Mihai Matache mihmatache@luxoft.com * @since 10/1/2019 */ public class DealerTests { //Static variables //Instance variables //Constructors //Methods @Test public void shuffleTest(){ D...
Java
UTF-8
1,580
2.078125
2
[]
no_license
package com.acmvit.acm_app.ui.invites; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import com.acmvit.acm_app.R; import com.acmvit.ac...
Java
UTF-8
7,731
1.945313
2
[ "Apache-2.0" ]
permissive
package net.mgsx.gltf.scene3d.shaders; import com.badlogic.gdx.Application.ApplicationType; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Texture.TextureFilter; import com.badlogic.gdx.graphics.VertexAttribute; import com.badlogic.gdx.graphics.g3d.Renderable; import com.badlogic.gdx.graphics.g3d.Shader...
Python
UTF-8
1,573
2.5625
3
[]
no_license
# Adapted from https://github.com/PyTorchLightning/pytorch-lightning/blob/master/pl_examples/basic_examples/mnist.py import torch import pytorch_lightning as pl from torch.nn import functional as F from torch.utils.data import DataLoader, random_split try: from torchvision.datasets.mnist import MNIST from tor...
Java
UTF-8
658
2.3125
2
[]
no_license
package com.webjjang.board.service; import java.util.List; import com.webjjang.board.dao.BoardDAO; import com.webjjang.board.dto.BoardDTO; import com.webjjang.main.Service; public class BoardListService implements Service{ private BoardDAO dao; public BoardListService(BoardDAO dao) { this.dao = dao; } pub...