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
PHP
UTF-8
1,459
2.625
3
[]
no_license
<?php require_once('Inventory.php'); require_once('Order.php'); require_once('OrderQueue.php'); $inventoryObj = new Inventory(); $orderQueue = OrderQueue::loadQueue(); $allOrdersStatus = array(); $allOrdersStatusHumanReadable = ''; foreach($orderQueue as $internalSerializeOrder){ echo "Processing order: ". $in...
Markdown
UTF-8
1,030
3.125
3
[]
no_license
# BloomShaderEffect The bloom filter operates as follows: firstly for each pixel calculate its luminance based on RGB intensities; second, extract the highest luminance values from the resulting luminance surface based on a given threshold; finally, apply Gaussian blur onto thresholded luminance surface and add the ...
C#
UTF-8
2,611
2.515625
3
[]
no_license
using System; using System.Linq; using ControlePonto.DataObject.DTO; using ControlePonto.DataObject.Entities; using ControlePonto.Repository.Base; namespace ControlePonto.Business { public class FuncionarioBusiness { IRepository<FuncionarioMapping> _repository; public FuncionarioBusiness(I...
Java
UTF-8
3,434
2.65625
3
[]
no_license
package TickTackToe; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.stage.Stage; public class OnePcGameController { private final Repli...
Java
UTF-8
7,083
2.78125
3
[]
no_license
package net.nextlogic.airsim.visualizer; import javax.imageio.ImageIO; import javax.swing.*; import java.awt.*; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOExcept...
Markdown
UTF-8
617
3.125
3
[ "MIT" ]
permissive
## Hashdot - cozy hash accessors. Hashdot provides a nicer way to access stuff in your hashes, if you've ever done JavaScript, Lua or countless others you'll be familiar with it. Note: This is a terrible monkeypatch of the Hash class, I would advise against using it in large production systems, I wrote it because I f...
Python
UTF-8
5,489
2.953125
3
[]
no_license
class Token: def __init__(self, ty, value, line=0, pos=0): self.type = ty self.value = value self.line = line self.pos = pos def __str__(self): return f"Token(type: {self.type}, value: {self.value})" def __repr__(self): return f"Token(type: {self.type}, valu...
Markdown
UTF-8
7,536
2.6875
3
[ "MIT" ]
permissive
<div align="center"> <img width="200" height="200" src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/notebook.png"> <h1>next-mdx-blog</h1> <p>Easy blog for next.js</p> </div [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=for-the-badge)](htt...
SQL
UTF-8
843
2.953125
3
[]
no_license
CREATE DATABASE Locadora; CREATE TABLE Empresas ( idEmpresa INT PRIMARY KEY IDENTITY ,Nome VARCHAR(200) NOT NULL ); CREATE TABLE Marcas ( idMarca INT PRIMARY KEY IDENTITY ,Nome VARCHAR(200) NOT NULL ); CREATE TABLE Modelos ( idModelo INT PRIMARY KEY IDENTITY ,idMarca INT FOREIGN KEY REFERENCES Marcas ,Desc...
Java
UTF-8
593
1.8125
2
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package sessionbeans; import entities.Product; import entities.StoredBasket; import entities.User; import javax.ejb.Local; /** * * ...
PHP
UTF-8
1,936
2.625
3
[]
no_license
<?php namespace app\models; use Yii; /** * This is the model class for table "bank". * * @property int $id * @property string $client_id * @property string $secret_id * @property string $code * @property string $response_type * @property string $authorization_code * @property string $refresh_token * @prope...
Java
UTF-8
389
2.1875
2
[]
no_license
package com.stress.sub1.sub3; import com.jtransc.annotation.JTranscKeep; @JTranscKeep public class Class3657 { public static final String static_const_3657_0 = "Hi, my num is 3657 0"; static int static_field_3657_0; int member_3657_0; public void method3657() { System.out.println(static_const_3657_0); } public ...
Python
UTF-8
1,229
2.71875
3
[]
no_license
import praw from credentials import AWS_ACCESS_KEY, AWS_BUCKET_NAME, AWS_SECRET_KEY, CLIENT_ID, CLIENT_SECRET, USER_AGENT import time import io import json #gain authorization to scan reddit through praw reddit = praw.Reddit(client_id= CLIENT_ID, client_secret=CLIENT_SECRET, us...
Java
UTF-8
5,001
2
2
[ "BSD-2-Clause-Views" ]
permissive
/* * Copyright (c) 2014, Thoughtworks Inc * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of co...
Java
UTF-8
6,943
2.359375
2
[]
no_license
package com.oneside.ui.story; import android.content.Context; import android.graphics.Color; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; import com.oneside.base.adapter.XSimpleAdapter; import com.oneside.base.view.XRoundImageView; import...
C++
UTF-8
526
3.09375
3
[]
no_license
#ifndef OBSERVER_H #define OBSERVER_H #include <iostream> using namespace std; class Observer { private: string observerName; public: Observer(string name): observerName(name){} void update(const string &subject) { cout <<"observer: " << observerName << " get new subject: " << subject << endl; } };...
Java
GB18030
2,039
4.34375
4
[]
no_license
/* * Objectеequals * * equals: * * public boolean equals(Object obj) { return (this == obj); } o1.equals(o2):o1thiso2obj == ͣȽϵڴַͬtrue֮false ObjectеequalsȽϵõڴַ javaequalsƵĿģжĶǷһ */ package rObject; public class Test02 { public static void main(String[] ...
Markdown
UTF-8
2,867
2.609375
3
[]
no_license
--- title: Best Bath Items For Your New-Born Baby date: 2019-01-04 12:35:00 category: baby shampoo & soap thumbnail: /img/5.jpg --- ![](/img/4.jpg) You’ve had the infant and brought him (or her) house in the super cute heading home outfit, now begins the entire year of ‘the firsts’. Initial smile, first coo,...
C++
UTF-8
1,133
2.625
3
[]
no_license
/******************************************************************************** CodeForces 100030L Make Your Donation Now (二分) ********************************************************************************/ #include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef long long ll; const in...
Markdown
UTF-8
1,367
2.828125
3
[]
no_license
+++ title = "茶葉蛋做法" date = 2019-04-21T23:58:18+08:00 draft = false summary = "" # Tags and categories # For example, use `tags = []` for no tags, or the form `tags = ["A Tag", "Another Tag"]` for one or more tags. tags = ["recipe","食譜","食"] categories = ["life"] # Featured image # To use, add an image named `featured...
Markdown
UTF-8
4,367
2.890625
3
[]
no_license
# dcinside-python3api ##### dcinside python3 전용 비공식 API 입니다. # 사용법 ###### 사용전 requests, beautifulsoup4, lxml 꼭 설치해주세요 ###### 프로젝트에 dcapi 폴더를 포함해준후 선언해줍니다. ```python import dcapi ``` #### dcapi.write.post(gall_name,usid,password,title,content) ```python #비로그인(유동) 상태에서 글을 작성할수있습니다. post_num = dcapi.write.post("prog...
Python
UTF-8
307
3.015625
3
[]
no_license
N, M = map(int, input().split()) AB = [] for _ in range(M): a, b = map(int, input().split()) AB.append((a, b)) AB.sort(key=lambda x: x[1]) # print(AB) base = AB[0][1] ans = 1 for ab in AB[1:]: if ab[0] < base <= ab[1]: continue else: ans += 1 base = ab[1] print(ans)
C++
UTF-8
2,724
2.546875
3
[]
no_license
/* * Created by Kuang Peng on 2018/4/8 */ #include <memory.h> #include <stdlib.h> #include <stdio.h> #include <assert.h> #include <time.h> #include <iostream> #include "tuple.h" #include "ns3/key-hash.h" #include "net-device.h" namespace ns3 { /* static int tuple_lookup(tuple_t* tp, tuple_key_t* key) { int idx...
TypeScript
UTF-8
1,021
2.78125
3
[]
no_license
export default class User { public id: number = 0; public firstname: string = ""; public lastname: string = ""; public email: string = ""; public city: string = ""; public age: number = 0; public token: string = ""; public tokenExpired: Date = new Date(); public privilegeId: number =...
JavaScript
UTF-8
1,107
3.421875
3
[]
no_license
/** * @author EmmanuelOlaojo * @since 4/25/16 */ angular.module("Validator", []) .factory("validator", [function(){ var validator = {}; validator.hasSpace = function(value){ return value.indexOf(' ') > -1; }; validator.illegalChars = function(value){ return /[~`!#$%\^&*+=\-\[\]\\';,/...
Java
UTF-8
111
2.109375
2
[]
no_license
public class Teacher extends Human { public void teacher(){ System.out.println("shangke"); } }
Shell
UTF-8
1,126
4.03125
4
[]
no_license
#!/bin/bash # Change hostname if needed current_hostname="$(cat /etc/hostname)" rasp='raspberrypi' if [ "$current_hostname" == "$rasp" ]; then echo '>>>Hostname must be changed for node network' echo 'Enter Node name, followed by [ENTER]:' read node_name while true; do read -p "To confirm, nod...
Markdown
UTF-8
746
3.890625
4
[]
no_license
## C++ 空类 C++ 空类中包含 6 个默认函数 ```c++ class Empty { }; ``` 一个空的 class 在 C++ 编译器处理过后就不再为空,编译器会自动地为我们声明一些 member function。 ```c++ class Empty { public: Empty(); // 缺省构造函数 Empty(const Empty&); // 拷贝构造函数 ~Empty(); // 析构函数 Empty& operator=(const Empty&); // 赋值运算符 Empty* operator&(); // 取址运算符 ...
Swift
UTF-8
1,003
2.625
3
[]
no_license
// // IntroViewController.swift // triviaApp // // Created by Michael Berend on 15/03/2018. // Copyright © 2018 Michael Berend. All rights reserved. // import UIKit class IntroViewController: UIViewController { // create outlets for the name field and the button @IBOutlet weak var nameField: UITextFi...
Java
UTF-8
128
1.984375
2
[]
no_license
package UpCasting; public class Music { public static void tune(Instrument i) { i.play(Note.MIDLLE_C); } }
Python
UTF-8
599
4.21875
4
[]
no_license
import random randomInt=random.randrange(1,10) chancecount=0 print("\n\nGUESS A NUMBER BETWEEN 1 TO 9") print("\nYOU HAVE 5 CHANCES") while chancecount < 5: guess=int(input("ENTER YOU GUESS HERE : ")) chancecount=chancecount+1 if guess < randomInt: print("\nTOO LOW!!! GUESS A NUMBER HIGHER ...
Java
UTF-8
889
1.875
2
[]
no_license
package com.example.kioteacher.home; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.ImageButton; import androidx.appcompat.app.AppCompatActivity; import com.example.kioteacher.R; import com.example.kioteacher.qr.ScannerActivity; public class MainActivity exte...
Ruby
UTF-8
2,354
2.609375
3
[]
no_license
require 'csv' require 'date' require 'json' CONTRIBUTOR_ACTIVE_MONTHS = 3 PROJECT_IDLE_MONTHS = 6 author_last_seen = {} author_commits = {} period_commits = 0 period_authors = {} period_author_first_seen = {} tag_authors = {} csv = [] last_date = nil File.readlines( ARGV[0] || "commits.log" ).each do |line| date_s...
C#
UTF-8
1,898
2.984375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Messages; using Events; using NServiceBus; namespace NSBServer { public class AddBookCommandHandler : IHandleMessages<AddBookCommand> { public IBus Bus { get; set; } publ...
Go
UTF-8
497
2.96875
3
[]
no_license
package main import ( "fmt" "testing" ) func Test_tree2str(t *testing.T) { tests := []struct { t *TreeNode want string }{ {treeFromLevelOrder(1, 2, 3, 4), "1(2(4))(3)"}, {treeFromLevelOrder(1, 2, 3, NA, 4), "1(2()(4))(3)"}, } for _, tc := range tests { tt := tc testName := fmt.Sprintf( "%v", ...
Java
UTF-8
8,491
2.265625
2
[]
no_license
package java.util.stream; /* JADX ERROR: NullPointerException in pass: ExtractFieldInit java.lang.NullPointerException at jadx.core.utils.BlockUtils.isAllBlocksEmpty(BlockUtils.java:546) at jadx.core.dex.visitors.ExtractFieldInit.getConstructorsList(ExtractFieldInit.java:221) at jadx.core.dex.visit...
Markdown
UTF-8
1,881
3.03125
3
[]
no_license
--- slug: frankie-and-bennys-pay-for-your-meal-via-the-web date: 2019-10-20T17:17:06.747Z title: "Frankie and Bennys: Pay for your meal via the web" link: '' tags: [payments] --- Bất cứ khi nào tôi thấy một nhà hàng nói rằng bạn có thể thanh toán trên điện thoại di động, tôi luôn kiểm tra nó, chủ yếu để tôi có thể nhậ...
Python
UTF-8
2,366
2.84375
3
[]
no_license
#!/usr/bin/env python2 import numpy as np from math import * import arm_model import os import yaml import logging def clip(x, minval, maxval): if x > maxval: return maxval elif x < minval: return minval else: return x CALIBRATION_FILE = 'calibration.yml' if os.path.exists(CALIB...
PHP
UTF-8
472
2.953125
3
[]
no_license
<?php namespace AppBundle\Entity; /** * Dummytext * */ class Dummytext { /** * @var string * */ private $text; /** * Set text * * @param string $text * * @return Dummytext */ public function setText($text) { $this->text = $text; re...
PHP
UTF-8
6,623
2.578125
3
[]
no_license
<?php class generar_control { function generar($factura, $nit_cli, $fecha, $monto, $dosificacion, $autorizacion) {// $monto= round($monto); $fecha=str_replace('/', '', $fecha); $digitos = $this->paso1($factura, $nit_cli, $fecha, $monto); $cad_concat = $this->paso2($factura...
Java
UTF-8
2,259
1.875
2
[ "Apache-2.0" ]
permissive
/* * SETTE - Symbolic Execution based Test Tool Evaluator * * SETTE is a tool to help the evaluation and comparison of symbolic execution based test input * generator tools. * * Budapest University of Technology and Economics (BME) * * Authors: Lajos Cseppentő <lajos.cseppento@inf.mit.bme.hu>, Zoltán Micskei <...
Rust
UTF-8
2,450
2.578125
3
[]
no_license
extern crate rustmojo as this; use std::fs::File; use this::acqua::acquamodel::Comparison; use this::acqua::acquamodel::Node; use this::acqua::acquamodel::NoNumberHandling; use this::mojoreader::MojoInformation; use this::mojoreader::MojoReader; fn treeprint(node: &Node) { println!("Tree:"); treeprint_level(...
Java
UTF-8
5,712
2.015625
2
[]
no_license
package com.miracas.espresso.fragments.expresso; import android.os.Bundle; import android.os.Handler; import android.support.annotation.NonNull; import android.support.v4.app.Fragment; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View;...
JavaScript
UTF-8
309
2.5625
3
[]
no_license
import { useTips } from "./TipDataProvider.js"; import Tip from "./Tip.js"; const TipList = () => { const contentElement = document.querySelector(".tipList") const tips = useTips() for (const tipString of tips) { contentElement.innerHTML += Tip(tipString) } } export default TipList
Python
UTF-8
1,061
2.796875
3
[]
no_license
import csv from flask import Flask, render_template app = Flask(__name__) @app.route('/') def main(): return render_template('main.html', data={}) @app.route('/data') def data(): data = {"timestamps": [], "hr": [], "br": [], "temp": [], "valence": [], "stress": [], "incident": []} with open('csv/data.csv...
Markdown
UTF-8
1,268
2.8125
3
[ "MIT" ]
permissive
--- layout: page title: About permalink: /about/ --- ### Hello world! My name is Cristian Gutu and I am a **Software Engineer** on **Prudential’s Messaging Team**. Primarily I work on designing and implementing data pipelines supporting the flow of millions of events between producer and consumer systems across the...
JavaScript
UTF-8
1,087
2.65625
3
[]
no_license
var express = require('express'); var app = express(); var port = process.env.PORT || 3000; var mysql = require('mysql'); //start server app.listen(port); console.log('Server started, at http://localhost'+ port); var connection = mysql.createConnection({ host: 'localhost', user: 'root', password: '13748abc...
Python
UTF-8
5,777
2.640625
3
[]
no_license
import smtplib import html2text import os import pyodbc import __main__ as main from simple_salesforce import Salesforce from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText config = {} execfile('/etc/py.conf', config) # contains all the passwords, etc def testconfig(): print conf...
TypeScript
UTF-8
4,713
2.640625
3
[ "MIT", "BSD-2-Clause" ]
permissive
// AngularIO libraries. import { Component, Inject } from '@angular/core'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; @Component({ selector: 'app-dialog-box', templateUrl: './dialog-box.component.html', styleUrls: ['./dialog-box.component.css'] }) /* * * The DialogBoxCompone...
Ruby
UTF-8
326
3.109375
3
[]
no_license
class ConstantNode < Node attr_reader :id, :val def initialize(id, val) super() @id, @val = id, val end # no need to recurse here because # constants only contain terminal values def accept visitor visitor.visit_constant_node self end def to_s "Constant -> #{@id} = #{@val}" e...
SQL
UTF-8
248
3.734375
4
[ "MIT" ]
permissive
CREATE PROC usp_GetEmployeesFromTown (@currentTown VARCHAR(50)) AS SELECT e.[FirstName], e.[LastName] FROM Employees AS e JOIN Addresses AS a ON a.AddressID = e.AddressID JOIN Towns AS t ON a.TownID = t.TownID WHERE t.[Name] LIKE @currentTown
PHP
UTF-8
363
2.515625
3
[]
no_license
<?php function getwebcontent($url){ $ch = curl_init(); $timeout = 10; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); $contents = trim(curl_exec($ch)); cu...
Java
UTF-8
4,725
2.71875
3
[ "BSD-2-Clause" ]
permissive
/* * #%L * SPIM Data: registered, multi-angle, multi-channel etc. image sequences. * %% * Copyright (C) 2013 - 2022 BigDataViewer developers. * %% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistrib...
C#
UTF-8
387
2.8125
3
[ "MIT" ]
permissive
using System.Collections.Generic; using ValueTypes; namespace ValueTypesTests.Cards { public class Hand : Value { public Card[] Cards { get; } public Hand(params Card[] cards) => Cards = cards; protected override IEnumerable<ValueBase> GetValues() => Group(Cards); public overri...
Python
UTF-8
527
3.078125
3
[]
no_license
# procesar_csv.py import pylab as pl import csv # entrada = open('uma_02.csv') tabla = [] for fila in csv.reader(entrada): tabla.append(fila) entrada.close() x=[0] y=[0] z=[0] for fila in range(1, len(tabla)): x.append(float(tabla[fila][13])) y.append(float(tabla[fila][2])) ...
Java
UTF-8
3,733
2.84375
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package hive.main; import hive.model.GameProgress; import hive.model.game.DefaultGame; import hive.model.game.Game; import h...
Python
UTF-8
393
3
3
[ "BSD-3-Clause" ]
permissive
import nltk from nltk.tokenize import word_tokenize from nltk.tag import pos_tag ex = 'European authorities fined Google a record $5.1 billion on Wednesday for abusing its power in the mobile phone market and ordered the company to alter its practices' def preprocess(sent): sent = nltk.word_tokenize(sent) sen...
C++
UTF-8
1,965
2.953125
3
[]
no_license
#ifndef __MATCH_H__ #define __MATCH_H__ #include "config.h" #include <functional> #include <arx/Collections.h> namespace prec { // -------------------------------------------------------------------------- // // Match // -------------------------------------------------------------------------- // class ...
Python
UTF-8
1,612
4.34375
4
[]
no_license
def example_one(i): if i == 10: return print(i) i = i + 1 example_one(i) # example_one(0) def fibonacci(x, y, max, counter=0): if counter == max: return print(counter) counter += 1 next_num = x + y print(x) fibonacci(y, next_num, max, counter) # fibonacci(1...
Markdown
UTF-8
1,487
2.765625
3
[]
no_license
+-- {: .rightHandSide} +-- {: .toc .clickDown tabindex="0"} ###Context### #### Differential geometry +--{: .hide} [[!include synthetic differential geometry - contents]] =-- =-- =-- > This entry is about the concept in [[differential geometry]] and [[Lie theory]]. For the concept in functional analysis see...
Java
UTF-8
1,813
3.453125
3
[]
no_license
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.rmi.server.ExportException; import java.util.Random; import java.util.Scanner; public class Main { private final static int MAX_NUMBER = 100; private static Random rnd = new Random(); private static Bu...
Java
UTF-8
4,769
2.328125
2
[]
no_license
package com.spring.core; import com.spring.core.config.BasketInitializer; import com.spring.core.dao.ListOfGoodsDao; import com.spring.core.dao.impl.InFileBasketDao; import com.spring.core.model.Basket; import com.spring.core.model.Product; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWit...
Markdown
UTF-8
4,334
3.734375
4
[ "MIT" ]
permissive
# SetImmutable [![Build Status](https://travis-ci.org/JonDotsoy/setImmutable.js.svg?branch=master)](https://travis-ci.org/JonDotsoy/setImmutable.js) An alternative to [lodash.set][] when your object necessary working with immutable objects. ## Installation Using npm: npm install --save setimmutable In Node.js: ...
Markdown
UTF-8
935
4.03125
4
[]
no_license
## Problem Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: ``` A: a1 → a2 ↘ c1 → c2 → c3 ↗ B: b1 → b2 → b3 ``` begin to intersect at node c1....
Java
UTF-8
3,776
2.125
2
[]
no_license
package com.example.mp5; import android.os.Bundle; import android.provider.ContactsContract; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; impor...
PHP
UTF-8
5,956
2.796875
3
[]
no_license
<?php /** * Use an HTML form to edit an entry in the * users table. * */ require "session.php"; require "common.php"; require "checkstaff.php"; if(isset($_POST['addsec'])){ if(isset($_POST['newsec_id']) and isset($_POST['newyear']) and isset($_POST['newsem']) and isset($_POST['newtid'])){ $newsec_id = $_...
Java
UTF-8
3,301
1.8125
2
[]
no_license
package com.ianarbuckle.fitnow.activities.running.gallery; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; ...
JavaScript
UTF-8
2,800
2.5625
3
[]
no_license
function insertDepartamentos() { var nombre = $("#dNb").val(); var descripcion = $("#dDe").val(); var datos = new Array(); var nb = new objPrm("Nombre", nombre); datos.push(nb); var pb = new objPrm("Descripción", descripcion); datos.push(pb); var res = new objRes(); res = valida...
Java
UTF-8
493
2.5
2
[]
no_license
package cn.com.jdsc; import java.security.interfaces.RSAPrivateKey; import java.security.interfaces.RSAPublicKey; public class codeKey { static RSAPublicKey pubKey; static RSAPrivateKey priKey; static void setRSAPublicKey(RSAPublicKey pub){ pubKey = pub; } static void setRSAPrivateKey(RSAPriv...
C#
UTF-8
1,457
2.734375
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.AI; public class NavMeshAgentEnemy : MonoBehaviour { Camera _target; // <-- Player position NavMeshAgent _agent; // <-- Get nawMesh Agent component [SerializeField] float HP = 100; // <-- Enemy HP (100 by...
Markdown
UTF-8
883
2.921875
3
[ "MIT" ]
permissive
<!--start-code--> ```js import { ButtonToolbar, Button, DOMHelper } from 'rsuite'; const { on, off } = DOMHelper; const App = () => { const btnRef = React.useRef(); const listenerRef = React.useRef(); const handleOnEvent = () => { if (!listenerRef.current) { listenerRef.current = on(btnRef.current, ...
Markdown
UTF-8
1,495
3.140625
3
[ "MIT" ]
permissive
# Pylot A Kubernetes deploy tool ## Purpose Pylot is a prototype exploring ways to provide a more user-friendly way to deploy kubernetes applications. The main design goals are: 1) to incorporate typing using the client-python Swagger specs, to make writing specs as IDE-friendly as possible 2) to wrap and/or hide...
Java
UTF-8
1,398
1.617188
2
[]
no_license
package com.google.android.gms.internal.measurement; import com.google.android.gms.common.api.Status; import com.google.android.gms.common.internal.Preconditions; import java.util.ArrayList; import java.util.List; final class zzgl implements zzpe, Runnable { private final /* synthetic */ zzgf zzbim; private ...
Markdown
UTF-8
591
2.859375
3
[ "MIT" ]
permissive
# Cryptography-Term-Project Implementation of the learned concepts in cryptography course on blockchain technology ## Project Overview Implemented an algorithm for first signing any given message, then using this digital signature, generated a block of random transaction and Proof-of-Work for the block. Then integrat...
Shell
UTF-8
178
2.515625
3
[]
no_license
# 判断build文件夹是否存在,不存在则创建 if [ ! -d "/build" ]; then mkdir /build fi # 进入build cd build # 编译并运行 make clean cmake .. make ./smooth
C++
UTF-8
990
3.265625
3
[]
no_license
// // Created by Deepanshu Arora on 03/11/19. // class isBSTReturn{ public: bool isBST ; int minimum ; int maximum ; }; isBSTReturn isBST2(BinaryTreeNode<int>* root){ //Base Case for the Problem : if(root==NULL){ isBSTReturn output ; output.isBST=true ; output.minimum=INT_M...
C++
UTF-8
568
3.015625
3
[]
no_license
#include <iostream> using namespace std; int arr[15]; int check[15]; int cnt; bool ans; void dfs(int n)//int n { if (n > cnt)return; else if (n == cnt) { int sum1 = 0; int sum2 = 0; for (int i = 0; i < cnt; i++) { if (check[i] == 1) { sum1 += arr[i]; } } if (sum1 == sum2) ans = true; else { ...
Python
UTF-8
846
2.59375
3
[]
no_license
#!/usr/bin/env python import signature_validation as sv (train_datas, train_labels, train_paths) = sv.get_training_set() (test_datas, test_labels, test_paths) = sv.get_testing_set() def run(img_size, K, bins): print(" Image size: {}\n K={}\n bins={}\n".format(img_size, K, bins)) for bin in bins: ...
Python
UTF-8
1,146
2.9375
3
[]
no_license
DEFAULT_MAP = { 'open' : 'open', 'high' : 'high', 'low' : 'low', 'close' : 'close', 'volume' : 'volume' } def load_ohlcv(df, **kwargs): _map = kwargs.get('column_map', DEFAULT_MAP) if kwargs.get('symbol'): _map = _map_symbol(kwargs.get('symbol')) ohlcv = df[list(_map.values())].copy() ohlcv...
Python
UTF-8
3,398
2.9375
3
[ "MIT" ]
permissive
import tensorflow as tf import numpy as np from tensorflow.python.framework import tensor_shape from tensorflow.python.util import nest def gelu(x): """Gaussian Error Linear Unit. This is a smoother version of the RELU. Original paper: https://arxiv.org/abs/1606.08415 Args: x: float Tensor to perform ac...
C#
UTF-8
998
2.78125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Common.Commands { public class Command { protected String _Text; public String Text { get { return _Text; } set { ...
C#
UTF-8
972
2.84375
3
[]
no_license
using Microsoft.AspNetCore.Mvc.Rendering; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace NewsManagementDotNetCoreApp.Extensions { public static class IEnumerableExtension { public static IEnumerable<SelectListItem> AnarKerimov<T>(this IEnumer...
C++
UTF-8
1,046
2.5625
3
[]
no_license
#include <iostream> #include <string> #include <vector> using namespace std; string s; int x,y; vector < int > mv[2]; bool is_possible(int ind, int M) { int sm[9000]; for(int i = 0 ; i < 9000;++i) sm[i] = 0; sm[0] = 1; int SM = 0; for(int i = (ind == 0? 1:0); i< mv[ind].size();++i) { SM += mv[ind][i]; for...
Python
UTF-8
500
2.953125
3
[]
no_license
# day 40 2019-06-18 Tue # 217. Contains Duplicate class Solution: def containsDuplicate(self, nums: List[int]) -> bool: # if len(nums) < 2: # return False # nums.sort(); # ahead = nums[0] # behind = nums[1] # for i in nums[2:]: # if ahead == behind: ...
Java
UTF-8
782
2.171875
2
[]
no_license
package com.example.vinove.listdemo_1; import android.os.Build; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.ArrayAdapter; import android.widget.ListView; import java.io.File; public class MainActivity extends AppCompatActivity { @Override protected void ...
Java
UTF-8
2,068
1.914063
2
[]
no_license
package com.ta.d3ti.wisnupamungkas.rekammediskeluarga; import android.os.StrictMode; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.Toolbar; import android.view.MenuItem; import android.widget.EditText; public class LihatDetailKandunganActivity extends AppC...
C++
UTF-8
542
2.6875
3
[]
no_license
#include <stdio.h> #include <string.h> int main() { int k = 0,n; int a[105]; char s[100000]; printf("PERFECTION OUTPUT\n"); while(~scanf("%d",&n),n) { int sum = 1,j; for(j = 2; j<=n/2; j++) { if(n%j == 0) sum+=j; } printf("%5d ...
Python
UTF-8
925
3.546875
4
[]
no_license
def find_range(arr, key): start, end = 0, len(arr) - 1 startKey, endKey = -1, -1 while start <= end: mid = int((start+end)/2) #print (start, end, mid) if arr[mid] == key: startKey = mid break elif arr[mid] < key: start = mid + 1 els...
C
UTF-8
548
2.765625
3
[]
no_license
#include <stdio.h> #if 0 int main () { int n[10]; printf ("%d", sizeof(n)); printf ("%d", sizeof(&n)); printf ("%d", (++ n)); printf ("%d", ++ &n); return 0; } #endif #if 0 int main () { char c = -20; printf ("0x%08x", c); return 0; } #endif # if 0 int main () { int n; char *str = "9999999999"; ...
Java
UTF-8
2,698
3.734375
4
[ "MIT" ]
permissive
package com.guann1n9.leetcode.problems.backtrack; import com.alibaba.fastjson.JSON; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 给定一个仅包含数字 2-9 的字符串,返回所有它能表示的字母组合。答案可以按 任意顺序 返回。 * * 给出数字到字母的映射如下(与电话按键相同)。注意 1 不对应任何字母。 * * * 0 <= digits.length <= 4 * d...
Java
UTF-8
2,667
2.375
2
[]
no_license
package com.example.omar.energy4.ui; import android.graphics.Color; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Toast; import com.afollestad.materialdialogs.MaterialDialog; import com.afollestad.materialdialogs.simplelist.MaterialSimpleLis...
TypeScript
UTF-8
2,644
2.890625
3
[]
no_license
/// <reference path="../../../globals.d.ts" /> /// <reference path="./asynctestcase.d.ts" /> /// <reference path="../../../third_party/closure/goog/mochikit/async/deferred.d.ts" /> declare module goog.testing { class DeferredTestCase extends DeferredTestCase__Class { } /** Fake class which should be extended ...
Python
UTF-8
312
3.671875
4
[]
no_license
year_start = int(input("Insert year: ")) if( (year_start % 4) == 0): if ( (year_start % 100 ) == 0): if ( (year_start % 400) == 0): print("Is leap year!") else: print("Is not leap year!") else: print("Is leap year!") else: print("Is not leap year!")
Java
UTF-8
1,481
2.234375
2
[]
no_license
package com.xjl.order; import com.google.common.collect.Maps; import java.util.Map; /** * * 订单提交模板 * * @Auther: xiaojinlu1990@163.partten * @Date: 2020/6/11 22:06 * @Description: */ public abstract class HotelOrder { private ApplicationReturn applicationReturn; private ProductReturn productReturn; ...
C++
UTF-8
2,325
2.703125
3
[]
no_license
#ifndef _NocheckWriteChannel_h_ #define _NocheckWriteChannel_h_ #include "../cPrimitiveTypes.h" #include "NocheckUnidirectionalChannel.h" class NocheckPacket; class NocheckPacketLayer; //------------------------------------------------------------------------------------------------ // * class NocheckWriteCh...
Markdown
UTF-8
1,412
2.921875
3
[]
no_license
# Medidas de posição e Dispersão ## Média, Mediana e Moda O objetivo desta tarefa é gerar as estatísticas para o atributo age da base de dados do censo Carregue o arquivo census.csv Calcule a média aritmética, média harmônica, média geométrica, média quadrática, a mediana e a moda. Compare os resultados ## Avaliaç...
Markdown
UTF-8
15,609
3.09375
3
[ "Apache-2.0", "LicenseRef-scancode-dco-1.1" ]
permissive
# 0519: Goal Codes - Authors: [Daniel Hardman](daniel.hardman@gmail.com) - Status: [ACCEPTED](/README.md#accepted) - Since: 2021-04-15 - Status Note: Used in several protocols that are part of [AIP 2.0](../0302-aries-interop-profile/README.md), such as the [Out-of-Band](../../features/0434-outofband/README.md) protocol...
Java
UTF-8
701
2.09375
2
[]
no_license
package br.com.sysdesc.pesquisa.components.buttonactions; import java.awt.event.KeyEvent; public class ButtonActionAvancar extends ButtonAction { private static final long serialVersionUID = 1L; public ButtonActionAvancar() { super("mapAvancar", KeyEvent.VK_PAGE_UP, 0, "next.png", "Avançar"); } ...
JavaScript
UTF-8
659
2.703125
3
[ "MIT" ]
permissive
Template.classicSong.onRendered(function() { var data = this.data; console.log(data); var rows = Math.ceil(data.notation.length/returnColNumber(data.taalName)); console.log(rows , " rows -------------"); $(function(){ //console.log(this , " what is this here"); //True indicates whether we want to add the row b...
JavaScript
UTF-8
7,833
3.0625
3
[]
no_license
import React, { useEffect, useRef } from 'react' const DequeCanvas = ({ dequeItems }) => { const canvasRef = useRef(null); useEffect(() => { const canvas = canvasRef.current; const ctx = canvas.getContext('2d'); const canvasWidth = canvas.offsetWidth; const canvasHeight = canvas.offsetHeight; ...