language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
Markdown
UTF-8
2,623
2.859375
3
[ "BSD-3-Clause", "CC-BY-3.0" ]
permissive
--- title: Free Flutter course from the App Brewery title: 来自 App Brewery 提供的免费 Flutter 教程 description: Link for registering for the free App Brewery course. description: 链接到 App Brewery 提供的免费 Flutter 教程。 tags: 课程 keywords: Flutter系列课程, Flutter视频教程, App Brewery --- <h1>This course is closed for enrollment.</h1> Howev...
Java
UTF-8
1,420
3.390625
3
[]
no_license
import java.util.Arrays; import java.util.Comparator; public class LargestNumber { public Comparator<String> comparater = new Comparator<String>() { @Override public int compare(String s1, String s2) { if (s1.length()==0) return s2.length(); if (s2.length()==0) return s1.le...
C++
UTF-8
4,286
2.984375
3
[ "MIT" ]
permissive
#pragma once #include "Traits.h" #include "EnumNameMapping.h" namespace Lux::Json { class json_value { private: winrt::Windows::Data::Json::IJsonValue _value; public: template <typename T> static winrt::Windows::Data::Json::IJsonValue to_json(const T& value) { using namespace winrt::Wi...
C#
UTF-8
6,858
2.5625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging;...
SQL
UTF-8
424
3.015625
3
[]
no_license
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Admin_Parking_List]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[Admin_Parking_List] GO CREATE Procedure dbo.Admin_Parking_List As SET NOCOUNT ON SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED SELECT ParkingID AS ParkingID...
C++
UTF-8
18,087
3.21875
3
[ "MIT" ]
permissive
// // Created by cworrell on 7/21/2017. // #include <random> #include <ctime> #include <iostream> #include <cfloat> #include "GeneticAlgorithim.h" GeneticAlgorithim::GeneticAlgorithim(std::mt19937 &rng){ bool validNumber = false; while(!validNumber) { this->contents.clear(); ...
TypeScript
UTF-8
648
2.9375
3
[ "MIT" ]
permissive
import { get } from "lodash-es"; import { normalizeDataLocationToDotNotation } from "./location"; /** * The target is in an array */ export function isInArray(data: unknown, dataLocation: string): boolean { const dataLocationAsDotNotation: string = normalizeDataLocationToDotNotation( dataLocation ); ...
Markdown
UTF-8
1,643
2.796875
3
[]
no_license
--- layout: page type: text title: No Balls categories: - picture --- It's fair to say I've been more frustrated than a teenage boy (no understatement) with the looooooong halt on my photography. Which is why I made a decision to try to [get back into drawing](http://www.flickr.com/photos/i-5-m/5505513095/in/...
Java
UTF-8
40,530
2
2
[]
no_license
package com.mi.game.module.pet; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import com.mi.core.dao.KeyGeneratorDAO; import com.mi.core.engine.IOMessage; import com.mi.core.engine.ModuleManager; import com.mi.core.engine.TemplateManager...
Ruby
UTF-8
4,333
3.078125
3
[]
no_license
def g_maxitem 50 end def g_maxeq 30 end #==============================# # Title system # #==============================# def default_male_title_list [ { :level=>0, :name=>"新人" }, { :level=>5, :name=>"武者" }, ...
Java
UTF-8
1,437
2.4375
2
[]
no_license
package mg.yvan.truth.manager; import android.content.SharedPreferences; import android.preference.PreferenceManager; import com.facebook.AccessToken; import mg.yvan.truth.TruthApplication; /** * Created by Yvan on 09/06/16. */ public class SessionManager { private final static String LAST_BOOK = "book"; ...
Shell
UTF-8
275
3.265625
3
[]
no_license
#!/bin/bash EXT_ASIS=".wav" #EXT_ASIS=".WAV" EXT_TOBE=".mp3" files=( `ls *$EXT_ASIS` ) for file in "${files[@]}" do echo "asis: $file" echo "tobe: ${file/$EXT_ASIS/$EXT_TOBE}" ffmpeg -i $file -vn -ar 44100 -ac 9 -b:a 192k "${file/$EXT_ASIS/$EXT_TOBE}" done
JavaScript
UTF-8
3,230
4.1875
4
[]
no_license
// Assignment Code var passwordLength; // Displaying all character and number possibilities var Specialcharacters = ["!", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", ":", ";", "<", "=", ">", "?", "@", "[", "^", "_", "`", "{", "|", "}", "~"]; var Numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; var u...
C
UTF-8
7,416
2.828125
3
[]
no_license
/*====================================================================== Behaviour: Implementation of preemptive RIOS for the HC11 Runs 2 example programs: Sequence: Loops through a sequence of 3 outputs (Bit2 -> Bit1 -> Bit0) Toggle: Toggles an output (Bit0) on and off. Assumptions...
C#
UTF-8
809
3.390625
3
[]
no_license
namespace CsharpExam { //https://leetcode-cn.com/problems/xuan-zhuan-shu-zu-de-zui-xiao-shu-zi-lcof/ // 11 旋转数组里的最小数字 public class Offer_20220203_11 { public int MinArray(int[] numbers) { int left = 0, right = numbers.Length - 1; while (left < right) ...
PHP
UTF-8
6,964
3
3
[]
no_license
<?php function consultarDepartamento($db,$numeroempleado){ $sql="select dept_name,dept_emp.dept_no,from_date,to_date from departments,dept_emp where dept_emp.dept_no=departments.dept_no and emp_no='$numeroempleado';"; $resultado=mysqli_query($db, $sql); $contador=mysqli_num_rows($resultado); echo "T...
C#
UTF-8
3,689
3.46875
3
[ "BSD-3-Clause" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AdvUtils.Regression { public class MultipleLinearRegression { private double[] coefficients; private bool addIntercept; /// <summary> /// Creates a new Multiple Linear Regression....
C
UTF-8
1,163
3
3
[]
no_license
#include "get_next_line.h" int main(int ac, char **av) { int fd; int fd2; char *line; char *line2; fd = 0; fd2 = 0; // printf("first\n"); if (ac == 2) fd = open(av[1], O_RDONLY); if (ac == 3) { fd = open(av[1], O_RDONLY); fd2 = open(av[2], O_RDONLY); } // get_next_line(fd, &line); ...
Java
UTF-8
148
1.882813
2
[]
no_license
package com.jfx.springlearn.spring中常用设计模式.观察者模式; public enum TeacherEventEnum { ON_START_CLASS, ON_END_CLASS; }
SQL
UTF-8
9,527
3.109375
3
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET ...
Python
UTF-8
1,173
4.03125
4
[]
no_license
""" Given a binary tree, return the tilt of the whole tree. The tilt of a tree node is defined as the absolute difference between the sum of all left subtree node values and the sum of all right subtree node values. Null node has tilt 0. The tilt of the whole tree is defined as the sum of all nodes' tilt. Example: Inp...
C
UTF-8
3,892
3.3125
3
[]
no_license
#include "thread_semaphore.h" #include <pthread.h> #include <stdlib.h> #include <string.h> enum thread_semaphore_flag { TSF_WAIT, /* bloccati in attesa */ TSF_GO /* status ora è valido */ }; struct thread_semaphore{ pthread_mutex_t mutex; pthread_cond_t cond; enum thread_semaphore_flag flag; ...
C++
UTF-8
4,019
2.890625
3
[]
no_license
#include <iostream> #include <fstream> #include <string> /* Conversion (c++11) */ #include <iomanip> #include <locale> #include <sstream> #include "CazanoveGulinoMartinMaupas-Loader.h" #include "conio.h" using namespace std; Loader::Loader() : _files() { } Loader::~Loader() { } Automate* Loader::get(std::string pa...
Markdown
UTF-8
924
3.046875
3
[ "MIT" ]
permissive
# Modal A _modal_ component is use to display content to the user and capture an action ## Basic Use _modal_ markup - `.modal` - `.modal-dismiss` - `.modal-header` - `.modal-title` - `.modal-body` - `.modal-footer` <snippeter> <pre> <div class="modal"> <button class="modal-dismiss"> <svg viewbox=...
Java
UTF-8
195
1.867188
2
[]
no_license
package com.example.moviemvvm.model; import java.util.List; public class FavouriteList { List<Favourite> results; public List<Favourite> getItems() { return results; } }
C++
UTF-8
750
2.640625
3
[]
no_license
#include <cstdio> #include <vector> #define MAX(A,B) ((A>=B)? A:B) int main(int argc, char** argv) { int cases; scanf("%d",&cases); while(cases--){ int elem,W; scanf("%d %d",&elem,&W); std::vector<int> weights; for(int i=0;i<elem;i++){ int aux; ...
PHP
UTF-8
867
2.6875
3
[]
no_license
<?php session_start(); //$userId = $_GET["userId"]; include("../includes/db-config.php"); $tripId = 2; $userId = 1; ?> <h1> Are you sure you want to delete the following member? </h1> <?php // $userdata = $pdo->prepare("SELECT `users`.`fullName`, `users`.`userId` FROM `users`, `users-groups` WHERE `users-groups`....
Markdown
UTF-8
1,556
2.75
3
[]
no_license
--- title: Developers description: The Cupcake Component Library provides front-end developers &engineers a collection of reusable HTML and SCSS partials to build user interfaces. --- #### Customization You may need to add, remove, or extend the core of Cupcake. You can customize your version by editing and recomp...
Python
UTF-8
3,219
2.828125
3
[]
no_license
from random import random import numpy as np import math f = open('day15-1_input.txt') # f = open('day15-1_debug.txt') text = f.readlines() f.close() program = [int(i) for i in text[0].strip().split(',')] program.extend([0 for _ in range(10**5)]) grid = np.ones((50, 50)) * -1 grid[:,0] = 0 grid[:,-1] = 0 grid[0,:]...
C++
UTF-8
1,869
3.03125
3
[]
no_license
#include<iostream> using namespace std; // 0 0 0 1 2 0 1 0 1 2 3 0 1 0 1 2 3 //2: 0 0 0 1 1 1 1 1 1 2 3 3 3 3 3 4 5 //3: 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 2 bool isHalfPrime(int n, int F[]) { return F[n] != 0 && F[n / F[n]] == 0 && n / F[n] != 1; } int main() { int max_size = 1000000; int F[max_size+1]...
PHP
UTF-8
8,534
3.359375
3
[]
no_license
<?php require_once 'Crypt/DiffieHellman/Math.php'; class Crypt_DiffieHellman { private $_prime = null; private $_generator = null; /** * A private number set by the local user. It's optional and will * be generated if not set. * * @var string */ private $_privateKey = null...
Java
UTF-8
5,364
2.6875
3
[]
no_license
package swarm_robotics.map; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; public class Main extends JFrame{ public Main(){ super("Map generation"); Container c ...
Python
UTF-8
705
3.28125
3
[]
no_license
#! /usr/bin/env python class Name: def __init__(self, culture, first=None, last=None): self.culture = culture if not culture: raise RuntimeError("Name does not have a culture!") if not culture.language: raise RuntimeError("Name does not have a culture with a langua...
JavaScript
UTF-8
1,624
2.546875
3
[]
no_license
const express = require('express'); const router = express.Router(); const {message}= require('../../models/message'); //post request - to send data router.post('/', (req, res) => { //create object of message callled myMessage - send details of message using request.body object const myMessage = new message({...
Markdown
UTF-8
2,957
3.171875
3
[ "MIT" ]
permissive
--- title: análisis de nodos date: 2019-03-03 category: metodos-numericos theme: iot syntax_theme: atom-one-light --- ## Análisis de nodos en circuitos eléctricos Métodos numéricos en ingeniería --- ### Método de tensiones nodales Se configura y resuelve un sistema de ecuaciones en el que las incógnitas son los vo...
JavaScript
UTF-8
439
2.90625
3
[]
no_license
var dinosaur = 'triceratops'; var replacement = dinosaur.toUpperCase(); var text = 'Velociraptor is a genus of herbivorous ceratopsid dinosaur that first appeared during the late Maastrichtian stage of the late Cretaceous period.'; var text2 = text.replace('Velociraptor', ''); var replacedText = (replacement + text2); ...
PHP
UTF-8
974
2.921875
3
[]
no_license
<?php class feeling extends bdd{ protected $id; protected $type; protected $user; protected $activities; protected $date_heure; public function __construct(){ parent::__construct(); } public function setFromBdd($var = []){ foreach($var as $key => $value){ $this->$key = $value; } } public ...
C++
UTF-8
2,514
2.84375
3
[]
no_license
/** * Copyright 2010 Jason Stredwick * * 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...
SQL
UTF-8
7,510
3.515625
4
[]
no_license
---Project 047 Case study of Individual Spots for Sky 1 and other channels--- --drop table #viewing_segment_summary_sky_1; select channel_name_inc_hd ,corrected_spot_transmission_start_datetime ,corrected_spot_transmission_end_datetime ,spot_duration --,adsmartable_box ,demograph ,adsmartable_box ,isba_tv_region ,...
JavaScript
UTF-8
827
2.625
3
[]
no_license
module.exports = { firstTime() { return 'El siguiente paso es calcular las distancias parcialmente. Partiendo del nodo 0, vemos que solo poodemos ' + 'acceder al nodo 1 y 2. Como podemos observar, la distancia al nodo 1 es 20, y como hasta ahora no teníamos ninguna distancia previa, ' + 'colocamos 20 como dist...
Java
UTF-8
60
1.6875
2
[]
no_license
package secret.model; public enum Carte { LUMOS, NOX }
C++
UTF-8
721
2.734375
3
[]
no_license
#include "SDLManager.h" #include "SDL.h" #include "SDL_ttf.h" #include "SDL_image.h" #include <iostream> void SDLManager::Setup() { m_initSuccess = false; if (SDL_Init(SDL_INIT_VIDEO) != SDL_INIT_SUCCESS) { SDL_LOG("Failed to Init Core"); return; } if (TTF_Init() != TTF_INIT_SUCCESS) { SDL_LOG("Failed to...
C
UTF-8
907
2.609375
3
[]
no_license
#include <lib.compile/compile-action.h> #include <lib.compile/compile-print.h> #include <lib.core/memory.h> #include <lib.core/string.h> CompileAction *compile_action_create (CompileActionType type) { CompileAction *action; if (type != COMPILE_ACTION_CC && type != COMPILE_ACTION_ARCH && type != COMPILE_AC...
Python
UTF-8
1,255
3.015625
3
[]
no_license
from robot import Robot from sr2013 import VisionShim from devices import Mbed, MotorMbed class Arm(object): def __init__(self, mbed): self._mbed = mbed self.lifted = False def setLifted(self, lifted, timeout=10.0): """Moves the arm to a specified state. :param lifted: whethe...
Markdown
UTF-8
2,111
3.953125
4
[ "MIT" ]
permissive
--- layout: post title: AVL Tree comments: true tags: - Algorithm --- The following is definition of AVL Tree according to [Wikipedia](https://en.wikipedia.org/wiki/AVL_tree) > In computer science, an AVL tree is a self-balancing binary search tree. It was the first such data structure to be invented. In an AVL tree,...
Python
UTF-8
376
3.359375
3
[]
no_license
def minion_game(string): cnt1 = 0 cnt2 = 0 for i in range(0,len(string)): if string[i] in ("A","E","I","O","U"): cnt2 += len(string) - i else: cnt1 += len(string) - i if cnt1 > cnt2: print("Stuart " + str(cnt1)) elif cnt1 < cnt2: print("Kevin "...
Java
UTF-8
359
2.734375
3
[]
no_license
package ceng.anadolu.bim492.project2; public class Swordsman extends Soldier { public Swordsman(){ attackBehavior = new InfantryAttack(); movementBehavior = new SlowWalk(); } @Override public void display() { blank(); System.out.println("I'm a Swordsman."); System.out.println("I can use sword. I'm strong...
Markdown
UTF-8
2,434
2.53125
3
[]
no_license
Formats: [HTML](/news/2011/09/23/south-korean-prosecutors-raid-the-offices-of-seven-savings-banks-whose-operations-were-suspended-last-week-with-the-president-of-one-bank-c.html) [JSON](/news/2011/09/23/south-korean-prosecutors-raid-the-offices-of-seven-savings-banks-whose-operations-were-suspended-last-week-with-the...
Python
UTF-8
530
2.984375
3
[]
no_license
import pickle import datetime def save_data(gym_store, folder="gym_data/"): filename_date = folder + str(datetime.datetime.now().strftime("%Y_%m_%d")) + ".dat" with open(filename_date, "wb") as f: pickle.dump(gym_store, f) """ #This shows how to read pickled list with open(filename_date, "r...
Markdown
UTF-8
559
2.59375
3
[]
no_license
# Blog with a photo gallery and CMS ## Introduction It was built with the use of PHP, JS, jQuery, Bootstrap, MySqli ## Getting Started 1. Create database with 4 tables: - users (id, username, password, first_name, last_name, rights, filename, created_at, last_modified) - posts (id, author, title, body, created_at, ...
Java
UTF-8
2,083
4.125
4
[]
no_license
package CodeWars.josephus_survivor; //In this kata you have to correctly return who is the "survivor", ie: the last element of a Josephus permutation. // // Basically you have to assume that n people are put into a circle and that they are eliminated in steps of k elements, like this: // // josephus_survivor(7...
C
WINDOWS-1250
1,953
3.5
4
[]
no_license
/* Napisati program koji iz datoteke ita dio teksta, rije po rije i unosi ih u red s prioritetom (maksimalna duljina rijei 1024 znaka, prioritet=1 => rije poinje samoglasnikom, prioritet=2 => rije poinje suglasnikom;). Rijei u redu moraju biti sortirane po prioritetu. Iz tako kreiranog reda kreirati dvije datoteke,...
Python
UTF-8
3,254
3
3
[ "AFL-2.1", "AFL-3.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#!/usr/bin/env python3 """ EV is a simple ES-like EA invented by Ken De Jong for educational purposes. Essentially, an EV uses a real-valued representation, and a pre-defined, static standard deviation applied to the Gaussian mutation operator. Note that there are sibling examples the demonstrate more...
Rust
UTF-8
7,984
3
3
[ "MIT", "Apache-2.0", "LicenseRef-scancode-free-unknown" ]
permissive
use std::f64; use std::num::Wrapping; use std::convert::TryFrom; use gml::symbol::Symbol; use gml::{self, vm}; pub struct State { random_seed: Wrapping<i32>, } impl Default for State { fn default() -> State { State { random_seed: Wrapping(0), } } } #[gml::bind] impl State { ...
SQL
UTF-8
2,204
3.109375
3
[]
no_license
INSERT INTO client (name, description) VALUES ('Miguel Bandeira', 'Vereador da C.M. Braga'); INSERT INTO catalog (title, description) VALUES ('Sinais de Transito', 'Sinais rodoviarios da cidade de Braga'); INSERT INTO client_catalog VALUES (1, 1, 'Contracto Atlas Innovation - CMBraga'); INSERT INTO feature (ti...
C#
UTF-8
3,226
3.828125
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AdditionTask1 { /*Используя Visual Studio, создайте проект по шаблону Console Application. Создайте программу, в которой создайте класс Car (машина) который содержит в себе полями с наз...
Java
UTF-8
2,035
2.046875
2
[]
no_license
/* * Copyright (c) 2016 Tata Consultancy Services and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ packa...
Markdown
UTF-8
2,932
3.3125
3
[]
no_license
# 简单配置Redux.md ### App.js(redux的设置) ```js import React, { Component } from 'react'; import './App.css'; import { HashRouter as Router, Route, Link } from "react-router-dom"; import Xheader from './page/Xheader.jsx' import Xlist from './page/Xlist.jsx' //先安装react-redux和redux,然后引入redux依赖 import { Provider } from '...
Markdown
UTF-8
1,558
3.046875
3
[]
no_license
# Item Catalog ## About This is the fourth project in the Full Stack Web Developer Nanodegree program from Udacity. The project is a web application item catalog allowing authenticated users to perform CRUD operations within a relational database. A google+ OAuth 2.0 sign in is used to authenticate users. Authenticat...
Markdown
UTF-8
92,813
2.578125
3
[]
no_license
# SPD (S&D) <p align="center"><a href="#voting-intentions">Voting Intentions</a> | <a href="#seats">Seats</a></p> ## Voting Intentions Last result: **27.3%** (General Election of 25 May 2014) ### Confidence Intervals | Period | Polling firm/Commissioner(s) | Median | 80% Confidence Interval | 90% Confidence In...
Java
UTF-8
2,330
2.265625
2
[]
no_license
package com.zyy.mowa.mapper; import com.zyy.mowa.dao.WorkGroup; import org.apache.ibatis.jdbc.SQL; public class WorkGroupSqlProvider { public String insertSelective(WorkGroup record) { SQL sql = new SQL(); sql.INSERT_INTO("ma_workgroup"); if (record.getId() != null) { ...
C++
UTF-8
2,079
2.984375
3
[]
no_license
# include "Squad.hpp" Squad::Squad(void) : _squad(NULL), _count(0) { return ; } Squad::~Squad( void ) { t_list *current; t_list *tmp; current = this->_squad; if (current) { while (current) { tmp = current->next; delete current->marine; del...
JavaScript
UTF-8
687
2.5625
3
[]
no_license
/* Hahn Ch3 p.40 */ const express = require('express'); const path = require('path'); const http = require('http'); const app = express(); const publicPath = path.resolve(__dirname, "public"); app.use(express.static(publicPath)); app.get("/", (req, res)=>{ res.end("Welcome to the Dharma Bums."); } ); app.get("/ab...
C++
GB18030
13,476
3.171875
3
[ "MIT" ]
permissive
#include "stdafx.h" #include "kstring.h" #include <string.h> #include <stdio.h> #include <stdarg.h> #include <algorithm> #ifdef _WIN32 #define vsnprintf _vsnprintf_s #endif kstring::kstring(void) { m_sString = NULL; m_iLength = 0; m_iBufLen = 0; } kstring::kstring(const char* lpszStr) { m_sString = NULL; m_iLe...
C#
UTF-8
3,778
2.53125
3
[ "MIT" ]
permissive
using System.Collections.Generic; using System.Linq; using U8Xml; namespace KyoshinEewViewer.JmaXmlParser.Data.Earthquake; public struct HypocenterArea { private XmlNode Node { get; set; } public HypocenterArea(XmlNode node) { Node = node; } private string? _name = null; /// <summary> /// 震央地名 /// </summa...
Python
UTF-8
4,631
2.90625
3
[ "MIT", "X11" ]
permissive
import logging import sys import re from privex.helpers import empty, empty_if, T, K from typing import List, Optional, Union log = logging.getLogger(__name__) __all__ = [ 'read_stdin', 're_markers', '_re_markers', 'replace_markers', 'automark_str', 'automark', '_dedup', 'dedup', 'dedup_dict', 'clean_dict', 'l...
Markdown
UTF-8
1,127
2.953125
3
[ "Apache-2.0" ]
permissive
# Appium Images Plugin This is an official Appium plugin designed to facilitate image comparison, visual testing, and image-based functional testing. ## Features 1. **Image Comparison** ([docs](./docs/image-comparison.md)) - A new Appium command and route that allows sending in two different images and comparing the...
Rust
UTF-8
2,973
2.71875
3
[]
no_license
use async_trait::async_trait; use crate::domain::hero::{Hero, HeroDto, repository::HeroRepository, HeroOptionResult}; use deadpool_postgres::{Pool, Client}; use crate::domain::Result; use tokio_postgres::error::SqlState; use serde::export::Formatter; #[derive(Debug)] pub struct NoRowError; impl std::fmt::Display for ...
Java
UTF-8
2,519
2.15625
2
[]
no_license
package com.wulianwang.lsp.activity; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.ImageView; import android.widget.Li...
C#
UTF-8
3,189
2.625
3
[ "MIT" ]
permissive
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Kernel { public int ID; public Vector3Int size; public string name; public Kernel(ComputeShader shader, string name) { this.name = name; ID = shader.FindKernel(name); uint x, y, z; ...
JavaScript
UTF-8
1,502
2.546875
3
[]
no_license
import Immutable from 'seamless-immutable'; import endpoints from 'core/endpoints'; const types = { ADD_HISTORY_ENTRY: 'ADD_HISTORY_ENTRY', }; function getOrdersHistoryFromLocalStorage() { const orders = window.localStorage.getItem('orderHistory'); try { const parsed = JSON.parse(orders); ...
JavaScript
UTF-8
3,860
2.640625
3
[]
no_license
'use strict' const boton_registrar = document.querySelector('#btn-registrar-autor'); const input_nombre = document.querySelector('#txt-nombre-autor'); const input_nombre_artistico = document.querySelector('#txt-nombre-artistico-autor'); const input_fecha_nacimiento = document.querySelector('#txt-nacimiento-autor'); co...
C#
UTF-8
5,936
2.8125
3
[]
no_license
//EXCEPCIONES try { // Código } catch (OverflowException e) { Console.WriteLine(e.Message); } catch (DivideByZeroException e) { Console.WriteLine(e.Message); } finally { Console.WriteLine("Pulse una tecla para continuar..."); } //crear excepcion using System; public class EmployeeListNotFoundExcept...
Java
UTF-8
2,849
1.726563
2
[]
no_license
package org.iplantc.de.client.services; import org.iplantc.de.client.models.analysis.Analysis; import org.iplantc.de.client.models.analysis.AnalysisParameter; import org.iplantc.de.client.models.analysis.AnalysisStepsInfo; import org.iplantc.de.client.models.analysis.sharing.AnalysisSharingRequest; import org.iplantc....
PHP
UTF-8
310
2.59375
3
[]
no_license
<?php class COrder { public $id; public $cdate; public $total; public $status; public $custid; function __construct($id, $cdate, $total, $status, $custid) { $this->id = $id; $this->cdate = $cdate; $this->total = $total; $this->status = $status; $this->custid = $custid; } } ?>
Python
UTF-8
1,541
3.703125
4
[]
no_license
""" multiScrolls.py Demonstrate three scroll bars add to 100 change top scroll, bottom two change proportionately """ from Tkinter import * class App(Tk): def __init__(self): Tk.__init__(self) self.scrA = Scale(self, from_ = 0, to = 100, orient = HORIZONTAL) self.scrA.grid() self.scrA.s...
Java
UTF-8
6,447
1.828125
2
[]
no_license
package com.quickblox.sample.chat.ui.adapter; import android.content.Context; import android.net.Uri; import android.os.Bundle; import android.text.TextUtils; import android.util.Log; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.b...
C++
UTF-8
4,089
3.296875
3
[]
no_license
/* Nama : Nadia Nur Halimah NIM : 3411151017 Kelas : SIE-A */ #include <stdio.h> #include <conio.h> #include <windows.h> #include <math.h> void menu(){ //algoritma printf("\n--------------- MENU ---------------\n"); printf("\n1. Hitung x+y"); printf("\n2. Hitung x-y"); pr...
Java
UTF-8
290
1.960938
2
[]
no_license
package com.zzt.populateBean.cycle; /** 描述:<br> </> @author 周志通 @version 1.0.0 @date 2020/12/15 20:53 **/ public class A { private B b; public A() { } public B getB() { return b; } public void setB(B b) { this.b = b; } }
Python
UTF-8
6,890
3.484375
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Thu Jan 25 09:06:46 2018 @author: 593787 Robert Piazza - Booz Allen Hamilton """ ##Predict-Multivariable Linear Regression: Model Section 4.2.3 #We need to expand our single variable to multi-variate regression to make it #more robust #Objective: Create a model with multiple ...
Python
UTF-8
1,119
2.84375
3
[]
no_license
import collections from python_vlookup import python_vlookup array = python_vlookup.get_csv_data('shareasale_lookup.csv') print array #Return a dictionary def get_credentials(): host = 'hostname' un = 'username' pw = 'password' credentials = {'hostname':host,'username':un,'password':p...
C#
UTF-8
916
2.578125
3
[]
no_license
namespace QuizProjectMvc.Services.Data.Protocols { using System.Collections.Generic; using System.Linq; using System.Web.Mvc; using QuizProjectMvc.Data.Models; public interface ICategoriesService { IQueryable<QuizCategory> GetAll(); /// <summary> /// Returns the top <s...
PHP
UTF-8
1,535
2.75
3
[]
no_license
<?php /** * Copyright (c) 2016 Kiboko SAS. * * @author Grégory Planchat <gregory@kiboko.fr> */ namespace Kiboko\Component\MagentoORM\Model; class AttributeOptionValue implements AttributeOptionValueInterface { use LocalizedMappableTrait; use IdentifiableTrait; /** * @var int */ private ...
Java
UTF-8
649
3.09375
3
[]
no_license
package collections.List; import java.util.*; @SuppressWarnings("serial") class MyArrayList<E> extends ArrayList<E> { public boolean add(E e) { if (e instanceof Integer || e instanceof Double || e instanceof Float) { super.add(e); return true; } throw new ClassCastException ("Only Integer, Float, ...
JavaScript
UTF-8
1,816
2.625
3
[]
no_license
export default class PaginateModel { lastPage = 1; pageNum = 0; pageSize = 0; size = 0; total = 0; startRow = 0; perPageShow = 0; /** * 构造器 * 可直接传入页面参数变更回调函数 * @param changeCallBack * @param pageSize */ constructor(changeCallBack = null, pageSize = 14) { ...
JavaScript
UTF-8
2,312
2.515625
3
[ "MIT" ]
permissive
// This script licensed under the MIT. // http://orgachem.mit-license.org /** * @fileoverview A class for list publishers for HTML. * @author orga.chem.job@gmail.com (OrgaChem) */ var basePath = '../lib'; var HtmlElement = require(basePath + '/html/HtmlElement'); var tsumekusa = require('tsumekusa'); var util =...
Java
UTF-8
1,007
1.921875
2
[]
no_license
package com.cnfantasia.server.api.access.codec.ake.bean.request; import com.cnfantasia.server.api.access.codec.ake.bean.base.DataDetailObj; import java.math.BigDecimal; public class UseTraderCoupon implements DataDetailObj { private static final long serialVersionUID = -6848035346462902727L; private String tr...
C++
UTF-8
1,934
3.21875
3
[]
no_license
#include "Item.h" #include <vector> #include <string> #include <iostream> #include <fstream> using namespace std; struct EmptyPriorityQueue { }; //exceptionclass template<typename ElemType> class PQueueVector { protected: typedef Item<ElemType> Item; typedef PQComp<ElemType> PQComp; private: vector<Item>V; ...
C#
UTF-8
1,802
2.609375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using PureCM.Server; namespace External_Items { /// <summary> /// Abstract class for a user /// </summary> internal abstract class ExUser : ExItem { internal ExUser(ExFactory oFactory, ExFactory.TPluginTy...
Java
UTF-8
623
3.25
3
[]
no_license
class Solution { public boolean isPalindrome(int x) { int flag = 0; String a = Integer.toString(x); for(int i = 0; i<a.length()/2; i++){ System.out.println("first loop"); for(int j = (a.length()-1)-i; j>=a.length()/2; j--){ System.out.println("second l...
JavaScript
UTF-8
3,994
2.890625
3
[]
no_license
let rootUrl = '' let jsList = {} let cssList = {} let jsLoadStatus = {} let cssLoadStatus = {} function create(createType) { function createScript(path, loadCb, readyCb, errorCb) { if(!document.getElementById(path)) { var scr = document.createElement('script'); scr.type = 'text/javascript...
Java
UTF-8
4,498
2.671875
3
[]
no_license
package UIComponents; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import jav...
TypeScript
UTF-8
958
2.84375
3
[ "MIT" ]
permissive
import { Injectable } from '@angular/core'; export enum LogLevel { Disabled = 0, Error, Warn, Info, Debug, } @Injectable() export class LogService { public logLevel = LogLevel.Info; public writer = console; public messagePrefix = () => 'ChatService:'; public error(...messages: an...
Java
UTF-8
681
1.671875
2
[]
no_license
package io.cloud.api.documents; import lombok.Data; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; import java.text.DateFormat; import java.util.Calendar; import java.util.Date; import java.util.List; @Data @Document(collection="faturas") pu...
Java
UTF-8
19,833
1.828125
2
[]
no_license
package com.thinkfaster.manager; import android.graphics.Color; import android.util.Log; import com.thinkfaster.asynctask.SoundLoaderAsyncTask; import com.thinkfaster.util.ContextConstants; import org.andengine.audio.sound.Sound; import org.andengine.audio.sound.SoundFactory; import org.andengine.engine.Engine; import...
JavaScript
UTF-8
1,398
3.09375
3
[]
no_license
function mashMap() { var size = 0 ; var entry = new Object(); this.put = function(key, value) { if(!this.has(key)) { size ++; } entry[key] = value; } this.pop = function(key) { if(this.has(key) && (delete entry[key])) { size --; } } this.has = function(key) { ...
Swift
UTF-8
1,618
2.78125
3
[ "MIT" ]
permissive
import UIKit import MobileCoreServices public extension String { var localized: String { return NSLocalizedString(self, comment: "") } func localizedFormat(_ args: [CVarArg]) -> String { return String(format: self.localized, locale: Locale.current, arguments: args) } } public extension RawRepresentable wh...
Python
UTF-8
2,867
3.203125
3
[ "MIT" ]
permissive
""" Author: CaptCorpMURICA Project: 100DaysPython File: module3_day37_mouseKeyboard.py Creation Date: 7/2/2019, 8:17 PM Description: Python Automation Program 9: Mouse/Keyboard Manipulations """ # Anytime a program takes charge of the computer, it's critical that the us...
C++
UTF-8
3,421
2.734375
3
[]
no_license
#ifndef RISA_PIXEL_PROPERTY_HPP_ #define RISA_PIXEL_PROPERTY_HPP_ #include <risa_gl/risa_types.hpp> #include <risa_gl/primitive/selector.hpp> namespace risa_gl { namespace primitive { /** * 何もしないsetter */ class nop_setter { public: template <typename result_itor_t> void operator()(result_itor_t, ...
Markdown
UTF-8
2,402
2.859375
3
[]
no_license
### Задача 1 Да се напише рекурсивна функция, която приема като аргументи едномерен масив от цели числа, и размера на масива, и връща като резултат нов масив от онези елементи, които са [Pentagonal numbers](http://en.wikipedia.org/wiki/Pentagonal_number), тоест намират се по формулата Pn=n(3n−1)/2. ### Задача 2 Да се ...