language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
Java
UTF-8
1,799
2.0625
2
[]
no_license
package com.wtoutiao.auth.config; import lombok.SneakyThrows; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import org.springframework.core.annotation.Order; import org.springframework.secur...
C#
UTF-8
4,581
3.15625
3
[ "BSD-3-Clause" ]
permissive
using Models.Enumeration; namespace Models { /// <summary> /// Represents model class for navigation. /// </summary> public sealed class NavigationModel : ModelBase<NavigationModel> { #region Private Fields /// <summary> /// Gets or sets identification of the left navigati...
Markdown
UTF-8
4,286
2.53125
3
[]
no_license
## Advanced Event Sampling PAPI is an API for performance counters. Extreme scale? The bigger the machine, harder it is to gain insights. ### Current Counters CPU counters: * Cycles, instructions * Cache hit/miss * Branch predictors * Typically aggregate counts ### Sampling Target single program. Periodically ...
Java
UTF-8
634
2.578125
3
[ "Apache-2.0" ]
permissive
package fr.univnantes.termsuite.ui.util.jface; import org.eclipse.core.databinding.validation.ValidationStatus; import org.eclipse.core.runtime.IStatus; public class IntegerValidator extends NumberValidator { public IntegerValidator() { super(); } public IntegerValidator(Number min, Number max) { super(min,...
PHP
UTF-8
775
3
3
[ "MIT" ]
permissive
<?php namespace App; use Nette\Application\UI; /** * Komponenta pro demonstraci hierarchické struktury. */ class BoxControl extends UI\Control { /** * Metody render() je automaticky volaná při vykreslování pomocí Latte makra {control} */ public function render() { // Stejně jako v presenteru je i v kompo...
Java
UTF-8
723
2.375
2
[]
no_license
package com.example.supermercadotico.Users; import com.example.supermercadotico.Controlador; public class Gerente extends Usuario{ public Gerente(String nombre, String contrasena, String direccion) { super(nombre, contrasena, direccion); } public void registarEmpleado(String nombre, String id, S...
Ruby
UTF-8
820
3.140625
3
[]
no_license
require_relative 'menu' require_relative 'order' class Takeaway attr_reader :menu, :order, :order_klass, :menu_name def initialize(menu_klass: Menu, order_klass: Order, menu_name: :italian) @menu = menu_klass.new(menu_name: menu_name) @order_klass = order_klass @order = order_klass.new (menu_instance...
JavaScript
UTF-8
2,605
3.828125
4
[]
no_license
//06--functional spec function doubler(n){ return n*2; } function map(arr, func){ var arr2=[]; for (i=0; i<arr.length; i++){ arr2.push(func(arr[i])); } return arr2; } function filter(arr, func){ var arr2=[]; for (var i=0; i<arr.length; i++){ if (func(arr[i])==true){ arr2.push(arr[i]); } } return ar...
Python
UTF-8
492
3.359375
3
[]
no_license
import os import zipfile directory = raw_input("Enter the directory path to zip ") dir_zip = zipfile.ZipFile('zip_directory.zip', 'w') if os.path.isdir(directory): for folder, subfolders, files in os.walk(directory): for file in files: dir_zip.write(os.path.join(folder, file), os.path.relpath(os.path.join(fold...
Python
UTF-8
735
2.609375
3
[ "MIT" ]
permissive
import os import sys import matplotlib.pyplot as plt import numpy as np # ------------------------------------------------------------ # Input output = os.path.join(sys.argv[1], '') # ------------------------------------------------------------ plot_dir = output+'plot/' if not os.path.exists(plot_dir): os.ma...
C++
UTF-8
1,819
3.390625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; class Graph{ public: int v; list<int> *adj; Graph(int v); void printSCC(); void addEdge(int v,int w); void fillOrder(int v,bool visited[],stack<int> &st); void dfsutil(int v,bool visited[]); Graph getTranspose(); }; Graph::Graph(int v){ ...
Markdown
UTF-8
1,719
3.890625
4
[ "MIT" ]
permissive
--- layout: post title: "Python学习日记(1)" excerpt: "1.Python之“可变”的tuple 2.关于缩进" categories: [Python] comments: true image: feature: --- ## 1.Python之“可变”的tuple 前面我们看到了tuple一旦创建就不能修改。现在,我们来看一个“可变”的tuple: t = ('a', 'b', ['A', 'B']) 注意到 t 有 3 个元素:'a','b'和一个list:['A', 'B']。list作为一个整体是tuple的第3个元素。list对象可以通过 t[2] 拿到: ...
Python
UTF-8
1,461
2.953125
3
[]
no_license
# -*- coding: utf-8 -*- # キーポイント性質比較用 import numpy as np import cv2 import sys # 引数の取得 argc = len(sys.argv) argv = sys.argv # 既定ファイルパス(エディタ実行用) im_path = 'images/labo/IMG_5894.jpg' # コマンドライン入力用(パスが上書きされる) if argc == 2: im_path = argv[1] if not os.path.isfile(im_path): print "given file(s) don't exi...
PHP
UTF-8
2,956
2.578125
3
[ "MIT" ]
permissive
<?php namespace App\Family; use App\TableData; class RecurringExpenseTables { /** * @var RecurringExpense */ private $recurringExpense; public function __construct(RecurringExpense $recurringExpense) { $this->recurringExpense = $recurringExpense; } public function monthl...
PHP
UTF-8
1,966
2.90625
3
[]
no_license
<?php //入力チェック(受信確認処理追加) if( !isset($_POST["newsId"]) || $_POST["newsId"]=="" || !isset($_POST["newsTitle"]) || $_POST["newsTitle"]==""|| !isset($_POST["newsContents"]) || $_POST["newsContents"]=="" ){ exit('ParamError'); } //1. POSTデータ取得 $newsId = $_POST["newsId"]; $newsTitle = $_POST["newsTitle"]; $newsC...
Markdown
UTF-8
37,134
3.484375
3
[]
no_license
# Introduction This is a small project I have thrown together to help students at LYIT with their exams in **Object Orientated Programming 3**. This tutorial deals with Java code, which is what is being used for the exam. If you are interested in Processing, check out my other projects [Asteroids Game](https://github....
C++
UTF-8
983
2.65625
3
[]
no_license
#include <iostream> #define forn(i, n) for (long long i = 0; i < n; i++) using namespace std; typedef long long ll; ll mdm[100000]; bool mdmb[100000]; ll diamonds[100000]; ll N; ll kadane(ll v) { ll re; if (v == -1) { re = 0; } else { if (!mdmb[v]) { mdm[v] = max(kadane(v-1) + ...
C#
UTF-8
670
2.671875
3
[]
no_license
using System; using System.Collections.Generic; namespace MvcIoC.Models { public class ProteinRespository : IProteinRespository { private ProteinData service=new ProteinData(); public ProteinRespository() { service.Goal = 0; service.Total = 0; service.TimeCreated = new DateTime().Da...
PHP
UTF-8
4,740
3
3
[]
no_license
<?php namespace Phug\Lexer\Scanner; use Phug\Lexer\ScannerInterface; use Phug\Lexer\State; use Phug\Lexer\Token\IndentToken; use Phug\Lexer\Token\InterpolationEndToken; use Phug\Lexer\Token\InterpolationStartToken; use Phug\Lexer\Token\NewLineToken; use Phug\Lexer\Token\OutdentToken; use Phug\Lexer\Token\TagInterpola...
C++
UTF-8
18,524
2.625
3
[ "MIT" ]
permissive
// This file is a part of WCPSP_Stereo. License is MIT. // Copyright (c) Qingqing Yang // Description : Cost propagation on a simple tree for stereo matching. #ifndef HORIZ_TREE_COST_AGGREGATION_H_ #define HORIZ_TREE_COST_AGGREGATION_H_ #include <cstdint> #include <cmath> #include "image.h" #include "image_proc-inl....
JavaScript
UTF-8
323
2.515625
3
[]
no_license
const express = require('express'); const app = express(); const port = 3000; app.get('/', function(request, response) { response.send('<h1>hello coderx</h1>'); }) app.get('/user', function(req, res) { res.send('user list'); }) app.listen(port, function() { console.log('sever listening on port ' + port);...
Python
UTF-8
1,059
2.9375
3
[]
no_license
import heapq class Solution(object): def nthSuperUglyNumber(self, n, primes): """ :type n: int :type primes: List[int] :rtype: int """ # if not primes: # return 0 # if n == 1: # return 1 # heap = [] ...
Shell
UTF-8
1,095
3.5625
4
[]
no_license
#!/bin/sh basePath=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) parentBasePath=$( cd $basePath/.. && pwd ) LOG_PATH=$(cat $parentBasePath/docker.conf | grep "LOG1_PATH1" | awk -F '=' '{print $2}') installPath=/usr/local installLocalService(){ echo `date +'%Y-%m-%d %H:%M:%S'`": Start cp visitor-wechat file .."...
Java
UTF-8
9,051
2.1875
2
[]
no_license
package org.fenixedu.ulisboa.specifications.ui.firstTimeCandidacy.forms.motivations; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import javax.servlet.http.HttpServletRequest; import org.fenixedu.bennu.TupleDataSourceBean; import org.fenixedu.ulisboa.specifications.domain.Un...
Java
UTF-8
9,958
1.75
2
[]
no_license
/******************************************************************************* * Copyright (c) 2012 Secure Software Engineering Group at EC SPRIDE. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser Public License v2.1 * which accompanies this...
JavaScript
UTF-8
510
3.578125
4
[]
no_license
var button = document.getElementById("b1"); button.addEventListener("click", buttonPress); var counter = 0; function buttonPress() { counter++; var scriptableDiv = document.getElementById("scriptable"); console.log(Math.random() * 5); scriptableDiv.style.color = "blue"; document.body.style.backgroundColo...
Java
UTF-8
1,012
3.046875
3
[]
no_license
import java.io.*; import java.util.*; class Ovation { public static void main(String args[]) throws IOException { String s; BufferedReader f = new BufferedReader(new FileReader("A-large.in")); PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("test.out"))); St...
C#
UTF-8
2,368
2.6875
3
[ "MIT" ]
permissive
using System; using System.Threading; using System.Threading.Tasks; namespace Podcasts.ViewModels { using Dom; public class EpisodeViewModel : BaseViewModel { #region Readonly Properties public Uri Source { get; private set; } public string Guid { get; private set; } pu...
Python
UTF-8
1,137
3.109375
3
[ "MIT" ]
permissive
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 17-8-23 下午2:28 # @Author : xiongzhibiao # @Email : 158349411@qq.com # @File : 高级_server.py # @Software: PyCharm import socketserver import time class MyTCPHandler(socketserver.BaseRequestHandler): """ The RequestHandler class for our server. ...
SQL
UTF-8
264
2.765625
3
[]
no_license
SELECT t.rescode FROM fsboss_ser_instance t minus SELECT s.resourcecodestr FROM instanceen i,subscriberaddonen s WHERE i.productchildtypeid = 1 and s.instanceid_pk = i.instanceid_pk; select * from phyresourceen p where p.resourcecodestr = '000F1E0B8765';
Markdown
UTF-8
3,741
2.796875
3
[]
no_license
# -ourier Упрощение процесса коммуникации между заказчиком, диспетчером и курьером Общие сведения 1. Наименование работ 1.1. Разработка Telegram Bot API 2. Назначение разработки 2.1. Упрощение процесса коммуникации между заказчиком, диспетчером и курьером; 2.2. Предоставление заказчику возможности контроля статуса про...
JavaScript
UTF-8
738
3.421875
3
[]
no_license
"use strict"; if (4==9) { console.log("ok"); } else{ console.log("error"); } // if (num<49){ // console.log('Error'); // } else if (num>100){ // console.log("много"); // } else{ // console.log("Ok"); // } // (num===50)? console.log('OK'):console.log('Error'); //тернарное условые если условые в () п...
Java
UTF-8
2,929
2.3125
2
[ "MIT" ]
permissive
package com.bitmovin.api.sdk.model; import java.util.Objects; import java.util.Arrays; import com.bitmovin.api.sdk.model.Filter; import com.bitmovin.api.sdk.model.InterlaceMode; import com.bitmovin.api.sdk.model.VerticalLowPassFilteringMode; import java.util.Date; import java.util.List; import java.util.Map; import co...
Java
UTF-8
1,755
2.546875
3
[]
no_license
package tr2sql.db; public enum KiyasTipi { ESIT, ESIT_DEGIL, BASI_BENZER, BASI_BENZEMEZ, SONU_BENZER, SONU_BENZEMEZ, KUCUK, BUYUK, KUCUK_ESIT, BUYUK_ESIT, NULL, NULL_DEGIL; public KiyasTipi tersi() { switch (this) { case BUYUK: ...
Java
UTF-8
4,005
2.171875
2
[ "MIT" ]
permissive
package com.rto.controller; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.log4j.Logger; imp...
Java
UTF-8
1,500
3.796875
4
[]
no_license
package assignment; public class Prob2 { public static void main(String[] args) { System.out.println("<과제 1>"); solution1(); System.out.println(); System.out.println("<과제 2>"); solution2(); } public static void solution1() { String sourceString = "everyday we have is one more than we deserve"; ...
Java
UTF-8
2,802
2.34375
2
[]
no_license
package com.linkage.mobile72.sh.adapter; import java.util.List; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import com.linkage.mobile72.sh.R; import com.linkage.mobile72...
Java
UTF-8
1,646
3.640625
4
[]
no_license
package xu.dfs.solutions; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; public class Solution491 { /* * 递增子序列 * * 这道题目就是数组中的深度优先搜索,需要注意以下几点: * * 1.整个数组可能是无序的,不能进行排序,比如 4 6 3 2 7 * 2.数组中可能会存在重复的数字,比如 1,2,3,1,1,1,因此在每一层递归的时候,使用一个 se...
Markdown
UTF-8
3,172
4.03125
4
[]
no_license
# ## 3.1 布尔表达式和判断 Python 中的布尔类型值:True 和 Flase 其中,注意这两个都是首字母大写。 但凡能够产生一个布尔值的表达式为**布尔表达式**: ``` 1 > 2 # False 1 < 2 <3 # True 42 != '42' # True 'Name' == 'name' # False 'M' in 'Magic' # True number = 12 number is 12 # True ``` >注1:不同类型的对象不能使用<、>、<=、=>进行比较,却可以使用==和!=。 >注2:浮点类型和整数类型虽然是不同类型,但不影响比较运算。还有,不等于!= 可以写作<> 。 话说,布...
Python
UTF-8
2,420
2.65625
3
[]
no_license
#pytesseract.pytesseract.tesseract_cmd = "C:\\Users\\Ashish.Gupta\\AppData\\Local\\Tesseract-OCR\\tesseract.exe" from PIL import Image, ImageFile import pytesseract #import argparse import cv2 import numpy as np import re #ap = argparse.ArgumentParser() #ap.add_argument("-i", "--image", required=True, # ...
Markdown
UTF-8
4,764
2.734375
3
[]
no_license
--- description: "Recette de Favoris Cookies banane chocolat" title: "Recette de Favoris Cookies banane chocolat" slug: 841-recette-de-favoris-cookies-banane-chocolat date: 2020-05-23T20:52:07.920Z image: https://img-global.cpcdn.com/recipes/7c1cd3f92d9968bf/751x532cq70/cookies-banane-chocolat-photo-principale-de-la-re...
Java
UTF-8
3,020
2.40625
2
[ "Apache-2.0" ]
permissive
/* vim: set ts=2 et sw=2 cindent fo=qroca: */ package com.globant.katari.user.view; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.validation.BindException; import...
Python
UTF-8
1,497
2.625
3
[]
no_license
import requests import glob import sys import json import io import os.path import argparse ap = argparse.ArgumentParser() ap.add_argument("-f", "--folder", required=True, help="images folder") args = vars(ap.parse_args()) FOLDER=args["folder"] def readFileFolder(strFolderName, suffix): print strFolderName file_l...
Java
UTF-8
1,142
3.4375
3
[]
no_license
import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.List; public class GoatLatin { public String toGoatLatin(String S) { String[] words = S.split(" "); Character[] vowels = {'a','e','i','o','u','A','E','I','O','U'}; HashSet<Character> set = new H...
Shell
UTF-8
1,480
3.25
3
[]
no_license
#!/usr/bin/env bash # # This file has executed each time when container's starts # # tech-stack: ubuntu / nginx # # @author demmonico # @image ubuntu-nginx # @version v3.3 ##### run once if [ -f "${DMC_RUN_ONCE_FLAG}" ]; then # run script once source /run_once.sh # rm flag /bin/rm -f ${DMC_RUN_ONCE_FLAG} fi ...
Python
UTF-8
4,098
3.953125
4
[]
no_license
import time import threading # project #3 Choose Your Own Adventure Game, From CSV.file Story # load story from filename def loadStory(filename): #put story into list story = [] for line in open(filename): #remove leading and trailing characters for nice output, break the string with seperator ...
Java
UTF-8
3,296
2.625
3
[]
no_license
package com.freeman.httpurlconnection.httpurlconnection; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.net.HttpURLConnection; import java...
Java
UTF-8
2,320
2.28125
2
[ "MIT" ]
permissive
package pl.java.borowiec.controller.test; import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.s...
Java
UTF-8
625
2.8125
3
[]
no_license
package jpu2016.dogfight.modele; public class Plane extends Mobile{ private static int SPEED = 2; private static int WIDTH = 100; private static int HEIGHT = 30; private static final String IMAGE = "plane.png"; private int player; public Plane(int player, Direction direction, Position position, Str...
C#
UTF-8
504
2.9375
3
[]
no_license
using System.Text; namespace ChatRoomService.Infrastructure { static class ObjectHelper { public static string Dump<T>(this T x) { var t = typeof(T); var props = t.GetProperties(); StringBuilder sb = new StringBuilder(); foreach (var item in prop...
JavaScript
UTF-8
2,735
3.03125
3
[]
no_license
document.addEventListener('DOMContentLoaded', function () { // Wait for Page to load. var yourUrl = '/learnword'; var wordlist = sessionStorage.getItem("wordlist", wordlist); if (wordlist == null) { wordlist = document.getElementById("Select").value } else { document.getElementById("Sele...
C++
UTF-8
1,127
2.859375
3
[]
no_license
#include <iostream> #include <iomanip> using namespace std; int main() { //freopen("2520.in", "r", stdin); int l, c; while(cin >> l >> c) { int cidade[l][c]; int pos_treinador[2], pos_pokemon[2]; int distancia = 0; for(int i = 0; i < l; i++) { for(int j = 0;...
Java
UTF-8
1,119
2.203125
2
[]
no_license
package com.vitamojo.Demo_API_RestAssured.TestCases; import java.util.HashMap; import java.util.Hashtable; import org.testng.Assert; import org.testng.annotations.Test; import com.vitamojo.Demo_API_RestAssured.API.UpdateCustomerAPI; import com.vitamojo.Demo_API_RestAssured.TestSetup.TestSetup; import com.vitamojo.De...
Java
UTF-8
394
3.125
3
[]
no_license
package EstructurasJava; public class Persona{ private String nombre; private int edad; private String direccion; public Persona(String nombre, int edad, String direccion){ this.nombre = nombre; this.edad = edad; this.direccion = direccion; } public String toString(){ ...
PHP
UTF-8
3,153
2.578125
3
[]
no_license
<html> <head> <title>Pet Shop</title> <link href="style.css" type="text/css" rel="stylesheet" /> </head> <body> <?php include 'koneksi.php'; $id_nota=$_GET['id_nota']; $tunai=$_GET['bayar']; $kembalian=$_GET['kembalian']; $query=mysql_query("SELECT id_nota_perawatan, nama_lengkap, tgl_transaksi, id_detail_p...
Python
UTF-8
536
3.671875
4
[]
no_license
#!/usr/bin/python # -*- coding: UTF-8 -*- a = 2 b = 3 c = 2 if(a == c) : print "a == 777c" if(a == b): print "xxxx" raw_input("number end...") a = "aaa" b = "bbb" c = "aaa" if(a == c) : print "a == c" if(a == b): print "xxxx" raw_input("string end...") list1 = [ 'runoob', 786 , 2.23, 'john', 70.2 ] li...
C++
UTF-8
1,502
2.9375
3
[]
no_license
#include<cstdio> #include<algorithm> using namespace std; const int N = 111; int ori[N],tempOri[N],changed[N]; int n; bool issame(int a[],int b[]) { for(int i=1;i<=n;i++) { if(a[i]!=b[i]) return false; } return true; } bool showarray(int a[]) { for(int i=1;i<=n;i++) { printf("%d",a[i]); if(i<n)printf(" ");...
C
UTF-8
378
2.71875
3
[]
no_license
#include <stdio.h> #include <conio.h> void about(bool *isGameActiveP) { system("cls"); printf("The game was developed for programming coursework.\n"); printf("\nCreated by Ilya Konnov.\n"); printf("For more information check out my github profile: \nhttps://github.com/konnov-007"); printf("\n\nPress any key to r...
Java
UTF-8
1,782
2.375
2
[]
no_license
package com.arnold.common.mvp.utils; import androidx.annotation.NonNull; import androidx.lifecycle.Lifecycle; import androidx.lifecycle.LifecycleOwner; import com.arnold.common.architecture.utils.Preconditions; import com.arnold.common.mvp.IView; import autodispose2.AutoDispose; import autodispose2.AutoDisposeConve...
PHP
UTF-8
378
2.625
3
[]
no_license
<?php class AreaModel extends Model { //获取地区的名字 public function getAreaInfo($areaId) { return $this->where("area_id = $areaId")->field("pid, area_name")->find(); } //获取一个id下的所有地区 public function getAreaList($pid) { return $this->where("pid = $pid")->field("area_id, area_na...
C
UTF-8
378
2.78125
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<fcntl.h> #include<sys/stat.h> #include<sys/types.h> int main() { char buf1[17] = "abcdefghijklmnop", buf2[17] = "ABCDEFGHIJKLMNOP"; int fp = open("Hole.txt", O_RDWR|O_CREAT|O_EXCL, 0755); write(fp, buf1, 16); lseek(fp, 48L, SEEK_SET); write(fp, buf2...
PHP
UTF-8
2,738
2.59375
3
[ "BSD-3-Clause" ]
permissive
<?php namespace app\models; use Yii; /** * This is the model class for table "permissions". * * @property string $permissionID * @property string $moduleID * @property string $entityActionID * @property string $groupID * @property int $access * @property int $active * @property string $insertedBy * @proper...
JavaScript
UTF-8
5,096
2.671875
3
[ "MIT" ]
permissive
'use strict'; var yahooFinance = require('yahoo-finance'); var logger = require('./logger'); function dateToYyyyMmDd(date) { function pad(s) { return (s < 10) ? '0' + s : s; } return [date.getFullYear(), pad(date.getMonth()+1), pad(date.getDate())].join('-'); } module.exports = function (stocks, callback) { var re...
C
UTF-8
603
3.09375
3
[]
no_license
#include "fthread.h" #include "stdio.h" /* use the base pthread */ void* pr (void *text) { int i; for (i=0;i<10;i++) { fprintf (stdout,"%s",(char*)text); } return NULL; } int main(void) { int v, *cell = &v; ft_thread_t th1 = NULL, th2 = NULL; pthread_t pth1, pth2; pth1 = ft_pthread (th1); ...
Python
UTF-8
543
3.671875
4
[]
no_license
largest = None smallest = None while True: num = input("Enter a number: ") if num == "done" : break #cvalue = num try: ivalue = int(num) except: print("Invalid Output") if largest is None: largest = ivalue elif ivalue>largest: ...
C++
UTF-8
2,037
3.046875
3
[ "Zlib" ]
permissive
#include <Engine/Core/Camera.h> #include <glm/gtc/matrix_transform.hpp> #include <cstdio> using namespace glm; namespace engine { Camera::Camera(const vec3 &position, float aspectRatio, float FoV, float nearDistance, float farDistance) : mPosition(position), mAspectRatio(aspectRatio), mFoV(FoV), mNearDist...
Markdown
UTF-8
592
3.203125
3
[ "MIT" ]
permissive
# MdTable.Insert Method **Declaring Type:** [MdTable](../index.md) Inserts the a row at the specified index. ```csharp public void Insert(int index, MdTableRow row); ``` ## Parameters `index` int The index (zero\-based) to insert the row at. `row` [MdTableRow](../../MdTableRow/index.md) The row to insert int...
Java
UTF-8
509
1.640625
2
[]
no_license
package com.cardinfolink.application; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.act...
TypeScript
UTF-8
41,733
3.140625
3
[]
no_license
/// <reference path="_fakeBABYLON.ts"/> module mathis { export const PI=Math.PI export const cos=Math.cos export const sin=Math.sin export const exp =Math.exp export const sqrt=Math.sqrt // // export enum Direction{vertical,horizontal,slash,antislash} // export var myFavoriteColors=...
Markdown
UTF-8
1,179
2.59375
3
[]
no_license
#include<stdio.h> #include<conio.h> int main() { printf("Oprating System For Prority \n"); int n; printf("\n\nEnter No. Of Student :- "); scanf("%d",&n); int i,Sname[n],gift[n],BT[n],CT[n],WT[n],TAT[n]; // Input Student buy Gift for(i=0;i<n;i++) { printf("\nStudent [%d]",i+1); Sname[i]=i+1; printf("...
Swift
UTF-8
3,115
2.984375
3
[]
no_license
// // TableBrcOperand.swift // // // Created by Hugh Bellamy on 12/11/2020. // import DataStream /// [MS-DOC] 2.9.305 TableBrcOperand /// The TableBrcOperand structure is an operand that specifies borders for a range of cells in a table row. public struct TableBrcOperand { public let cb: UInt8 public let it...
Markdown
UTF-8
2,736
2.625
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: Auto Item description: Auto Item ms.date: 03/27/2023 --- # Auto Item To implement [auto-configured scanning](auto-configured-scanning.md) in Windows 7 and later, a WIA minidriver must include an *auto item* in the [WIA item tree](wia-item-trees.md) for the scanner device. An auto item belongs to the WIA_CA...
Java
UTF-8
452
2.234375
2
[]
no_license
package com.DAO.Test; import com.Factory.DAOFactory; import com.vo.Person; import org.junit.Test; public class PersonDAOTest { @Test public void loginCheckTest() throws Exception{ Person person = new Person(); person.setId("2018110116"); person.setPassword("123"); S...
Rust
UTF-8
628
2.765625
3
[]
no_license
use ndarray::Array1; use super::{FullState, Game}; use policies::{Policy, Random}; pub trait StateEvaluator<G: Game> { type TargetPolicy: Policy; fn evaluate(&self, &FullState<G>) -> Array1<f64>; } pub struct RandomEvaluator<G: Game> { game: G, } impl<G: Game> RandomEvaluator<G> { pub fn new(game: ...
PHP
UTF-8
6,975
2.953125
3
[]
no_license
<?php abstract class BaseOAuth extends BaseObject { /** * Variables for the OAuth urls * * @var string */ protected $_requestTokenUrl; protected $_accessTokenUrl; protected $_authoriseUrl; /** * Variables for the consumer * * @var string */ protected $_consumerKey; protected $_consumerSecret...
Markdown
UTF-8
1,452
3.4375
3
[ "MIT" ]
permissive
# realGen Fast implementation of Genetic Algorithm only for real genotype, useful for nonlinear constrained and unconstrained optimization problems. ## INSTALL ``` $ git clone https://github.com/alenic/realGen.git $ cd realGen $ make ``` # Quick start First of all you have to define a fitness function to m...
Markdown
UTF-8
791
2.5625
3
[ "MIT" ]
permissive
# Knock Knock Sensor This sketch reads a piezo element to detect a knocking sound. It reads an analog pin and compares the result to a set threshold. If the result is greater than the threshold, it writes "knock" to the serial port, and toggles the LED on pin 13. The circuit: + connect...
Java
UTF-8
484
1.796875
2
[]
no_license
package top.duanhong.emims.configuration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.socket.server.standard.ServerEndpointExporter; /** * @author duanhong * @description webSocket配置 * @date 2019/5/11 */ @Configura...
Markdown
UTF-8
626
2.890625
3
[]
no_license
# Mobile-first Responsive Landing Page ## About the project On this solo project for my Treehouse tech degree, I built a responsive, mobile-first layout using HTML and CSS from a mock-up design. The layout is responsive, adjusting to accommodate mobile, tablet, and desktop screen sizes. ### Built With - HTML - CSS ...
Java
UTF-8
6,420
2.046875
2
[]
no_license
package com.example.sociedad; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.widget.Button; import android.widget....
C++
UTF-8
1,158
3
3
[ "MIT" ]
permissive
#ifndef __SEQUENCER__ #define __SEQUENCER__ #include <stdint.h> #include "ButtonManager.h" #define MIN_SEQUENCE_LENGTH 8 #define MAX_SEQUENCE_LENGTH 32 class Sequencer { public: enum SequencerState { SEQUENCER_STATE_STOPPED = 0, SEQUENCER_STATE_PLAYING, SEQUENCER_STATE_RECORDING }; ...
JavaScript
UTF-8
1,079
2.671875
3
[]
no_license
// File - /pages/index.js import { useEffect, useState } from "react"; import { useAppContext } from "../context/context"; export default function posts() { const [posts, setPosts] = useState([]); const { authenticatedName } = useAppContext(); useEffect(() => { fetch("https://jsonplaceholder.typicode.com/po...
C++
UTF-8
1,404
2.671875
3
[]
no_license
#include <iostream> #include <vector> #include <string> #include <fstream> #include <sstream> #include <cstdlib> #include <time.h> /* time */ #include <algorithm> #include <list> #include <utility> using namespace std; int main() { ofstream outfile; outfile.open ("phonenumber.out"); std::ifstream inf...
C#
UTF-8
577
2.84375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FunctionalExamples { public class Maybe:Identity { public Maybe(object val):base(val) { } public override Identity Map(Func<object, object> f) ...
PHP
UTF-8
413
3.296875
3
[ "MIT" ]
permissive
<?php namespace Spatie\UnitConversions; class Temprature { /** @var float */ private $celsius; public static function fromCelsius(float $celsius): self { return new static($celsius); } public function __construct(float $celsius) { $this->celsius = $celsius; } pub...
Java
UTF-8
726
2.1875
2
[]
no_license
package io.openmessaging.demo; /** * Created by YangMing on 2017/5/25. */ public class YmMessageRegister3 { private int offset = 0; private YmBucketCache6[] bucketArray; private static YmMessageRegister3 register = new YmMessageRegister3(); private YmMessageRegister3() { bucketArray = new YmB...
C++
UTF-8
1,770
2.921875
3
[]
no_license
#pragma once #include <vector> #include <cstdint> #include <thread> #include "socketabstraction.h" #include "messages.h" namespace Krakenplay { /// \brief Krakenplay server singleton class. /// /// The server manages all connections to clients and gathers all incoming inputs. class NetworkServer { public: //...
Markdown
UTF-8
488
2.734375
3
[]
no_license
# Chess notation reader Chess notation reader is a failed experiment in creating an app to convert chess games recorded by hand in notation books to digitally analysable games. OCR readers struggle to read human handwriting, but I had hoped that using a combination of photoprocessing and pattern matching, the simple ...
C
UTF-8
5,721
3.640625
4
[]
no_license
//CONTA BANCO #include <stdio.h> #include <string.h> #define N 7 void cadastraCliente (int pos); void listaTodosCliente (); void listaCliente (int pos); void inicializaVetor (); int buscaPosicaoVazia (); int menu (); int buscaCPF (long cpf); void buscaNome (char str[]); void removeCliente (int pos); int submenu (); ...
PHP
UTF-8
2,390
2.6875
3
[]
no_license
<?php /** * Default * * * @package * @subpackage Controller * @author YOUR NAME <YOUREMAIL@jouve.com> */ include '../../../config/autoload.php'; //BDD $postgres = new connexion(); $conn = $postgres->connect(); //var_dump($_POST); //SQL $sql = "select * from menu m order by m.niveau...
JavaScript
UTF-8
3,037
2.515625
3
[]
no_license
const express = require("express"); const app = express(); const mongoose = require("mongoose") app.use(express.json()); require("./models/Artigo"); const Artigo = mongoose.model('artigo') var cors = require('cors') //========== MIDDLEWARE CORS =================// app.use((req, res, next) => { console.log("Middl...
Java
UTF-8
9,435
2.265625
2
[]
no_license
package FreeRun; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; public clas...
Markdown
UTF-8
2,037
2.9375
3
[]
no_license
# Neural and Behavioral Modeling 2018 Fall Neural and Behavioral Modeling @ NTU, given by Prof. Tsung-Ren Huang. ## Syllabus |Week|Subject| |---|---| |01|National Holiday| |02|Course Introduction: Models & modeling| |03|Behavioral Modeling (1/2): System dynamics| |04|Behavioral Modeling (2/2): Agent-based modeling| |...
PHP
UTF-8
7,419
2.90625
3
[ "MIT" ]
permissive
<?php use Slim\Http\Request; use Slim\Http\Response; use WebDrinkAPI\Models\ApiKeys; use WebDrinkAPI\Models\DrinkItemPriceHistory; use WebDrinkAPI\Models\DrinkItems; use WebDrinkAPI\Utils\API; use WebDrinkAPI\Utils\Database; function addItem($item_name, $item_price, API $api): DrinkItems { // Creates a entityMana...
Swift
UTF-8
1,277
2.71875
3
[]
no_license
// // ViewController.swift // FIT5140-Maybe the last Version // // Created by Burns on 2/9/19. // Copyright © 2019 Burns. All rights reserved. // import UIKit import MapKit class ViewController: UIViewController { @IBOutlet weak var mapView: MKMapView! override func viewDidLoad() { super.viewDi...
JavaScript
UTF-8
4,328
3.8125
4
[]
no_license
/** * Trabalhando com comentarios e arquivo js + overwie básico sobre JS. */ console.log('Oláaaa'); /*console.log('Oláaaa'); console.log('Oláaaa');*/ /** * Utilizando varivel */ var olaMundo = "Olá, Mundo!"; console.log(olaMundo); console.log(olaMundo); consol...
C++
UTF-8
948
3.578125
4
[]
no_license
#include <iostream> #include <string> using namespace std; int fact(int num); // proto int largest(const int list[], int lowerIndex, int upperIndex); int rFibNum(int a, int b, int n); int main() { int mylist[] = { 5,10,12,8 }; //cout << fact(3) << endl; //cout << largest(mylist, 0, 3) << endl; cout << rFibNum...
Java
UTF-8
79,528
2.75
3
[]
no_license
package org.jsweet; import static def.dom.Globals.*; import java.io.*; import java.util.*; public class Logic{ /** Logic modes - how to choose alternatives! */ static final int MODE_RANDOM_TYPED=0, MODE_RANDOM_RELATED=1, MODE_COMPLETELY_RANDOM=2, MODE_SOUNDS_SIMILAR=3, MODE_BROTHER_OF_CORRECT=4...
C++
UTF-8
608
2.640625
3
[ "MIT" ]
permissive
#include "matrix.h" #define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/euler_angles.hpp> #include <glm/gtx/transform.hpp> namespace pathtrace::matrix { glm::dmat4 euler_rotation(const glm::dvec3& rotation) { return glm::yawPitchRoll(-rotation.x, rotation.y, ...
C++
UTF-8
1,095
2.9375
3
[]
no_license
// Emilio Lopez // Lab 10 part 6 // 4/21/2012 #include <iostream> #include <fstream> #include <sstream> using namespace std; struct data { double number; double miles; double gallons; double milespgallon; }; int main() { data dt; double num[5]={25,36,44,52,68}; double mi[5]={1450,3240,1769,2360,2115}; doub...