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
28,943
3.59375
4
[]
no_license
#include <stdbool.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <math.h> #include "location.h" /** * A set of geographic locations given by latitude and longitude * implemented using a k-d tree, where k = 2. For all functions, * points are considered different based on the values of the ...
C++
UTF-8
803
3.625
4
[]
no_license
#include <iostream> using namespace std; class Link { public: int element; Link *next; Link(int elemval,Link *nextval=NULL) { element=elemval; next=nextval; } Link(Link *nextval=NULL) { next=nextval; } }; class LStack : public Link { public: Link *top; int size; LStrack(int sz=0) ...
Shell
UTF-8
130
3.171875
3
[ "LicenseRef-scancode-unknown-license-reference", "ISC" ]
permissive
#!/bin/sh uname="/usr/bin/uname" if [ -f "${uname}" ]; then case `"$uname" -s` in Darwin|"Mac OS") exit 0 ;; esac fi exit 1
Python
UTF-8
6,970
3.65625
4
[]
no_license
# CONVOLUTION OPERATION # This program takes input a png image and a filter (box,gaussian,sharpen,edge) # It applies the filter to the image and displays the output. from PIL import Image, ImageDraw import numpy as np from matplotlib import pyplot as plt import imageio def get_image(image_path): im ...
Java
UTF-8
2,812
3.625
4
[]
no_license
package top.qiaojianyong.hanoi; import java.util.HashMap; import java.util.LinkedList; public class Hanoi { private static HashMap<Integer, LinkedList<Integer>> map = new HashMap<>(); // store holders private static int num = 4; // dish num private static int count = 0; // steps count static...
Java
UTF-8
5,469
1.953125
2
[]
no_license
/** * <copyright> * </copyright> * * $Id: BlockActivityImpl.java,v 1.1 2009/12/22 06:17:22 kmyu Exp $ */ package net.smartworks.server.engine.process.xpdl.xpdl1.impl; import net.smartworks.server.engine.process.xpdl.xpdl1.BlockActivity; import net.smartworks.server.engine.process.xpdl.xpdl1.Xpdl1Factory;...
C++
UTF-8
162
2.71875
3
[]
no_license
#include <iostream> using namespace std; int main(){ int a[3],b[3]; int i; for(i=0;i<3;i++){ cin>>a[i]>>b[i]; } cout<<a[0]-a[2]<<" "<<b[0]-b[1]<<endl; }
Java
UTF-8
470
2.015625
2
[]
no_license
package br.com.softdesign.votacao.exception; import br.com.softdesign.votacao.message.MessageKey; import lombok.Getter; @Getter public abstract class BaseRuntimeException extends RuntimeException { private static final long serialVersionUID = -8962469694754031642L; private final MessageKey messageKey; private f...
Python
UTF-8
550
3.171875
3
[]
no_license
if __name__ == "__main__": num = int(input().strip()) dirt = [int(i) for i in input().strip().split()] dirt_ctr = 0 clean_ctr = 0 has_dirt = 0 for i in range(1,366): if dirt_ctr >= 20: dirt_ctr = 0 clean_ctr += 1 has_dirt = False ...
JavaScript
UTF-8
575
3.90625
4
[]
no_license
/** * 별 찍기 - 1 문제 첫째 줄에는 별 1개, 둘째 줄에는 별 2개, N번째 줄에는 별 N개를 찍는 문제 입력 첫째 줄에 N(1 ≤ N ≤ 100)이 주어진다. 출력 첫째 줄부터 N번째 줄까지 차례대로 별을 출력한다. 예제 입력 1 5 예제 출력 1 * ** *** **** ***** */ let input = +require('fs').readFileSync('./dev/stdin').toString(); let answer = ""; for (let ix = 1; ix <= input; ix++) { ...
C
UTF-8
1,986
2.75
3
[]
no_license
#ifndef MATRIXEDCPP_DEFINES_H #define MATRIXEDCPP_DEFINES_H // ================= Global error codes ================= // /** * Thrown when a memory-linked error occured * * @example Malloc fail */ #define MATRIX_EXCEPTION_MEMORY_ERROR 0 /** * Thrown when a file is not readable bu the program or does not exist ...
Java
UTF-8
437
2.796875
3
[]
no_license
package designmode.structure.decorator.house; /** * 测试粘钩装饰器模式 * 主要是新增了功能 * * @author Defu Li * @since 2021/7/26 8:30 */ public class Main { public static void main(String[] args) { IHouse house = new House(); house.live(); IStickyHookHouse stickyHookHouse = new StickyHookDecorator(ho...
Java
UTF-8
1,906
3.328125
3
[]
no_license
package P51_P100; import java.util.ArrayList; public class P80_unique_binary_search_trees_II { public class TreeNode { int val; TreeNode left; TreeNode right; TreeNode(int x) { val = x; left = null; right = null; } } public ArrayList<TreeNode> generateTrees(int n) { ArrayList<TreeNode>...
Swift
UTF-8
1,163
2.578125
3
[]
no_license
// // DayTableViewCell.swift // HolidayPlanner // // Created by Rory Prior on 13/03/2019. // Copyright © 2019 ThinkMac Software. All rights reserved. // import UIKit class DayTableViewCell: UITableViewCell { @IBOutlet var dayLabel : UILabel! @IBOutlet var monthLabel : UILabel! @IBOutlet var weatherIcon : U...
Python
UTF-8
3,053
2.640625
3
[ "Unlicense" ]
permissive
"""Test which require arcpy to be installed. """ from os.path import join import json import re import unittest try: import arcpy except ImportError: arcpy = None else: from wsdottraffic.gp import __main__ class TestGeoprocessingFunctions(unittest.TestCase): """Test case for testing functions that d...
Markdown
UTF-8
855
3.09375
3
[]
no_license
# Anomaly-Detection-and-Recommender-Systems ## Anomaly Detection Anomalies are outliers exhibiting different behaviour when compared to other data examples. So if we can successfully identify the outliers we can identify the anomalies. Dataset consist of datacenter server data, Always visualize the data to identify ...
C++
UTF-8
1,125
3.125
3
[]
no_license
class Solution { public: vector<int> spiralOrder(vector<vector<int>>& matrix) { vector<int> res; if (matrix.empty()) { return res; } int rowBegin = 0,rowEnd=matrix.size()-1,colBegin=0,colEnd = matrix[0].size()-1; while(rowBegin<=rowEnd && colBegin<=colEnd)...
Java
UTF-8
826
3.453125
3
[ "Apache-2.0" ]
permissive
package com.kdyzm.thread.thread030105; import java.util.Random; import java.util.concurrent.CountDownLatch; /** * CountDownLatch的简单使用 * * @author t_zhengrj * */ public class CountDownLatchDemo implements Runnable { private static final CountDownLatch end = new CountDownLatch(10); @Override ...
SQL
UTF-8
298
2.625
3
[]
no_license
/* * sql surrounding auth_tokens table: * - create table syntax */ create table auth_tokens ( id serial not null, created_at timestamp default current_timestamp, expires_at timestamp default current_timestamp + interval '10 days', user_id integer, auth_token char(32) );
Java
UTF-8
9,572
2.28125
2
[]
no_license
package Vista; import Controlador.Control; public class VentanaNumeros extends javax.swing.JFrame implements InterfazNumeros { public VentanaNumeros() { } @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initC...
Java
UTF-8
399
2.40625
2
[]
no_license
package com.joe.nfortics; public class OperationResult { private String error = ""; private boolean successful = true; public OperationResult(String error, boolean successful) { this.error = error; this.successful = successful; } public String getError() { return error;...
C
UTF-8
322
3.84375
4
[]
no_license
#include "holberton.h" /** * print_alphabet_x10 - main function. * Description: This program prints 10 times the alphabet, in lowercase. * * Return: none. */ void print_alphabet_x10(void) { int n; char i; for (n = 0; n <= 9; n++) { for (i = 'a'; i <= 'z'; i++) { _putchar(i); } _putchar('\n'); } ...
PHP
UTF-8
4,156
2.96875
3
[ "MIT" ]
permissive
<?php namespace Cmmarslender\PostIterator; use Cmmarslender\Timer\Timer; abstract class PostIterator { /* * Query Related Variables */ public $post_type; public $post_status; public $offset; public $limit; public $orderby; public $order; /** * @var \Cmmarslender\Timer\Timer */ public $timer; /* ...
Python
UTF-8
580
3
3
[]
no_license
from __future__ import print_function from pprint import pprint import config import layout import sorter if __name__ == "__main__": words = config.words words = sorter.geneticSorter(words, numGen=25, popSize=500, selectSize=10) print(words) grid = layout.createLayout(words) for wor...
SQL
UTF-8
240
4
4
[]
no_license
select e.emp_no, max(s.salary) AS salary, e.last_name, e.first_name from employees AS e inner join salaries AS s on e.emp_no=s.emp_no where to_date='9999-01-01'and salary not in (select max (salary) from salaries where to_date='9999-01-01')
JavaScript
UTF-8
2,356
3
3
[ "MIT", "Apache-2.0" ]
permissive
var horoscopeArray = [ { sign: "Aries", personality: "Your gifts include courage and being independent.", image: "img/signPictures/Aries.jpg" }, { sign:"Taurus", personality: "You are easy going but will fight for what you want.", image: "img/signPictures/Taurus.jpg" }, { sign:"Gemini", personality: "You hav...
Python
UTF-8
85
3.28125
3
[]
no_license
num = int(input("find even : ")) for i in range(num): if i%2==0: print(i)
Shell
UTF-8
1,566
3.859375
4
[]
no_license
#!/bin/bash workingDir=$HOME/listtask currentDate=`date +%Y'-'%m'-'%d` lastDate=`ls "$HOME" | grep "^Backup-" | sed "s/^Backup-//" | sort -r | head -n 1` #Проверка на то, что католог существует if ! [ -e $workingDir ] then echo "No target directory to make backup" exit 1 fi #Проверяет когда был последний бэкап и о...
Java
UTF-8
940
2.03125
2
[]
no_license
package org.marsatg.poseidonconsumer; import org.marsatg.annotation.EnableNettyClient; import org.marsatg.annotation.EnableHttpClient; import org.marsatg.annotation.EnableWebManage; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.spring...
Markdown
UTF-8
2,772
3.21875
3
[ "MIT" ]
permissive
--- layout: page title: Heuristic Evaluation --- ## Table Heuristic Broken | Description | Severity ---------------- | ----------- | ---------- Control & Freedom | User cannot go back to previous screens | 2 Visibility | Once a gallery is selected, the artworks are not highlighted | 1 Control & Freedom | Cannot exit...
Shell
UTF-8
238
3.140625
3
[ "ISC" ]
permissive
#!/bin/bash set -e if [ ! -f "scripts/path.sh" ] then echo "Error: does not look like a root of Dancy source tree" 1>&2 exit 1 fi export DANCY_ROOT=`pwd` export PATH="$DANCY_ROOT/bin:$DANCY_ROOT/external/bin:$PATH" echo "$PATH"
TypeScript
UTF-8
2,262
2.6875
3
[]
no_license
//------------------------------------------------- // Dependencies //------------------------------------------------- import * as mongoose from 'mongoose'; import {kebabCaseRegex} from '../../utils/regular-expressions'; //------------------------------------------------- // Schema //-------------------------------...
Python
UTF-8
269
3.28125
3
[]
no_license
# coding: utf-8 # In[3]: l= [ ['Ali', 'Male'], ['Maha', 'Female'], ['Laith','Male'], ['Lamiaa', 'Female'], ['Zainab', 'Female'], ['Lena','Female'], ['Hanan', 'Female'] ] n=raw_input('enter name') for i in l: if n==i[0]: print i[1] # In[ ]:
Java
UTF-8
662
2.6875
3
[]
no_license
import javax.swing.*; public class PolishForeign extends LearningMode{ JLabel label; public PolishForeign(TypeOfLearning tol) { super(tol); this.panel = new JPanel(); label = new JLabel(getQuestion()); this.panel.add(label); } @Override public String getCorrectAnswer() { return super.getQuestion()...
Java
UTF-8
1,007
1.710938
2
[]
no_license
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.wsi.android.framework.wxdata.controller.helpers; import com.wsi.android.framework.wxdata.geodata.helpers.GeoDataType; import com.wsi...
Java
UTF-8
3,917
2.46875
2
[]
no_license
package com.example.ulanganpwpbsqlite; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; import java.util.ArrayList; import java.util.List; publ...
SQL
UTF-8
769
2.921875
3
[]
no_license
DROP TABLE IF EXISTS races; CREATE TABLE `races` ( `id` int(4) NOT NULL AUTO_INCREMENT, `course` int(1) NOT NULL, `status` int(1) DEFAULT '0' NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id...
Swift
UTF-8
461
2.984375
3
[ "MIT" ]
permissive
import Foundation public struct License { /// The license name used for the API. public let name: String /// A URL to the license used for the API. public let url: URL? } struct LicenseBuilder: Codable { let name: String let url: URL? } extension LicenseBuilder: Builder { typealias Buil...
Go
UTF-8
897
2.875
3
[]
no_license
package factory import ( "bytes" "io" "github.com/aws/aws-sdk-go/service/s3" "github.com/golang/glog" ) func BuildAWSCSVLoader( tetraBucket string, csvFileKey string, svc *s3.S3, decrypt func(io.Reader) (io.Reader, error), ) func() string { stringCSVLoader := func() string { csvFileOutput, err := svc.Get...
PHP
UTF-8
1,650
2.875
3
[]
no_license
<?php require_once('admin/scripts/config.php'); if(isset($_GET['filter'])){ $tbl = 'tbl_movies'; $tbl2 = 'tbl_genre'; $tbl3 = 'tbl_mov_genre'; $col = 'movies_id'; $col2 = 'genre_id'; $col3 = 'genre_name'; $filter = $_GET['filter']; $results = filterResults($tbl, $tbl2, $tbl3, $col, $col...
Java
UTF-8
1,255
2.671875
3
[]
no_license
package com.gvl.test; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import com.gvl.entities.Person; import com.gvl.helper.SessionFactoryRegistry; public class GVLTest { public static void main(String[] args) { Person person=new Person(); Session session=nu...
C#
UTF-8
1,765
2.53125
3
[ "MIT" ]
permissive
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2012 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Similar to UIButtonColor, but adds a 'disabled' state based on whether the collider is enabled or n...
Python
UTF-8
703
4.28125
4
[]
no_license
# set (집합) # 중복이 안되고, 순서가 없음 my_set = {1,2,3,3,4} print(my_set) java = {"유재석", "김태호", "양세형"} python = set(["유재석", "박명수"]) # 교집합 (java 와 python을 모두 할 수 있는 개발자) print(java & python) print(java.intersection(python)) # 합집합 (java도 할 수 있거나 python도 할 수 있는 개발자) print(java | python) print(java.union(python)) # 차집합 (java는 할...
Markdown
UTF-8
22,132
2.90625
3
[ "MIT" ]
permissive
<!-- Use fully qualified URL for the images so they'll also be visible from the NPM page too --> ![join-monster](https://raw.githubusercontent.com/stems/join-monster/master/docs/img/join_monster.png) [![npm version](https://badge.fury.io/js/join-monster.svg)](https://badge.fury.io/js/join-monster) [![Build Status](http...
Markdown
UTF-8
11,621
2.640625
3
[]
no_license
**Unit 3: The Umayyad and Abbasid Empires** <span id="3"></span>  *After the period called “Rightly Guided Caliphs,” the Umayyad Caliphate emerged in the mid-600s CE following a succession struggle among the descendants of Muhammad.  In less than 50 years, the Umayyad Dynasty’s military forces secured political control...
C
UTF-8
3,082
2.890625
3
[]
no_license
/****************************************************************************** * Function: Pcre match handle. * Author: forwarding2012@yahoo.com.cn * Date: 2012.01.01 * Compile: gcc -Wall smatch_base.c -I/usr/local/include -lpcre -o smatch_base ************************************************...
Markdown
UTF-8
599
2.6875
3
[]
no_license
# Intro This is a simple theme made using awesome things like [bootsrap](https://getbootstrap.com/), [sass](http://sass-lang.com/) and [fontawesome](http://fontawesome.io/). You should have sass compiler such as sassc installed to generate css files. It should look more or less like this [demo](https://haaja.github.i...
JavaScript
UTF-8
4,466
2.703125
3
[]
no_license
/** * PBR Viewport. * * @package PBR extension for SketchUp * * @copyright © 2018 Samuel Tallet-Sabathé * * @licence GNU General Public License 3.0 */ /* jshint browser: true, esversion: 5 */ /** * PBR plugin namespace. */ PBR = {}; /** * Renders SketchUp active model in a 3D view. */ PBR.Viewport = {}; ...
JavaScript
UTF-8
1,930
3.359375
3
[]
no_license
const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, }); function getInput() { return new Promise((res) => { let input = undefined; const board = []; const startPos = { x: 0, y: 0 }; rl.on("line", (line) => { if (input === undefined) { inpu...
Java
UTF-8
287
1.8125
2
[]
no_license
package com.informatica.lasin.system.dao; import java.util.List; import org.springframework.data.repository.CrudRepository; import com.informatica.lasin.system.models.Curso; public interface ICursoDao extends CrudRepository<Curso, Long>{ List<Curso> findByDocente_Id(Long id); }
C#
UTF-8
1,473
2.96875
3
[ "MIT" ]
permissive
using Microsoft.EntityFrameworkCore; namespace graphql_minimal_api { public class BookRepository { private readonly DemoDbContext context; public BookRepository(DemoDbContext context) { this.context = context; } public IQueryable<Book> GetAll() { ...
Python
UTF-8
1,514
2.6875
3
[]
no_license
from __future__ import print_function from settings import ( BUCKET_NAME, MONGODB_SERVER, MONGODB_PORT, MONGODB_DB, MONGODB_COLLECTION, HEADERS, COOKIES, MIN_SLEEP, MAX_SLEEP ) from getpass import getpass, getuser import os import sys """ Command line args: 1: str "(r)estore" or "(d)ump" 2: str dire...
C++
UTF-8
768
3.421875
3
[]
no_license
#include "Fixed.hpp" #include <iostream> const int Fixed::offs = 8; Fixed::Fixed():value(0) { std::cout << "Default constructor called" << std::endl; } Fixed::Fixed(Fixed const &dest) { std::cout << "Copy constructor called" << std::endl; this->value = dest.getRawBits(); } Fixed::~Fixed() { std::cout << "Defaul...
Ruby
UTF-8
507
4.25
4
[]
no_license
#define a method that takes 2 arguments -> positive intgeger and boolean #calculates bonus for a given salary #if boolean is true, bonus should be half of the salary #if boolean is false, bonus should be 0 def calculate_bonus(num, boolean) if boolean == true num / 2 else 0 end end #OR def c...
JavaScript
UTF-8
374
3.984375
4
[]
no_license
const equalOccurences = (string, ...checkChars) => { console.log(checkChars) let xOccurences = string.split(char1).length-1 let yOccurences = string.split(char2).length-1 if (xOccurences === yOccurences) { return true} // check if 'x' and 'o' have the same number in the string. else return false; ...
Java
UTF-8
1,686
3.09375
3
[]
no_license
package xogame; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import static org.assertj.core.api.BDDAssertions.then; /** * https://kata-log.rocks/tic-tac-toe-kata * * 🟪❌⭕ * * Rules * In ran...
PHP
UTF-8
627
2.984375
3
[]
no_license
<?php class Database{ private $host; private $db; private $user; private $password; private $charset; public function __construct(){ $this->host = constant('HOST'); $this->db = constant('DB'); $this->user = constant('USER'); $this->password = cons...
SQL
UTF-8
1,962
3.46875
3
[]
no_license
SELECT crede.ci_unidade_trabalho, crede.nm_sigla, upper(tmc.nm_municipio) AS nm_municipio, upper(tc.nm_categoria) AS nm_categoria ,tut.nr_codigo_unid_trab, tut.nm_unidade_trabalho, upper(tlz.nm_localizacao_zona) AS nm_localizacao_zona FROM rede_fisica.tb_unidade_trabalho tut JOIN rede_fisica.tb_unidade_trabalho cr...
Python
UTF-8
255
3.40625
3
[]
no_license
archivo=open('Numeros_lista.txt','r') '''archivo=str()''' '''print (archivo.read())''' num=input('Numero que desea encontrar: ') for linea in archivo: if num in linea: print('Numero encontrado') else: print('No encontrado')
TypeScript
UTF-8
391
2.609375
3
[]
no_license
// 6~10자 영문, 숫자 조합 export const passwordStandard = /^(?=.*\d)(?=.*[a-zA-Z])[0-9a-zA-Z]{6,10}$/; // 이메일 유효성검사 export const emailStandard = /^[0-9a-zA-Z]([-_\.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_\.]?[0-9a-zA-Z])*\.[a-zA-Z]{2,3}$/i; // 2~15자 한글, 영문 대소문자, 언더바 사용가능 export const usernameStandard = /^[\wㄱ-ㅎㅏ-ㅣ가-힣]{2,15}$/;
PHP
UTF-8
1,353
2.5625
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateEmployeesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('employees', f...
JavaScript
UTF-8
668
2.78125
3
[]
no_license
let comic = document.getElementById("comic"); let comicImg = document.querySelector("#comic img"); if (comic){ let url = "http://www.explainxkcd.com/wiki/index.php" + window.location.pathname.slice(0, -1); let d = document.createElement("div"); d.setAttribute("style", "font-size:0.8em;"); let alt = d...
Markdown
UTF-8
13,299
3.203125
3
[]
no_license
--- title: 求解矩阵的四种迭代法 tags: - 数值分析 mathjax: true abbrlink: 26753 date: 2018-07-19 12:16:12 --- ## Introduction &emsp;&emsp;在之前我实现了求解低阶矩阵的一些算法。考虑线性方程组Ax=b,其中A为非奇异矩阵,当A是低阶稠密矩阵时,可以使用之前提到的中的高斯消元法以及列主 元消元法(详情请参考[高斯消元法之讲解与代码实现](https://leungyukshing.github.io/archives/GaussianElimination.html))来进行求解。但是实际生活中工程技术产生的矩阵都是大型的稀疏...
Java
UTF-8
689
2.671875
3
[]
no_license
package imd.thiyagu.taku.ImageUtils; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; /** * Created by thiyagu on 12/12/2017. */ public class ImageUtils { public static Bitmap scaleBitmap(Bitmap bitmap, int wantedWidth, int wantedHe...
Python
UTF-8
5,127
2.546875
3
[ "Apache-2.0" ]
permissive
""" K.Srinivas, 12-Jun-2018 Project: BCS Projects Description: This is special one-time use program to upload "targetSet" field from XLS-files to the goals Approach is as follows: a) loadfromxls.py handles all the XLS-file reading part, from hard-coded directory structure b) This application calls methods from loadfro...
C++
UTF-8
12,590
2.78125
3
[]
no_license
// OpenGL main program // contains // control of animation/simulation module: singel step, continuous run, etc. // graphics API initialization and setup (OpenGl in this case): camera, lights, display // user interface handling of mouse and keyboard // =========================================================...
Java
UTF-8
643
2.140625
2
[]
no_license
package example.impl; import com.google.protobuf.RpcCallback; import com.google.protobuf.RpcController; import log.Log; import log.LogCategory; import example.proto.Login; public class LoginServiceImpl extends Login.LoginService { @Override public void login(RpcController controller, Login.LoginRequest reques...
Markdown
UTF-8
3,181
2.796875
3
[ "MIT" ]
permissive
--- layout: post title: "The Purple Parade - featuring Zui Young" permalink: "/media/technews/the-purple-parade-featuring-zuiyoung" category: technews image: "images/technews/Zuiyoung1.jpg" --- Zui Young was born with high astigmatism in his right eye and is only able to see with the right eye. But he never once los...
Markdown
UTF-8
432
2.53125
3
[ "MIT" ]
permissive
--- layout: project_single title: "Hygge: conheça o estilo de vida que faz a Dinamarca ser o país mais feliz do mundo e 5 maneiras de trazê-lo para casa" slug: "hygge-conheca-o-estilo-de-vida-que-faz-a-dinamarca-ser-o-pais" parent: "hygge-interiors-living-room" --- Hygge é uma palavra dinamarquesa que não tem tradução...
Shell
UTF-8
340
3.03125
3
[]
no_license
#!/bin/bash # copy standard file with no values cp atlas_reorganization/atlas_84regions_reorganized.node temp.node # pattern to be replaced with values pattern="&" # while read p; do value=$p #sed -i 's/'$pattern'/'$value'/' temp.node sed -i '0,/'$pattern'/s//'$value'/' temp.node # change only the first mat...
TypeScript
UTF-8
4,386
2.84375
3
[]
no_license
import { getRepository } from 'typeorm'; import { ITask, TaskDTO } from './task.model'; import { TaskEntity } from '../../entities/Task'; // let Tasks = require('./task.dataBase'); /** * @typedef task * @type {Object} * @property {string} id - id of a task * @property {string} title - title of a task * @proper...
C++
UTF-8
725
2.6875
3
[]
no_license
#include "HASH_STASH.h" #include "DEVE_STACK.h" #include "SMART_ARRAY.h" long hash_f( const void* to_hash, const size_t numof_bytes ) { assert (to_hash != NULL); assert (numof_bytes > 0); long hash = 1; const size_t byte_move = sizeof (long) - 1; for (size_t i = 0; i < numof_bytes; i++) hash = -hash * *((c...
JavaScript
UTF-8
919
2.828125
3
[]
no_license
//Top Navigation const tabSelector = document.querySelectorAll('#topnav section>a'); const tabGroup = document.querySelectorAll('[role="group"]'); tabSelector.forEach((item, index) => { item.addEventListener('mouseenter', e => { if (item.nextSibling == tabGroup[index]) { item.nextSibling.class...
TypeScript
UTF-8
155
2.53125
3
[]
no_license
export function b(data: string | number[]) { if (typeof data === "string") return Buffer.from(data); return Buffer.from(data); } b.c = Buffer.concat;
Java
UTF-8
239
2.4375
2
[]
no_license
package com.miaisoft.miscellaneous; /** * Created by touhid on 26/09/2014. */ public class Loop { public static void main(String[] args) { for (int i = 0; i < 17; i++){ System.out.println(i); } } }
C#
UTF-8
1,090
2.890625
3
[]
no_license
using UnityEngine; public class Rectangule : MonoBehaviour { private float ab, ac; public float x1, x2, x3; public float y1, y2, y3; private float height, rectanguleBase, perimeter, area; void Start() { GetBase(); GetHeight(); GetPerimeter(); GetArea(); } ...
C
UTF-8
2,440
2.84375
3
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
/* i2c_ads1015.c -- Test of ADS1015 I2C ADC chip * * Copyright (C) 2013 Omer Kilic <omerkilic@gmail.com> - Erlang Solutions * Copyright (C) 2013 Jeremy Bennett <jeremy.bennett@embecosm.com> - Embecosm Limited * * This file is part of pihwm <http://omerk.github.io/pihwm> * * Licensed under the Apache License, Version 2....
C#
UTF-8
20,699
3.0625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using FinchAPI; using static System.Net.Mime.MediaTypeNames; namespace CapstoneProject { class Program { public static object DisplayGetMagicSource { get; private set; } static ...
Shell
UTF-8
2,791
3.375
3
[]
no_license
#!/bin/bash #16.04.14 V 0.1 Bleifuss . /usr/lib/vdr/easyvdr-config-loader ## common defines . /usr/lib/vdr/functions/easyvdr-functions-lib ## common functions . /usr/share/easyvdr/setup/easyvdr-setup-defines ## setup only defines . /usr/share/easyvdr/setup/easyvdr-setup-functions ...
C#
UTF-8
4,188
2.765625
3
[]
no_license
using ApiDomain.Entities; using ApiDomain.Interfaces.Domain.Services; using ApiDomain.Interfaces.Infraestructure.Services; using ApiDomain.Shared.Data; using System.Collections.Generic; namespace ApiDomain.Services { /// <summary> /// Servicio de datos de la entidad Marca /// </summary> public class Ma...
Python
UTF-8
1,469
3.046875
3
[]
no_license
""" AR_XpressoNodeInfo Author: Arttu Rautio (aturtur) Website: http://aturtur.com/ Name-US: AR_XpressoNodeInfo Description-US: Print to console selected Xpresso nodes info. Select Xpresso tag and select nodes and run the script. Written for Maxon Cinema 4D R20.057 """ # Libraries import c4d # Functions def main(): ...
C#
UTF-8
508
3.25
3
[]
no_license
public class CustomValidationRule : ValidationRule { private static bool IsValid(string value) { // implement you business rule checking logic here // if valid // return true; // else // return fase; } public override ValidationResult Validate(object value, CultureInfo cultureInfo) ...
C++
UTF-8
1,490
3.015625
3
[ "MIT" ]
permissive
#ifndef SQLBACKUPTOFTPSERVER_EXCEPTION_H #define SQLBACKUPTOFTPSERVER_EXCEPTION_H /** * @file Exception.h * @author Argishti Ayvazyan (ayvazyan.argishti@gmail.com) * @brief Declaration of Exception class. * @date 9/20/2021 * @copyright Copyright (c) 2021 */ #include <stdexcept> ////...
Python
UTF-8
2,730
2.890625
3
[]
no_license
__author__ = "Maxime CHRIST" __email__ = "maxime.christ@insa-lyon.fr" import serial import io, os, time, threading, json, dateutil.parser from gps import * from time import * gpsd = None #seting the global variable accelerometer = serial.Serial("/dev/ttyACM0", 9600) os.system('clear') #clear the terminal (optional...
Java
UTF-8
4,359
2.296875
2
[ "MIT" ]
permissive
package com.wraithavens.conquest.Utility; import java.io.File; import org.lwjgl.glfw.GLFW; import org.lwjgl.opengl.GL11; import com.wraithavens.conquest.Launcher.MainLoop; import com.wraithavens.conquest.Launcher.WraithavensConquest; import com.wraithavens.conquest.Math.MatrixUtils; import com.wraithavens.conq...
Python
UTF-8
4,942
2.84375
3
[]
no_license
import logging from enum import Enum from typing import * from telegram import * log = logging.getLogger(__name__) PollId = int class MessageId: def __init__(self, chat_id: int = None, message_id: int = None, inline_message_id: str = None): inline = inline_message_id is not None chat = (chat_id...
C
UTF-8
1,823
3.203125
3
[]
no_license
#include <sys/types.h> #include <sys/dir.h> #include <sys/param.h> #include <sys/stat.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define FALSE 0 #define TRUE 1 extern int alphasort(); char pathname[MAXPATHLEN]; int file_select(struct direct *entry) { if ((strcmp(e...
JavaScript
UTF-8
1,202
2.546875
3
[]
no_license
import React, { useState, useEffect } from "react"; import { withRouter } from "react-router-dom"; import { getAllDeals } from "./requests"; import Card from "react-bootstrap/Card"; import "./ResultsPage.css"; function ResultsPage({ match: { params } }) { const [deals, setDeals] = useState([]); const [name, setName...
Ruby
UTF-8
1,141
2.90625
3
[]
no_license
describe ContestResults do context "initialize" do it "should raise exception if not an array" do expect {ContestResults.new([1])}.to_not raise_error expect {ContestResults.new([1,2,3,4])}.to_not raise_error expect {ContestResults.new(["a","b"])}.to_not raise_error expect {ContestResults.new("")}.to raise_erro...
Java
UTF-8
601
2.171875
2
[]
no_license
package com.lin.missyou.service; import com.lin.missyou.model.Theme; import java.util.List; import java.util.Optional; /** * The interface Theme service. * * @ClassName: ThemeService * @Author: Mrguo * @Description: * @Date: 2021 -06-17 9:38 * @Version: 1.0 */ public interface ThemeService { /** * G...
Python
UTF-8
3,172
2.59375
3
[]
no_license
import sys import typing import logging import argparse class Configuration(object): log_levels = ["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG"] def __init__( self, log_level, log_file, stdout=True, drop_tables=False, root_route="/scraper", host="localhost", port=8080, d...
Shell
UTF-8
2,437
3.421875
3
[]
no_license
#!/bin/bash # # [Quick Box :: Install SickRage package] # # GITHUB REPOS # GitHub _ packages : https://github.com/QuickBox/quickbox_packages # LOCAL REPOS # Local _ packages : /etc/QuickBox/packages # Author : QuickBox.IO | JMSolo # URL : https://quickbox.io # # QuickBox Copyright ...
C#
UTF-8
2,770
3.90625
4
[ "Apache-2.0" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DivideAndConque { public class MedianOf2Array { /*http://www.geeksforgeeks.org/median-of-two-sorted-arrays/ * Question: There are 2 sorted arrays A and B of size n eac...
Markdown
UTF-8
2,387
3.546875
4
[]
no_license
# 三大框架组件化学习笔记 ## Vue组件规范 摘自:https://cn.vuejs.org/v2/guide/components.html > 组件是可复用的 Vue 实例,且带有一个名字 [Components Basics](https://vuejs.org/v2/guide/components.html) [Components In-Depth](https://vuejs.org/v2/guide/components-registration.html) [Single File Components](https://vuejs.org/v2/guide/single-file-components.h...
C++
UTF-8
293
2.8125
3
[]
no_license
class Solution { public: int climbStairs(int n) { std::vector<int> memo; memo.push_back(0); memo.push_back(1); memo.push_back(2); for (int i = 3; i < n + 1; ++i) memo.push_back(memo[i - 1] + memo[i - 2]); return memo[n]; } };
Markdown
UTF-8
1,009
3.046875
3
[]
no_license
1. Checkout code mới nhất từ branch develop ```bash git checkout develop git pull ``` 1. Tạo branch: **feature/new-feature** từ branch develop ```bash git checkout -b feature/new-feature develop ``` 1. Push branch **feature/new-feature** lên origin ```bash git push -u origin feature/new-fe...
Python
UTF-8
740
3.1875
3
[]
no_license
print(" This is a genral knowledge quiz") playername = input("What is your name: ") playerage = input("What is your age: ") text_file = open("Info_Players.txt", "w") text_file.write("PlayerOne") text_file.write("\n Name : " + playername) text_file.write("\n Age : " + player...
Python
UTF-8
1,888
3.640625
4
[]
no_license
from FunFun import getAnswer # Примеры вопросов и ожидаемых ответов: # Где находится Неболит? ул. Городская, д. 75. + relations # Какой адрес у Неболит? ул. Городская, д. 75. + properties # Кем является Игорь? Администратор + relations # Кем является Марина? Пациент + relations # Кем является Костя? Паци...
Python
UTF-8
509
3.796875
4
[]
no_license
nome = str(input('Diga seu nome: ')).title() if nome == 'Gustavo': print('Que nome bonito você tem.') else: print('Que nome normal esse seu.') print('Bom dia, {}.'.format(nome)) print('Agora vamos para as suas notas.') n1 = float(input('Digite a primeira nota: ')) n2 = float(input('Digite a segunda nota: ')) m...
Java
UTF-8
524
2.21875
2
[]
no_license
package cn.edu.neu.cloudlab.haolap.strategy; import cn.edu.neu.cloudlab.haolap.cube.Schema; public class PageSizer { PageSizerStrategy strategy; public PageSizer(PageSizerStrategy strategy) { super(); this.strategy = strategy; } public long[] getPageLengths(Schema schema) { r...