language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
Markdown
UTF-8
1,449
2.890625
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: Los tipos protegidos sólo se pueden declarar dentro de una clase. ms.date: 07/20/2015 f1_keywords: - vbc31047 - bc31047 helpviewer_keywords: - BC31047 ms.assetid: b2d79254-8efd-4b8f-b691-dc168caed207 ms.openlocfilehash: f63f45efc96c3064d0f642fa65248aa3f324307e ms.sourcegitcommit: 22c3c8f74eaa138dbbb...
Java
UTF-8
1,545
2.140625
2
[]
no_license
package org.zerock.test; import static org.junit.Assert.*; import javax.inject.Inject; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJU...
Python
UTF-8
3,555
2.90625
3
[]
no_license
# Own python file from Melody import Melody # Python standard libs import time import random # Pygame import pygame class Queue: def __init__(self): self.lst = [] def __str__(self): return str(self.lst) def enQ(self, items): self.lst.append(items) def deQ(self): if ...
Python
UTF-8
7,471
3.109375
3
[]
no_license
import numpy as np import matplotlib.pyplot as plt import pandas as pd from matplotlib.patches import Rectangle def load_event_properties(experiment): """ Load event property file picks for a given experiment number and return that data as an array """ return np.loadtxt('../Slip_Property_Data/%s_ev...
Ruby
UTF-8
749
3.71875
4
[]
no_license
# Algoritma # 1) Başla # 2) toplam = 0 olsun # 3) sayac = 1 olsun # 4) sayac > 999 ise 9. adıma git # 5) Eğer sayac mod 3 = 0 veya sayac mod 5 = 0 değil ise 7. adıma git. # 6) toplam = toplam + sayac olsun # 7) sayac = sayac + 1 olsun # 8) 4. adıma git # 9) toplamı ekrana yazdır # 10) Bitir # 2) toplam = 0 olsun topla...
Java
UTF-8
2,350
1.929688
2
[]
no_license
package com.dxjr.portal.cms.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.dxjr.common.page.Page; import com.dxjr.portal.cms.mapper.CmsTagMapper; import com.dxjr.portal.cms.service.CmsTagService; import com...
Java
UTF-8
7,266
2.203125
2
[ "Apache-2.0" ]
permissive
package io.quarkus.it.hibernate.validator; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.is; import org.junit.jupiter.api.Test; import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.h2.H2DatabaseTestResource; import io.quarkus.test.junit.QuarkusTest; impo...
Java
UTF-8
4,689
3.21875
3
[]
no_license
package org.gnuhpc.interview.leetcode.solutions; import org.junit.Test; import java.util.HashMap; import java.util.Map; public class NumberToWords273 { Map<Integer, String> wordsMap = new HashMap<Integer, String>() {{ put(0, "Zero"); put(1, "One"); put(2, "Two"); put(3, "Three"); ...
Markdown
UTF-8
444
2.671875
3
[]
no_license
--- layout: post title: TripLab has its first social event at Snakes and Lattes! date: 2019-07-22 excerpt: > TripLab has its first social event at Snakes and Lattes! --- The lab had our first lab social event at a boardgame themed coffeeshop, Snakes and Lattes. We played the game Codenames and had a ton of fun! ...
Python
UTF-8
12,281
2.875
3
[]
no_license
"""M3C 2018 Homework 3 Frederica Melbourne CID: 01068192 Contains five functions: plot_S: plots S matrix -- use if you like simulate2: Simulate tribal competition over m trials. Return: all s matrices at final time and fc at nt+1 times averaged across the m trials. performance: To be completed -- an...
Swift
UTF-8
1,958
2.703125
3
[ "MIT" ]
permissive
// // AnimatedImageView.swift // AnimatedImage // // Created by Tigran Yesayan on 6/26/17. // Copyright © 2017 Tigran Yesayan. All rights reserved. // import UIKit private let kContentChangeAnimation = "__contentChangeAnimation" public class AnimatedImageView: UIImageView { public override class var lay...
PHP
UTF-8
2,678
2.734375
3
[]
no_license
<?php /** * POST createProperty * Summary: Create property * Notes: * Output-Formats: [application/json] */ $app->POST('/v2/property', function ($request, $response, $args) { try { $dataRequest = $request->getParsedBody(); $insertStatement = $this->db->insert(array_keys($dataRequest)) ...
C#
UTF-8
807
2.765625
3
[]
no_license
public void NewClass() { try { con.Open(); SqlCommand cmd = new SqlCommand("create database "+dbnm,con); cmd.ExecuteNonQuery(); cmd.Cancel();cmd.Dispose(); con.Close();con.Dispose(); con = new SqlConnection("Data Source=DESK...
Markdown
UTF-8
3,010
3.1875
3
[ "MIT" ]
permissive
# Căi Express permite mai multe modalități de formare a căilor necesare rutării. ## Căi explicite Introduci calea ca prim argument. ```javascript app.use('/abcd', function (req, res, next) { next(); }); ``` ## Căi după șabloane O cale care începe cu `ab`, este urmat de caracterul `c`, care poate exista sau nu, ...
Java
WINDOWS-1252
945
2.0625
2
[]
no_license
package com.guyi.TestNG; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.testng.annotations.Test; import org.testng.annotations.BeforeTest; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeSuite; import org.testng.annotations.AfterSuite; i...
C++
UTF-8
1,806
2.53125
3
[ "MIT" ]
permissive
#include "Polygon3DDataBS.h" #include "Polygon3DTopology.h" #include <data_structures/VectorOperations.h> Polygon3DDataBS::Polygon3DDataBS( const std::shared_ptr<Polygon3DTopology>& topology, const Vectors& positionsBS, const Vectors& outerVertexNormalsBS, const Vectors& outerFaceNorm...
Shell
UTF-8
1,293
4.34375
4
[]
no_license
#!/bin/bash # # create a tree full of files that can be used to verify access # checking behavior. # # You will want to change TEST_DIR to be on the file system to be tested. # You might want to change TEST_PGM to be a fully qualified file name # # program that can be executed for testing purposes TEST_PGM=./check_ac...
JavaScript
UTF-8
2,109
3.03125
3
[]
no_license
"use strict"; exports.__esModule = true; var tuckShop_1 = require("../tuckshop/tuckShop"); var vendingMachine_1 = require("../vending/vendingMachine"); function main() { var t = []; t.push(new tuckShop_1.TuckShop("T1", 1, "b", new vendingMachine_1.VendingMachine("Coco-cola", 1, 2, 15))); t.push(new tuckShop...
Swift
UTF-8
630
2.671875
3
[]
no_license
// // NetworkConstants.swift // CarMeets // // Created by Lennert Bontinck on 18/01/2019. // Copyright © 2019 Lennert Bontinck. All rights reserved. // import Foundation /** Base URL's voor communicatie met de backend. */ struct NetworkConstants { static let baseApiURL = URL(string: "https://carmeets-backen...
Ruby
UTF-8
631
2.65625
3
[]
no_license
module Kernel def Boolean(string) return true if string== true || string =~ (/(true|t|yes|y|1)$/i) return false if string== false || string.nil? || string =~ (/(false|f|no|n|0)$/i) raise ArgumentError.new("invalid value for Boolean: \"#{string}\"") end if RUBY_VERSION < "1.9" def ruby_18 yi...
C#
UTF-8
7,075
2.828125
3
[ "MIT" ]
permissive
using NAudio.Wave; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Zokma.Libs.Audio { /// <summary> /// Audio data. /// </summary> public class AudioData : IDisposable { /// <summary> /// Min volume. ...
C++
UTF-8
956
3.078125
3
[]
no_license
#include <iostream> using namespace std; int main() { int n; cin>>n; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } int smaller[n]; int greater[n]; smaller[0]=-1; int min=0; for(int i=1;i<n;i++) { if(a[i]<=a[min]) { min=i; smaller[i]=-1; } ...
Markdown
UTF-8
1,300
2.578125
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- description: Gets a pointer to the pool of shared parameters. ms.assetid: 1e999fd5-76ef-43fa-8a77-ae6f2821f46d title: ID3DXEffect::GetPool method (D3DX9Effect.h) ms.topic: reference ms.date: 05/31/2018 topic_type: - APIRef - kbSyntax api_name: - ID3DXEffect.GetPool api_type: - COM api_location: - D3dx9.lib - D3...
C#
UTF-8
443
3.125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication.Calculator { public class OperationAdd { public float Calculate(string inputA, string inputB) { inputA = inputA.Replace('.', ','); ...
Python
UTF-8
1,247
3.171875
3
[]
no_license
# coding:utf-8 ''' @Copyright:LintCode @Author: ultimate010 @Problem: http://www.lintcode.com/problem/regular-expression-matching @Language: Python @Datetime: 16-07-03 08:50 ''' class Solution: """ @param s: A string @param p: A string includes "." and "*" @return: A boolean """ def i...
Ruby
UTF-8
875
3.96875
4
[]
no_license
# puts "WEBCAMP".methods # puts "WEBCAMP".reverse # puts "WEBCAMPでプログラミング学習".include?("WEBCAMP") # tall = 180 # if tall >= 170 && tall <= 190 # puts "身長は170以上190以下です。" # end # puts 'キーボードで数字「2」と数字「3」を入力してください' # a = gets.to_i # b = gets.to_i # puts "a+b=#{a+b}" dice = 0 while dice != 6 do dice ...
Python
UTF-8
402
3.453125
3
[]
no_license
import time def sieve_eratosthenes(n): sieve = [1] * n sieve[0] = 0 for p in xrange(2, n + 1): if sieve[p - 1]: # print p for i in xrange(p ** 2, n + 1, p): sieve[i - 1] = 0 n = 100000000 average = 0 for _ in xrange(2): start = time.time() sieve_er...
Python
UTF-8
26,453
2.703125
3
[]
no_license
import random import copy from ks.commands import ECommandDirection, ChangeGhostDirection, ChangePacmanDirection from ks.models import ECell, EDirection ai = None CELL_EMPTY = ECell.Empty CELL_FOOD = ECell.Food CELL_SUPERFOOD = ECell.SuperFood CELL_WALL = ECell.Wall DIR_UP = EDirection.Up DIR_RIGHT = EDirection.Righ...
Java
UTF-8
3,996
2.625
3
[]
no_license
package backend.deductiveRules.segments.theorems; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import backend.ast.GroundedClause; import backend.ast.Descriptors.Intersection; import backend.ast.Descriptors.Relations.Congruences.GeometricCongruentAngles; import bac...
Python
UTF-8
231
3.5
4
[]
no_license
#Oef 04 som van n getal = input("Geef een getal op: ") getal = getal getal1 = getal+getal getal2 = getal+getal+getal getal = int(getal) getal1 = int(getal1) getal2 = int(getal2) totaal = getal + getal1 + getal2 print(totaal)
C
UTF-8
823
3.515625
4
[]
no_license
#include <stdio.h> void tohex(unsigned char * in, size_t insz, char * out, size_t outsz) { unsigned char * pin = in; const char * hex = "0123456789ABCDEF"; char * pout = out; for(; pin < in+insz; pout +=3, pin++){ pout[0] = hex[(*pin>>4) & 0xF]; pout[1] = hex[ *pin & 0xF]; p...
C++
UTF-8
314
2.578125
3
[]
no_license
#include <iostream> #include <my_math.h> using namespace std; int main(void){ Math my_math_library; cout << my_math_library.getSin(30) << endl; cout << my_math_library.getCos(30) << endl; cout << my_math_library.getCos(45) << endl; cout << my_math_library.getSin(45) << endl; return 0; }
PHP
UTF-8
1,645
2.5625
3
[ "MIT" ]
permissive
<?php namespace App\Console\Commands; use App\model\Penjualan; use Carbon\Carbon; use Illuminate\Console\Command; use Illuminate\Support\Facades\DB; class updateExpiredOrder extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'o...
Java
UTF-8
3,583
2.390625
2
[]
no_license
package org.me.web.plugin.shiro.authentication; import java.util.Set; import javax.annotation.Resource; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.AuthenticationInfo; import org.apache.shiro.authc.AuthenticationToken; import org.apache.sh...
Go
UTF-8
5,894
2.640625
3
[ "MIT" ]
permissive
package canvas_test import ( "fmt" "github.com/ghthor/aodd/game/client/canvas" "github.com/ghthor/filu/rpg2d" "github.com/ghthor/filu/rpg2d/coord" "github.com/ghthor/filu/rpg2d/quad" "github.com/ghthor/filu/sim/stime" "github.com/ghthor/gospec" . "github.com/ghthor/gospec" ) type terrainContext struct { rp...
PHP
UTF-8
9,550
2.53125
3
[]
no_license
<!DOCTYPE html> <html> <head> <title>Profile Page</title> <meta charset="UTF-8"> <?php include 'header.php' ?> </head> <body> <?php include 'config.php'; include 'db_connect.php'; include 'navbar.php'; ?> <?php ...
Java
UTF-8
4,744
3.5
4
[]
no_license
package com.company; import java.util.ArrayList; /** * Created by mh6900 on 2/20/2019. */ public class Students { //Properties: private ArrayList<Assignments> Assignments;//Assignments (List) //create Assignments class private String firstName;//firstName (String) private String lastName;//lastN...
C++
UTF-8
4,153
2.6875
3
[]
no_license
/* Copyright Kangaroo Magic 2011 Created Jonathan Jones Name RobotBuildingPuzzle.hpp Brief Includes all the objects that make up the robot building puzzle */ #ifndef ROBOT_BUILDING_PUZZLE_HPP #define ROBOT_BUILDING_PUZZLE_HPP // Includes #include <Vector> #include "Puzzle.hpp" // Forward decelarations class...
Markdown
UTF-8
641
2.703125
3
[]
no_license
--- title: "Testing Hugo Markup" date: 2023-05-15T23:58:09-07:00 draft: false --- It's a particle! In a box! <canvas id="particlecanvas" width="300" height="100"></canvas> <script> const c = document.getElementById("particlecanvas"); const ctx = c.getContext("2d") let pos = 0; let v = 1; function step() { ctx.clea...
Python
UTF-8
5,119
2.53125
3
[]
no_license
from numpy import exp, median from scipy.sparse.csgraph import laplacian from sklearn.manifold.locally_linear import ( null_space, LocallyLinearEmbedding) from sklearn.metrics.pairwise import pairwise_distances, rbf_kernel from sklearn.neighbors import kneighbors_graph, NearestNeighbors from mpl_toolkits.mplot3d im...
Java
UTF-8
913
3.265625
3
[]
no_license
package com.lfw.io.base; import java.io.*; /** * @email fuwei.liu@dmall.com * @author: fuwei.iu * @date: 2021/4/25 下午10:36 * @description: 写入字符流信息 */ public class WriterDemo { /** * 字节流(inputStream/outputStream)与字符流(reader/writer)的区别: * 字符流可以直接处理中文,但是字符流处理中文会出现乱码 * * @param args */ ...
Go
UTF-8
1,642
2.703125
3
[]
no_license
package structs_test import ( "testing" "github.com/andrievsky/daretogo/structs" "github.com/stretchr/testify/assert" ) func TestHashSetInit(t *testing.T) { var set = structs.NewHashSet(10) assert.Equal(t, false, set.Contains(1)) assert.Equal(t, 0, set.Count()) } func TestHashSet(t *testing.T) { var set = st...
Markdown
UTF-8
4,754
2.59375
3
[]
no_license
--- title: 搭建WordPress个人站点 date: 2017/12/10 12:00:00 tags: - WordPress - 个人博客 - MySQL categories: 搭建博客 --- > WordPress 是一款常用的搭建个人博客网站软件,使用 PHP 语言和 MySQL 数据库开发。 ## 说在前面 近期我的女神希望建立自己的个人博客,明确表示不喜欢平时我写博客的方式——目前我使用hexo+github的方式。她希望有一种创建博客的感觉,能够所见即所得,而且不喜欢用markdown语法,就目前而言,我能想到的只有WordPress,恰好最近在腾讯云上买了一台服务器,于是立即着手。<b...
Swift
UTF-8
3,946
3.0625
3
[ "AFL-3.0" ]
permissive
@testable import DiceKit import XCTest final class ChanceTests: XCTestCase { func testInitialization() { XCTAssertNil(try? Chance.oneOut(of: 0)) XCTAssertNotNil(try? Chance.oneOut(of: 1)) XCTAssertNil(try? Chance.oneOut(of: -1)) XCTAssertNotNil(try? Chance.oneOut(of: 5)) XCT...
PHP
UTF-8
2,001
2.515625
3
[ "MIT", "BSD-3-Clause" ]
permissive
<?php namespace MissionBundle\Service; class Mission { protected $em; public function __construct(\Doctrine\ORM\EntityManager $em) { $this->em = $em; } public function organiseMissions($listMissionsAvailable, $listCurrentMissions) { foreach ($listMissionsAvailable as $missio...
C++
ISO-8859-1
11,204
2.875
3
[]
no_license
#pragma once #include <vector> #include <time.h> #include <windows.h> #include <gl\gl.h> #include <gl\glu.h> #include <math.h> #include <stdlib.h> #include "Model.h" #include "Constant.h" #include "Vertex.h" class Asteroid { private: /*MEMBERS*/ //Variabile che fa da moltiplicatore per la ...
C#
UTF-8
896
2.875
3
[]
no_license
using System; using System.IO; using Data.Models; using Data.Repositories.Interfaces; using Newtonsoft.Json; namespace Data.Repositories { public class JsonRepository<T>: IRepository<T> { private readonly string _filePath; public JsonRepository() { _filePath = AppDomain.Cu...
PHP
UTF-8
593
2.828125
3
[]
no_license
<?php namespace Bundle\DownloadBundle\Resources; /* * MORE TYPES: * http://www.iana.org/assignments/media-types/ * http://en.wikipedia.org/wiki/Internet_media_type * */ class MediaType { public static $mediaTypes = array( 'pdf' => 'application/pdf', 'mp3' => 'audio/mpeg', 'wav' => '...
JavaScript
UTF-8
2,311
2.890625
3
[]
no_license
import fetchCountries from './fetchCountries.js'; import getRefs from './get-refs.js'; import { success, info, error } from './pnotify.js'; import singleRenderCountry from '../templates/singleCountryRender.hbs'; import multipleRenderCountry from '../templates/multipleCountryRender.hbs'; const _ = require('lodash'); ...
Java
UTF-8
1,428
2.140625
2
[]
no_license
package com.hg.anDGS; import java.util.Locale; import android.app.Activity; import android.content.SharedPreferences; import android.content.res.Configuration; import android.content.res.Resources; import android.os.Bundle; public class DGSActivity extends Activity { @Override public void onCreate(Bundle save...
C#
UTF-8
1,017
3.203125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; namespace ByteBank.Modelos { class FileReader : IDisposable // Provides a mechanism for releasing unmanaged resources. { /*------------------------------ | Var...
Python
UTF-8
4,457
2.828125
3
[ "BSD-2-Clause" ]
permissive
class KNNClassifier: def __init__(self, k=5, strategy='my_own', metric='euclidean', weights=False, test_block_size=1000): self.strategy = strategy self.weights = weights self.test_block_size = test_block_size self.metric = metric self.k = k if strateg...
C#
UTF-8
1,321
2.5625
3
[]
no_license
using Coding.ShannonFano; using NUnit.Framework; namespace CodingUnitTests { [TestFixture] public class ShannonFano { [TestCase("aaabbcde", "000101011011101111")] [TestCase("a", "0")] [TestCase("aaaaaaaa", "00000000")] public void EncodeTesting(string input, string expected...
Python
UTF-8
6,498
2.59375
3
[]
no_license
# -*- coding: utf-8 -*- from sqlalchemy import create_engine from sqlalchemy import Table, Column, Integer, String, Text from sqlalchemy import Sequence from sqlalchemy import and_, or_ from sqlalchemy import ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.orm import sessionmaker from sqlalchemy.ex...
PHP
UTF-8
743
2.625
3
[ "MIT" ]
permissive
<?php /** * PayuBundle for Symfony2 * * This Bundle is part of Symfony2 Payment Suite * */ namespace PaymentSuite\PayUBundle\Model\Abstracts; /** * Abstract Model class for report response models */ abstract class PayuReportResponse extends PayuResponse { /** * @var PayuResult * * result ...
PHP
UTF-8
1,674
3.46875
3
[]
no_license
<?php interface MyProduk{ public function getInfoProduk(); } abstract class Produk{ protected $nameProduk; protected $ketegory; protected $modelProduk; public function __construct($nameProduk="name Produk", $ketegory="ketegory", $modelProduk="model Produk") { $this->nameProduk = $nameProduk; $this->ketegory...
Go
UTF-8
1,753
2.6875
3
[ "Apache-2.0" ]
permissive
/* Copyright 2018 COMPANY Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distrib...
Java
UTF-8
2,788
2.359375
2
[]
no_license
package com.bvd.android.carstobert.customer; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.widget.ArrayAdapter; import android.widget.ListView; import com.bvd.android.carstobert.R; import com.bvd.android.carstobert.controllers.CarController; import ...
Markdown
UTF-8
3,884
2.59375
3
[ "MIT" ]
permissive
![image preview](https://github.com/acecreamu/craquelure-graphs/blob/master/readme_imgs/img_preview.jpg) Supporting code to the publication [“The cracks that wanted to be a graph”: application of image processing and Graph Neural Networks to the description of craquelure patterns](https://arxiv.org) # Option 1. Extra...
JavaScript
UTF-8
3,894
2.59375
3
[ "CC-BY-3.0", "CC-BY-4.0" ]
permissive
customElements.define('fb-news-item', class extends HTMLElement { constructor() { super(); let menu = [ { 'label':'新增消息', 'event':'add-item' }, { 'label':'更改消息', 'event':'update-item' }, { 'la...
Markdown
UTF-8
1,076
2.6875
3
[ "MIT" ]
permissive
Site Lab ===== Site Lab aims to be an open-source replacement for website analysis tools such as BuiltWith, NerdyData, and DataNyze. Site Lab is a Ruby on Rails application. It uses PostgreSQL as its database and Redis + Sidekiq for background processing. How Does it Work? ----- Right now, it's fairly simple: ...
JavaScript
UTF-8
668
2.59375
3
[]
no_license
let net = require("net"); let fs = require("fs"); function rert(remoteFileName) { if (remoteFileName!=undefined); console.log("no remote filename"); return send(remoteFileName); } function send(remoteFileName) { let commands = []; commands[0] = "PASV \n"; commands[1] = "RETR "+rem...
TypeScript
UTF-8
1,544
2.984375
3
[]
no_license
import faker = require('faker'); import { EventsMap, IEventDetails } from './EventsSourceToMap'; import { IEvent } from './iDBEvent'; function readEventsMap(): {key: string, item: IEventDetails} | undefined{ let i: number = 0; let max: number = EventsMap.size - 1; const index: number = (faker.random.number...
Java
UHC
1,083
3.75
4
[]
no_license
import java.util.Scanner; public class Exam04_3_1 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print(" Էϼ(1~12)>>"); int month = scanner.nextInt(); if (month <= 2) { System.out.println("ܿ"); } else if (month <= 5) { System.out.println...
Ruby
UTF-8
1,947
4.21875
4
[]
no_license
# Write a program called name.rb that asks the user to type in their name and then prints out a greeting message with their name included. puts "What's your name?" name = gets.chomp puts "Hello, #{name}. Have a nice day." # Write a program called age.rb that asks a user how old they are and then tells them how old the...
Java
UTF-8
905
2.5625
3
[ "MIT" ]
permissive
package id.or.k4x2.monopoly.entity.Cards; import id.or.k4x2.monopoly.entity.Player; import id.or.k4x2.monopoly.model.Context; import id.or.k4x2.monopoly.model.ContextEvents.MoneyEvent; import id.or.k4x2.monopoly.model.GameManager; /** * deduct money entity * @author Muhammad Yanza Hattari/18217043 */ public class ...
Java
UTF-8
7,871
2.875
3
[]
no_license
package newcalculator; import java.awt.BorderLayout; import javax.swing.*; import java.sql.*; import java.awt.EventQueue; import javax.swing.border.EmptyBorder; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.awt.Font; import java.awt.Image; import com.toedter.calendar.JDateChoos...
Python
UTF-8
1,919
2.765625
3
[]
no_license
import requests from fake_useragent import UserAgent # # url = 'http://codingbat.com/java' # file_name = 'codingbat_exercises.txt' # # user_agent = UserAgent() # page = requests.get(url, headers ={'user-agent':user_agent.chrome}) # # with open(file_name,'w') as file: # file.write(page.content.decode('utf-8')) if ty...
Markdown
UTF-8
959
2.609375
3
[]
no_license
# CandyShop This is a candy store website. New user can sign up and log in. There are two roles: admin and user. Admin has an access to the admin panel. Admin can add new good, user, category; edit good, user, category and order status; delete good, user and category. User is able to search goods by category and name;...
Go
UTF-8
1,792
3.0625
3
[]
no_license
package currencies import ( "gopkg.in/mgo.v2/bson" "klubox/infrastructure/db" "klubox/util" ) // CurrencyRepository is a Mongo DB implementation of the currency repository type CurrencyRepository struct { Db db.DbHandler } // Save is a method for adding a currency to the currency mongo repo. func (repo *Currenc...
Java
UTF-8
1,880
2.234375
2
[]
no_license
package mx.com.doe.dev.webbet.data.mysql; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.List; import javax.annotation.Resource; import javax.ejb.Stateless; import javax.sql.DataSource...
C++
UTF-8
953
2.671875
3
[]
no_license
/* Define the traditional particle filter (PF) algorithm */ #ifndef PARTICLEFILTER #define PARTICLEFILTER #include <iostream> #include <Eigen/Dense> #include "Filter.h" namespace attitude_estimation{ class ParticleFilter: public ParticleFilterBase { double diffuse_kernel_; // Noise parameter to diffuse part...
Python
UTF-8
19,282
4.84375
5
[]
no_license
""" In this lesson, you will build a simple to-do list program that lets you: Print your to-do list Add items to your to-do list Mark items as "complete" - removing them from the list """ "WHAT IS A SEQUENCE?" "In Python, a sequence is a data type that can store multiple, individual values. Examples of sequences incl...
Shell
UTF-8
709
3.875
4
[]
no_license
#! /usr/bin/env bash xbit=false gbit=false ro=false script="$0" fail() { local target="$1" if [ -f $target ]; then rm -f $target shift fi echo "$script: $@" 1>&2 exit 1 } args="" for arg in $@; do case "$arg" in -x) xbit=true ;; -g) gbit=true ;; -p) xbit=true gbit=...
Java
UTF-8
304
2
2
[ "Apache-2.0" ]
permissive
package com.hyphenate.easeui.game.iterface; /** * Reference: * Author: * Date:2016/9/9. */ public interface OnPlayListener { int FLAG_I_WIN=0; int FLAG_OPPO_WIN=1; int FLAG_DRAW=2; void onIPlayed(int[] data); void onOppoPlayed(int[] data); void onGameOver(int resultFlag); }
Java
UTF-8
2,208
2.4375
2
[]
no_license
package com.dodge.dodgedemoapp.restcontroller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.sprin...
Markdown
UTF-8
1,708
3.4375
3
[ "MIT" ]
permissive
--- title: Exercise 4.1-2 published: 2012-08-28 18:05 modified: 2021-01-19 10:30 keywords: "maximum subarray, python code" description: "[Python code] Write pseudocode for the brute-force method of solving the maximum-subarray problem. Your procedure should run in Θ(n²) time." --- > Write pseudocode for ...
Shell
UTF-8
390
2.65625
3
[ "MIT" ]
permissive
#!/bin/bash # # Customized i3lock with https://github.com/Lixxia/i3lock set -euo pipefail source "$HOME/.colors" i3lock="$HOME/repos/i3lock/i3lock" wallpaper="$HOME/.local/share/wallpaper.png" "$i3lock" \ --image "$wallpaper" \ --24 \ --ignore-empty-password \ --idle-color "$B_BASE06" \ --verify...
Markdown
UTF-8
744
3.015625
3
[ "MIT" ]
permissive
# Задание к занятию «Методы математической оптимизации» ## 1. Массивы Существует массив `Z = [1,2,3,4,5,6,7,8,9,10,11,12,13,14]`, как из него создать массив `R = [[1,2,3,4], [2,3,4,5], [3,4,5,6], ...,[11,12,13,14]]`? ## 2. Матрица Дана произвольная матрица `A`. Рассчитать ранг матрицы `A`. ## 3. Опимизация Найти ...
Java
UTF-8
1,019
2.078125
2
[ "Apache-2.0" ]
permissive
package com.sdl.web.spring.configuration; import com.sdl.dxa.DxaModelServiceApplication; import org.junit.Test; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; pu...
Markdown
UTF-8
4,974
2.640625
3
[]
no_license
# Security perspective The security perspective guides you as you consider the set of processes and technologies that allow the owners of resources in the system to reliably control who can perform what actions on particular resources. The ability of the system to reliably control, monitor, and audit who can perform ...
C++
UTF-8
6,871
2.953125
3
[]
no_license
#ifndef h_db_chit #define h_db_chit #include "DBChitFwd.h" class db_chit_exception_t : public std::exception { public: db_chit_exception_t(); db_chit_exception_t(const db_chit_exception_t &initializer); virtual ~db_chit_exception_t() throw(); db_chit_exception_t &operator=(const db_chit_exception_t &...
TypeScript
UTF-8
1,547
3.09375
3
[]
no_license
import { expect } from "chai"; import { identity } from "../../src/identity"; import { mapBy } from "../../src/intermediates"; import { toArrayBy } from "../../src/consumables"; describe("intermediates::mapBy", () => { it("empty array returns empty array", () => { const items = []; const result = toArrayBy(...
PHP
UTF-8
1,809
2.859375
3
[]
no_license
<?php class Pedido { private $codPedido; private $codCliente; private $tipo; private $dtEntrada; private $dtEmbarque; private $valorTotal; private $desconto; public function __construct($codPedido, $codCliente, $tipo, $dtEntrada, $dtEmbarque, $valorTotal, $desconto) { $this...
JavaScript
UTF-8
646
2.796875
3
[ "MIT" ]
permissive
const slugify = require("slugify"); const { kebabCase, startCase, round } = require("lodash"); function toSlug(str) { return slugify(kebabCase(str)); } function toArray(param) { if (param && typeof param === "object") return Object.keys(param).map((key) => param[key]); return undefined; } function hasPrope...
JavaScript
UTF-8
650
2.859375
3
[ "MIT" ]
permissive
class Actor { constructor(x,y,radius) { this.preOffsetPosition = createVector(x,y); this.postOffsetPosition = createVector(x,y); this.radius = radius; this.radiusCopy = radius; this.isColliding = false; this.closestFood = null; this.closestFoodDist = Infinity; } checkCollision(objec...
JavaScript
UTF-8
1,808
3.015625
3
[]
no_license
const handlebars = require('handlebars') handlebars.registerHelper('compare', function (lvalue, operator, rvalue, options) { if (arguments.length < 3) { throw new Error("Handlerbars Helper 'compare' needs 2 parameters"); } if (options === undefined) { options = rvalue; ...
Python
UTF-8
5,146
2.625
3
[]
no_license
from myapp import app from myapp.decorators import login_required from myapp.library.models import Author, Book from myapp.library.forms import AuthorForm, BookForm from myapp.database import db_session from flask import render_template, redirect, request, url_for, flash @app.route('/') def index(): books_amount ...
C#
UTF-8
2,690
2.625
3
[]
no_license
using Social.Core.Entity; using Social.Core.Entity.Enums; using Social.Core.Service; using Social.Model.Context; using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Text; namespace Social.Service.Base { public class BaseService<T> : ICoreService<T> where ...
Python
UTF-8
6,584
3.21875
3
[]
no_license
class LinearRegression: @staticmethod def get_cofactor(arr, temp, p, q, n): i = 0 j = 0 for row in range(n): for col in range(n): if row != p and col != q: temp[i][j] = arr[row][col] j += 1 if j ==...
Java
UTF-8
2,240
2.0625
2
[]
no_license
package com.celik.gokhun.burgerfinder; import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.ActivityCompat; import android.Manifest; import android.content.DialogInterface; import android.content.Intent; import android.location.Location; import android.os.Bundle; import android.view.View; public...
Markdown
UTF-8
3,040
3.140625
3
[ "MulanPSL-2.0", "LicenseRef-scancode-mulanpsl-2.0-en", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- --- --- title: 43 宇宙是怎么来的? --- 宇宙是如何诞生的?有很多理论试图去回答这个问题,但目前全世界范围内,接受度最高的一种理论是:宇宙大爆炸理论(the Big Bang theory)。 所谓的宇宙大爆炸理论,讲的是宇宙诞生于130多亿年前的一场大爆炸,在大爆炸还没有发生的时候,万事万物都不存在,宇宙只是一个致密的几何奇点。爆炸发生时,时间、空间诞生并开始扩散,整个宇宙就像一锅热汤,能量密度极高。随着继续扩大,宇宙开始冷却,并在万有引力的作用下,星系天体开始形成,听着是不是很耳熟?这样看来,好像盘古开天地和上帝创世这两个东西方神话都还挺有道理的。 单看宇宙大爆炸理论,感觉还是有点漫无...
Markdown
UTF-8
2,061
2.78125
3
[]
no_license
#### 费拉 https://jikipedia.com/definition/7505 指在古埃及文明没落之后,依然在尼罗河领域耕作的农民。反民主政治作家斯宾格勒在西方的没落中借用该词描述所有伟大文明没落之后的民族(如罗马之后的意大利,日不落帝国之后的英吉利) #### 费 拉 https://www.sohu.com/a/306315574_99922744 费拉源自阿拉伯语,本义是种植者、佃农、自耕农。引申为丧失武德,失去公民特征,以苟活为目的的散沙化民众,是人尽可欺的社会最底层,却有些不着边际的生存智慧。 ![](http://5b0988e595225.cdn.sohucs.com/images/20190407/0...
Java
UTF-8
571
1.914063
2
[]
no_license
package com.arz.pmp.base.framework.commons; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.Valid; import javax.validation.constraints.NotNull; /** * description 请求体信息 * * @author chen wei * @date 2019/11/11 */ @Data @ApiModel ...
Python
UTF-8
348
3.34375
3
[]
no_license
#coding: utf-8 # # criada uma classe # class Juros(): pass # # instancia da classe 'Juros' # juros = Juros() # # deinido uma funcao para o metodo atraves do lambda # juros.simples = lambda obj: obj.capital * obj.taxa * obj.periodo # # teste # juros.capital = 16000 juros.taxa = 0.04 juros.periodo = 4 assert ...
Java
UTF-8
1,606
2.140625
2
[ "MIT" ]
permissive
package org.innovateuk.ifs.publiccontent.service; import org.innovateuk.ifs.commons.rest.RestResult; import org.innovateuk.ifs.commons.service.BaseRestService; import org.innovateuk.ifs.competition.publiccontent.resource.PublicContentResource; import org.innovateuk.ifs.competition.publiccontent.resource.PublicContentS...
Markdown
UTF-8
1,969
2.90625
3
[ "MIT" ]
permissive
# Settings ### `cozy.client.settings.diskUsage()` `cozy.client.settings.diskUsage` is used to known informations about the total used space on the cozy disk. It returns a promise of the document of the disk-usage of id `io.cozy.settings.disk-usage`, with attributes containing a `used` field a string of how many *byt...
Markdown
UTF-8
1,212
2.578125
3
[]
no_license
# Rent WebApi em C# que realiza um CRUD de endereços no SQLServer consumindo recursos da API do ViaCEP # Banco de Dados: SQLServer # Como executar o projeto: * Clone o repositório https://github.com/joaogbsilva/rent.git localmente * Abra o projeto e vá até o arquivo "appsettings.json" e ajuste o conteúdo da "Connect...
Java
UTF-8
852
2.578125
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 editor.common; import Polyhedron.Vector3; import java.util.List; /** * Docasny model implementujici zakladni funkce * @auth...
Java
UTF-8
540
3.15625
3
[]
no_license
package array; public class MyClass { int y; double x; @Override public String toString() { return "y: "+y+"\nx: "+x; } public static void main(String[] args) { // int x = 10; // String xx = String.valueOf(10); // System.out.println(xx); MyClass obj = new MyCla...