language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
Markdown
UTF-8
12,422
2.515625
3
[ "Apache-2.0" ]
permissive
# Run SMV App using Python smv-pyshell ### Synopsis Start the shell with ```shell $ smv-pyshell [smv-options] -- [standard spark-shell-options] ``` **Note:** The above command should be run from your project's top level directory. ## SMV Utility methods * `df(dataset_name, force_run=False, version=None, runConfig=No...
TypeScript
UTF-8
1,991
2.65625
3
[]
no_license
import { Hero } from '../../structures/Hero' export const Anoki: Hero = { name: 'Anoki', title: 'The Blood Guard', skins: [], union: null, faction: 'Mauler', advantage: 'Wilder', role: 'Control', type: 'Strength', class: 'Tank', trait: 'Dura\'s Fortitude', armor: 'Plate', ...
Python
UTF-8
13,430
2.546875
3
[ "BSD-3-Clause" ]
permissive
''' Created on 31 Jul 2009 @author: charanpal ''' import unittest import numpy import scipy.linalg import logging import sys import numpy.testing as nptst from apgl.util.Util import Util from apgl.util.Parameter import Parameter from apgl.util.PathDefaults import PathDefaults from apgl.graph.Sparse...
PHP
UTF-8
1,064
3
3
[]
no_license
<?php declare(strict_types=1); namespace MySelf\Scrabble\Application\StartGameService; use MySelf\Scrabble\Application\DisplayBoardService\DisplayBoardService; use MySelf\Scrabble\Domain\Games\GameRepository; use MySelf\Scrabble\Domain\Players\PlayerRepository; class StartGameService { private GameRepository $ga...
Python
UTF-8
1,114
3.0625
3
[]
no_license
import msvcrt import pyautogui pyautogui.PAUSE = 1 pyautogui.FAILSAFE = True def wait(): while True: if msvcrt.kbhit(): chr = msvcrt.getch() if chr == b"\x1b": print("ESCAPE") circle() def circle(): x,y = pyautogui.position() pyautogui.mouse...
C++
UTF-8
2,785
3.5625
4
[]
no_license
/* * List.cpp * * Created on: Feb 12, 2015 * Author: juncheng */ #include "List.h" #define SUCCESS 0; #include "stddef.h" #include <iostream> using namespace std; List::List() { this->head = NULL; } List::List(Node* node){ this->head = node; } List::List(const List* l) { this->head=NULL; Node* cur = l...
Java
UTF-8
696
3.40625
3
[]
no_license
package entities; public class Account { private Float balance; public Account(Float balance) { this.balance = balance; } public void doDeposit(Float amount) { balance += amount; } public Boolean doWithdrawn(Float amount) { if ((balance - amount) < 0...
Markdown
UTF-8
1,348
3.015625
3
[]
no_license
Bamazon ReadMe ================ Bamazon Userflow ---------------- This Bamazon application will mimic the Amazon user interface and allow customers to purchase items. When the program is run the items available for purchase will be listed with the following information: Item_Id | Item Name | Item Department | Item ...
Shell
UTF-8
214
3.140625
3
[]
no_license
#!/bin/sh declare PT_host_entry (( EUID == 0 )) || fail "This utility must be run as root" getent hosts "$(echo ${PT_host_entry} | awk '{print $2}')" > /dev/null && exit 0 echo "${PT_host_entry}" >> /etc/hosts
Java
ISO-8859-1
17,995
2.296875
2
[]
no_license
/** * */ package DAO; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.object.StoredProcedure; import Bean.ItemColecao; import Bean.Pesquisa; import Bean.Resultado; import RowMapper...
Java
UTF-8
229
1.953125
2
[]
no_license
package string; import leetcode.string.WordPatternII; import org.junit.Test; public class WordPatternIITest { @Test public void test() { (new WordPatternII()).wordPatternMatch("abba","dogcatcatdog"); } }
Shell
UTF-8
471
3.59375
4
[ "Apache-2.0" ]
permissive
#!/bin/bash # Call from project root directory: ./release/windows.sh set -e version=$1; if [ "$version" == "" ]; then echo Gimme version number exit 1 fi OUT="abstreet_windows_$version" source release/common.sh common_release $OUT cp release/play_abstreet.bat $OUT mkdir $OUT/game cross build --release --target ...
Java
UTF-8
216
1.851563
2
[]
no_license
package lark.net.rpc.server.register; import java.util.function.Supplier; /** * @author cuigh */ public interface Register { void register(Supplier<Provider> supplier); void remove(Provider provider); }
SQL
UTF-8
417
3.25
3
[]
no_license
-- sample view for Milestone 7 create view oscars.oscar_nominations as select entity, count(*) as nomination_count from `cs327e-sp2019.oscars.Academy_Award` where category in ('ACTOR IN A LEADING ROLE', 'ACTOR IN A SUPPORTING ROLE', 'ACTRESS', 'ACTRESS IN A LEADING ROLE', 'ACTRESS IN A SUPPORTING ROLE', 'DIRECTING (...
C
UTF-8
612
2.609375
3
[]
no_license
/** * @file Ogrenci.hpp * @course 2. Ogretim A * @assignment 1.Odev * @date 23.10.2018 * @author Fatih Enis Kaya fatih.kaya18@ogr.sakarya.edu.tr */ #include "Random.h" #include <sys/time.h> #include <stdio.h> #include <time.h> #include <math.h> unsigned short lfsr = 0xACE1u; unsigned bit; unsigned...
Python
UTF-8
1,223
2.53125
3
[ "MIT" ]
permissive
""" Script for coarse-graining an EM map downloaded from EMD """ import cg import numpy as np from cg import em from csb.bio.io import mrc ## change accordingly ... code = 1290 ## EMD map that will be coarse-grained n_coarse = None ## number of coarse-grained atoms (if None, K=100) n_nearest = 10 ##...
C#
UTF-8
1,266
3.921875
4
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace stringExample { class Program { static void Main(string[] args) { //Replace : 문자열 치환 string sayIntro = "I am swan"; Console.WriteLine(sayIntro); sayIn...
Markdown
UTF-8
2,546
2.765625
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: PwrTest Platform Idle Scenario description: The PwrTest Platform Idle Scenario (/platidle) polls and attempts to log platform idle transition counts if they are supported by the computer. ms.date: 04/20/2017 --- # PwrTest Platform Idle Scenario The PwrTest Platform Idle Scenario (**/platidle**) polls and ...
C++
UTF-8
2,652
3.125
3
[]
no_license
#ifndef SCHR_FIELD_HH #define SCHR_FIELD_HH #include <vector> #include "global.h" /* an n dimensional scalar field */ struct Field1D { std::vector<field_data_t> field_data; /* the dimension of the scalar field is determined implicitly by the size of the field_sizes vector */ std::vector<unsigned int> field...
Swift
UTF-8
597
3.4375
3
[ "MIT" ]
permissive
// // Problem5.swift // ProjectEuler // // Created by Tiago Henriques on 08/05/16. // Copyright © 2016 Tiago Henriques. All rights reserved. // import Foundation class Problem5: Solvable { func solve() -> Int { var value = 20 while value.divisibleByAllNumbersInRange(1...20) == false { ...
PHP
UTF-8
3,533
3.078125
3
[ "MIT" ]
permissive
<?php namespace Rollbar; final class Utilities { // In order to support < 5.6 we had to use __callStatic to define // coalesce, because the splat operator was introduced in 5.6 public static function __callStatic($name, $args) { if ($name == 'coalesce') { return self::coalesceArray(...
Python
UTF-8
4,928
3.359375
3
[]
no_license
class SLList(object): def __init__(self): self.head = None self.tail = None self.length = 0 def addBack(self, val): if not self.head: self.head = SLNode(val) self.tail = self.head return self run = self.head while run.next != N...
Java
UTF-8
1,196
2.921875
3
[]
no_license
package Comandos; import java.util.Scanner; import memoria.MemoriaVariaveis; import memoria.MemoriaComando; /** * * @author aluno */ public class ReadInt { MemoriaVariaveis variavel = new MemoriaVariaveis(); MemoriaComando comando = new MemoriaComando(); public ReadInt(){ ...
Java
UTF-8
223
1.671875
2
[]
no_license
package com.dev.ieeensut.interfaces; import android.view.View; import com.dev.ieeensut.models.Feed; /** * */ public interface OnHomeSliderInteractionListener { void onHomeSliderInteraction(View view, Feed feed); }
Markdown
UTF-8
8,580
3.421875
3
[ "Apache-2.0" ]
permissive
# Echart属性说明 ## title echart标题设置项。 |属性|显示名|类型|默认值|说明| |------|----|-----|--------|----:| |show|是否显示标题组件|boolean|true|是否显示标题组件| |zlevel|所有图形的 zlevel 值|number|无|所有图形的 zlevel 值| |z|组件的所有图形的z值|number|6|二级层叠控制,同一个canvas(相同zlevel)上z越高约靠顶层。| |text|主标题文本|string|无|主标题文本| |link|主标题文本超链接|string|无|主标题文本超链接| |target|指定窗口打开主标题超链接...
Java
UTF-8
462
2.25
2
[ "MIT" ]
permissive
public void test20() throws Throwable { Player player0 = new Player((byte)0, "", "", (-1), (byte)0); int int0 = player0.gangStrength(); assertEquals(0.0F, player0.getY(), 0.01F); assertEquals(0L, player0.getTimeOfDeath()); assertFalse(player0.isDead()); assertEquals(10.0F, player...
Python
UTF-8
1,469
3.53125
4
[]
no_license
# Count of number of given string in 2D character array # Given a 2-Dimensional character array and a string, we need to find the given string in 2-dimensional character array such that individual characters can be present left to right, right to left, top to down or down to top. # Input : a ={ # {D,D,D,G,D...
JavaScript
UTF-8
5,219
2.65625
3
[]
no_license
const assert = require('assert'); const request = require('request-promise'); const express = require('express'); const bodyParser = require('body-parser'); const config = require('../config'); const restUrl = `http://localhost:${config.REST_PORT}`; const pubsubUrl = `http://localhost:${config.PUBSUB_PORT}`; function...
JavaScript
UTF-8
1,087
2.53125
3
[]
no_license
const ONE_MINUTE = 60 * 1000; const FIVE_MINUTES = 5 * ONE_MINUTE; export function getTimeDisplayFeedbackByDiff(diff) { if (typeof diff !== 'number') { console.error(`Wrong diff type received in timeDisplayFeedbackRules. Expected "number", got "${typeof diff}".`); return { momentMessage: '', dur...
C#
UTF-8
845
2.6875
3
[]
no_license
using DiaryOfSportsNutrition_Andrianova.Abstract; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DiaryOfSportsNutrition_Andrianova.Concrete { public class PlateFoodRecordRepository : IPlateFoodRecordRepository { private rea...
C++
UTF-8
1,097
2.75
3
[]
no_license
#include<iostream> using namespace std; int main() { int ch, n, temp, j, i, k; n = 6; int x[] ={7, 19, 4, 8, 20, 1}; ch = true; cout << "Latihan 3" << endl; for (int i=0; i<n; i++) { cout << x[i] << ","; } cout << "\n\nInsertion Sort : "; for (i=1; i<=n-1; i++) { temp = x[i]; j =...
Python
UTF-8
2,818
3.203125
3
[]
no_license
def gcite(doi=None, opage=False): """ Get citation (gcite) information from the web using an 'objects' doi number (digital object identifier). cite, bibf = gcite(doi) or cite, bibf = gcite(doi, opage) Inputs: doi number as a string. The doi number can be entered as ...
C++
UTF-8
627
2.671875
3
[ "MIT" ]
permissive
#pragma once #include <vector> #include <queue> #include <string> #include <climits> #include <algorithm> #include <cmath> #include <unordered_map> #include <stack> using namespace std; class Solution { public: bool repeatedSubstringPattern(string str) { int n = str.size(); for (int i = n / 2; i >=...
JavaScript
UTF-8
726
2.609375
3
[ "MIT" ]
permissive
fs = require('fs'); var configLoader = function(configFile) { try { fs.accessSync(configFile, fs.R_OK, function(err) { console.log('Cannot read configuration file' + configFile); process.exit(1); }); } catch (err) { console.log('Configuration file ' + configFile + ' not found.'); conso...
JavaScript
UTF-8
103
2.53125
3
[]
no_license
function noisy(f) { return function(arg) { var val = f(arg); return val; }; } noisy(Boolean)(0);
Go
UTF-8
806
3.03125
3
[ "MIT" ]
permissive
package gitreceive import ( "testing" ) func TestReadLine(t *testing.T) { //readLine() expects a line with two spaces. good := "foo bar car" foo, bar, car, err := readLine(good) if err != nil { t.Errorf("Expected err to be nil, got '%v'", err) } if foo != "foo" { t.Errorf("Expected 'foo', got '%s'", foo) ...
Python
UTF-8
496
3.46875
3
[ "MIT" ]
permissive
lista1 = [] while True: cont = '' lista1.append(int(input('Digite um número: '))) cont = str(input('Deseja continuar? [S/N] ')).strip().upper() while cont not in 'SSIMNNÃONAO': cont = str(input('Deseja continuar? [S/N] ')).strip().upper() if cont in 'NNÃONAO': break listapar = [] lis...
C++
UTF-8
1,386
3.21875
3
[]
no_license
#include "leetcode_solutions.h" class Solution { public: TreeNode* buildTree(vector<int>& preorder, vector<int>& inorder) { if(preorder.empty() || inorder.empty()) return nullptr; return build(preorder, inorder, 0, preorder.size() - 1, 0, inorder.size() - 1); } TreeNode * build(vector<int>...
Shell
UTF-8
5,818
3.25
3
[]
no_license
#!/bin/bash ############################################################################### ## Codes for the paper: ## .............. ## ## Authors : GUERIN Pierre-Edouard, MATHON Laetitia ## Montpellier 2019-2020 ## ############################################################################### ## Usage: ## bash...
Java
UTF-8
2,262
2.359375
2
[]
no_license
package service; import beans.AuthorBean; import dao.DAOType; import exception.BusinessException; import exception.MyException; import exception.NoSuchObjectInDB; import exception.SystemException; import service.dbOperations.DBOperations; import service.dbOperations.DBOperationsFactory; import javax.servle...
Markdown
UTF-8
1,291
2.640625
3
[ "MIT" ]
permissive
# Ember-touchspin Ember version of [Bootstrap TouchSpin](https://github.com/istvan-ujjmeszaros/bootstrap-touchspin). ## Usage Ember-touchspin allows you to freely design your TouchSpin component in the way you want by providing a set of yield actions. ``` {{#touch-spin initVal=inputValue step=1 decimals=0 ...
Java
UTF-8
2,856
4.375
4
[]
no_license
package day0727.ch12; import java.util.ArrayList; //------------------------------------------ // MyQueue 클래스 선언 //------------------------------------------ class MyQueue { //------------------------------------------ // String형으로 ArrayList 변수 arrayQueue 선언, // String형으로 ArrayList 인스턴스 생성하여 리턴된 메위주 ...
C++
GB18030
1,110
4.0625
4
[]
no_license
//дַеÿո滻20% // ҳеĿոȻƣַ /* ַܻ޷ʾҪASCIIת%32ո*/ #include <iostream> #include <cstring> using namespace std; char* replacestr(char str[]){ //ûҪµ飬Ϊstr㹻ֱӺԪؼ if (str == NULL || strlen(str) == 0)/*ע⣺жϴIJǷգ*/ return NULL; int len = strlen(str); int count = 0; int i = 0; while (count < len && i < len){ if (str[i++]...
Markdown
UTF-8
1,751
2.609375
3
[]
no_license
# OCI IAM > IAM, Authentication, Authorization, Policies ## Identity and Access Management (IAM) It lets you control who has access to your cloud resources. IAM has 2 principals<sup>**1**</sup> : - IAM Users - Instance Principals ### IAM Users and Groups - Users = individual people or applications - First IAM Use...
C++
UTF-8
1,722
3.796875
4
[]
no_license
#include<iostream> #include<conio.h> #include <chrono> using namespace std; using namespace std::chrono; void heapify(int arr[], int n, int i) { int largest = i; // Initialize largest as root int l = 2 * i + 1; // left = 2*i + 1 int r = 2 * i + 2; // right = 2*i + 2 // If left child is l...
PHP
UTF-8
15,824
2.65625
3
[ "CC0-1.0" ]
permissive
<?php class SWFTextObjectExporterDOCX extends SWFTextObjectExporter { protected function addSection($textObject) { // add section name $heading = new DOCXParagraph; $heading->paragraphProperties = new DOCXParagraphProperties; $heading->paragraphProperties->pStyleVal = 'Heading1'; $heading->paragr...
Python
UTF-8
3,969
2.640625
3
[]
no_license
""" Constructs the data lists of image to id with the following format. [video_name/%08d] [class_id] stores them in: "./Train_list.txt" "./Test_list.txt" Customized for the detection task. """ import subprocess, os, pickle, csv, argparse ##HARD coded in the dictionaries from the video name ...
Python
UTF-8
1,975
4.53125
5
[]
no_license
# 6. Crear un programa que lea un entero positivo, n, introducido por el usuario y después muestre en pantalla la suma de todos los enteros desde 1 hasta n. n = int(input('Ingrese un número: ')) suma = 0 # creo la variable suma como contenedor de de los enteros de 1 a n y le sumo el indice del for for i i...
Python
UTF-8
1,489
2.890625
3
[]
no_license
import math # 1996 Pacejka R25B_13 Lateral Force # input normal load on tire, slip angle, camber angle, gives lateral force # on tire y axis #positive alpha = positive force #negative camber = "good" camber #Cyrus #I have no clue what's happening here, but I believe dynamics is currently working on something...
Markdown
UTF-8
11,449
2.75
3
[]
no_license
[TOC] # 一、概述 内存一直都是性能优化的重点,今天我们主要介绍如何使用`Android Studio`生成分析`hprof`报表,并使用`MAT`分析结果,在介绍之前,首先需要感谢[`Gracker`](https://www.jianshu.com/u/FK4sc4),本文的分析大多数都是来自于它的这篇文章: > [`http://www.jianshu.com/p/d8e247b1e7b2`](https://www.jianshu.com/p/d8e247b1e7b2) # 二、获取内存快照并分析 ## 2.1 获取内存快照 为了便于大家理解,我们先编写一个用于调试的单例`MemorySingleton`,...
Markdown
UTF-8
1,801
2.96875
3
[ "Apache-2.0" ]
permissive
--- layout: post title: "Chrome 独享的 Gmail 新功能:浮动窗口可脱离主窗口运行" date: 2010-06-11 17:44 author: Eyon comments: true tags: [Chrome, Chrome技巧, Gmail] --- 继之前 Chrome 用户可优先独享 [Gmail 的附件拖放新功能](http://www.chromi.org/archives/4641)之后,今天 Gmail 团队再次给 Chrome 开小灶,现在 Chrome 用户可以优先使用 Gmail 的另一个新功能——让浮动窗口完全脱离主窗口运行。 <a href="http...
Java
UTF-8
1,336
2.78125
3
[]
no_license
package leetcode; import org.omg.CORBA.PUBLIC_MEMBER; import java.util.*; public class demo241 { private Map<String, List<Integer>> map = new HashMap<>(); public List<Integer> diffWaysToCompute(String input) { if (map.containsKey(input)) return map.get(input); List<Integer> res = new ArrayL...
Markdown
UTF-8
1,574
3.296875
3
[]
no_license
# Naive Bayes Email Classification We have a set of emails, half of which were written by one person and the other half by another person at the same company. Our objective is to classify the emails as written by one person or the other based only on the text of the email. We will use the Naive Bayes algorithm. We w...
PHP
UTF-8
7,305
2.984375
3
[]
no_license
<?php //Definir as variaveis para conexao com o Banco de Dados define('server','mysql:host=localhost; dbname=wim'); define('usuario','root'); define('senha',''); //Classe Clientes class Clientes{ //Atributos da classe(campos da tabela cliente) public $cpf; public $nome; public $usuario; public $sen...
C#
UTF-8
1,625
2.6875
3
[]
no_license
using System; using System.Linq; using System.Collections.Generic; namespace ConsoleApp1 { abstract class servize { public abstract Product1 chainik(); public abstract Product3 tarelka(); public abstract Product2 chashka(); } class KazakhstanFactory : servize { ...
PHP
UTF-8
4,299
2.78125
3
[]
no_license
<?php class Controller{ // llamada a la plantilla public function callTemplate(){ include "views/plantilla.php"; } #interaccion con el usuario public function enlacesPaginasController(){ if (isset($_GET["action"])) { $enlacesController= $_GET["action"]; }else{ ...
Markdown
UTF-8
2,724
2.96875
3
[]
no_license
# TypeScript ### (一)概述 ### (二)主要内容 1.强类型和弱类型 强类型不允许又隐式类型转换;落泪行可以 javascript的问题 const obj={} obj.foo() //运行才报错 数字+‘字符串’==拼接字符串 强优势 1、错误更早提醒 2、代码智能,提示,准确 3、重构绕靠 4、减少不必要的类型判断 2.静态类型和动态类型 静态类型就是申明之后的变量,类型就确定了, 相反动态就是可以改 3.javascript 自有类型系统问题 4.Flow静态类型检查方案 Flow java..类型检查其 类型注解 ::numbe--babel---> 两种方案处理...
C++
UTF-8
1,044
3.09375
3
[]
no_license
#include "ClassDeclaration.h" using namespace std; ClassDeclaration::ClassDeclaration(): HashElement(""), _baseClass("") {} ClassDeclaration::ClassDeclaration(const string& identifer): HashElement(identifer), _baseClass("") {} ClassDeclaration::ClassDeclaration(const string& identifer, const string& baseClass...
Python
UTF-8
1,602
4.0625
4
[]
no_license
shopping = 'y' pie_list = ["Pecan", "Apple Crisp", "Bean", "Banoffee", "Black Bun", "Blueberry", "Buko", "Burek", "Tamale", "Steak"] pie_dict = {pie: amt for pie, amt in zip(pie_list, [0 for i in range(len(pie_list))])} print(pie_dict) # Display initial message print("Welcome to the House of Pies! Here ...
C
UTF-8
1,158
2.5625
3
[ "ISC" ]
permissive
#include <kernel/x86/8259pic.h> #include <kernel/x86/portio.h> /* resources: [8259], [osdev/PIC] */ #define PIC_MASTER 0x20 #define PIC_SLAVE 0xa0 #define PIC_CMD(pic) (pic) #define PIC_DATA(pic) ((pic)+1) #define PIC_INIT 0x10 #define PIC_EOI 0x20 void remap_8259pic(void) { out8(PIC_CMD(PIC_MASTER), PIC_INIT); o...
Java
ISO-8859-3
3,968
3.65625
4
[]
no_license
package models; import java.util.HashSet; import java.util.Random; import java.util.Set; /** * @author Pol & Angel * @name Game.java * @origin Play.java * @description Model: motor del programa, conte tots els metodes pel funcionament del joc * @test GameTest.java */ public class Game { private int arr...
C++
UTF-8
8,664
2.59375
3
[ "MIT" ]
permissive
#include "inputassembler.h" #include "matrixd.h" #include "io.h" #include <stdexcept> #include <opencv2/opencv.hpp> #include "iaveragebackgroundcolourlocator.h" #include <algorithm> #include <random> namespace anima { namespace ia { std::vector<math::vec3> RemoveDuplicatesWithGrid(const cv::Mat& mat, u...
Markdown
UTF-8
19,036
2.71875
3
[ "MIT" ]
permissive
--- title: "Building a directory map with ELK" #description: toc: true authors: - David Pilato tags: - elasticsearch - logstash - kibana categories: - tutorial date: 2015-12-10 09:28:15 +0100 lastmod: 2015-12-10 09:28:15 +0100 # featuredImage: blog/2016-03-17-and-the-beats-go-on/beats.png draft: false aliase...
Java
UTF-8
521
2.015625
2
[]
no_license
package com.eazytec.crm.dao; import java.util.List; import com.eazytec.crm.model.Custom; import com.eazytec.dao.GenericDao; import com.eazytec.util.PageBean; public interface CustomDao extends GenericDao<Custom, String> { List<Custom> getAllCustomList(String num,String name); Custom saveCustom(Custom custom); ...
Java
UTF-8
3,046
2.21875
2
[ "BSD-3-Clause" ]
permissive
package org.scut.ccnl.genomics.io.fasta; import htsjdk.samtools.SAMException; import htsjdk.samtools.SAMSequenceDictionary; import htsjdk.samtools.reference.FastaSequenceIndex; import htsjdk.samtools.reference.FastaSequenceIndexEntry; import htsjdk.samtools.reference.ReferenceSequence; import org.apache.hadoop.hbase.C...
C#
UTF-8
720
2.828125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; namespace Epic.TypeConverter { public static class TConverter { public static T ChangeType<T>(object value) { return (T)ChangeType(typeof(T), value); } ...
C
UTF-8
965
3.8125
4
[]
no_license
#include<stdio.h> #include<stdlib.h> struct Node { int data; struct Node* next; }; void InsertionAtEnd(struct Node** head) { struct Node *temp=(struct Node*)malloc(sizeof(struct Node)); struct Node *temp1=(struct Node*)malloc(sizeof(struct Node)); temp->next=NULL; temp1=*head; printf("Enter Data : " ); ...
Java
UTF-8
1,095
2.234375
2
[ "BSD-3-Clause" ]
permissive
public void testProcessDefinitionProperties(){ List<ProcessDefinition> processDefinitions=repositoryService.createProcessDefinitionQuery().orderByProcessDefinitionName().asc().orderByProcessDefinitionVersion().asc().orderByProcessDefinitionCategory().asc().list(); ProcessDefinition processDefinition=processDefiniti...
JavaScript
UTF-8
226
3.21875
3
[]
no_license
//Check to see if script is linked properly. console.log("This script is linked properly!") //Write your JS code here... function changeColor(color) { document.getElementById("colorDIV").style.backgroundColor = color; }
TypeScript
UTF-8
4,426
3.90625
4
[]
no_license
/** * The string values here are only for the sake of debugging. Trying to tell which token is which * given only an integer is hard. */ export enum TokenType { BRACE_OPEN = "{", BRACE_CLOSE = "}", PARENTHESES_OPEN = "(", PARENTHESES_CLOSE = ")", SEMICOLON = ";", /* UNARY */ U...
Python
UTF-8
237
2.703125
3
[]
no_license
from math import * #from numpy.random import * vida = int(input("digite vida")) D1 = int(input("dado 1"))#randint(1, 20, size = 1) D2 = int(input("dado 2"))#randint(1, 20, size = 1) dano = (sqrt(5*D1))+(pi**(D2/3)) print(vida-int(dano))
PHP
UTF-8
606
2.765625
3
[]
no_license
<?php // Conecta ao banco de dados mysql_connect('127.0.0.1', 'usuario', 'senha'); mysql_select_db('meusite'); // "Hoje" em formato SQL $data = date('Y-m-d'); // Monta e executa uma consulta SQL $sql = "SELECT `id`, `titulo`, `link` FROM `noticias` WHERE `ativa` = 1 AND `data` <= '". $data ."'"; $query = mysql_query($s...
C
UTF-8
5,848
3.390625
3
[]
no_license
/* We have 256MB RAM=256*1024*1024=268 697 600 bytes Max nums count is 100 000 000= 4*100 000 000 = 400 000 000 bytes max Which means that we can store half the file in RAM */ #include <stdbool.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <err.h> #include <stdio.h> #i...
C#
UTF-8
3,147
2.828125
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class HighScoreController : MonoBehaviour { [SerializeField] Text[] highScoreList; [SerializeField] string readHighScore; [SerializeField] string highScoreKey = "HighScore"; [SerializeField] string highSc...
PHP
UTF-8
6,849
2.515625
3
[]
no_license
<?php // kernel-functions.inc.php // functions and classes scriptData to kcm, payroll, gateway, etc function kernel_array_concat($array, $prefix, $suffix) { $newArray = array(); foreach( $array as $value ) { $newArray[] = $prefix . $value . $suffix; } return $newArray; } function krnLib_asse...
Java
UTF-8
5,259
2.15625
2
[ "BSD-3-Clause" ]
permissive
package org.firstinspires.ftc.teamcode.OpModes.Testing; import com.acmerobotics.roadrunner.geometry.Pose2d; import com.qualcomm.robotcore.eventloop.opmode.Autonomous; import com.qualcomm.robotcore.eventloop.opmode.Disabled; import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; import org.firstinspires.ftc.robo...
C#
UTF-8
2,275
2.546875
3
[]
no_license
using System; using Xamarin.Forms; using Xamarin.Forms.Xaml; namespace PrimeAssault.Views { /// <summary> /// The Main PrimeAssault Page /// </summary> [XamlCompilation(XamlCompilationOptions.Compile)] public partial class BattlePage: ContentPage { /// <summary> /// Constructor /// </summary> public Bat...
C#
UTF-8
2,448
3.25
3
[]
no_license
using System; namespace OnlineChess { public class CreateGame { public void CreatePlayer(GameObject[] player, int N) { for (int i = 0; i < N; i++) { player[i] = new GameObject(); } for (int i = 0; i < N; i++) { ...
TypeScript
UTF-8
749
2.671875
3
[ "MIT" ]
permissive
import { BaseExtensionOptions } from '@remirror/core'; export interface MulticursorExtensionOptions extends BaseExtensionOptions { /** * This determines the character that will be used to represent the cursor. * * @default '|' */ cursor?: string; /** * The class name of the decoration span used t...
Markdown
UTF-8
15,702
3.359375
3
[ "MIT" ]
permissive
# Latex-in-Academic-Writing 记录Latex在学术论文写作中的的常见问题和解决方案,并附有详细代码 ## latex基本知识 - 这部分的参考链接 - https://liam.page/2014/09/08/latex-introduction/ - http://liuchengxu.org/blog-cn/posts/quick-latex/ - 本质其实就是一种类似html,markdown的标记语言,只不过相比起来所具有的标记更加多样和复杂而已。 - 或者还可以再拿代码中的宏定义来理解,把一些特定的序列定义为某些操作,某些意思,方便后面的使用。这种特定的序列在latex...
Python
UTF-8
851
3.1875
3
[]
no_license
import numpy as np from __future__ import division import matplotlib.pyplot as plt def weights(x): w = [] for i in xrange(len(x)): temp = x[i] - x den = temp[temp != 0] w.append(1./np.prod(den)) return w def barycentric(x,y): w = weights(x) X = np.linspace(min(x),max(x),500...
Markdown
UTF-8
373
2.546875
3
[]
no_license
# FASHION-MNIST ### A Sequential Model with Dense & Flatten layers has been built on Fashion-Mnist dataset of tensorflow.keras. ### The training dataset has Images of "T-shirt/top","Trouser","Pullover","Dress","Coat","Sandal","Shirt","Sneaker","Bag","Ankle Boot". ### Our model basically predicts the images in Training...
Markdown
UTF-8
735
2.75
3
[]
no_license
My Dotfiles =========== These are my dotfiles. The bootstrapping process was copied from [Rowan's dotfiles][rowan]. Installing ---------- You'll need Git installed for this to work. ```sh git clone https://github.com/rowanmanning/dotfiles.git ~/.dotfiles && cd ~/.dotfiles && source bootstrap.sh ``` Updating ---...
Swift
UTF-8
4,385
2.921875
3
[]
no_license
// // Mapper.swift // Employees // // Created by Farzana Sultana on 7/27/19. // import UIKit import CoreData class Mapper: NSObject { class func convert(fromEntity entity:NSObject, toManaged managed:NSManagedObject){ if (entity.isKind(of: EEmployee.self)){ let e...
PHP
UTF-8
827
2.609375
3
[ "MIT" ]
permissive
<?php namespace Chigi; use Chigi\Sublime\Models\ReturnData; use Chigi\Sublime\Settings\Environment; use Chigi\Sublime\Models\File; class BuildMdToPdf{ public function run(){ $env = Environment::getInstance(); $file = new File($env->getArgument('file')); require_once('pandoc/config.php'); $cmd = "pand...
JavaScript
UTF-8
674
2.59375
3
[]
no_license
const uwu = require('uWebSockets.js'); const app = uwu.App(); function delay(ms = 0){ return new Promise((resolve, reject)=>{ setTimeout(()=>{ resolve() }, ms) }) } async function delayLog(){ await delay(500); console.log("Hey, watch out! Im logging here.") } app.get('/', ...
Java
UTF-8
2,168
2.703125
3
[]
no_license
package nl.finalist.liferay.lam.api; /** * Service for managing custom fields. */ public interface CustomFields { /** * Add a custom field of type text. * * @param entityName entity that the field is added to * @param fieldName name of the field * @param defaultValue default value of th...
JavaScript
UTF-8
4,062
2.53125
3
[]
no_license
$(document).ready(function () { function getCookie(name) { var v = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)'); return v ? v[2] : null; }; $("#usernameNavBar").text(getCookie("username")); if (getCookie("isAdmin") == "" && getCookie("isSeguridad") == "") { alert(...
Java
UTF-8
1,278
2.671875
3
[]
no_license
package extractor; import config.ConfigurationUtils; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.Set; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; class DefaultWord...
Python
UTF-8
273
3.4375
3
[]
no_license
""" Write a python function parse_csv to parse csv (comma separated values) files. """ def parse_csv(filename): csv=[] lines=open(filename).readlines() for line in lines: csv.append([i for i in line if i != ',' and i != '\n']) return csv print parse_csv('a.csv')
Python
UTF-8
696
2.671875
3
[]
no_license
import pytest from Database import Database from db import PhraseInput @pytest.hookimpl() def pytest_sessionstart(session): """Actions before all tests.""" db = Database() for a in range(1, 4): data = { 'author': f'test-author-{a}', 'text': f'test-text-{a}' } ...
Java
UTF-8
475
1.921875
2
[]
no_license
package com.sink.service.core; import java.util.List; import com.sink.domain.core.Contact; import com.sink.domain.core.Partner; public interface ContactService { public Contact findContactById(int id); public Contact findContactByName(String name); public List<Contact> findContactsByPartner(Partner part...
C
UTF-8
3,197
3.25
3
[]
no_license
#include <stdio.h> #include <stdlib.h> int max (int a, int b) { return a > b ? a : b; } int rec_opt(int arr[], int i){ if ( i == 0 ) { return arr[0]; } else if ( i == 1 ){ return max (arr[0], arr[1]); } else { int a, b; a = rec_opt (arr, i - 2) + arr[i]; b = rec_opt (arr, i - 1); return max (a, b); ...
C
UTF-8
1,004
3.453125
3
[]
no_license
/* * queue.c * * Created on: 2016年9月13日 * Author: Bill */ #include "queue.h" #include "common.h" node new_queue_node() { node ret = (node)malloc(sizeof(node_t)); ret->m_data = 0; ret->m_next = NULL; return ret; } void free_node(node n) { if (n != NULL) { free(n); n = NULL; } } queue new_queue()...
JavaScript
UTF-8
322
3.046875
3
[]
no_license
const nationalID = prompt ('what is your NID'); const nidIsValid = (nid) => { const nationalID = parseInt(nid,10) if (Number.isNaN(nationalID)) { return false; } if (nationalID % 11 !== 0 ) { return false; } else { return true; } }; document.write (nidIsValid()...
Markdown
UTF-8
4,730
2.609375
3
[ "MIT" ]
permissive
--- layout: post title: "Covid-19 disrupts China’s rise as a destination for foreign students" date: 2021-01-28T17:09:42.000Z author: 经济学人en from: https://www.economist.com/china/2021/01/30/covid-19-disrupts-chinas-rise-as-a-destination-for-foreign-students tags: [ 经济学人en ] categories: [ 经济学人en ] --- <!--1611853782000-...
Java
UTF-8
1,143
2.546875
3
[]
no_license
package com.salesforce.tests.dependency.command; import java.util.List; import java.util.Map; import java.util.Set; import com.salesforce.tests.dependency.Item; import com.salesforce.tests.dependency.util.DependancyUtil; public class INSTALLCommand implements Command{ @Override public void execute(CommandOptions ...
Java
UTF-8
723
2.125
2
[]
no_license
package fr.training.spring.library.infrastructure.http.dto; public class AuthorInfo { private String name; private String personal_name; private DateInfo last_modified; private String key; private TypeInfo type; private int id; private int revision; public String getName() { re...
PHP
UTF-8
1,086
2.546875
3
[]
no_license
<?php namespace backend\widgets; use yii\base\Widget; use yii\helpers\Json; use yii\web\JsExpression; class SelectStorySlidesWidget extends Widget { public $slidesAction; public $onSave; public $selectedSlides = []; public $buttonTitle = 'Выбрать слайды'; public $stories; public function ru...
Markdown
UTF-8
4,394
3.359375
3
[]
no_license
# Java ## 编码 Java默认字符是Unicode编码,而String类型的编码方式与JVM编码方式都与本机操作系统的默认字符集有关 ## 语言特性 ### 泛型 - E Element,在集合中使用,集合中存放的元素 - T Type, Java的类 - K key 键 - V Value 值 - N Number 数值类型 - ?不确定的Java类型 ### Class类 是所有对象的运行时类型标识,即RTTI-Run Time Type Identification 它是由JVM创建,它的作用就是在运行时提供或获得某个对象的类型信息 ```java ...