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
JavaScript
UTF-8
3,065
2.71875
3
[ "MIT" ]
permissive
'use babel'; import { Point, TextEditor } from 'atom'; class GoToLineView { constructor() { this.miniEditor = new TextEditor({ mini: true }); this.miniEditor.element.addEventListener('blur', this.close.bind(this)); this.message = document.createElement('div'); this.message.classList.add('message');...
Java
UTF-8
1,736
2.65625
3
[]
no_license
package com.aoa.springwebservice.dto; import com.aoa.springwebservice.domain.Menu; import com.aoa.springwebservice.domain.Store; import java.io.Serializable; public class MenuDTO implements Serializable { protected String name; protected int price; protected String description; protected String imag...
JavaScript
UTF-8
601
2.828125
3
[]
no_license
function update_username() { var username = document.getElementById('username').value; var user_id = document.getElementById('user_id').innerHTML; var user = { username: username }; var xhttp = new XMLHttpRequest(); xhttp.open('PUT', '/user/' + user_id, true); xhttp.setRequestHeader('Content-Typ...
Java
UTF-8
863
2.578125
3
[]
no_license
package edu.pucmm; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; /** * Created by anyderre on 04/06/17. */ public class ConnectionDB { private final String url="jdbc:h2:./practica3db"; private final String username="sa"; private final String password=""; p...
Markdown
UTF-8
585
3.5625
4
[]
no_license
## 分而治之 ### 分而治之是什么? - 分而治之是算法设计中的一种方法。 - 它将一个问题分成多个和原问题相似的小问题,递归解决小问题,再将结果合并以解决原来的问题。 ### 场景一:归并排序 - 分: 把数组从中间一分为二。 - 解: 递归地对两个子数组进行归并排序。 - 合: 合并有序子数组。 ### 场景二:快速排序 - 分:选基准,按基准把数组分成两个子数组。 - 解:递归地两个子数组进行快速排序。 - 合:对两个子数组进行合并。
JavaScript
UTF-8
1,620
2.8125
3
[ "MIT" ]
permissive
import React, { Component } from "react"; import "./background.css"; import imageSources from './images.json'; let container = null; let images = imageSources let _images = [] let imgLoc = "" let index = 0 let screenWidth = 0 export class Background extends Component { componentDidMount() { screenWidth = windo...
Shell
UTF-8
1,354
3.796875
4
[ "ISC" ]
permissive
#!/bin/sh RED='\033[0;31m' GREEN='\033[0;32m' NC='\033[0m' # No Color okMsg="[${GREEN}OK${NC}]" errorMsg="[${RED}ERR${NC}]" for file in ./store/DEV/*; do input=$(echo "$file"| sed -E "s/\.\/store\/DEV\///g" | sed -E "s/\.\///g"); output=$(echo "$input" | sed -E "s/ DEV$//g"); echo ":: $input"; if $(markdown-pp...
C++
UTF-8
2,624
2.609375
3
[ "Artistic-2.0", "MIT" ]
permissive
/* * Copyright (c) 2003-2023 Rony Shapiro <ronys@pwsafe.org>. * All rights reserved. Use of the code is allowed under the * Artistic License 2.0 terms, as specified in the LICENSE file * distributed with this code, or available from * http://www.opensource.org/licenses/artistic-license-2.0.php */ /** * \file Linux-sp...
PHP
UTF-8
12,493
2.78125
3
[]
no_license
<?php class Exposicion_model extends CI_Model { public $NOMBRE_TABLA = "exposicion"; private $sql; public function __construct() { parent::__construct(); $this->load->database(); $this->sql = "SELECT *, year(fecha_inicio) 'ano', ( SELECT 1 + (-0.1*(TRUNCATE((DATEDIFF(CURDATE(), fecha_inicio) /365),0) )) )...
Java
UTF-8
91,234
2.1875
2
[ "Apache-2.0" ]
permissive
package io.reactiverse.pgclient; import io.reactiverse.pgclient.data.Interval; import io.reactiverse.pgclient.data.Json; import io.reactiverse.pgclient.data.Numeric; import io.reactiverse.pgclient.data.Point; import io.vertx.core.buffer.Buffer; import io.vertx.core.json.JsonArray; import io.vertx.core.json.JsonObject;...
Java
UTF-8
4,007
2.375
2
[]
no_license
package dev.brighten.example.commands; import cc.funkemunky.api.Atlas; import cc.funkemunky.api.commands.ancmd.Command; import cc.funkemunky.api.commands.ancmd.CommandAdapter; import cc.funkemunky.api.utils.Color; import cc.funkemunky.api.utils.Init; import cc.funkemunky.api.utils.MiscUtils; import cc.funkemunky.api.u...
Ruby
UTF-8
424
2.703125
3
[]
no_license
require './lib/enigma' require 'date' require './lib/generator' require './lib/abc_index' enigma = Enigma.new handle = File.open(ARGV[0], "r") incoming_text = handle.read handle.close decrypted_text = enigma.decrypt(incoming_text, ARGV[2], ARGV[3]) writer = File.open(ARGV[1], "w") writer.write(decrypted_text[:encrypti...
JavaScript
UTF-8
1,484
2.59375
3
[ "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-ecma-no-patent" ]
permissive
// Copyright (C) 2016 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- esid: sec-%typedarray%.prototype.slice description: Preservation of bit-level encoding info: | [...] 15. Else if count > 0, then [...] e. NOTE: If srcType and t...
Python
UTF-8
1,191
3.859375
4
[]
no_license
import string def invert_text(text_tobe_inverted): inverted_text = text_tobe_inverted[::-1] return inverted_text def remove_punctuations(text_tobe_stripped): removed_punct = text_tobe_stripped.translate(string.maketrans("",""), string.punctuation) return removed_punct def chec...
Python
UTF-8
569
2.71875
3
[]
no_license
import sys import MySQLdb as mysql def main(): # create a connection object connection = mysql.connect(host="localhost", user="root", passwd="123456", db="menu") # create a cursor object cursor = connection.cur...
Shell
UTF-8
1,572
3.390625
3
[]
no_license
#!/bin/bash # Exit on any failure set -e # Check for uninitialized variables set -o nounset ctrlc() { killall -9 python mn -c exit } trap ctrlc SIGINT start=`date` exptid=`date +%b%d-%H:%M` rootdir=ddos-$exptid iperf=/usr/bin/iperf rm -f last ln -s $rootdir last ./http/generator.py --dir ./http/Random_objects...
JavaScript
UTF-8
1,401
3.453125
3
[ "Apache-2.0" ]
permissive
(function() { "use strict"; function insert(element, array, compare) { array.splice(locationOf(element, array, compare) + 1, 0, element); return array; } // performs binary search in a sorted array function locationOf(element, array, compare, start, end) { if (array.length === 0) return -1; start = ...
JavaScript
UTF-8
2,168
2.546875
3
[]
no_license
import { createAction, createReducer } from 'redux-act'; const REDUCER = 'app'; const NS = `@@${REDUCER}/`; export const setUserState = createAction(`${NS}SET_USER_STATE`); export const addSubmitForm = createAction(`${NS}ADD_SUBMIT_FORM`); export const deleteSubmitForm = createAction(`${NS}DELETE_SUBMIT_FORM`); expor...
C++
UTF-8
2,960
3.28125
3
[]
no_license
Password (20) To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish 1 (one) from l (L in lowercase), 0 (zero) from O (o in uppercase). One solution is to replace 1 (one) by @, 0 (ze...
Java
UTF-8
6,699
1.773438
2
[ "BSD-3-Clause" ]
permissive
/* * Copyright (C) 2017, Rockwell Collins * All rights reserved. * * This software may be modified and distributed under the terms * of the 3-clause BSD license. See the LICENSE file for details. * */ package fuzzm.lustre.evaluation; import java.util.List; import fuzzm.poly.PolyBool; import fuzzm.util.Debug...
Markdown
UTF-8
1,678
3.21875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
# React : Design Patterns Ce dossier Repository est lié au cours React : Design Patterns. Le cours est accessible sur [LinkedIn Learning](https://www.linkedin.com/learning/react-design-patterns-10416007). Dans cette formation qui s'adresse aux développeurs d'application web, vous découvrirez l'usage des design patter...
Java
UTF-8
4,259
1.914063
2
[]
no_license
package com.eposapp.service.impl; import com.eposapp.common.constant.JsonConstans; import com.eposapp.common.constant.ResponseCodeConstans; import com.eposapp.common.constant.SysConstants; import com.eposapp.common.util.EntityUtil; import com.eposapp.common.util.JsonResult; import com.eposapp.common.util.StringUtils...
C++
UTF-8
8,600
2.75
3
[ "MIT" ]
permissive
// CIX C++ library // Copyright (c) Jean-Charles Lefebvre // SPDX-License-Identifier: MIT namespace cix { namespace path { template <typename Char> inline constexpr bool is_sep(Char c) noexcept { #ifdef _WIN32 return c == win_sep<Char> || c == unix_sep<Char>; #else return c == unix_sep<Char> |...
Python
UTF-8
3,576
2.90625
3
[]
no_license
import os import re from collections import namedtuple Service = namedtuple('Service', ['number', 'status', 'transport_protocol', 'application_protocol']) Host = namedtuple('Host', ['addr', 'hostname', 'status', 'services']) HOST_WITH_SERVICES = re.compile(r'Host:\s\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s\(.*\)\sPorts\:...
Java
UTF-8
584
2.203125
2
[]
no_license
package Test; import java.sql.Connection; import java.sql.SQLException; import Connection.OracleConnection; import Domain.BankAccountException; public class A_TestConnection { public static void main(String[] args) { try { OracleConnection oracon = new OracleConnection(); oracon.open(); Connection co...
Java
UTF-8
4,993
2.125
2
[]
no_license
package com.tsp3.stashcards; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; impor...
PHP
UTF-8
969
2.5625
3
[]
no_license
<?php /* * 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. */ /** * Description of Serie * * @author Fernando */ class Zend_View_Helper_Serie extends Zend_View_Helper_Abstract { ...
Markdown
UTF-8
2,022
2.546875
3
[]
no_license
# uqueue ### Created by Shawn Fotsch and John Rocha ##Screenshots ![screen1](screenshots/playlists.png) ![screen2](screenshots/player.png) ![screen3](screenshots/queue.png) ![screen4](screenshots/broadcasted.png) ##Proof of Concept We originally intended to use Spotify's iOS API to take care of all of th...
Python
UTF-8
9,897
2.578125
3
[]
no_license
import django import os import time,statistics os.environ['DJANGO_SETTINGS_MODULE'] = 'helloword.settings' django.setup() class TimeTestTool: # 计算函数运行的时间 @classmethod def calc_func_time(cls, func): start = time.perf_counter() func() end = time.perf_counter() return end - star...
Java
UTF-8
3,635
2.390625
2
[]
no_license
package com.lin.controller.user; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpSession; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui...
Java
UTF-8
3,392
2.171875
2
[ "Apache-2.0" ]
permissive
package com.asus.robotdevsample; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; import com.asus.robotframework.API.RobotCallback; import com.asus.r...
TypeScript
UTF-8
1,105
2.515625
3
[ "MIT" ]
permissive
import {Component} from '@angular/core'; import {FormGroup, FormControl, FormArray, Validators} from '@angular/forms'; @Component({ moduleId: module.id, selector: 'data-driven', templateUrl: './data-driven.component.html' }) export class DataDrivenComponent{ f: FormGroup; constructor(){ th...
Java
UTF-8
8,820
1.945313
2
[]
no_license
package org.techtown.menu_app; import android.app.AlarmManager; import android.app.Notification; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.wid...
Java
UTF-8
1,109
3.578125
4
[]
no_license
public class SingliLinkedListObjects { Node head; // basic structure of the list public SingliLinkedListObjects(Student newEntry){ head = new Node(); head.std = newEntry; head.link = null; } public void addSingliLinkedListObjectsBeforeHead(Student newEntry){ Node n = new Node(); n.std = newEntry; n.lin...
Java
UTF-8
396
2.078125
2
[]
no_license
package com.project.apptruistic.persistence.repository; import com.project.apptruistic.persistence.domain.Volunteer; import org.springframework.data.mongodb.repository.MongoRepository; import java.util.Optional; public interface VolunteerRepository extends MongoRepository<Volunteer, String> { Optional<Volunteer...
Python
UTF-8
672
3.25
3
[]
no_license
# 쉽고 빠르게 배우는 파이썬 GUI 프로그래밍(2020.12) # 1 차시 : 파이썬 GUI Programming & widget import tkinter as tk win = tk.Tk() ent1 = tk.Entry(win, relief='ridge', borderwidth=3, highlightcolor='red', highlightthickness=3, highlightbackground='yellow', ...
C++
UTF-8
6,376
2.515625
3
[]
no_license
#include <zlib.h> #include "tools/zlib/Worker.hpp" namespace Tools { namespace Zlib { namespace { inline unsigned int _Min(unsigned int a, unsigned int b) { if (a < b) return a; return b; } } Worker::Worker(int compressionLevel) { ...
Java
UTF-8
1,892
4.25
4
[]
no_license
package com.tts; import java.util.ArrayList; import java.util.Scanner; import java.util.List; import java.util.ArrayList; import java.util.Collections; public class Numbers { public static void main(String[] args) { Scanner userInput = new Scanner(System.in); //Asking the user for 5 numbers and s...
Java
UTF-8
5,379
2.046875
2
[]
no_license
package com.sblm.bean; public class Columna { private String rep_ordentotal; private String rep_ordenxdistrito; private String rep_clave; private String rep_direccion; private String rep_numero; private String rep_mazlote; private String rep_stand; private String rep_uso; private String rep_distrit...
Rust
UTF-8
5,794
2.765625
3
[]
no_license
#![allow(dead_code)] use std::fs::File; use std::io::BufWriter; use std::path::Path; use png::HasParameters; use rand::prelude::*; mod camera; mod geometry; mod material; mod ray; mod vec3; use crate::camera::Camera; use crate::geometry::{HitInfo, Hitable, Sphere}; use crate::material::Material::*; use crate::ray::...
C++
UTF-8
673
3.109375
3
[]
no_license
class Solution { public: bool stoneGame(vector<int> &piles) { // return func1(piles); return func2(piles); } // ** greedy algorithm // ** wrong case: 3 2 10 4 bool func1(vector<int> &piles) { int alex = 0; int lee = 0; int i = 0, j = piles.size() - 1; while (i < j) { if (piles[i]...
C#
UTF-8
6,379
2.671875
3
[ "MIT" ]
permissive
using Bottleships.Logic; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; namespace Bottleships.Communication { public class Client { private string _serverUrl; private...
Java
UTF-8
6,362
1.679688
2
[ "Apache-2.0" ]
permissive
// // Copyright 2011 EXANPE <exanpe@gmail.com> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ...
Java
UTF-8
906
2.0625
2
[]
no_license
package com.foxconn.service.impl.trafficcosts; import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.foxconn.dao.trafficcosts.TrafficCostsDao; import com.foxconn.pojo.trafficcosts.TrafficCosts; import com.foxconn.service.trafficcosts.TrafficCostsService; @...
Markdown
UTF-8
1,286
2.71875
3
[ "MIT" ]
permissive
# Financial Portfolio Manager This is a code repository for the capstone project for COMP3900 (Computer Science Project) by our team HRDM. ## Getting Started These instructions will get you a copy of the project up and running on your local machine for development/testing/viewing purposes. ### Prerequisites * Node.js...
Python
UTF-8
526
3.21875
3
[]
no_license
''' Created on 6 Apr 2018 @author: Robert ''' class files: def __init__(self, value): self._v = value print("constructor") def move(self): print('move data', self._v) def copy(self): print("copy data", self._v) def delete(self): print("delete ...
Java
UTF-8
853
2.515625
3
[]
no_license
package tranditional.strategy.company.business; import tranditional.bean.business.JavaDevDirEnum; import java.util.HashMap; import java.util.Map; public class StrategyCreator { final static Map<JavaDevDirEnum.ReportType,IGetDataServiceStrategy> reportServiceMap = new HashMap<>(); static { reportServ...
Python
UTF-8
398
2.578125
3
[]
no_license
#!/usr/bin/python import RPi.GPIO as GPIO import time def init_gpio(): # Set pin 4 to low GPIO.setmode(GPIO.BCM) GPIO.setup(4, GPIO.OUT) GPIO.output(4, GPIO.HIGH) def gate_toggle(): # time to sleep between operations in the main loop GPIO.output(4, GPIO.LOW) time.sleep(1)...
Markdown
UTF-8
987
3.78125
4
[]
no_license
magine that you have an array of 3 integers each representing a different person. Each number can be 0, 1, or 2 which represents the number of hands that person holds up. Now imagine there is a sequence which follows these rules: None of the people have their arms raised at first Firstly, a person raises 1 ha...
C++
UTF-8
936
3.078125
3
[]
no_license
// // Created by optimus on 19/2/18. // # include <iostream> #include <vector> using namespace std; int main (){ int n ; cin >> n ; while ( n --){ string s; cin >> s; int size = s.size() - 4; int count = 0; for ( int i = 0; i < size; i ++){ if ( ...
JavaScript
UTF-8
2,796
3.203125
3
[]
no_license
// Date comparation export const isSooner = (d1, d2) => { var arr1 = d1.split("-").map((item) => parseInt(item)); var arr2 = d2.split("-").map((item) => parseInt(item)); if (arr1[2] === arr2[2]) { if (arr1[1] === arr2[1]) { return arr2[0] - arr1[0]; } return arr2[1] - arr1[1]; } return arr2[...
C++
UTF-8
449
2.8125
3
[]
no_license
#ifndef BARBOT_SPEECHSYNTHESIS_H #define BARBOT_SPEECHSYNTHESIS_H #include <iostream> /** * Uses Google Speech and an sh script to synthesise speech */ class SpeechSynthesis { public: static const std::string TAG; /** * Excecutes a bash script that pronounces the text given as parameter. * @param...
JavaScript
UTF-8
5,980
3.15625
3
[]
no_license
window.onload = function() { game.init(); } var game = { /** * @parmas {string} canvasId canvas 画布 id * @parmas {Number} canvasWidth 、canvasHeight canvas画布 宽 、高 * @parmas {Object} context 绘制上下文环境 * @parmas {Number} frameWidth 边框宽度 * @parmas {String} frameColor 边框颜色 * @parmas {Stri...
C++
UTF-8
395
3.28125
3
[]
no_license
/* * Task #1: * Write a program in CPP to convert the distance in meters entered by the user into * distance in feet and inch using the concept of basic to user defined data conversion. */ #include "Distance.hpp" int main(){ Distance *distance = new Distance; distance->getDistance(); distance->conve...
C
UTF-8
1,632
3.03125
3
[]
no_license
#ifndef SUCCESSORS_QUEUE_H #define SUCCESSORS_QUEUE_H struct successors_cell { //each cell contains a word, it's number of occurence and a pointer toward a standard queue containing it's successors and their number of occureces (attribute "was_read_by_statistician") char word[MAX_WORD_LENGTH+1]; int nb_of_oc...
Java
UTF-8
299
2.34375
2
[]
no_license
package com.jutem.sort; import java.util.Arrays; import org.junit.Test; public class KSortTest { @Test public void SortIncrease(){ KSort.SortIncreaseInsertion(numbers, 3); System.out.println(Arrays.toString(numbers)); } private int[] numbers={3,5,6,3,1,4,7,8,2}; }
TypeScript
UTF-8
1,346
3.15625
3
[]
no_license
export interface IMessage { text: string; authorID: number; recipientID: number; timestamp: number; isRead: boolean; } export class Message { static parse(proto: IMessage): Message { return new Message( proto.text, proto.authorID, proto.recipientID, proto.timestamp, proto....
C++
UTF-8
1,278
3.625
4
[]
no_license
#include <bits/stdc++.h> #define N 10 using namespace std; class Stack{ int top; public: int a[N]; Stack(){ top=-1; } //push function bool push(int x) { if (top>=(N-1)) { cout<<"Stack Overflow"; return false; } else { a[top++]=x; return true; } }...
Python
UTF-8
383
3.171875
3
[]
no_license
# -*- coding: utf-8 -*- # -*- coding in this time : utf-8 -*- """ Created on Sat Oct 05 03:36:04 2019 @author: Ajm joha """ days =int(input("Enter days: ")) years = days/365 #weeks = (days -(years * 365)) /7 weeks = int((days % 365) /7) #day = days - ((years * 365) + (weeks * 7)) day = (days % 365) % 7 print(days,"da...
Markdown
UTF-8
21,898
2.640625
3
[ "CC-BY-4.0", "MIT", "CC-BY-3.0" ]
permissive
<properties pageTitle="Partizione tabelle SQL Data Warehouse | Microsoft Azure" description="Guida introduttiva partizione della tabella Data warehouse di SQL Azure." services="sql-data-warehouse" documentationCenter="NA" authors="jrowlandjones" manager="barbkess" editor=""/> <tags ms.service="...
Java
UTF-8
1,070
2.3125
2
[]
no_license
package com.example.user.mcalc; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.TextView; public class EntryForm extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) ...
SQL
UTF-8
261
3.046875
3
[]
no_license
DROP TABLE IF EXISTS collaborators CASCADE; CREATE TABLE collaborators ( id serial PRIMARY KEY NOT NULL, map_id integer REFERENCES maps(id) NOT NULL, user_id integer REFERENCES users(id) NOT NULL, active boolean NOT NULL, unique (map_id, user_id) );
Markdown
UTF-8
2,605
2.703125
3
[]
no_license
<!-- Title: Saving cows with the help of Lord Krishna, Gunny Sacks and Potassium permanganate! Culture Jam #01 Scripts: - //s.imgur.com/min/embed.js --> <!-- > <i>This is a part of "[These are Our Cows](/?p=ourcows)" initiative.</i> An effort to improve the quality of life for abandoned cows and bulls in India. --...
PHP
UTF-8
733
2.703125
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder { /** * Seed the application's database. * * @return void */ public function run() { /** * Vaciando tabla antes de llenarla de nuevo */ $this->truncateTables([ 'citie...
Java
UTF-8
1,843
2.25
2
[]
no_license
package ucll.project.ui.controller; import ucll.project.domain.model.Lector; import ucll.project.domain.model.Lesson; import ucll.project.domain.model.Rol; import ucll.project.domain.service.ApplicationService; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.ut...
Python
UTF-8
2,075
3.21875
3
[]
no_license
"""Lab 1. Approximation of reachable set. Considered model is x'(t) = A(t)*x(t) + C(t)u(t). t belongs to [t0, t1] x(t0) belongs to start set M0, which is ellipsoid u(t) - control function, which belongs to U(t) which is also ellipsoid for any non-negative t """ import numpy as np from approximation import solve ...
Java
UTF-8
396
1.632813
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 ctig; import placedata.ReligionID; /** * Class used for picking religious affiliation * @author RollerSimmer */ public cl...
Rust
UTF-8
19,972
2.875
3
[ "BSD-3-Clause", "MIT", "Apache-2.0" ]
permissive
use super::Timed; use crate::event::EventHandler; #[cfg(test)] use crate::test_utilities::{DummyEventHandler, TestPlugin}; use crate::ContextualAudioRenderer; use std::cmp::Ordering; use std::collections::VecDeque; use std::ops::{Deref, Index, IndexMut}; use vecstorage::{VecGuard, VecStorage}; pub struct EventQueue<T>...
JavaScript
UTF-8
1,598
2.625
3
[]
no_license
const express = require('express') const mongoose = require('mongoose') const app = express() app.use(express.json()) mongoose.connect('mongodb://localhost:27018/empDB', { useNewUrlParser: true }) .then(() => { console.log('Connected to DB...') }) .catch(err => { console.error(`Error: ${err}`) }) const Emplo...
Python
UTF-8
1,211
4.40625
4
[]
no_license
''' leetcode 225 Implement a last in first out (LIFO) stack using only two queues. The implemented stack should support all the functions of a normal queue (push, top, pop, and empty). Implement the MyStack class: void push(int x) Pushes element x to the top of the stack. int pop() Removes the element on the top of ...
C++
UTF-8
2,737
2.515625
3
[]
no_license
#include "buffer.h" #include <glt/zplane.h> #include <glt/error.h> //////////////////////////////////////////////// CsgDepthBufferHelper::CsgDepthBufferHelper(const bool useCopy) : _useCopy(useCopy), _viewport(true), _buffer(NULL) { if (_useCopy) glViewport(0,0,_viewport.width()>>1,_viewport.height()); }...
C#
UTF-8
1,878
2.5625
3
[]
no_license
using DataBaseConnector; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace win_database { public partial class frmUpdat : Form { ...
C++
UTF-8
1,466
2.75
3
[]
no_license
#include <bits/stdc++.h> using namespace std; struct Node { int conn[10003]; uint32_t weight; }; int N_EDGE; int N_NODE; Node NODES[10003]; bool CHECKED[10003]; uint32_t min_weight = -1; uint32_t min_weight_node = -1; int dfs(int i, int prev = -1) { CHECKED[i] = 1; int cc = 1; uint32_t weight = ...
Java
UTF-8
882
2
2
[]
no_license
package com.checkpoint.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.s...
Markdown
UTF-8
475
2.59375
3
[ "CC0-1.0" ]
permissive
# Contribution Guidelines Ensure your pull request adheres to the following guidelines: - Search included books before adding a new one, as yours may be a duplicate. - Every workflow addition should follow the same format. 1. The book should be put into its appropriate category (Pick the one you think is closest if yo...
Java
UTF-8
5,214
3.671875
4
[]
no_license
import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.BasicStroke; import java.awt.Dimension; import java.awt.Point; import java.awt.Color; import javax.swing.JFrame; import java.util.Collection; import java.util.ArrayList; // Aplicação do padrão Decorator. // Interface comum a todos os Shapes inte...
Java
UTF-8
1,534
2.546875
3
[]
no_license
package com.eclipsekingdom.warpmagic.sys.config; import com.eclipsekingdom.warpmagic.WarpMagic; import com.google.common.collect.ImmutableList; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; public class ConfigLoader { private static final String pluginF...
Java
UTF-8
2,078
2.421875
2
[]
no_license
package com.example.recorder; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import j...
Java
UTF-8
1,449
2.203125
2
[]
no_license
package com.example.colombo_life.model; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.EntityListeners; import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToOne; import javax.persistence.Table; impo...
Markdown
UTF-8
851
3.296875
3
[ "MIT" ]
permissive
## AWS Secrets Manager This Python example shows you how to retrieve the decrypted secret value from an AWS Secrets Manager secret. The secret could be created using either the Secrets Manager console or the CLI/SDK. The code uses the AWS SDK for Python to retrieve a decrypted secret value. # Prerequisite tasks To ...
Shell
UTF-8
322
2.5625
3
[ "MIT" ]
permissive
#!/usr/bin/env bash set -eo pipefail SELFDIR=$(dirname "$0") SELFDIR=$(cd "$SELFDIR" && pwd) PASSENGER_ROOT=$(cd "$SELFDIR/../../.." && pwd) # shellcheck source=../lib/functions.sh source "$SELFDIR/../lib/functions.sh" # shellcheck source=../lib/setup-container.sh source "$PASSENGER_ROOT/dev/ci/lib/setup-container.sh...
Ruby
UTF-8
65
2.5625
3
[]
no_license
class Dice def self.roll(side) rand(side) + 1 end end
Java
UTF-8
2,543
2.21875
2
[ "MIT" ]
permissive
package com.godcheese.nimrod.user.mapper; import com.godcheese.nimrod.user.entity.UserEntity; import com.godcheese.tile.mybatis.CrudMapper; import com.github.pagehelper.Page; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Component; impor...
Python
UTF-8
4,930
2.609375
3
[ "BSD-3-Clause" ]
permissive
#!/usr/bin/env python # Copyright 2014 The 'mumble-releng' Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that # can be found in the LICENSE file in the source tree or at # <http://mumble.info/mumble-releng/LICENSE>. # This script returns the Mumble version string for a Mumb...
Python
UTF-8
939
3.078125
3
[]
no_license
import sys from PyQt5.QtWidgets import * class Window(QWidget): def __init__(self): super().__init__() self.setWindowTitle("PyQt_01") self.setGeometry(50,50,350,350) self.UI() def UI(self): # all your code is here : self.lbl = QLabel("My Text",self) ...
Java
UTF-8
1,473
1.875
2
[]
no_license
package com.petro.span.client.application.header; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.uibinder.client.UiHandler; import com.google.gwt.user.client.Window; import com.google.gwt.user.clie...
JavaScript
UTF-8
237
3.828125
4
[ "MIT" ]
permissive
/* Smallest difference pair of values between two unsorted Arrays */ function smallest_difference(arrayOne, arrayTwo) { } console.log(`Smallest Difference Pair: ${smallest_difference([-1, 5, 10, 20, 28, 3], [26, 134, 135, 15, 17])}`);
C#
UTF-8
9,666
3
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; /* * This code handles the spawning of new rooms from room points. Room points exist on the outside of * doorways. The code is also a source of dynamic programming, as there exist certain rooms for which * it does not make sense to spaw...
C++
UTF-8
2,208
2.671875
3
[]
no_license
/************************************************************************* File Name: SPOJ_ORDERSET.cpp ID: obsoles1 PROG: LANG: C++ Mail: 384099319@qq.com Created Time: 2015年08月07日 星期五 09时33分02秒 ************************************************************************/ #include<cstdio>...
Markdown
UTF-8
2,262
3.15625
3
[ "MIT" ]
permissive
# Cypress testing vs selenium ### Cypress Testing : Cypress is a purely a javascript based frontend testing tool used for morden web.it can be useful for both developers and QAs, but it is more developer friendly tool because for web development mainly javascript is used and cypress is also a javascript based tool usi...
Java
UTF-8
341
3.078125
3
[]
no_license
class Solution { public int removeElement(int[] nums, int val) { int read = 0; int write = 0; while (read < nums.length) { if (nums[read] == val) { read++; } else { nums[write++] = nums[read++]; } } ...
C++
UTF-8
804
3.421875
3
[]
no_license
#include "order.h" Order::Order(std::string email) : _email{email} { } std::string Order::email() {return _email;} double Order::cost() { double sum; for (auto& po : _products) sum += po.cost(); return sum; } void Order::add_product_order(Product_order po) { _products.push_back(po); } int Order::num_pr...
Java
UTF-8
311
2.84375
3
[]
no_license
/** * Player class * @author Johnathan Poeschel * @version 1.0, 25 Nov 2019 */ public abstract class Player { /** * makeMove method, must be defined for each player * @param board game board to vaildate move * @return int for spot to move in */ public int makeMove(Board board){return 0;}...
Java
UTF-8
10,460
2.203125
2
[]
no_license
package com.eparking.informationPush.entity.system; public class RouteInfo { /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column route_info.id * * @mbg.generated */ private Integer id; /** * * This field was generat...
Java
UTF-8
448
1.851563
2
[]
no_license
package com.octopus.Practice.dao.dto; import lombok.Data; import lombok.Getter; import lombok.Setter; import lombok.experimental.Accessors; import java.util.Date; @Data @Accessors(chain = true) public class PostDto { @Getter @Setter private int id; private String title; private St...
C++
UTF-8
251
2.515625
3
[ "MIT" ]
permissive
#include "model/ChessPiece.h" ChessPiece::ChessPiece(const common::ChessPieceColor& color, const common::ChessPieceType& type) : m_color(color) , m_type(type) {} ChessPiece::~ChessPiece() { printf("Destructor called for Chess Piece\n"); }
C++
UTF-8
2,192
3
3
[]
no_license
#include "Dollar.h" #include "../../Renderer/Image.h" #include "../../Utilities/Rect.h" #include "../Sprite.h" #include "../../Utilities/Time.h" #include <iostream> const float Dollar::ANIM_RATE = 0.4f; const int Dollar::NUM_SPRITES = 6; Sprite** Dollar::dollarSprites = nullptr; Dollar::Dollar(int x, int y) : Entit...
C++
UTF-8
325
2.578125
3
[]
no_license
Node *func(int pre[],char arr[],int &id,int n) { if(id >=n) return NULL; Node *root=new Node(pre[id]); id++; if(arr[id-1]=='L') return root; root->left=func(pre,arr,id,n); root->right=func(pre,arr,id,n); } struct Node *constructTree(int n, int pre[], char arr[]) { // Code here int id=0; return func(pre,arr,id,n...
Ruby
UTF-8
542
3.6875
4
[]
no_license
def bubble_sort(v) n = 1 while n < v.length i = 0 until i == v.length-n if v[i] > v[i+1] v[i], v[i+1] = v[i+1], v[i] end i += 1 end n += 1 end puts v.join(', ') end bubble_sort([4,3,78,2,0,2]) def bubble_sort_by(v) n = 1 while n < v.length i = 0 until i == v.length-n if (yield v...
Python
UTF-8
11,398
2.90625
3
[]
no_license
from docx import Document from docx.styles.style import _ParagraphStyle from docx.styles.style import _TableStyle import logging import os from collections import OrderedDict class WordWriter: """Microsoft Word specification writer for prpl HL-API. It generates a new word file document for the p...