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,322
2.5625
3
[ "MIT" ]
permissive
<?php namespace App\eegt\Repositories; use App\eegt\Interfaces\BackendRepositoryInterface; use App\Research; use App\Visit; //komunikacja z BD class BackendRepository implements BackendRepositoryInterface { //znajdz wszystkie wizyty public function getAllVisits() { return Visit::with('user', ...
Java
UTF-8
2,212
3.703125
4
[]
no_license
/* Project: * Longest Increasing Sub-sequence (LIS) * Given an array, finds its longest increasing * subsequence using dynamic programming * Complexity: O(n^2) * */ public class LCS { private static int SubsequenceLength(int[] array_sequence) { int int_sequence_length = array_sequence.leng...
Markdown
UTF-8
262
2.90625
3
[]
no_license
# Image-Inversion Program to create new images that are photographic negatives (or inverted images) of selected images and save these new images with filenames that are related to the original images, such as adding “inverted-” in front of the old filename.
Java
UTF-8
589
2.125
2
[ "Apache-2.0" ]
permissive
package br.indie.fiscal4j.nfe310.transformers; import br.indie.fiscal4j.nfe310.classes.NFNotaInfoCombustivelTipo; import org.simpleframework.xml.transform.Transform; public class NFNotaInfoCombustivelTipoTransformer implements Transform<NFNotaInfoCombustivelTipo> { @Override public NFNotaInfoCombustivelTipo ...
C#
UTF-8
5,845
2.640625
3
[ "MIT" ]
permissive
using System.Collections; using System.Collections.Generic; using UnityEngine; public class AISteeringController : MonoBehaviour { public Agent agent; [Header("Steering Settings")] public float maxSpeed = 6.0f; public float maxForce = 10.0f; public float fleeSeekDist = 10.0f; [Header("List of...
C++
UTF-8
490
2.515625
3
[]
no_license
#pragma once #ifndef __DustParticleH__ #define __DustParticleH__ #include "ParticleBase.h" // Class is 16-bit aligned to allow use of SIMD member variables __declspec(align(16)) class DustParticle : public ALIGN16<DustParticle>, public ParticleBase { public: // Force the use of aligned allocators to distinguish b...
Java
UTF-8
2,009
2.671875
3
[]
no_license
package concurrency.java.wrappers.isg.jobs; import java.util.concurrent.Callable; import java.util.concurrent.atomic.AtomicLong; import concurrency.java.wrappers.isg.threads.JobListener; /** * * * @author EMAIL:vuquangtin@gmail.com , tel:0377443333 * @version 1.0.0 * @see <a * href="https://github.com/v...
JavaScript
UTF-8
401
3.75
4
[]
no_license
function randomize(array) { let randomDictionary = {}; let results = []; while (Object.keys(randomDictionary).length < array.length) { index = getRandomIndex(array.length); if (!randomDictionary[index]) { randomDictionary[index] = true; results.push(array[index]); } } return results; ...
Rust
UTF-8
385
2.609375
3
[ "BSD-3-Clause" ]
permissive
pub use url::Url as Uri; pub fn to_uri(uri_like: &str) -> Uri { let path = std::fs::canonicalize(uri_like).unwrap(); let mut path_str = path.as_path().to_str().unwrap().to_string(); if cfg!(windows) { path_str = path_str.split_off(4); path_str = path_str.replace('\\', "/"); } let uri_str = format!("...
PHP
UTF-8
1,216
2.78125
3
[ "MIT" ]
permissive
<?php namespace Dnetix\Redirection\Validators; use Dnetix\Redirection\Entities\Recurring; class RecurringValidator extends BaseValidator { const PERIOD_DAY = 'D'; const PERIOD_MONTH = 'M'; const PERIOD_YEAR = 'Y'; public static $PERIODS = [ self::PERIOD_DAY, self::PERIOD_MONTH, ...
Swift
UTF-8
1,662
2.625
3
[]
no_license
import UIKit class SideMenuTableView:UITableView { weak var menu:SideMenu? var items:[MenuItem]! init(menu:SideMenu,items:[MenuItem]) { super.init(frame: .zero, style: UITableView.Style.plain) self.items = items translatesAutoresizingMaskIntoConstraints = false ba...
Java
UTF-8
1,978
2.25
2
[]
no_license
package com.sc.mytown.dao; import java.util.List; import org.apache.ibatis.session.SqlSession; import com.sc.mytown.util.SqlSessionUtil; import com.sc.mytown.vo.AddHashTagVo; import com.sc.mytown.vo.HashTagVo; import com.sc.mytown.vo.SpotVo; public class AddHashTagsDAO { public static int inser...
Java
UTF-8
2,406
2.625
3
[]
no_license
package com.example.baselibrary.http; import android.content.Context; import java.util.HashMap; import java.util.Map; /** * 网络请求工具类 * Created by cherish * 实现链式调用的方法 */ public class HttpUtils { private static final int POST_TYPE = 0x0011; private static final int GET_TYPE = 0x0022; private static fi...
Python
UTF-8
4,891
3.09375
3
[ "MIT" ]
permissive
import pickle import os import numpy as np from sklearn.tree import DecisionTreeClassifier class AdaBoostClassifier: '''A simple AdaBoost Classifier.''' def __init__(self, weak_classifier, n_weakers_limit): '''Initialize AdaBoostClassifier Args: weak_classifier: The class of wea...
Java
UTF-8
5,854
2.578125
3
[]
no_license
import static java.util.Map.entry; import java.util.HashMap; import java.util.Map; public class grafixGlobs { static final Map<String, Integer> OBJ_TO_INDEX = Map.ofEntries(entry("arc", 0), entry("circle", 1), entry("polygon", 2)); static final int SIZE = OBJ_TO_INDEX.size(); public int[] execute(String[...
JavaScript
UTF-8
1,000
2.609375
3
[ "MIT" ]
permissive
let scanner = new Instascan.Scanner({ video: document.getElementById('qrscanner') }); scanner.addListener('scan', function (content) { var array = content.split("&"); array[0] = array[0].replace("npm=", ""); array[1] = array[1].replace("nama=", ""); array[2] = array[2].replace("kelas=", ""); array[3...
Markdown
UTF-8
4,232
3.609375
4
[]
no_license
--- title: for... in与for... of date: 2023-07-02T14:17:19.138Z size: 4153 --- - for...in用于可枚举数据,对象、数组、字符串 - for...of用户可迭代数据,数组、字符串、Map、etc - for...of为es6的特性,弥补for...in的不足 - for...in获取键名,for...of获取键值 ##### for...in缺点 - 数组的键名是数字,但是for...in循环是以字符串作为键名 - 会循环遍历对象的所有可枚举属性 - 某些情况下,for...in循环会乱序 ##### for...of优点 - 没有for.....
Markdown
UTF-8
2,639
2.90625
3
[]
no_license
# 静态购物商城 ## 实现功能和作业要求: - 完成电子商务网站页面(动态)(仿京东) 1. 主页部分 - `:hover`纯CSS导航菜单 - `float`瀑流商品布局 - ``js左侧伸缩菜单 - ``js图片自动切换 - `@media screen`以1190px为临界实现两种布局 2. 注册页面 - js部分表单验证 3. 登录页面 - 登录页面和注册页面基本一致,前面写特效耗时太多,这个页面就不做了。 4. 一些记录 - 字符超出元素长度以"..."结尾 ``` overflow:hidden; white-space: nowrap; text-overflow: elli...
Markdown
UTF-8
1,849
3.625
4
[]
no_license
# 문제 ## 삽입 정렬 만들기 * 내림차순이 되도록 코드 작성하기 # 예제 출력 124 112 87 55 17 9 6 5 3 1 # 접근방식 삽입 정렬은 하나의 값은 선택하고 자신 앞에 있는 값들과 하나씩 비교해나가면서 자리를 교환하는 정렬 방법이다. 첫 시작은 arr[1]부터 시작하는데, 먼저 arr[1]을 임시변수 temp에 저장한 후 이를 앞의 요소인 arr[0]의 값과 비교하여 더 크면 arr[0]의 원소를 arr[1]의 자리에 넣어준다. 즉, 앞의 원소를 뒤로 미뤄주게 된다. 그리고 기존의 arr[0]자리는 temp값으로 덮어 씌워주면 된다. ...
PHP
UTF-8
3,628
2.578125
3
[]
no_license
<?php namespace App\Http\Controllers; use App\Job; use Carbon\Carbon; use Illuminate\Http\Request; class JobController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $jobs = Job::all(); ...
Java
UTF-8
302
1.757813
2
[]
no_license
package com.finolweb.userapp.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import com.github.javafaker.Faker; @Configuration public class FakerBeanConfig { @Bean public Faker getFaker() { return new Faker(); } }
C
UTF-8
6,424
2.796875
3
[]
no_license
#include "Serial.h" #include <fcntl.h> #include <termios.h> #include <errno.h> #include <string.h> #include <unistd.h> #include <stdio.h> #include <linux/limits.h> /********************----- STRUCT: Serial -----********************/ struct Serial_t { int m_deviceHandle; }; /******************************************...
Python
UTF-8
145
2.984375
3
[]
no_license
a=list(map(int,input().replace('',' ').split()));i=0 while len(a)!=1: a=list(map(int,str(sum(a)).replace('',' ').split())) i+=1 print(i)
Go
UTF-8
2,022
2.78125
3
[]
no_license
package main import ( "fmt" "image" "image/color" "image/gif" "os" "github.com/husl-colors/husl-go" "github.com/kriskowal/bottle-world/sim" "github.com/kriskowal/bottle-world/viz" ) func newPalette() color.Palette { pal := make(color.Palette, 0) for h := 0; h < 16; h++ { for w := 0; w < 16; w++ { pal ...
Python
UTF-8
1,268
2.546875
3
[]
no_license
from task_manager.db import db from passlib.apps import custom_app_context as pwd_context from itsdangerous import (TimedJSONWebSignatureSerializer as Serializer, BadSignature, SignatureExpired) from config import Config class User(db.Model): __tablename__ = 'users' id = db.Column(db...
Java
UTF-8
2,679
2.71875
3
[]
no_license
package sk.tuke.kpi.oop.game.controllers; import org.jetbrains.annotations.NotNull; import sk.tuke.kpi.gamelib.Actor; import sk.tuke.kpi.gamelib.Input; import sk.tuke.kpi.gamelib.KeyboardListener; import sk.tuke.kpi.gamelib.Scene; import sk.tuke.kpi.oop.game.Keeper; import sk.tuke.kpi.oop.game.actions.Drop; import sk....
Java
UTF-8
655
3.28125
3
[]
no_license
package DoIt; import java.util.Scanner; public class Max3 { static int max4(int a, int b, int c, int d){ int max = a; if(b > a) max = b; if (c > b) max = c; if (d > c) max = d; return max; } public static void main(String[] args){ Scanner stdIn = new Scan...
Java
UTF-8
3,338
2.546875
3
[]
no_license
package com.ran.engine.factories.interpolation.curvecreators; import com.ran.engine.algebra.function.DoubleFunction; import com.ran.engine.algebra.matrix.DoubleMatrix; import com.ran.engine.algebra.vector.ThreeDoubleVector; import com.ran.engine.factories.interpolation.input.SimpleInputParameters; import com.ran.engin...
Markdown
UTF-8
6,832
2.9375
3
[]
no_license
# Bottom-CMS ## Install * npm install ## running in developer mode 1. npm run dev 2. you can test with "Advance Rest" for api. ## please change the bills module, this line: ![](./doc/bills.png) ## The symbolic model database ![](./doc/cms.jpg) ## Introduction FORMAT: 1A HOST: http://localhost:7000 ...
Java
UTF-8
249
1.585938
2
[]
no_license
/** * */ package org.herb.ui.pubsub; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JPanel; /** * @author herb * */ public class MyPanel extends JPanel { public MyPanel() { super(); } }
C++
UTF-8
366
3
3
[ "MIT" ]
permissive
https://www.interviewbit.com/problems/min-xor-value/ int Solution::findMinXor(vector<int> &A) { vector <int > arr(A) ; sort(arr.begin(), arr.end()); int minXor = INT_MAX; int val = 0; for (int i = 0; i < arr.size()- 1; i++) { val = arr[i] ^ arr[i + 1]; minXor = m...
TypeScript
UTF-8
1,726
2.6875
3
[]
no_license
import {Pipe, PipeTransform} from '@angular/core'; import {UnidadeMedidaEnum} from '../../../item/model/unidade-medida.enum'; import {TipoPipeUnidadeMedidaEnum} from '../../models/tipo-pipe-unidade-medida.enum'; @Pipe({ name: 'unidadeMedida' }) export class UnidadeMedidaPipe implements PipeTransform { /** * @p...
Java
UTF-8
9,994
2.609375
3
[]
no_license
package highway62.filefork; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.util.ArrayList; public class ContactDeviceDAO extends BaseDAO{ public ContactDeviceDAO(Context context) { super(co...
C#
UTF-8
3,428
2.53125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data.SqlClient; using System.Data; using System.Windows.Forms; namespace BUS { public class CTGD { public DataTable Show(string tenlop) { string sql = @"...
C++
UTF-8
954
2.609375
3
[]
no_license
#include<iostream.h> #include<stdiostr.h> #include<conio.h> #define size 5 int temp; int swap(int&a,int&b) {temp=a; a=b; b=temp; return (a,b);} struct stud { int rno; char name[10]; int marks; }stud[size]; int main() { clrscr(); for(int i=0;i<size;i++) { cout<<"Enter roll no :"; ...
C++
UTF-8
1,108
2.546875
3
[]
no_license
#include <SDL.h> #include "RenderEngine.h" #include "PhysicsEngine.h" const int windowWidth{1280}; const int windowHeight{720}; int main(int argc, char* argv[]) { RenderEngine render_engine {windowWidth, windowHeight}; PhysicsEngine physics_engine; physics_engine.g = {0, 1000}; PhysicalRect rect {{100, 100}, {...
JavaScript
UTF-8
4,418
2.953125
3
[]
no_license
import { buildChapter } from '../shared/build-chapter.js'; import { PhysicsBody } from '../shared/classes/physics-body.js'; import { Attractor } from '../shared/classes/attractor.js'; import { degToRad, random } from '../shared/utils.js'; const canvasWidth = 450; const canvasHeight = 500; const canvasBackground = 255;...
JavaScript
UTF-8
1,730
2.859375
3
[]
no_license
const Discord = require("discord.js"); const client = new Discord.Client(); require("dotenv").config(); // Notre préfixe de commande const prefixCmd = '!'; client.on("ready", () => { console.log("I'm ready !"); }); client.on("message", msg => { // Si le message n'est pas préfixé ou qu'il vient ...
C++
UTF-8
11,396
3.375
3
[]
no_license
#include "evote.h" // ELECTION ACTIONS void evote::create(name election_name) { // Only TSE can create an election require_auth(name("tse")); // Instantiate multi-index table aka: Get the first row // (1) Owner of table. (2) Account name hits contract deployed to // get_self() gets the name o...
C#
UTF-8
1,005
2.828125
3
[]
no_license
using System.Configuration; using Serilog; using Task4.BL.Enum; namespace Task4.BL.Logger { public static class LoggerFactory { public static ILogger GetLogger(LoggerType type) { switch (type) { case LoggerType.Console: { ...
Java
UTF-8
1,960
2.4375
2
[]
no_license
package com.springangular.application.SpringAngular.controller; import java.util.Optional; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBod...
C++
UTF-8
1,109
2.671875
3
[]
no_license
#include <iostream> #include <cstdlib> #include <cstdio> #include <memory> #include <gal/dll/helper.hpp> #include "myclass.hpp" using namespace std; //MyClass* (*create)(); //void (*destroy)(MyClass*); /* void load(void*& handle,char const * filename) { handle = dlopen(filename, RTLD_LAZY); if(handle == NULL)...
Java
UTF-8
984
1.804688
2
[]
no_license
package com.example.prana.openlibrary; import android.content.Intent; import android.net.Uri; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; public class Kddiarywimpy extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState)...
C
UTF-8
804
3.25
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<string.h> char *to_ascii(char *nul) { char *res = calloc(1,strlen(nul)*sizeof(char)); char *bis = res; int taille = strlen(nul); for(int i = 0 ; i < taille ; i++) { if (nul[i] == -30) { *res = (char)39; i+=2; res += 1; } else { *res = nul[i]...
Python
UTF-8
3,007
3.859375
4
[]
no_license
class Pose: def __init__(self, points): assert len(points) == 25, "Not enough points!" self.__points = points self.__nose = points[0] self.__neck = points[1] self.__right_shoulder = points[2] self.__right_elbow = points[3] self.__right_wrist = points[4] ...
Shell
UTF-8
1,324
3.671875
4
[]
no_license
#!/bin/bash CONFIRMED_LIST="" if [ "x$1" = "x--sites" ]; then shift while [ "x$1" != "x" ]; do CONFIRMED_LIST="$CONFIRMED_LIST $1" shift done else YES=$([ "x$1" = "x-y" ] || [ "x$1" == "x--yes" ] && echo "1" || echo "0") for i in $(./ls.sh); do if [ $YES == 1 ]; then ...
PHP
UTF-8
1,529
2.765625
3
[ "MIT" ]
permissive
<?php namespace App\Front\Forms; use Nette; use Nette\Application\UI\Form; class commentFormFactory extends Nette\Application\UI\Presenter { use Nette\SmartObject; /** @var FormFactory */ private $factory; private $database; private $user; private $productId; public function __construc...
Java
UTF-8
2,135
2.28125
2
[]
no_license
package com.example.myapplication.ui.fragment; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; import android.widget.TextView; import com.exampl...
C
UTF-8
4,762
2.796875
3
[]
no_license
/* * Threads.c * =========================== * Exercise 2 * =========================== * Name: Assaf Ben Yishay * =========================== */ #include "Threads.h" int LaunchThreadsAndWait(char* file_path, char* log_path) { HANDLE threads_handles[NUM_OF_TESTS]; LPTHREAD_START_ROUTINE t...
Python
UTF-8
1,475
2.78125
3
[ "MIT" ]
permissive
from random import randint from time import sleep from src.utils import init_clients, init_dht from sys import argv if __name__ == '__main__': try: try: flag_idx = argv.index("--clients") clients = int(argv[flag_idx + 1]) except: clients = 1 try:...
Java
UTF-8
958
2.875
3
[ "MIT" ]
permissive
package seedu.address.model.person; import static java.util.Objects.requireNonNull; //@@author liliwei25 /** * Represents a profile picture for Person */ public class ProfilePicture { private final String imageLocation; /** * Validates given location of image. */ public ProfilePicture(String...
C
UTF-8
2,202
3.015625
3
[]
no_license
#include "stdio.h" #include "stdlib.h" #include "string.h" #define MAX_PATTERN_LEN (1*1024*1024) #define MAX_GENOME_LEN (1*1024*1024) #define MAX_SYMBOLS (27) const char possibleSyms[4] = {'A', 'C', 'G', 'T'}; int main(int argc, char** argv) { char* pattern; char* genome; pattern = (char* )malloc(sizeof(...
C#
UTF-8
710
3.078125
3
[ "MIT" ]
permissive
namespace SixtyFiveOhTwo.Instructions.Encoding { public class ImmediateAddressInstructionEncoder : IInstructionEncoder { private readonly InstructionBase _instruction; private readonly byte _value; public ImmediateAddressInstructionEncoder(InstructionBase instruction, byte value) ...
Swift
UTF-8
1,324
2.9375
3
[]
no_license
// // ViewController.swift // customcell // // Created by Glen Jantz on 3/20/17. // Copyright © 2017 Glen Jantz. All rights reserved. // import UIKit class TableViewController: UITableViewController, CustomCellDelegate { var num = [0,2,3,4,5,6,7,8,9,10,11,12,13,14,15] var total = 0 @IBOutlet var tota...
Java
UTF-8
33,659
1.75
2
[]
no_license
package hok.chompzki.hivetera.client.gui; import hok.chompzki.hivetera.HiveteraMod; import hok.chompzki.hivetera.api.IArticle; import hok.chompzki.hivetera.registrys.ReserchRegistry; import hok.chompzki.hivetera.research.data.Chapeter; import hok.chompzki.hivetera.research.data.DataHelper; import hok.chompzki.h...
Python
UTF-8
781
3.203125
3
[]
no_license
import sys import time start_secs = time.time() # read in input file l1=[] my_file = open("inp.txt", "r") lines = my_file.readlines() for line in lines: l1.append(line.strip()) tmp = [None]*3 sa = 0 ribbon = 0 for i in range(0,len(l1)): arr = l1[i].split('x') l = int(arr[0]) w = int(arr[1]) h = ...
JavaScript
UTF-8
1,655
3.015625
3
[]
no_license
/** * @description : Component to create renderable input fields * @prop {String} : inputID, required * @prop {Number} : name, required * @prop {Number} : value, required */ import { Component, PropTypes } from "react"; class InputField extends Component { constructor(props, context){ ...
C
UTF-8
493
3.3125
3
[]
no_license
#include <stdio.h> #include <string.h> #include <stdlib.h> #include "alphabetical_printing.h" #define MAX_LENGTH_WORDS 50 int file_size(FILE *fp); char **read_words(FILE *fp){ char **array; int size = 0; int i = 0; int j = 0; size = file_size(fp); array = malloc(sizeof(char *) * size); for (i=0; i ...
Java
UTF-8
3,370
2.015625
2
[]
no_license
package com.lk.savsiri.domain; import com.google.gson.annotations.SerializedName; public class User { @SerializedName("nick_name") String name; @SerializedName("id") String userId; @SerializedName("email") String email; @SerializedName("status") String status; @SerializedName("role") String role; ...
Swift
UTF-8
7,407
2.53125
3
[]
no_license
// // PhotoLocations.swift // Virtual Tourist // // Created by Aldin Fajic on 8/17/15. // Copyright (c) 2015 Aldin Fajic. All rights reserved. // import Foundation import UIKit import CoreData struct PhotoLocations { // get phtos from flickr static func getLocations(latitude: String, longitude: Strin...
Java
UTF-8
541
1.523438
2
[]
no_license
package cn.xinyuan.blog.service.impl; import cn.xinyuan.blog.entity.BlogRecommend; import cn.xinyuan.blog.mapper.BlogRecommendMapper; import cn.xinyuan.blog.service.IBlogRecommendService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; /** * <p> * 推...
TypeScript
UTF-8
1,279
3.671875
4
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
import isPlainObject from 'lodash/isPlainObject' const SEPARATOR = '__' const _innerFnFlattenNested = (innerProperties: any, prefix: string): any => { return Object.keys(innerProperties).reduce((acc, key) => { // if the key's value is an object, recurse into it const nestedValue = innerProperties[key] i...
Ruby
UTF-8
896
2.546875
3
[ "BSD-3-Clause", "MIT" ]
permissive
#Creates the two database tables, plus indexes, you'll need to use A/Bingo. class AbingoMigration<%= version -%> < ActiveRecord::Migration def self.up create_table "experiments", :force => true do |t| t.string "test_name" t.string "status" t.timestamps end add_index "experiments", "tes...
Markdown
UTF-8
3,112
2.875
3
[]
no_license
## GPIO Stands for "General Purpose Input/Output." GPIO is a type of pin found on an integrated circuit that does not have a specific function. While most pins have a dedicated purpose, such as sending a signal to a certain component, the function of a GPIO pin is customizable and can be controlled by software. ## Con...
PHP
UTF-8
1,042
2.75
3
[]
no_license
<?php /** * @license see LICENSE */ namespace UForm\Form\Element\Primary\Input; use UForm\Form\Element\Primary\Input; /** * input checkbox * @semanticType input:checkbox */ class Check extends Input { protected $value; public function __construct($name, $value = null, $attributes = null, $validators...
Python
UTF-8
147
3.546875
4
[]
no_license
for i in range(0,21): print(i) for each in [1,2,3]: print("Each") #another loop for each in [1,2,3]: print(each) #this is another line
TypeScript
UTF-8
174
2.578125
3
[ "MIT" ]
permissive
export type Context = { filename: string; url: string; originalUrl: string; content: string | null; }; export type Processor = (input: Context) => Promise<Context>;
Java
UTF-8
4,287
2.515625
3
[]
no_license
package edu.ncsu.csc.itrust.server; import edu.ncsu.csc.itrust.action.EventLoggingAction; import edu.ncsu.csc.itrust.beans.ApptBean; import edu.ncsu.csc.itrust.beans.ReminderBean; import edu.ncsu.csc.itrust.dao.DAOFactory; import edu.ncsu.csc.itrust.dao.mysql.PersonnelDAO; import edu.ncsu.csc.itrust.dao.mysql.Reminder...
Java
UTF-8
2,214
2.53125
3
[ "Apache-2.0" ]
permissive
package net.mfinance.chatlib.view; import android.content.ClipboardManager; import android.content.Context; import android.text.Editable; import android.text.Spannable; import android.util.AttributeSet; import android.util.Log; import androidx.appcompat.widget.AppCompatEditText; import net.mfinance.chatlib.utils.Emo...
JavaScript
UTF-8
105
2.703125
3
[]
no_license
window.alert('This is an alert statement'); alert('Learning Javascript'); console.log('Jurassic World');
Markdown
UTF-8
3,362
3.203125
3
[]
no_license
# Brushing & Linking This example shows how to combine multiple views via [Brushing & Linking](https://en.wikipedia.org/wiki/Brushing_and_linking) in order to selectively visualise fish data queried via [FishBase](http://fishbase.org/). ## Usage Start the Cocoon editor from the root directory of this repository usin...
Java
UTF-8
5,074
2.390625
2
[]
no_license
package com.ssthouse.twopersonchat.lib.adapter; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import ...
C++
UTF-8
756
3.171875
3
[]
no_license
/** * @author Hansheng Zhang */ class Solution { public: string tables[8]={"abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"}; void dfs(vector<string> & result, int n, int i, string & digits, string cur){ string str = tables[digits.at(i)-'2']; int len = str.length(); for (int j=0; j<len; j++){ str...
Java
UTF-8
1,006
3.03125
3
[]
no_license
package Baidu; import Base.TreeNode; import java.util.ArrayList; import java.util.List; public class Solution113 { public List<List<Integer>> pathSum(TreeNode root, int targetSum) { List<List<Integer>> res = new ArrayList<>(); List<Integer> tmp = new ArrayList<>(); pathSum(res, tmp, root,...
Java
UTF-8
908
2.109375
2
[]
no_license
package com.example.springboot; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.DriverManagerDataSour...
Java
UTF-8
1,244
2.015625
2
[ "Apache-2.0" ]
permissive
package org.appfuse.web; import java.util.ArrayList; import java.util.Map; import javax.servlet.http.HttpServletResponse; import org.appfuse.service.UserManager; import org.jmock.Mock; import org.jmock.MockObjectTestCase; import org.springframework.mock.web.MockHttpServletRequest; import org.springframewo...
JavaScript
UTF-8
1,061
3
3
[]
no_license
var count = 0; function wave(){ if(count %2 == 0){ document.getElementById("droid").src="ic_launcher.png"; }else{ document.getElementById("droid").src="icon.png"; } count ++; } function show(jsondata){ //jsondata接收一个字符串 [{name:"xxx",amount:600,phone:"13988888"},{name:"bb",amount:2...
Java
WINDOWS-1252
2,133
2.09375
2
[]
no_license
package com.yl.domain; import java.util.Date; import java.util.Set; public class Person { private Integer id; private String password; private String sex; private String name; private Integer age; private String email; private Date dateLLastActived; private String photoName; private Integer postCount; priva...
Java
UTF-8
584
1.84375
2
[]
no_license
package com; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.cloud.netflix.feign.EnableFeignClients; /** * @author zzg * @Description ...
TypeScript
UTF-8
1,691
2.71875
3
[]
no_license
/* * File: WorkflowService.ts * Version: 1.0.0 * Date: Date: 2019-02-21 * Author: Stefano Zanatta * License: * * History: * Author || Date || Description * Stefano Zanatta || 2019-02-21 || Created file * Stefano Zanatta || 2019-02-24 || Implemented * Bianca Ciuche || 2019-02-2...
PHP
UTF-8
2,376
2.609375
3
[]
no_license
<?php // Début de la SESSION session_start(); // Inclusion des classes "lrs_management.php" et "lrs.php" require_once($_SERVER["DOCUMENT_ROOT"].'/lrs/src/model/lrs_manager.php'); require_once($_SERVER["DOCUMENT_ROOT"].'/lrs/src/model/lrs.php'); // Vérification pour savoir si le formulaire a bien été remplit if(empty($...
C++
UTF-8
1,200
3.15625
3
[]
no_license
// https://leetcode.com/problems/letter-combinations-of-a-phone-number/ class Solution { public: vector<string> res; unordered_map<int, string> mymap; void createMap() { mymap[2] = "abc"; mymap[3] = "def"; mymap[4] = "ghi"; mymap[5] = "jkl"; mymap[6] = "mno"; ...
Java
UTF-8
89
2.1875
2
[]
no_license
public interface Noeud { public abstract String toString(); public int getIdNoeud(); }
C++
UTF-8
326
2.75
3
[]
no_license
#include <iostream> #include <map> #include <string> using namespace std; int main() { int C; cin >> C; while (C--) { int N; cin >> N; map <string, int> mp; while (N--) { string a, b; cin >> a >> b; mp[b]++; } int res = 1; for (auto i : mp) res *= (i.second + 1); cout << res - 1 << "\n"...
Python
UTF-8
759
3.109375
3
[]
no_license
#------------------------------------------------------------------------------- # Name: module1 # Purpose: # # Author: anderson # # Created: 15/08/2017 # Copyright: (c) anderson 2017 # Licence: <your licence> #------------------------------------------------------------------------------...
Rust
UTF-8
2,647
2.71875
3
[]
no_license
use crate::types::text::Text; use serde::{Deserialize, Serialize}; #[derive(Debug, Deserialize, Serialize)] pub struct VersionStatus { /// String name of the current version, e.g. "1.15.2" name: String, /// Protocol number of the current version protocol: i32, } impl VersionStatus { pub fn new(nam...
PHP
UTF-8
3,260
2.671875
3
[]
no_license
<?php namespace App\Command; use App\Entity\Transaction; use App\Exception\ExporterNotFoundException; use App\Repository\TransactionRepository; use App\Adapter\TransactionAdapter; use App\Service\CurrencyConverter; use App\Service\Exporter\ExporterFactory; use App\Service\Exporter\ExporterInterface; use Symfony\Com...
Java
UTF-8
643
2.921875
3
[]
no_license
/** * */ package poj; /** * @author chenxi * */ import java.util.*; public class Main { static int max(int a,int b) { return a>b?a:b; } /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner s= new Scanner(System.in); int n,m; n =s.nextInt();m=...
Python
UTF-8
339
3.078125
3
[]
no_license
import math from trapezoid_module import * def f(x): return math.sqrt(x) * math.cos(x) * 3 / 2 Iold = 0.0 for k in range(1, 21): Inew = trapezoid(f, 0.0, math.pi, Iold, k) if (k > 1) and (abs(Inew - Iold)) < 1.0e-6 : break Iold = Inew print("Integral =", Inew) print("nPanels =", 2 ** (k - 1)) input("\nPre...
Go
UTF-8
408
2.671875
3
[]
no_license
package main import ( "fmt" "os" "github.com/nlopes/slack" ) func main() { token := os.Getenv("SLACK_API_TOKEN") if token == "" { fmt.Fprintf(os.Stderr, "SLAC_API_TOKEN is not found.\n") return } api := slack.New(token) teams, err := api.GetChannels(false) if err != nil { fmt.Printf("%s\n", err) re...
Markdown
UTF-8
617
2.953125
3
[]
no_license
# Project Name Here is my basic website design for a blog post. I detail designing a bedroom for my daughter. The brief was to design a basic webpage, including images. ## The problem My approach was to use a design board I had previously designed, to illustrate how I designed a bedroom for my 8-year old daughter. ...
PHP
UTF-8
3,325
3.390625
3
[]
no_license
<?php $dbServer = "mysql:3306"; $dbName = "Users"; $dbUName = "root"; $dbPassword = "docker"; // Open a connection to the database server $mysqli = new mysqli($dbServer, $dbUName, $dbPassword, $dbName); /* * This is the "official" OO way to do it, * BUT $connect_error was broken until PHP 5.2.9 and 5.3.0. */ if ($...
Ruby
UTF-8
1,123
2.796875
3
[ "BSD-3-Clause" ]
permissive
class BotDispatcher def initialize(chat, text, lang) @chat, @text, @lang = chat, text, lang I18n.locale = %w(pt ru).include?(@lang) ? @lang : 'en' end def process case @text when /\A\/((start)|(stop)|(commands))\z/i reply I18n.t @text[1..-1] when /\/t\b/, /\/т\b/, /\/traduzir/i, /\/tran...
Java
UTF-8
18,647
1.84375
2
[]
no_license
/* * An XML document type. * Localname: Medline-rn * Namespace: http://www.ncbi.nlm.nih.gov * Java type: gov.nih.nlm.ncbi.www.MedlineRnDocument * * Automatically generated - do not modify. */ package gov.nih.nlm.ncbi.www; /** * A document containing one Medline-rn(@http://www.ncbi.nlm.nih.gov) ele...
C#
UTF-8
2,230
3.359375
3
[]
no_license
namespace Labyrinth.Core.PlayField { using System; using Labyrinth.Core.Common; using Labyrinth.Core.Helpers.Contracts; using Labyrinth.Core.PlayField.Contracts; /// <summary> /// This class represents the game cell /// </summary> public class Cell : ICell, ICloneableCell { ...
PHP
UTF-8
1,436
3.09375
3
[ "MIT" ]
permissive
<?php namespace OwAPI; use GuzzleHttp\ClientInterface; use Psr\Http\Message\ResponseInterface; /** * Class Response * @package OwAPI */ class Response { private $body; private $rawResponse; private $request; private $status; private $success; /** * Response constructor. * @param...
Java
UTF-8
3,839
1.804688
2
[ "Apache-2.0", "LicenseRef-scancode-elastic-license-2018" ]
permissive
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this fi...
C++
UTF-8
1,660
3.359375
3
[]
no_license
#pragma once #define MATRIX_H #include <iostream> #include <Windows.h> #include <random> #include <ctime> class Matrix { private: int row; int col; int** matrix; public: //constructors and destructors Matrix() { matrix = NULL; row = 0; col = 0; } Matrix(const int size_row, const int size_col) { matr...
Java
UTF-8
548
2.09375
2
[]
no_license
package com.example.parita.pplview; /** * Created by parita on 18-02-2018. */ public class DataAdapter { String heading; public String getHeading(){return heading;} public void setHeading(String heading){this.heading=heading;} String comment; String useremail; public String get...
Java
UTF-8
188
1.664063
2
[]
no_license
package Exercicios.ExercicioFixacaoCap18.Services; public interface OnlineService { Double paymentTax (Double quantidade); Double paypalTax(Double quantidade, Integer date); }