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
C#
UTF-8
1,058
2.8125
3
[ "MIT" ]
permissive
using System.IO; namespace BatchAudioFileConverter.Models { public class PathTransformer : IPathTransformer { public string Transform(string inputBasePath , string inputPath , string outputBasePath ) { return Path.Combine(outputBasePath ...
Markdown
UTF-8
770
2.96875
3
[ "Apache-2.0" ]
permissive
## Autoplay <!-- {docsify-ignore-all} --> If autoplay with sound is not allowed by the browser, the player will try to mute and play again. Some mobile device does not support autoplay start even player is muted. :warning: Autoplay already handled in **VideoJS 7**, you may not need this plugin <br /> ```html inject...
JavaScript
UTF-8
403
2.75
3
[]
no_license
const electron = require('electron'); const { ipcRenderer } = electron; const taskList = document.querySelector('.task-list ul'); ipcRenderer.on('task:new', (event, task) => { const elem = document.createElement('li'); const text = document.createTextNode(task); elem.appendChild(text); taskList.appendChild(e...
Python
UTF-8
2,020
2.5625
3
[]
no_license
N=int(input()) sand=[] for i in range(N): a=list(map(int,input().split())) sand.append(a) start=[int((N-1)/2),int((N-1)/2)] import math visited=[ [0]*N for i in range(N)] dr=[0,1,0,-1] dc=[-1,0,1,0] cnt=0 cum=-1 row=start[0] col=start[1] def tornado(x,r,c): y=[x[0]+r,x[1]+c] ratio=[0.02,0.10,0.07,0.01,...
JavaScript
UTF-8
5,794
2.5625
3
[]
no_license
import * as dicomParser from 'dicom-parser' import log from 'loglevel' const decodeLittleEndian = async ( byteArray, { bitsAllocated, bitsStored, pixelRepresentation } ) => { if (bitsAllocated === 8) { return new Uint8Array( byteArray.buffer, byteArray.byteOffset, byteArray.length ) }...
Java
MacCentralEurope
2,291
2.65625
3
[]
no_license
package br.com.ligaesporteamador.bo; import java.util.Calendar; import org.apache.commons.lang.StringUtils; import br.com.ligaesporteamador.model.Usuario; import br.com.ligaesporteamador.util.ValidaCPF; public class UsuarioBO { public String validaPreenchimento(Usuario usuario) { String message = ""; if (!u...
C++
UTF-8
2,492
2.515625
3
[]
no_license
#ifndef CITYSIMULATOR_ENTITY_SERVICE_HPP #define CITYSIMULATOR_ENTITY_SERVICE_HPP #include "base_service.hpp" #include "ecs.hpp" #include "world.hpp" const EntityID MAX_ENTITIES = 1024; typedef std::unordered_map<std::string, ConfigKeyValue> EntityTags; class EntityService : public BaseService { public: virtual voi...
JavaScript
UTF-8
1,857
2.78125
3
[]
no_license
(function () { $(".register #reg").click(function () { var user=/^\w{4,10}$/g; var phone=/^1[3578]\d{9}/g; var psw=/^\w{6,12}/g; if($(".register #username").val()==""){ alert("请输入用户名"); $(".register #username").focus(); ...
Shell
UTF-8
551
3.078125
3
[]
no_license
#!/usr/bin/env bash function install_ansible_ubuntu() { sudo apt-get update sudo apt-get install software-properties-common sudo apt-add-repository ppa:ansible/ansible -y sudo apt-get update sudo apt-get install ansible -y } function install_awx_dependencies(){ for role in geerlingguy.repo-epel geerlinggu...
Java
UTF-8
837
3.421875
3
[]
no_license
package me.surendra.leetcode.trees.n_ary_tree; import java.util.ArrayList; import java.util.List; /** * @see <a href="https://leetcode.com/problems/n-ary-tree-postorder-traversal/">N-ary Tree Postorder Traversal</a> */ public class PostOrderTraverser { /* Time Complexity - O(n) Space Complexit...
TypeScript
UTF-8
1,514
3.0625
3
[ "MIT" ]
permissive
import Promises from '@promises/core'; import { IOptionalPromise } from '@promises/interfaces'; import forEachRightSeries from '../'; Promises._setOnPrototype('forEachRightSeries', forEachRightSeries); export default Promises; declare module '@promises/core' { interface Promises <T> { /** * @exa...
C++
UTF-8
612
2.71875
3
[]
no_license
#ifndef DEF_GUERRIER #define DEF_GUERRIER #include <personnage.h> class Guerrier : public Personnage { private: public: Guerrier(); virtual ~Guerrier(); virtual void action1(Personnage &adversaire); virtual void action2(Personnage *adversaire = nullptr); virtual vo...
C++
UTF-8
4,746
2.625
3
[]
no_license
/* * EventLoopTimer.hpp * * Created on: Aug 3, 2017 * Author: ishan */ #ifndef SRC_TIMERCOMPONENT_EVENTLOOPTIMER_HPP_ #define SRC_TIMERCOMPONENT_EVENTLOOPTIMER_HPP_ #include <boost/bind.hpp> #include <boost/thread.hpp> #include <boost/asio.hpp> #include <boost/signals2/signal.hpp> #include "../interfaces/I...
Markdown
UTF-8
9,775
2.90625
3
[]
no_license
--- title: 'Hibernate Tools: Tips for Reverse Engineering at the Command Line' author: mdesjardins categories: - blog tags: - hibernate - java - jpa - programming --- One of the ancillary projects of the Hibernate framework is the [Hibernate Tools][1] toolset. Using Hibernate Tools, you can automatically gen...
JavaScript
UTF-8
488
2.609375
3
[ "MIT" ]
permissive
import Promise from 'bluebird'; export const getImageSizeForSource = source => { const img = document.createElement('img'); img.src = source; return new Promise(resolve => { img.onload = () => resolve({ couldGetSize: true, width: img.naturalWidth, height: img.na...
Java
UTF-8
6,683
2.078125
2
[ "CC-BY-3.0", "Apache-2.0", "BSD-3-Clause", "BSD-2-Clause", "LicenseRef-scancode-protobuf", "MIT" ]
permissive
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
Markdown
UTF-8
2,929
2.609375
3
[]
no_license
# Project Task ## Tech Stack - Laravel - Mysql ## API Services - GET - POST - PATCH - DELETE ### API Endpoint localhost:8000 ## Functions Example ``` json POST /teams request: { "name":”Platform”, } response: { "id":"b7f32a21-b863-4dd1-bd86-e99e8961ffc6", "name”: “Platform”, } ``` ```json GET /teams/:i...
JavaScript
UTF-8
764
2.609375
3
[]
no_license
import React from 'react'; const SearchBar = ({ searchTerm, setSearchTerm }) => { const handleChange = (event) => { event.preventDefault(); setSearchTerm(event.target.value); }; const handleShowAllClick = (event) => { event.preventDefault(); setSearchTerm(''); }; const ShowAllBtn = () => { ...
Markdown
UTF-8
3,364
2.90625
3
[]
no_license
# LOGFLOWS Software Engineer Challenge - Frontend - [Overview](#overview) - [Functional Requirements](#functional-requirements) - [Other Requirements](#other-requirements) - [Frameworks and Libraries](#frameworks-and-libraries) - [Using the Mock API](#using-the-mock-api) - [Implementation Notes](#implementation-notes)...
Java
UTF-8
1,085
1.789063
2
[]
no_license
package com.ucpro.feature.video.player.view; import android.view.View; import com.ucpro.feature.video.player.b.v; /* compiled from: ProGuard */ final class ad implements v<Boolean> { final /* synthetic */ af a; ad(af afVar) { this.a = afVar; } public final /* synthetic */ void a(int i, Objec...
Python
UTF-8
4,035
2.515625
3
[]
no_license
import time import pandas as pd import numpy as np import networkx as nx import random as rand import csv import ogb.nodeproppred as ogbn from torch_geometric.data import Data import torch_geometric.utils as utils import torch_geometric import torch MAX_NODES = -1 values_dict = {} def choose_node_dataset(): name ...
Markdown
UTF-8
709
2.609375
3
[ "Apache-2.0" ]
permissive
--- layout: post title: '[BOJ] 2293 : 동전 1' author: wookje.kwon comments: true date: 2018-03-27 14:23 tags: [boj, dynamic-programming] --- [2293 : 동전 1](https://www.acmicpc.net/problem/2293) ## 풀이 `dp[i] = 동전 i원을 만들 수 있는 방법의 수` `dp[i] = dp[i - coins[]]` ## 코드 ```cpp main() { int N, K, x, i, j; int dp[10001] = ...
Markdown
UTF-8
19
2.859375
3
[ "MIT" ]
permissive
# udacity-aos-learn
Java
UTF-8
3,230
2.265625
2
[]
no_license
package com.ems.dao; import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; import org.hibernate.Criteria; import org.hibernate.HibernateException; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.criterion.Order; import org.hibernate.criterion.Rest...
JavaScript
UTF-8
4,882
3.28125
3
[]
no_license
class Obstacle { constructor(ctx, canvasSize, speed, canvasWidth, canvasHeight, imgObstSrc) { this.ctx = ctx this.canvasSize = canvasSize this.speed = speed this.canvasWidth = canvasWidth this.canvasHeight = canvasHeight // gap es la diferencia en segundos entre obsta...
C
UTF-8
2,455
3.890625
4
[]
no_license
/* * ===================================================================================== * * Filename: angle.c * * Description: Calculate the quadrant based on input angle * Quadrant I: angle between 0 and 90 * Quadrant II: angle between 90 and 180 * ...
Markdown
UTF-8
1,360
2.65625
3
[]
no_license
# 使用 Amazon SageMaker 训练自己的数据 常用的机器学习的DEMO或者演示项目中使用到的基本全是公开已经制作好并经过经验的数据集,而工作中实际运用到生产的数据往往是未经过处理的。这个项目演示了如何从零开始(指手头没有任何数据),收集数据,筛选数据,给数据打标签,并通过有限数量的jpeg图片(3000张图片),生成 MXNet 常用的 RecordIO 数据格式。并利用自定义的小规模数据集,进行迁移学习(transfer learning),在短时间低成本的情况下获取准确率较高的模型。 另外,可以使用上述生成的数据集交给 Amazon SageMaker Ground Truth 快速进行数据打标签的测试。 ...
SQL
UTF-8
6,943
3.640625
4
[]
no_license
/************************************************************************************************ NPM1: Update to find the molecular information closest to arrival */ DROP TABLE IF EXISTS molecular.cp ; CREATE TABLE molecular.cp SELECT PatientId, PtMRN FROM caisis.vdatasetpatients; DROP TABLE IF EXISTS mole...
Ruby
UTF-8
2,098
2.578125
3
[ "MIT" ]
permissive
module WatcherFactory def self.create(queue_name, config, default_config) watcher_class = config[:name].to_s require "bender/watchers/#{watcher_class}" watcher_class.classify.constantize.new(queue_name, default_config) end end class Watcher def name @name ||= safe_queue_name("#{@queue_name}-#{se...
Java
UTF-8
5,917
2.125
2
[]
no_license
package com.tapan.flickrsample.adapters; import android.content.Context; import android.graphics.Bitmap; import android.support.annotation.NonNull; import android.support.v4.graphics.drawable.RoundedBitmapDrawable; import android.support.v4.graphics.drawable.RoundedBitmapDrawableFactory; import android.support.v7.widg...
Markdown
UTF-8
2,391
2.609375
3
[]
no_license
--- published: true title: Ifai ordena a SAT revele a qué empresas condonó impuestos twitt: "Son montos que deja de recaudar el Estado, por lo que constituye una transferencia negativa de recursos públicos, argumenta comisionada." author: La Jornada location: Nacional category: Principales layout: posts --- ![](http:/...
Markdown
UTF-8
1,577
3.390625
3
[]
no_license
--- layout: post title: Functional programming in scala image: /assets/img/2012-10-1-scala/scala.jpg readtime: 5 minutes --- Its been a while since i managed to get the time post on my blog, I've been really busy with work and home life, I've recently enrolled in an online course. Functional programming in Scala. I ...
Markdown
UTF-8
21,682
3.125
3
[ "MIT" ]
permissive
--- title: "Turning Data into Information" layout: class course: "GIS 520: Advanced Geospatial Analytics" topic: "Geospatial Data Issues" order: 1 esri-course: http://training.esri.com/gateway/index.cfm?fa=catalog.webCourseDetail&CourseID=2017 --- {% include topic-header.html %} [This particular course](http://tr...
JavaScript
UTF-8
5,461
4.3125
4
[]
no_license
function addStringToStorage(event) { let number = event.target.innerText //store number in an array numberStorage.push(number) console.log(numberStorage); } // show number in display //[9, 4, 2] would be 942 function renderDisplay() { let numbersDisplayed = numberStorage.join("") answerElement.innerText =...
Shell
UTF-8
311
2.84375
3
[ "MIT" ]
permissive
#!/bin/bash alias git-tree="git log --graph --date=relative --decorate --pretty=\"format:%C(yellow)%h %C(blue)%>(12)%ad %C(green)%<(7)%aN%C(auto)%d %C(reset)%s\"" # rebase to origin/master function grebase { git fetch --all git stash save prebase git rebase ${@-origin/master} git stash pop }
Ruby
UTF-8
603
2.546875
3
[ "MIT" ]
permissive
module ScormCloud class CLI def self.start command = ARGV.shift appid = ENV['SCORM-CLOUD-APPID'] secret = ENV['SCORM-CLOUD-SECRET'] opts = {} while ARGV.length > 0 case ARGV[0] when '--appid' ARGV.shift; appid = ARGV.shift when '--secret' ...
C#
UTF-8
499
2.53125
3
[]
no_license
using NUnit.Framework; using RecreateMe.Sports; namespace TheRealDealTests.DomainTests.Sports { [TestFixture] public class SportTests { private Sport _sport; [SetUp] public void SetUp() { _sport = new Sport(); } [Test] public void Ha...
Java
UTF-8
762
1.75
2
[]
no_license
package com.pg.crudOps; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration; import org.springframework.context.annotation.ComponentScan; import org.springfra...
C++
UTF-8
455
3.171875
3
[]
no_license
class Solution { public: string reverseString(string s) { if (s.length() == 2){ char result = s[1]; s[1] = s[0]; s[0] = result; }else{ for (int i = 0; i < s.length()/2; i++){ cout<<i<<endl; char index = s[i]; cout<<index...
C#
UTF-8
5,843
2.984375
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; namespace Banzai.Factories { public interface INodeFactory { /// <summary> /// Gets a node by the specified type. /// </summary> /// <typeparam name="TNode">Type of the node to return.</typeparam> /// <returns>The first n...
Java
UTF-8
254
3.03125
3
[ "Apache-2.0" ]
permissive
package P02_Shapes; public class Main { public static void main(String[] args) { Shape shape = new Rectangle(4,7); System.out.println(shape.calculateArea()); System.out.println(shape.calculatePerimeter()); } }
C#
UTF-8
374
2.84375
3
[]
no_license
using System; namespace TDDPalindromo { public class Palindromo { public string Frase { get; set; } public Palindromo(string frase) { if (!String.IsNullOrEmpty(frase)) { this.Frase = frase.Replace(" ","").Replace("-","").ToLower(); }...
Java
UTF-8
929
2.5
2
[ "CC0-1.0", "LicenseRef-scancode-public-domain" ]
permissive
package gov.cms.bfd.pipeline.bridge.model; import static org.junit.jupiter.api.Assertions.assertEquals; import gov.cms.bfd.model.rif.CarrierClaimColumn; import org.junit.jupiter.api.Test; /** Unit tests for {@link Mcs} class. */ public class McsTest { /** Verifies that all lists of numbered enum names appear in th...
Java
UTF-8
946
2.5625
3
[ "MIT" ]
permissive
package net.aholbrook.paseto.data; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import net.aholbrook.paseto.service.Token; import java.util.Objects; @JsonPropertyOrder({"userId", "iss", "sub", "aud", "exp", "nbf", "iat", "jti"}) public class CustomToken extends Token { private Long userId; public Lo...
Ruby
UTF-8
490
3.234375
3
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
require "pry" class Pokemon attr_accessor :id, :name, :type, :db def initialize(id:, name:, type:, db:) @id = id @name = name @type = type @db = db end def self.save(name, type, db) db.execute("INSERT INTO pokemon (name, type) VALUES ('#{name}', '#{type}')") end def self.fin...
C++
UTF-8
1,339
2.53125
3
[]
no_license
#ifndef SHORTEST_LOOP_H #define SHORTEST_LOOP_H #include <vector> #include <iostream> #include <fstream> #include <set> #include <cstring> #include <string> //#define DEBUG 1 const int MAX_NODE_NUM = 51000; struct Edge{ int from,to; int distance; Edge(int _from,int _to,int _weight):from(_from),to(_to),di...
C++
GB18030
10,192
2.671875
3
[]
no_license
#include "Vayo3dFontManager.h" #include "VayoLog.h" #include "Vayo3dRoot.h" #include "Vayo3dRenderSystem.h" #include "Vayo3dTextureManager.h" NS_VAYO3D_BEGIN //------------------------------------------------------------------------ // bitmap.width λͼ // bitmap.rows λͼ(߶) // bitmap.pitch λͼһռõֽ //----------------...
Python
UTF-8
495
3.875
4
[]
no_license
''' # 가운데 글자 가져오기 단어 s의 가운데 글자를 반환하는 함수, solution을 만들어 보세요. 단어의 길이가 짝수라면 가운데 두글자를 반환하면 됩니다. 제한사항 s는 길이가 1 이상, 100이하인 스트링입니다. ''' def solution(s): if len(s) % 2 == 0: answer = s[int(len(s) / 2) - 1 : int(len(s) / 2) + 1] else: answer = s[int(len(s) / 2)] return answer print(solution("abcde...
C#
UTF-8
1,639
3.046875
3
[]
no_license
using System; using System.Collections.Generic; using System.Numerics; using System.Text; using System.Linq; using System.Diagnostics; using _calc = MathService.Calculators.Calculator; namespace ProblemService.Problems { public class Problem_271 : Problem { //https://projecteuler.net/problem=271 Publ...
Java
UTF-8
1,489
2.359375
2
[]
no_license
package ftn.project.xml.service; import ftn.project.xml.model.TUser; import ftn.project.xml.model.User; import ftn.project.xml.repository.UserRepository; import ftn.project.xml.util.AuthenticationUtilities; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.userdeta...
Markdown
UTF-8
1,089
2.984375
3
[]
no_license
## Goals Create the home screen of the app. Create a ListView for the Categories. ## Steps Fill out the TODOs in main.dart and category_route.dart using the specs below. If you had customized your category.dart, you can replace our category.dart with yours. Customize your app if desired. Some ide...
JavaScript
UTF-8
4,847
2.625
3
[]
no_license
export class loginController { constructor() { setTimeout(() => { this.toggleHeader(); }, 100); this.usernameInput = ''; this.password = ''; this.submit = false; dynamicImport("./../../adminpanel/js/database.js").then(db => { this.db = db; ...
Java
UTF-8
14,509
1.898438
2
[]
no_license
package com.example.cauvong.musiconline; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.content.Intent; import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.media.MediaPlayer; import android.net.Uri; import andr...
C
UTF-8
2,266
2.84375
3
[ "BSD-3-Clause" ]
permissive
#ifndef __LCD_H__ #define __LCD_H__ // ------------------------------------------------------------------------ #define LCD_WIDTH 160 #define LCD_HEIGHT 80 #define LCD_FRAMEBUFFER_PIXELS (LCD_WIDTH * LCD_HEIGHT) #define LCD_FRAMEBUFFER_BYTES (LCD_WIDTH * LCD_HEIGHT * 2) // -------------...
JavaScript
UTF-8
139
2.953125
3
[]
no_license
"use strict"; function helloWorld(name, val) { console.log(`Hello ${name}! ${val || ''}`); } helloWorld('Joe'); helloWorld('John', 5);
PHP
UTF-8
2,372
2.75
3
[]
no_license
<?php class categorias{ private $name = "llx_categorie"; private $custom; private $arraySubCategorias; private $countSubCategorias = 0; private $rowid; private $fk_parent; private $label; private $description; private $type; public function __constructComplete($rowi...
JavaScript
UTF-8
2,424
3.234375
3
[]
no_license
import React, { Component, useState } from 'react'; export default function Form() { const [number1, setNumber1] = useState(""); const [number2, setNumber2] = useState(""); // const [total, setTotal] = useState(number1 + number2); // const [dif, setdif] = useState(number1 - number2); // const ...
Java
UTF-8
1,953
4.15625
4
[]
no_license
package com.company; import java.util.Scanner; public class Main { public static void main(String[] args) { // write your code here startCalculator(); } public static void startCalculator() { Scanner input = new Scanner(System.in); int number1; int number2; ...
Python
UTF-8
150
2.53125
3
[]
no_license
import enum class ButtonType(enum.Enum): """ Enum class with type of buttons """ Start = 0 Records = 1 Quit = 2 Back = 3
Java
UTF-8
599
1.992188
2
[]
no_license
package com.elmagmo3a.java.playstation.repository; import java.util.Optional; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.stereotype.Repository; import com.elmagmo3a.java.playstation...
Ruby
UTF-8
3,857
3.765625
4
[]
no_license
# Virus Predictor # I worked on this challenge [by myself, with: ]. # We spent [#] hours on this challenge. # EXPLANATION OF require_relative: links test file to the class file for rspec testing # # require_relative 'state_data' class VirusPredictor # for each new instance of a class, sets the 3 below parameters def ...
C++
UTF-8
12,343
2.640625
3
[]
no_license
#include <iostream> #include <fstream> #include <cmath> #include "Vector.h" #include "Random64.h" using namespace std; const double A=10., L=100., R=1.; const double K=1e4, Gamma=50, Kcundall=10; const double g=9.8; const int N=27; const double Zeta=0.1786178958448091; const double Lambda=-0.2123418310626054; const...
C
UTF-8
126
2.671875
3
[]
no_license
#include <stdio.h> int main() { int var = 10; int int_ptr = &var; printf("%d\n", int_ptr); return 0; }
JavaScript
UTF-8
647
2.8125
3
[]
no_license
//importando request var request = require('request'); ///Pegando arquivos function get_img(url, tipo) { request(url, (response, body) => { if (response.statusCode == 200) { const https = body //BUSCA PELO INDICE const types = https.indexOf(tipo) //htttps peg...
C++
UTF-8
2,049
3.515625
4
[]
no_license
#include<iostream> #include <vector> #include <stdexcept> #include <cmath> #include <string> #include <map> #include <algorithm> #include <stack> #include <unordered_map> #include <queue> using namespace std; class Solution { public: int MoreThanHalfNum_Solution(vector<int> numbers); // int Partition(vector<int>&...
Java
UTF-8
4,351
2.1875
2
[]
no_license
package com.wzcsoft.dzpjdy.util; import com.alibaba.fastjson.JSON; import com.wzcsoft.dzpjdy.domain.User; import org.json.JSONArray; import org.json.JSONObject; import java.io.UnsupportedEncodingException; import java.util.HashMap; import java.util.List; import java.util.Map; /** * @author lyj * @date 2019/7/26 1...
C++
UTF-8
3,260
2.578125
3
[]
no_license
#include "Skybox.h" Skybox::Skybox(int scale, Scene *scene) { for (int i = 0; i < 108; i++) { skyboxVertices[i] *= scale; } glGenVertexArrays(1, &skyboxVAO); glGenBuffers(1, &skyboxVBO); glBindVertexArray(skyboxVAO); glBindBuffer(GL_ARRAY_BUFFER, skyboxVBO); glBufferData(GL_ARRAY_BUFFER, sizeof(skyboxVert...
PHP
UTF-8
1,840
2.859375
3
[]
no_license
<?php /** * Created by PhpStorm. * User: hocvt * Date: 7/25/16 * Time: 09:40 */ namespace App\Traits; trait FileUtils { private $tmp_files = []; /** * Tạo 1 file tạm tự động xóa * * @param null|string|resource $input * * @param bool $is_content xác định input là content hay path * * @param str...
Markdown
UTF-8
4,256
3.109375
3
[ "MIT" ]
permissive
--- layout: item title: "Wand of Wonder" sources: [DMG.212] tags: [focus, wand, rare, attunement] category: "Wand" rarity: "Rare (requires attunement by a spellcaster)" --- This wand has 7 charges. While holding it, you can use an action to expend 1 of its charges and choose a target within 120 feet of you. The targe...
C++
UTF-8
1,487
2.859375
3
[]
no_license
class Solution { public: int leastInterval(vector<char>& tasks, int n) { vector<int> freq(26); // frequency of each task for (const char& ch: tasks) { freq[ch - 'A']++; } // Find the maximum frequency int maxTask = *max_element(begin(freq...
Markdown
UTF-8
2,849
2.984375
3
[]
no_license
# Predicting a book's literary success using specific books features ## Table of Contents 1. [Introduction and Overview](#introduction) 2. [Technologies](#technologies) 3. [Installation](#installation) 4. [References](#references) ### Introduction and Overview The purpose of this project is to analyze and predict bo...
Python
UTF-8
567
3.921875
4
[]
no_license
''' You are given a string S. Your task is to print all possible combinations, up to size k, of the string in lexicographic sorted order. Input Format A single line containing the string S and integer value k separated by a space. ''' # Enter your code here. Read input from STDIN. Print output to STDOUT from itertoo...
C++
UTF-8
544
2.640625
3
[]
no_license
#include <iostream> #include <chrono> #include <thread> void StatusLoop(); int main(int argc, char* argv[]){ if(argc == 1){ system("cat HSSTool.txt"); return 0; } char StatusArg {'s'}; char* pStatusArg = &StatusArg; if(*argv[1] == *pStatusArg){ std::cout<<"Success.\n"; ...
Python
UTF-8
1,622
2.796875
3
[]
no_license
#!/bin/python2 ### This ncfile is set up to compare the Mass Extinction Coefficients with ### internal vs. external mixing from netCDF4 import Dataset import numpy as np import sys as sys import itertools ### Read data files # Open netCDF file ncfile_bc = 'bc_size.nc' ncfile_su = 'sulfate_size.nc' fh_bc = Dataset(...
C#
UTF-8
1,042
2.984375
3
[]
no_license
using Microsoft.AspNetCore.Mvc; using WeekdayFinder.Models; namespace WeekdayFinder.Controllers { public class HomeController : Controller { [Route("/hello")] public string Hello() { return "Hello friend!"; } [Route("/goodbye")] public string Goodbye() { return "Goodbye friend."; } [Route("/...
PHP
UTF-8
2,810
2.59375
3
[ "MIT" ]
permissive
<?php /* * This file is part of Yrgo. * * (c) Yrgo, högre yrkesutbildning. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); require __DIR__.'/../autoload.php'; $id = $_SESSION['userid']; $getData = $pdo-...
Python
UTF-8
1,439
2.65625
3
[]
no_license
from datetime import datetime from ...extensions import db # -------------------------------- Driver Model ------------------------------- # class Driver(db.Model): """ Driver Model: The driver is the one who produce data records. """ __tablename__ = 'drivers' id = db.Column(db.Integer, prim...
Java
UTF-8
207
1.859375
2
[]
no_license
package com.generactive.util.namegenerator; public class Nouns { public static final String[] VALUES = new String[]{ "n_name1", "n_name2" }; private Nouns() { } }
Java
UTF-8
331
2.453125
2
[]
no_license
package com.wangby.ztest; public class RunB implements Runnable { private Object lock; public RunB(Object lock) { this.lock = lock; } @Override public void run() { synchronized (lock) { System.out.println("RunB start"); while (true) { } ...
Java
UTF-8
1,186
2.390625
2
[]
no_license
package org; import org.apache.log4j.Logger; import org.apache.log4j.PropertyConfigurator; import org.statemachine.abstractfactory.StateAbstractFactory; import org.statemachine.interfaces.IContext; import org.statemachine.interfaces.IGameState; public class Main { public static void main(String[] args) { ...
Go
UTF-8
1,232
3.46875
3
[]
no_license
package logger import ( "os" "io" ) var stdlog *Loggie func init() { stdlog = NewLoggie("Loggie", os.Stdout) stdlog.SetLogLevel(STDLVL) } //Returns the loggies level as an int func GetCurrentLogLevel() loglevel { return stdlog.loglvl } //Sets to loggies loglevel func SetLogLevel(level loglevel) { stdlog.SetL...
JavaScript
UTF-8
458
2.703125
3
[]
no_license
// @ts-check /* import { resolve } from 'url'; const apiUrl = 'http://localhost:8080/api/v2/'; */ // BEGIN (write your solution here) /* class WeatherService { constructor(client) { this.client = client; } async find(cityName) { const url = resolve(apiUrl, `cities/${cityName}`); const response = a...
Markdown
UTF-8
14,918
3.21875
3
[]
no_license
# Formulaires Il y a 2 types de formulaires : * `FormsModule` \(en HTML\) * `ReactiveFormModule` \(en TypeScript\) ## Template-driven \(`FormsModule`\) Inspirée du "two-way binding", cette approche a de quelques limitations et s'avère peu extensible. A réserver pour des formulaires simples. Comme son nom l'indique...
Java
UTF-8
816
2.46875
2
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-unknown" ]
permissive
package com.rfacad.joystick; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import com.rfacad.buttons.interfaces.BState; import com.rfacad.buttons.ButtonCommand; @com.rfacad.Copyright("Copyright (c) 2018 Gerald Reno, Jr. All rights reserved. Licensed under Apache License 2.0") p...
C#
UTF-8
4,071
3.171875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using NUnit.Framework; using Polynomial; namespace PolynomialNUnitTests { [TestFixture] public class PolynomialTests { #region Plus public IEnumerable<TestCaseData> TestPlus...
JavaScript
UTF-8
4,784
3.59375
4
[]
no_license
//task 1 document.writeln("task 1 \n"); var qualifications = ["SSC","HSC","BCS","BS","BCOM","MS", "M. Phil.","PhD"]; document.writeln("<h1>Qualifications: </h1> \n"); for(i=0; i<qualifications.length;i++){ document.writeln(i+1 + ") " + qualifications[i]); } document.writeln(""); //task 2 document.writeln("t...
TypeScript
UTF-8
510
2.515625
3
[]
no_license
input.onButtonPressed(Button.A, function () { direction = 1 }) input.onButtonPressed(Button.AB, function () { direction = 0 servos.P0.stop() }) input.onButtonPressed(Button.B, function () { direction = -1 }) let speed = 0 let direction = 0 direction = 1 basic.forever(function () { if (direction != 0...
Go
UTF-8
753
2.828125
3
[ "BSD-3-Clause" ]
permissive
package tools import ( "encoding/json" "html/template" "io/ioutil" "net/http" "github.com/gin-gonic/gin" "github.com/google/uuid" ) func NewUUID() uuid.UUID { uuid, _ := uuid.NewRandom() return uuid } func Redirect(code int, url string, c *gin.Context) { c.Redirect(code, url) c.Abort() } func CURL(r *http...
Java
UTF-8
981
2.046875
2
[]
no_license
package com.example.ashtech.kilbil; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; /** * A simple {@link Fragment} subclass. */ public class ExtendedFragment extends Frag...
Markdown
UTF-8
3,687
3.359375
3
[ "Apache-2.0" ]
permissive
# 几何参数化 在计算设计中,曲线和曲面经常用作基础脚手架,用于构建后续几何体。为了使早期几何体用作以后几何体的基础,脚本必须能够提取诸如整个对象区域的位置和方向等特性。曲线和曲面均支持此提取,并且称为参数化。 曲线上的所有点可以看作具有从 0 到 1 的唯一参数。如果基于多个控制点或插值点创建 NurbsCurve,则第一个点将具有参数 0,而最后一个点将具有参数 1。不可能提前知道什么是精确参数以及什么是中间点,这听起来像是严重限制,但这可通过一系列实用程序函数来减轻。虽然使用两个参数而不是一个参数(称为 u 和 v),但曲面的参数化与曲线相似。如果我们要使用以下点创建一个曲面: ```js pts = [ [p1, p2...
C++
UTF-8
2,348
3.671875
4
[]
no_license
//34. 在排序数组中查找元素的第一个和最后一个位置 //给定一个按照升序排列的整数数组 nums,和一个目标值 target。找出给定目标值在数组中的开始位置和结束位置。 // //如果数组中不存在目标值 target,返回[-1, -1]。 // //进阶: // //你可以设计并实现时间复杂度为 O(log n) 的算法解决此问题吗? // // //示例 1: // //输入:nums = [5, 7, 7, 8, 8, 10], target = 8 //输出:[3, 4] //示例 2: // //输入:nums = [5, 7, 7, 8, 8, 10], target = 6 //输出:[-1, -1] //示例...
PHP
UTF-8
8,253
2.515625
3
[]
no_license
<?php namespace app\components; use Yii; use yii\web\Response; /** * Class YandexMerchant * * @property array $paymentTypes * @property string $paymentUrl */ class YandexMerchant extends \yii\base\Component { public $shopId; public $scId; public $shopPassword; public $securityType = 'MD5'; ...
Java
UTF-8
2,425
4.3125
4
[]
no_license
package hard; /* 19.12.2020 * * Convert a Roman numeral to an integer * Assume only positive integer (1 to 3,999) should be entered */ public class RomanToInteger { public static void main(String[] args) { String roman = "MMDCLXXIV"; System.out.println("The value for " + roman + " is " + romanToI...
Java
UTF-8
2,270
3.078125
3
[]
no_license
package com.ldm.basic.bean; import java.io.Serializable; /** * Created by ldm on 12-12-13. * 客户端私有分页Bean */ public class BasicPagerBean implements Serializable{ /** * */ private static final long serialVersionUID = 1L; /** * 默认1 */ private int page = 1; /** * 默认15条 */ private int limit = 15...
C#
UTF-8
2,154
2.65625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using android_test.ActivityElement; using NUnit.Framework; namespace android_test.ActivityRepo { class ArchiveActivity { static string ActivityName = "Flow Archive Activity"; pu...
C++
UTF-8
1,017
3.734375
4
[]
no_license
#pragma once #include <iostream> #include <string> using namespace std; class Enemy { private: int health; int attack; int defence; string weapon; public: //getters int getEnemyHealth() { return health; } int getEnemyAttack() { return attack; } int getEnemyDefence() { return defence; } string getEnemyWeapon()...
Markdown
UTF-8
21,575
2.515625
3
[ "Apache-2.0" ]
permissive
# 步骤12 探索不同ServiceExpose类型下Pod到Service的通信以及VPCPeering的支持 - [Service expose 类型 官方文档](https://kubernetes.io/docs/tutorials/services/source-ip/) - [External SNAT 官方文档](https://docs.aws.amazon.com/eks/latest/userguide/external-snat.html/) - [AWS-VPC-CNI 插件官方文档](https://github.com/aws/amazon-vpc-cni-k8s) > 本节目的 1. 探索 Serv...
Java
UTF-8
1,100
3.640625
4
[]
no_license
package level2; public class Valid_Palindrome { public static void main(String[] args) { System.out.println(isPalindrome2("1a2")); } public static boolean isPalindrome(String s) { if (s.isEmpty()) return true; StringBuilder sb = new StringBuilder(); for (int i = 0; i < s.length(); i++) { ...
Java
UTF-8
376
2.09375
2
[ "MIT" ]
permissive
package com.knifed.makemefat.daos; import androidx.room.Dao; import androidx.room.Insert; import androidx.room.Query; import com.knifed.makemefat.entities.Sleep; import com.knifed.makemefat.entities.Water; import java.util.List; @Dao public interface SleepDao { @Query("SELECT * FROM sleep") List<Sleep> getA...
C#
UTF-8
2,524
2.8125
3
[ "MIT" ]
permissive
using System.IO; using Xunit; using Xunit.Abstractions; namespace AdventOfCode.Tests { public class Day10Tests { private readonly ITestOutputHelper output; private readonly Day10 solver; public Day10Tests(ITestOutputHelper output) { this.output = output; ...