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,388
2.5625
3
[]
no_license
<?php session_start(); if (true) { print_r( $_POST ); header("Location: http://localhost/BrokerModule1.8/BrokerModule/index.php"); update(); } function update() { try{ $host = "localhost"; $port = "5432"; $dbUsername = "pos...
PHP
UTF-8
305
2.625
3
[]
no_license
<?php namespace Foundation\Form\Filter; /** * Replace elements of a string * * @package Foundation\form\filter */ class Replace extends AbstractFilter { public function filterValue($value) { return \str_replace($this->ruleSet['pattern'], $this->ruleSet['replace'], $value); } }
C#
UTF-8
3,961
2.921875
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Minesweeper { public partial class Winners : Form { public Winners() { In...
JavaScript
UTF-8
591
2.78125
3
[]
no_license
const concluirTarefa = (atualiza, id) => { const tarefaCadastradas = JSON.parse(localStorage.getItem('tarefas')) tarefaCadastradas[id].concluida = !tarefaCadastradas[id].concluida localStorage.setItem('tarefas', JSON.stringify(tarefaCadastradas)) atualiza() } const BotaoConcluir = (atualiza, id) => { ...
Java
UTF-8
2,082
3.125
3
[]
no_license
package com.revature.ui.client; import com.revature.model.Client; import com.revature.services.bankServices.BankServices; import com.revature.ui.menu.Menu; import org.apache.log4j.Logger; public class TransferMoneyMenu implements Menu { private static Logger log = Logger.getLogger(TransferMoneyMenu.class); B...
PHP
UTF-8
497
3.34375
3
[]
no_license
<?php abstract class Recorrido { protected $barrio = NULL; protected $punto = NULL; public function __construct($recorrido) { if (!empty($recorrido)) { $this->barrio = substr($recorrido, 0, 2); $puntoSize = sizeof($recorrido) - sizeof($this->barrio); // should be sizeof($id) -2; $this->punto =...
Markdown
UTF-8
7,516
3.109375
3
[]
no_license
一六四 “如果姑娘看得起,就给我一名副会主干。否则,即使把我降为堂主,我也心甘情愿。” 白素娟再扫视四名堂主一眼,道:“你们呢?” 四名堂主几乎是齐声道:“只要饶我们不死,我们都愿降级听用。” 白素娟有些犹豫,望向罗奇道:“罗大哥看该怎么办?” 罗奇不动声色道:“一切应由姑娘自行决定,不过姑娘必须想到后果。” 洪大全心里一急,叫道:“罗大侠,你……你要帮洪某讲几句话!” 罗奇哼了声道:“洪大全,在下和白姑娘都不只一次的吃过你的亏,像你这种人,我有必要帮你讲话吗?” 洪大全双颊抽搐着道:“洪某从前……错了……今后归附白……会主,一定竭诚尽忠,若再有三心二意,天诛...
Python
UTF-8
1,718
2.65625
3
[ "MIT" ]
permissive
# Libraries import h5py from collections import namedtuple # Helper classes Channel_Info = namedtuple('ChannelInfo', ['digitisation', 'parange', 'offset', 'sampling_rate', 'raw_signal']) class OsBp_FAST5(): ''' Reader class for FAST5 file from osmium-tagged oligo translocation experiments ...
C#
UTF-8
2,537
2.609375
3
[]
no_license
using DataAccess.Dao; using EntitiesPOJO; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DataAccess.Mapper { public class IdiomaMapper : EntityMapper, ISqlStatements, IObjectMapper { private const string DB_COL_IDIOMA = "No...
Shell
UTF-8
861
3.65625
4
[]
no_license
#!/bin/bash CURRENT=`pwd` cd $(dirname $0) if [ $# != 3 ] ; then echo Error ! $0 app.jar config_dir name echo PORT in yml/properties file to config AND SPRING_PROFILES_ACTIVE=online exit 1; fi DOCKER_NAME=$3 TAG_NAME=`date +%s` set -e -x TMP="/tmp/docker-template/" rm -rf $TMP mkdir $TMP cp $CURRENT/$1 "...
Java
UTF-8
553
2.53125
3
[]
no_license
package db.data_processing; import org.json.simple.JSONObject; public class Utils { /** * Проверка наличия искомого ключа в JSON-объекте. */ public static Object checkExist(String key, JSONObject params) { if (params.containsKey(key)) { if (params.get(key) instanceof Long) { ...
Markdown
UTF-8
930
2.6875
3
[]
no_license
# Przetwarzanie Formularza Railsowego Załóżmy, że chcemy dodawać Diga metodą Railsową: (uwaga, przykład trochę celowo nie zadziała w naszej aplikacji z powodu powodów :) Między innymi dlatego, że już posiadamy Controller dla `Digs` w naszym API) ```ruby # not an API ▼ # app/controllers/digs_controller.rb class Di...
Shell
UTF-8
122
2.578125
3
[ "Apache-2.0" ]
permissive
#!/bin/bash set -e cd $(dirname $0) if [ -z "$SKIP_VALIDATE" ]; then ./validate ./validate-ci fi ./build ./package
Markdown
UTF-8
758
2.71875
3
[]
no_license
# RateMe The application has been created for TIN university course. RateMe application gathers information about restaurants. Everyone can see all the restaurants, its details and rating. Only logged in users can rate the restaurant. Admin can manage restaurants (CRUD operations). ## Backend Technology Stack - Java ...
Java
UTF-8
837
2.0625
2
[]
no_license
package jats.utfpl.stfpl.dynexp; import java.lang.reflect.Type; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonParseException; public class D2CimpdecDeserializer implements J...
Java
UTF-8
1,517
2.09375
2
[]
no_license
package com.fileEncryption.joblauncher; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.batch.core.Job; import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.JobParametersBuilder; import org.springframework.batch.core.launch.JobLauncher; ...
C++
UTF-8
3,556
2.78125
3
[]
no_license
/************************************************************************* Trajet_Compose - Classe fille ------------------- début : 21/11/2018 copyright : (C) 2018 par LOKUGE, RAMSAHA, DEBORD e-mail : sadsitha...
SQL
UTF-8
1,876
3.390625
3
[]
no_license
DROP DATABASE IF EXISTS my_authorization; CREATE DATABASE my_authorization CHARACTER SET UTF8 ; USE my_authorization ; CREATE TABLE role( rid varchar(50) , title varchar(200) , CONSTRAINT pk_rid PRIMARY KEY(rid) ) engine='innodb' ; CREATE TABLE action( actid varchar(50) , title varchar(200) , rid ...
Markdown
UTF-8
9,458
3.03125
3
[]
no_license
<-------------------双伪元素清除浮动 (伪元素的本质是插入一个行内元素)-----------------------------------> .clearfix:before,.clearfix:after{ content:""; display:table; } .clearfix:after{ clear:both; }` .clearfix{ *zoom:1; <---------------解决图片底测缝隙的问题---------------------------------------> 给 img vertical-align:middle | t...
PHP
UTF-8
2,374
2.6875
3
[ "BSD-3-Clause" ]
permissive
<?php /** * 生成用户参加码 * User: 姜伟 * Date: 2020/3/30 0030 * Time: 8:26 */ namespace SyLive\BaiJia\LiveLargeClass\Room; use SyConstant\ErrorCode; use SyConstant\ProjectBase; use SyException\Live\BaiJiaException; use SyLive\BaseBaiJia; use SyLive\UtilBaiJia; /** * Class CodeGet * * @package SyLive\BaiJia\LiveLarge...
Python
UTF-8
1,115
3.15625
3
[]
no_license
# To run this, download the BeautifulSoup zip file # http://www.py4e.com/code3/bs4.zip # and unzip it in the same directory as this file import urllib.request, urllib.parse, urllib.error from bs4 import BeautifulSoup import ssl # Ignore SSL certificate errors ctx = ssl.create_default_context() ctx.check_hostname = Fa...
Java
UTF-8
7,537
1.984375
2
[]
no_license
package com.jiazy.areaview.util; import android.content.Context; import android.graphics.Bitmap; import com.jiazy.areaview.R; public class ChinaUtil extends CityUtil{ /*110000=北京市 120000=天津市 130000=河北省 140000=山西 150000=内蒙古自治区 210000=辽宁省 220000=吉林省 230000=黑龙江省 310000=上海市 ...
Java
UTF-8
297
2.421875
2
[]
no_license
/* * file: DolphinFactory.java * author: garret patten * date: 03/12/18 */ package hw5; public class DolphinFactory extends FishFactory{ public DolphinFactory(){} public Fish create(){ Fish f = new Fish(new DolphinBehavior()); f.setType(new Dolphin()); return f; } }
JavaScript
UTF-8
1,945
2.859375
3
[]
no_license
$( document ).ready(function() { var Trackster = {}; /* Given an array of track data, create the HTML for a Bootstrap row for each. Append each "row" to the container in the body to display all tracks. */ Trackster.renderTracks = function(tracks) { for(var i = 0; i < tracks.length; i++){ var mediumAlbumArt = tr...
Ruby
UTF-8
2,588
4.40625
4
[]
no_license
=begin ask for the first name and last name. Split into two variables called first and last and downcase split the two name variables into a data structure (array) that has each letter (as a string) set a variable with vowels, set a variable with consonants loop through each data structure of first and last na...
Python
UTF-8
4,231
4.0625
4
[]
no_license
https://leetcode.com/problems/h-index/?tab=Description Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. According to the definition of h-index on Wikipedia: "A scientist has index h if h of his/her N papers have at least h cit...
Java
UTF-8
5,023
2.0625
2
[]
no_license
package sample.view; import com.google.gson.Gson; import com.jfoenix.controls.JFXButton; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.fxml.Initializable; import javafx.geometry.HPos; import javafx.geometry.Pos; import javafx.geometry.VPos; import javafx.scene.Parent; import javafx.scene.contro...
C#
UTF-8
1,625
2.890625
3
[]
no_license
using System; using FluentValidation; namespace FluentValidator.Models.FluentValidators { public class DeveloperValidator : AbstractValidator<Developer> { public DeveloperValidator() { RuleFor(p => p.FirstName) .Cascade(CascadeMode.StopOnFirstFailure) // scenarios w...
Java
UTF-8
2,194
1.835938
2
[]
no_license
package com.canteen.entity; import com.baomidou.mybatisplus.annotation.TableId; import java.time.LocalDateTime; import com.baomidou.mybatisplus.annotation.TableField; import java.io.Serializable; import java.util.List; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; /** * ...
C#
UTF-8
1,948
2.671875
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; //状态转换条偶见 public enum Transition { NullTransition = 0, SawPlayer, //看到主角 LostPlayer, //跟丢主角 } //状态ID,是每一个状态的唯一标识,一个状态有一个stateid,而且其他的状态不可重复 public enum StateID { NullStateID = 0, ...
Java
UTF-8
191
2.828125
3
[]
no_license
package week1.dayy1; public class EvenNos { public static void main(String[] args) { for (int i=80;i>=60;i--) { if (i%2==0) { System.out.println(i); } } } }
Python
UTF-8
2,893
3.125
3
[]
no_license
# # Students : Philip Bouman , Alex Khawalid # Studentnr : 10668667 , 10634207 # Assignment B: step 1 NTMI # Date : 06-02-2015 # # Command-line: # (1): python bstep1.py -i [non-binarized] -o [binarized] from optparse import OptionParser # parse options parser = OptionParser() parser.add_option("-i", "--input", dest=...
C++
UTF-8
1,742
3.859375
4
[]
no_license
/************************************************************************************************** * Hau Tao * select.cpp * 01/26/2016 * This program implement the selection sort *The algorithm divides the input list into two parts: the sublist of items already sorted, *which is built up from left to right at th...
Python
UTF-8
1,346
3.265625
3
[]
no_license
def reverse_complement(read): read = read[::-1] read = read.replace("A", "t").replace("C", "g") read = read.replace("T", "a").replace("G", "c") return read.upper() def parse_fasta(filepath): with open(filepath) as fasta_file: reads = [ line.strip() for i, line in e...
C++
UTF-8
5,377
3.359375
3
[]
no_license
#ifndef CAMERA_HPP #define CAMERA_HPP #include <glm/glm.hpp> /** * @brief Manage the Camera. * * We consider a camera to be defined by two 4x4 matrices: * - the view matrix * - the projection matrix. * * The view matrix defines the position and the orientation of the camera in the * world coordinates. It is ...
Java
UTF-8
7,225
3.1875
3
[]
no_license
package bgs.geophys.library.Swing.Wizard; import java.awt.*; import java.util.Iterator; import java.util.Vector; import javax.swing.*; /** * A descriptor class used to reference a Component panel for the Wizard, as * well as provide general rules as to how the panel should behave. */ public class WizardPanelDescr...
PHP
UTF-8
1,945
2.9375
3
[]
no_license
<?php /** * Created by PhpStorm. * User: allflame * Date: 4/4/16 * Time: 9:08 PM */ namespace Logger; use Vain\Expression\Evaluator\EvaluatorInterface; use Vain\Expression\ExpressionInterface; use Vain\Expression\Logger\LoggerInterface; use Vain\Expression\Parser\ParserInterface; class Logger implements Logger...
C++
UTF-8
2,003
2.53125
3
[ "CC0-1.0" ]
permissive
#pragma once #include "ofMain.h" #include "ofxMidi.h" #include "ofxAnimationPrimitives.h" #define MIDI_SENDER MidiSenderController::getInstance() class MidiSenderController { class Note : public ofxAnimationPrimitives::Instance { ofxMidiOut * mMidi; const int mCh; const int mPich; ...
Markdown
UTF-8
1,150
2.953125
3
[]
no_license
# CookItYourself <p align="center"> <img src="page.png" width="400"/> </p> CookItYourself is a neat web app which transforms pictures of food (or single ingredients) into recipes. It uses image recognition—powered by Google Cloud Platform—to fetch matching recipes from [Chefkoch](http://chefkoch.de). The app was ...
Markdown
UTF-8
1,142
2.625
3
[ "MIT" ]
permissive
# Billing Package Umbrella package for billing, charging, invoicing and payment functionality ## 1. Installation ### 1.1 Setup your project's composer.json Add repository containing this package ```json "repositories": [{"type": "composer", "url": "http://your.resource.url"}], ``` (Note: you need to have acce...
C++
WINDOWS-1252
2,510
2.75
3
[]
no_license
#include"Queue.cpp" #include"time.h" #define Qn 5 #define maxit 5 #define maxdt 30 typedef LinkList EventList; EventList ev; Event en,et; LinkQueue q[5]; QElemType customer; int TotalTime,CustomerNum; int CloseTime=100; int n=1; int cmp(Event a,Event b){ if(a.Occurtime>b.Occurtime) return 1; else if(a...
Shell
UTF-8
441
2.875
3
[ "MIT" ]
permissive
#!/usr/bin/env bash #{{{ MARK:Header #************************************************************** ##### Author: JACOBMENKE ##### Date: Sat Apr 21 17:07:54 EDT 2018 ##### Purpose: bash script to ##### Notes: #}}}*********************************************************** for file in "$@"; do n...
C
UTF-8
2,745
2.890625
3
[]
no_license
#include "ros/ros.h" #include "svg_ros/OverSrv.h" #include <cstdlib> int over_light() { static int flg = 1; static ros::NodeHandle n; static ros::ServiceClient client; svg_ros::OverSrv srv; //printf("over light\n"); if(flg == 1){ client = n.serviceClient<svg_ros::OverSrv> ("over_light"); // co...
Python
UTF-8
386
3.25
3
[]
no_license
a=[ {"name":"nikhil","roll":12,"feedback":None}, {"name":"anil","roll":23,"feedback":None}, {"name":"raol","roll":1,"feedback":"Behaves like johnny"} ] for i in range(3): print(a[i]["name"]); # ab=a[0]["last_name"]; This returns an error...so ab=a[0].get("last_name","last_name not ...
Swift
UTF-8
1,511
2.921875
3
[]
no_license
// // ExampleViewController.swift // LovelyActivityIndicatorView // // Created by Evan Bacon on 09/14/2016. // Copyright (c) 2016 bacon brix. All rights reserved. // import UIKit class ExampleViewController: UIViewController { var loop: UIButton! } extension ExampleViewController { override func viewDidL...
C
UTF-8
1,689
4.40625
4
[]
no_license
//Write a program to pass a character array in a function and function should commute the //total numbers of occurrences of a particular character in the character array. #include <stdio.h> /******declaring function******/ void occurrences(); //globally declare variable char array[] char array[100]; int main(...
Markdown
UTF-8
6,826
3.359375
3
[]
no_license
# **Kickstarting with Excel** ## **Overview of Project** ### **Purpose** The purpose of this analysis is to provide a comprehensive review of the performance of other “Play” projects on Kickstarter, specifically with regards to the success of these projects relative to their launch dates. Louise contacted us after h...
Go
UTF-8
4,449
2.546875
3
[ "Apache-2.0" ]
permissive
// Copyright (c) 2021 Terminus, Inc. // // 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 agree...
PHP
UTF-8
7,693
2.828125
3
[]
no_license
<?php // Check we have the appropriate variable data $vote = $_POST['vote']; if (empty($vote)) { echo '<p>You have not voted for a politician.</p>'; exit; } /******************************************* Database query to get poll info *******************************************/ // Log in to databa...
C
UTF-8
1,139
3.859375
4
[]
no_license
#include <stdio.h> #include <stdlib.h> struct node { int value; struct node *l; struct node *r; }; typedef struct node node; node *ptr, *root = NULL; void createbinary() { root = getNode(50); root->l = getNode(20); root->r = getNode(30); root->l->l = getNode(70); root->l->r = get...
C
UTF-8
1,655
3.375
3
[]
no_license
/* ** EPITECH PROJECT, 2020 ** PSU_2019_malloc ** File description: ** list */ #include "malloc.h" #include <unistd.h> data_t *init_list(size_t size) { data_t *ret = sbrk(sizeof(data_t) + size); ret->struct_size = sizeof(data_t); ret->size = size; ret->adress = sbrk(0) + ret->struct_size; ret->is...
Java
UTF-8
1,351
3.234375
3
[]
no_license
import java.util.*; public class ColorfulStrings { private int[] digits; private int n; private int k; private int count; private int[] prods; private boolean[] used; public String getKth(int n, int k) { this.n = n; this.k = k; if (n == 1) { if (k <= 10) { return "" + (k - 1); } return "";...
C
UTF-8
2,829
2.59375
3
[]
no_license
#include <stdio.h> #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/event_groups.h" #include "esp_system.h" #include "esp_wifi.h" #include "esp_event_loop.h" #include "esp_log.h" #include "nvs_flash.h" #include "mdns.h" // Event group static EventGroupHandle_t wifi_event_group; const int C...
TypeScript
UTF-8
4,514
3.03125
3
[]
no_license
/** * validation.ts * Provide functions for validating data */ // Node Modules // NPM Modules import { isUndefined } from 'lodash' // Local Modules import { IValidationFields } from '@osm/server' // Constants and global variables export class Validation { private providedFields: any /** * Accept the pro...
Python
UTF-8
3,604
3.078125
3
[]
no_license
#! /bin/python3 # vim: set expandtab: ''' [begin_markdown get_started] # Getting Started Using CurveFit ## Data Mean The model for the mean of the data for this example is: \[ f(t; \alpha, \beta, p) = \frac{p}{1 + \exp [ -\alpha(t - \beta) ]} \] where \( \alpha \), \( \beta \), and \( p \) are unknown parameter...
PHP
UTF-8
438
2.640625
3
[]
no_license
<?php ini_set('display_errors', 0); function getTwitterStatus($userid, $x){ $url = "https://api.twitter.com/1/statuses/user_timeline/$userid.xml?count=$x&include_rts=1callback=?"; $xml = simplexml_load_file($url) or die("Unable to load news stream. Sorry!"); foreach($xml->status as $status){ $text = $s...
C++
UTF-8
1,590
2.796875
3
[]
no_license
/* https://leetcode.com/problems/count-the-repetitions/ Time: O(rep1 + M*N*(M+N)) ~ 10^6 Space: O(M*N) ~ 10^4 */ class Solution { public: int getMaxRepetitions(string s1, int rep1, string s2, int rep2) { int n = s1.size(); int m = s2.size(); vec...
SQL
UTF-8
1,394
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Generation Time: 2019 年 2 月 08 日 07:54 -- サーバのバージョン: 5.7.23 -- PHP Version: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
Markdown
UTF-8
3,370
2.953125
3
[]
no_license
# devjek example Hello we are devjek! This is a repo to give you an example of what we can do for you. We chose to recreate a [web design](https://dribbble.com/shots/2144293-Redesign-Dropbox-Dashboard/attachments/392373) we found on Dribbble by [Muhammad Asad](https://dribbble.com/mrasad40). We took the .PSD file and ...
JavaScript
UTF-8
449
2.5625
3
[]
no_license
function Command(commandString='') { this.childArguments = []; this.value = commandString; this.defaultAction = function() { // map to service } this.help = function() { console.log(` ${ `Command: `.gray } ${ `${this.value}`.blue } ${ `Arguments:`.gray } ${ this.childArguments } `); ...
Java
UTF-8
822
2.0625
2
[ "Apache-2.0" ]
permissive
package dharma.github.io.mvvmsample.data.database; import android.arch.lifecycle.LiveData; import android.arch.persistence.room.Dao; import android.arch.persistence.room.Insert; import android.arch.persistence.room.OnConflictStrategy; import android.arch.persistence.room.Query; import java.util.List; import dharma.g...
JavaScript
UTF-8
6,172
2.890625
3
[]
no_license
var center, weight; function setup(){ createCanvas(700,500); background('blue'); m = 50;//mass of block in kg g = 1.5;//gravity muSlider = createSlider(0.1,0.9,0.5,0.1); muSlider.position(100,580); mu_s = muSlider.value();//coefficient of static friction mu_k = muSlider.value()/2;//kinetic weight...
JavaScript
UTF-8
711
3.234375
3
[ "MIT" ]
permissive
//business logic // function player A(randomA) { // this.randomA = randomA; // } // function player B(randomB) { // this.randomB= randomB // } // playerA.prototype.scoreA =function() { // return scoreA.randomA; // } // playerB.prototype.scoreB = function() { // return scoreB.randomB; // } $(document).ready...
PHP
UTF-8
20,313
2.71875
3
[]
no_license
<?php class ParseQueries { protected $db; protected $total_rows = 0; protected $indexes = array(); protected $setting = array(); private function open_connection($host, $dbname) { try { $dsn = sprintf('mysql:host=%s;dbname=%s;', $host, $dbn...
Python
UTF-8
582
3.1875
3
[]
no_license
class Movie(): """A class movie which have some movie attributes Attributes: title (str): the title of the movie post_image_url (str): The link to the image of the movie trailer_youtube_url (str): The link to the trailer story (str): the story of the movie """ def __init...
Java
UTF-8
802
1.78125
2
[]
no_license
package com.liyuan.ecommerce.domain.po.memberlevel; import java.io.Serializable; import java.util.Date; import lombok.Data; @Data public class MemberLevelPo implements Serializable { /** * 主键 */ private Integer id; /** * 等级值 */ private String levelValue; /** * 登记名称 */ private String levelName; /** ...
Markdown
UTF-8
9,136
2.5625
3
[ "Apache-2.0" ]
permissive
# HyperflexWitnessConfigurationAllOf ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassId** | **string** | The fully-qualified name of the instantiated, concrete type. This property is used as a discriminator to identify the type of the payload when ma...
Python
UTF-8
1,204
2.640625
3
[ "MIT" ]
permissive
from django.db import models from random import randrange from datetime import timedelta from django.utils import timezone # http://www.crockford.com/wrmg/base32.html # Should reduce confusion on characters when typing in from a phone. No I/1 l/I l/1 confusion. CHARSET = '0123456789ABCDEFGHJKMNPQRSTVWXYZ' LENGTH = 10 ...
Shell
UTF-8
924
3.546875
4
[ "MIT" ]
permissive
#!/bin/bash source ${0%/*}/utils/common.sh function usage() { cat <<EOF Usage: $0 [options] -h| --help Display help text. -n| --no-questions No interactive mode (default behavior by default: raspbian image cache is not re-downloaded). EOF } while [[ $# -gt 0 ]]; do KEY="$1"...
JavaScript
UTF-8
7,775
2.609375
3
[]
no_license
var createStatement = "CREATE TABLE IF NOT EXISTS TaskNotification (id INTEGER PRIMARY KEY AUTOINCREMENT, title TEXT, duedate TEXT, tasktype TEXT, created_by TEXT, assigned_to TEXT, deal_id INTEGER, is_complete INTEGER, is_notified INTEGER)"; var createLoginStatement = "CREATE TABLE IF NOT EXISTS is_login (id INTEGER ...
PHP
UTF-8
1,426
3.015625
3
[ "MIT" ]
permissive
<?php namespace ClassConfig; use ClassConfig\Exceptions\MissingConfigException; /** * Class Config * @package ClassConfig */ abstract class AbstractConfig { /** * @var object */ protected $___owner; /** * @var null|AbstractConfig */ protected $___parent; /** * @var n...
Java
UTF-8
581
3.53125
4
[]
no_license
package interviewPrograms; public class ReverseOnlyAlphacharactersInString { public static void main(String[] args) { String str = "M@he,sh"; char [] values = str.toCharArray(); int l=0; int r = str.length()-1; while (l < r) { if(!Character.isAlphabetic(values[l])) { l++; }else if...
Python
UTF-8
1,949
2.703125
3
[]
no_license
import cv2 import sys import os import glob class FaceCropper(object): CASCADE_PATH = "./haarcascade_frontalface_default.xml" def __init__(self): self.face_cascade = cv2.CascadeClassifier(self.CASCADE_PATH) def generate(self, image_path, show_result): cap = cv2.VideoCapture(image_path) ...
TypeScript
UTF-8
3,035
2.765625
3
[]
no_license
import { FormValidationService } from './form-validation.service'; import { FormValidationRule } from './form-validation-rule'; describe('FormValidationService', () => { let service: FormValidationService; beforeEach(() => { service = new FormValidationService(); }); it('should be created', () => { e...
Python
UTF-8
452
3.359375
3
[]
no_license
import math def match(n): s = str(n) return s[0]=='1' and s[2]=='2' and s[4]=='3' and s[6]=='4' and s[8]=='5' and s[10]=='6' and s[12]=='7' and s[14]=='8' and s[16]=='9' and s[18]=='0' #print(math.sqrt(1020304050607080900), match(1020304050607080900)) magic = 10203040506070809 # Add a zero on the end of the pr...
Python
UTF-8
250
3.984375
4
[]
no_license
# Allison Gross # factorial.py # computes factorial # 01-07-13 def main(): fact = 1 n = eval(input( "What number should we compute the factorial of? ")) for i in range(1, n+1): fact = fact*i print(n, "factorial is", fact) main()
JavaScript
UTF-8
16,339
2.828125
3
[ "MIT" ]
permissive
//取得当前选中的升或降一的音符 function getNewNote(note, flag) { if (note == "") { return note; } // 判断音符出现的次数,如果出现次数大于1,则于无做升降调 var count = 0; for (var i = 1; i < note.length; i++) { if (notestr.indexOf(note.substr(i - 1, i)) > -1) { count++; } } if (count > 1) { return note; } var suffix = ""; var start = note...
PHP
UTF-8
2,167
2.9375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php /** * Reshi libray - an assertion library. * * @author Armando Sudi <armando.sudi@mixteer.com> * @copyright 2015 Mixteer * @link http://os.mixteer.com/baseutils/reshi * @license http://os.mixteer.com/baseutils/reshi/license * @version 0.1.0 * * MIT LICENSE */ use \Reshi\Constraint...
Python
UTF-8
3,295
3.234375
3
[]
no_license
#Sentiment Analysis usng Twitter API and TextBlob for sentiment Analysis # #https://apps.twitter.com #Owner ybouakkaz import csv import os import re import tweepy from textblob import TextBlob import numpy as np import matplotlib.pyplot as plt class SearchPolarities: positive = 0.0 neutral = 0.0 negative = 0.0 ...
Markdown
UTF-8
697
2.625
3
[]
no_license
### Date created 11/25/2018 ### Project Title Explore US Bikeshare Data ### Description This project uses python code to analyze data related to bike share systems for three cities: Chicago, New York City and Washington. This project will 1) import data based on user inputs 2) compute descriptive statistics r...
Java
UTF-8
557
3.328125
3
[]
no_license
package KTU; import java.util.Scanner; public class Uzd_0_03 { public static void main(String[] args) { Scanner reader = new Scanner(System.in); System.out.println("Kiek yra monetu po 5 ct? "); double a = reader.nextInt(); System.out.println("Kiek yra monetu po 20 ct? "); double b = reader....
Markdown
UTF-8
713
2.703125
3
[ "Apache-2.0" ]
permissive
``` # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def buildTree(self, preorder, inorder): # 返回以preorder[0]为root的 树节点 """ :type preorder: List[int] :type inord...
Java
UTF-8
869
3.375
3
[]
no_license
package Ex46; /* * UCF COP3330 Summer 2021 Assignment 3 Solution * Copyright 2021 Richard Pekarski */ import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class fileReader { public List<String> readFile() { // scans file...
Java
GB18030
6,211
2.46875
2
[]
no_license
package com.lantu.comhelper.utils; import java.io.BufferedReader; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import android.content.Context; import an...
Java
UTF-8
353
2.625
3
[]
no_license
package utilities; import javafx.scene.image.Image; public class Utilities { public static Image image(String url){ try { return new Image(Utilities.class.getClassLoader().getResourceAsStream(url)); }catch (Exception e){ System.out.println("image não existe"); r...
C
UTF-8
4,630
3
3
[ "MIT" ]
permissive
// // main.c // Fizteh2 // // Created by Александр Ноянов on 27/02/2019. // Copyright © 2019 MPEI. All rights reserved. // //#include <stdio.h> // //int main(int argc, const char * argv[]) { // // insert code here... // printf("Hello, World!\n"); // return 0; //} #include <assert.h> #include <limits.h> #...
SQL
UTF-8
125
2.875
3
[ "MIT" ]
permissive
select e1.name as Employee from Employee e1 join Employee e2 on e1.ManagerId = e2.id where e1.Salary > e2.Salary
JavaScript
UTF-8
5,775
2.640625
3
[]
no_license
const request = require('supertest'); if (!process.env.USER_STORE_API_SECURED_TEST_URL) { require('./helper/services'); } else { jest.setTimeout(10000); } const requestUserApi = () => request(process.env.USER_STORE_API_SECURED_TEST_URL); describe('User API', () => { it('should return 404 when getting a non...
Swift
UTF-8
1,728
2.578125
3
[]
no_license
// // Conversation+CollectionView.swift // UpFit Coaching // // Created by Jason Pierna on 10/05/2018. // Copyright © 2018 Jason Pierna. All rights reserved. // Version 1.0 import UIKit extension ConversationController: UICollectionViewDataSource { func collectionView(_ collectionView: UICollectionView, numberOf...
PHP
UTF-8
1,081
2.640625
3
[ "MIT" ]
permissive
<?php session_start(); if(!isset($_SESSION['name'])) { header('Location: index.php?auth=0'); } ?> <!DOCTYPE html> <html lang="en"> <?php include('head.php'); ?> <body> <?php include('menu.php'); ?> <section class="main container pt-5 w-50"> <?php //When the client places the order //Empty the cart and show...
Python
UTF-8
5,281
3.5
4
[]
no_license
# This code demonstrates various tree and tree algorithm implementations. # Credit to Miller and Ranum, Problem Solving with Algorithms and Data Structures Using Python from pythonds.basic.stack import Stack from pythonds.trees.binaryTree import BinaryTree import operator # Binary Tree """ class BinaryTree: d...
Python
UTF-8
2,288
2.828125
3
[]
no_license
# These are the dependecies. The bot depends on these to function, hence the name. Please do not change these unless your adding to them, because they can break the bot. import discord import asyncio from discord.ext.commands import Bot from discord.ext import commands import platform import spotipy import spoti...
C#
UTF-8
3,172
3.15625
3
[]
no_license
using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Xml; using System.Text; namespace ProtoEngine { /// <summary> /// Klasa odpowiadająca opcji lub zmiennej dowolnego typu. /// Dziedziczące klasy muszą udostępniać konstruktory: /// (string na...
Java
UTF-8
346
2.34375
2
[]
no_license
package model.repository; public interface Queryable { public static final int TYPE_STORY = 0,TYPE_GUEST=1,TYPE_SUB=2,TYPE_REP=3; public int getType(); public boolean hasMember(String memName); public Object getMember(String memName); public boolean isMemberEqualTo(String memName,Queryable comparTo); pu...
Java
UTF-8
136,583
2.515625
3
[]
no_license
import com.sun.javaws.exceptions.InvalidArgumentException; import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.geometry.*; import javafx.geometry.Insets; import javafx.s...
Python
UTF-8
3,077
2.78125
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Sat Feb 22 23:16:30 2020 @author: PC MILO fixe """ import os import matplotlib.pyplot as plt from Src.controllers.swarmDescriptor import swarmDescriptor from Src.milolib import toussaint def testEverythingOnAnInstance( points, save = False, affiche = True ) : """ pren...
Java
UTF-8
1,116
1.90625
2
[ "Apache-2.0" ]
permissive
package com.avatech.edi.codegen.service.sql; import com.avatech.edi.codegen.data.ModelConstant; import com.avatech.edi.codegen.model.bo.DomainModel; import com.avatech.edi.codegen.model.bo.project.ProjectStructure; import com.avatech.edi.codegen.model.bo.project.modelparameter.BaseModelParameter; import com.avatech.ed...
Java
UTF-8
3,360
2.28125
2
[]
no_license
package com.kpos.dao; import com.kpos.domain.MenuCategory; import org.springframework.stereotype.Repository; import javax.persistence.NoResultException; import javax.persistence.Query; import java.util.List; /** * Created by kpos. * Author: kkwang * Date: 3/10/12 11:21 PM */ @Repository public cla...
C++
UTF-8
371
3.59375
4
[]
no_license
/* Time Duration 4 Minutes (1746-1749) * Write a C program to check whether a number is negative, positive, or zero. */ #include <stdio.h> int main() { long int number; scanf("%ld", &number); if(number==0) printf("0\n"); else if(number<0) printf("negative number.\n"); else ...
PHP
UTF-8
3,210
2.5625
3
[ "Apache-2.0" ]
permissive
<?php namespace App\Controller\Api; use App\Cache; use Doctrine\ORM\EntityManager; use App\Entity; use App\Http\Request; use App\Http\Response; class NowplayingController { /** @var EntityManager */ protected $em; /** @var Cache */ protected $cache; /** * @param EntityManager $em * @pa...