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
Java
UTF-8
2,191
2.109375
2
[]
no_license
package cn.nowcode.controller; import cn.nowcode.domain.User; import cn.nowcode.rabbitmq.MQSender; import cn.nowcode.redis.RedisService; import cn.nowcode.redis.UserKey; import cn.nowcode.result.CodeMsg; import cn.nowcode.result.Result; import org.springframework.beans.factory.annotation.Autowired; import org.springfr...
Java
UTF-8
2,699
2.203125
2
[]
no_license
package com.sjsu.aws.controller; import java.io.File; import java.sql.Date; import java.util.List; import java.util.Properties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import o...
Java
UTF-8
4,696
2.796875
3
[]
no_license
package person.daizhongde.virtue.util.exception; import java.io.Serializable; import java.text.MessageFormat; import java.util.MissingResourceException; /** * 业务异常基类. 带有错误代码与错误信息. 用户在生成异常时既可以直接赋予错误代码与错误信息. 也可以只赋予错误代码与错误信息参数. * 如ErrorCode=ORDER.LACK_INVENTORY ,errorArg=without EJB * 系统会从errors.properties中查...
PHP
UTF-8
1,067
2.984375
3
[]
no_license
<?php namespace App; abstract class BaseClass { protected static $instance; public static function getInstance() { if(!static::$instance) { static::$instance = new static; } return static::$instance; } public static function...
C
UTF-8
287
3.625
4
[]
no_license
#include <stdio.h> int main (void) { double X1, Y1, X2, Y2; double A, B; printf("Informe X1 Y1 X2 Y2: "); scanf("%lf %lf %lf %lf", &X1, &Y1, &X2, &Y2); A = (Y2 - Y1) / (X2 - X1); B = (Y1 * X2 - Y2 * X1) / (X2 - X1); printf("Y = %lf * x + %lf\n", A, B); }
Python
UTF-8
2,270
3.515625
4
[]
no_license
''' Advent of Code Day 1 ''' from typing import Iterable import math from multiprocessing import Pool import utils_aoc_2019 as utils def calculate_fuel_simple(mass: int) -> int: """ The basic function for simple fuel calacualte Parameters ---------- mass : int the mass to calcualte fuel...
Rust
UTF-8
3,291
2.765625
3
[]
no_license
use crate::CompletedMarker; use super::Parser; use cst::SyntaxKind::{self, *}; use cst::T; mod expressions; mod items; pub enum EntryPoint { Module, Block, Expression, } pub(super) fn entry_point(parser: &mut Parser<'_>, entry: EntryPoint) { match entry { EntryPoint::Module => { ...
C#
UTF-8
4,039
3
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; namespace CommonLib.Utils { /// <summary> /// Xml로 만들어 주는 Util 모음 = 실제 엔진은 CXmlMaker이며 이 Class를 이용하여 만듬 /// </summary> public class CXmlUtil { /// <summary> /// DataSet을 Xml형식으로...
Java
UTF-8
3,619
2.21875
2
[]
no_license
package tralafarlaw.com.appred; import android.support.annotation.NonNull; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.fir...
Python
UTF-8
1,906
2.828125
3
[]
no_license
#!/usr/bin/python from http.server import BaseHTTPRequestHandler,HTTPServer from json_handler import JsonHandler from os import curdir, sep import json filename = 'data' PORT_NUMBER = 8081 #This class will handles any incoming request from #the browser class statistics_service_handler(BaseHTTPRequestHandler): de...
Java
UTF-8
887
2.09375
2
[]
no_license
import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class Assi21 { public static void main(String[] args) throws InterruptedException { System.setProperty("webdriver.chrome.driver","./driver/chromedriver.exe"); // ChromeDriver driv...
Java
UTF-8
3,619
3.578125
4
[]
no_license
package competitiveProgramming.leetcode.thirtyDaysLeetcodingChallenge.year_2020.july.week3; import utils.ArrayUtils; import java.util.*; /* https://leetcode.com/explore/featured/card/july-leetcoding-challenge/546/week-3-july-15th-july-21st/3393/ Top K Frequent Elements Given a non-empty array of integers, return t...
Python
UTF-8
11,766
2.640625
3
[]
no_license
#!/usr/bin/python3 from tkinter import * from tkinter import ttk class Program: def __init__(self,master): master.option_add('*tearoff',False) master.title('Point System') self.menubar=Menu(master) master.config(menu = self.menubar) self.file=Menu(self.menubar) s...
PHP
UTF-8
19,348
2.546875
3
[]
no_license
<?php class Solicitudturno extends \Phalcon\Mvc\Model { /** * * @var integer */ protected $solicitudTurno_id; /** * * @var integer */ protected $solicitudTurno_legajo; /** * * @var string */ protected $solicitudTurno_nomApe; /** * *...
Java
UTF-8
1,055
2.0625
2
[]
no_license
package com.yichuangzhihui.robotvrp.pojo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; import java.util.Date; /** * @Date : 2020/12/14 1...
Python
UTF-8
567
3.203125
3
[]
no_license
from matplotlib import pyplot as plt class PlotBuilder: def __init__(self, name = 'Plot', labelX = 'x', labelY = 'y'): self.name = name self.labelX = labelX self.labelY = labelY self.plots = [] def AddPlot(self, x, y, label): self.plots.append((x, y, label)) def Bu...
C++
UTF-8
460
2.765625
3
[]
no_license
using namespace std; #pragma once class Input { private: struct Mouse { float x, y; bool left = false; }; public: Input(); ~Input(); void setKeyDown(int key); void setKeyUp(int key); bool isKeyDown(int key); void setMousePosition(int lx, int ly); void setMouseLeftDown(bool l); bool isMouseLeftDown()...
C++
UTF-8
915
2.90625
3
[]
no_license
#pragma once #include <chrono> #include <ctime> #include <string> struct timestamp { timestamp(const timestamp& other); timestamp(timestamp&& other); void swap(timestamp& other); timestamp& operator=(const timestamp& other); static timestamp create(const std::string& s); static timestamp create(const s...
Python
UTF-8
1,663
2.78125
3
[ "MIT" ]
permissive
#!/usr/bin/env python """Remove embedded signalalign analyses from files""" ######################################################################## # File: remove_sa_analyses.py # executable: remove_sa_analyses.py # # Author: Andrew Bailey # History: 02/06/19 Created ##################################################...
Java
GB18030
3,425
2.390625
2
[]
no_license
package com.ericsson.lte.session.controller; import com.ericsson.lte.session.consts.ParametersConstants; import com.ericsson.lte.session.entity.RequestBean; import com.ericsson.lte.session.entity.ResponseBean; import com.ericsson.lte.session.entity.ResponseResult; import com.ericsson.lte.session.exception.SessionContr...
Java
UTF-8
254
2.21875
2
[]
no_license
package file.exception; /** * @ClassName UnavailableChunkException * @Description * @Date 2019/11/17 **/ public class UnavailableChunkException extends Exception{ public UnavailableChunkException(String message){ super(message); } }
Java
UTF-8
478
3.03125
3
[]
no_license
/** Program header: Profitable.java * * Author: George Gichuki * Class: Monday and Wednesday 11.00 to 13.45 * * Brief Program Description: * This is the interface, and it has abstract methods to be implemented by it subclass. * There are three methods that the inheriting classes will add data ...
Java
UTF-8
5,173
1.960938
2
[]
no_license
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
C#
UTF-8
1,300
3.765625
4
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Game_of_Numbers { class Program { static void Main(string[] args) { int firstNum = int.Parse(Console.ReadLine()); int secondNum = int.Parse(Cons...
JavaScript
UTF-8
2,504
2.78125
3
[]
no_license
import fetch from 'isomorphic-fetch' // const API_ROOT = 'http://speadmin.nexus.net/'; const API_ROOT = 'http://localhost:5000/'; // Fetches an API response and normalizes the result JSON according to schema. // This makes every API response have the same shape, regardless of how nested it was. const callApi = (type,...
Java
UTF-8
563
3.203125
3
[]
no_license
package regex; import java.util.regex.Pattern; public class MatchOnlyAlpha { public static void main(String[] args) { System.out.println(Pattern.matches("PM$", "12:00:00PM")); //? System.out.println(Pattern.matches("W[a-zA-Z]{7}", "Wabcdefg")); //true System.out.println(Pattern.matches("W[a-zA-Z]{7...
Java
UTF-8
822
3.03125
3
[]
no_license
package domain; public class BirdSpecie { private String name; private Integer yearOfDiscovery; private String code; public BirdSpecie(String name, Integer yearOfDiscovery, String code) { super(); this.name = name; this.yearOfDiscovery = yearOfDiscovery; this.code = code; } public String g...
PHP
UTF-8
973
2.53125
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateEventTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('event', function ...
Markdown
UTF-8
742
2.625
3
[]
no_license
# Vapari "Vapaaehtoistyön rekisteri" (Register for volunteer work) Vapari is program with GUI to keep record of volunteer workers, customers and interactions between them. As it is, there are two imaginary registers ready for testing. By default you can access the register named Jyväskylä. Done with Java and ...
Java
UTF-8
4,491
2.3125
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2008 The Microlog project @sourceforge.net * 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...
C
UTF-8
237
3.234375
3
[]
no_license
#include "../../j02/ex06/ft_putnbr.c" int ft_recursive_factorial(int nb) { if (nb == 1) return (1); nb = nb * ft_recursive_factorial(nb - 1); return (nb); } int main(void) { ft_putnbr(ft_recursive_factorial(4)); return (0); }
Go
UTF-8
3,359
3.046875
3
[ "Apache-2.0" ]
permissive
package config import ( "fmt" "reflect" "regexp" "strings" "github.com/golang/glog" ) type logMsg func(string, ...interface{}) var mapregex = regexp.MustCompile(`mapstructure:"([^"]+)"`) var blocklistregexp = []*regexp.Regexp{ regexp.MustCompile("password"), } // LogGeneral will log nearly any sort of value,...
Java
UTF-8
736
3.125
3
[]
no_license
package com.company; public class Book { private final String name; private final Author author; private double price = 100; private final String genre; public Book(String name, Author author, String genre) { this.name = name; this.author = author; this.genre = g...
PHP
UTF-8
5,800
3.109375
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); /** * SPHPlayground Framework (https://playgound.samiholck.com/) * * @link https://github.com/samhol/SPHP-framework for the source repository * @copyright Copyright (c) 2007-2018 Sami Holck <sami.holck@gmail.com> * @license https://opensource.org/licenses/MIT The MIT License...
Markdown
GB18030
2,756
2.703125
3
[]
no_license
/* author:zhwilson content:ģı롢ж */ //----------------------code---------------------- //ͷļ #include<linux/init.h> #include<linux/module.h> /* ģ module_param(name, type, perm);// module_param_array(name, type, num, perm);// type: bool, invbool(ߵbool,falseΪֵ), charp(ֵַָ), int, long, short, uint, ulong, ushort; ...
SQL
UTF-8
617
3.03125
3
[]
no_license
INSERT INTO department (name) VALUES ("Accounts"), ("Human Resources"), ("Development"), ("Sales"); INSERT INTO role (title, department_id) VALUES /* 1 */ ("Accountant 1", 1), /* 2 */ ("Accountant 2", 2), /* 3*/ ("Human Resource Manager", 3), /* 4 */ ("Lead Engineer", 4), /* 5 */ ("Software Developer", 5), /* 6 ...
Go
UTF-8
500
3.171875
3
[]
no_license
package main import( "fmt" "io" ) func main(){ for true { var upper, lower int _, err := fmt.Scanf("%d", &upper) if err == io.EOF{ break } _, err = fmt.Scanf("%d", &lower) if err == io.EOF { break; } if lower == 0 && u...
Java
GB18030
1,294
2.71875
3
[]
no_license
package com.Tomcat.main; import java.io.InputStream; import java.io.OutputStream; import java.net.ServerSocket; import java.net.Socket; import com.Tomcat.Request.RequestContent; import com.Tomcat.Start.Start; public class TomcatMain { public static void main(String[] args) throws Exception { ...
Java
UTF-8
6,725
1.734375
2
[ "MIT" ]
permissive
package com.example.arken.fragment; import android.app.Activity; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget....
Java
UTF-8
13,066
2.640625
3
[]
no_license
package com.stefa; import com.stefa.domain.Reservation; import com.stefa.domain.Room; import lombok.SneakyThrows; import javax.swing.*; import javax.swing.table.DefaultTableModel; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEv...
SQL
UTF-8
249
2.703125
3
[]
no_license
ALTER USER sys IDENTIFIED BY "1wcsites2"; CREATE USER csdb IDENTIFIED BY "1wcsites2" DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp; GRANT CONNECT, CREATE session, CREATE table, CREATE view TO csdb; GRANT UNLIMITED TABLESPACE to csdb; COMMIT;
Java
UTF-8
1,521
2.953125
3
[]
no_license
package com.mparaz.pinoyjugakka; import akka.actor.ActorRef; import akka.actor.Props; import akka.actor.UntypedActor; import akka.routing.RoundRobinRouter; /** * Receive messages and scatter to the workers */ public class ScatterGatherActor extends UntypedActor { private final ActorRef workerRouter; publi...
C
UTF-8
415
4.25
4
[]
no_license
#include <stdio.h> /*Clase 3. Ej2:Declara x = 2 e y = 55. Intercambiar los valores. */ int main() { //variables int x=2; int y=55; int aux; //operacions aux = x; x = y; y = aux; //resultats printf("\n\t\t\4 \4 \4 \4 \4 Clase 3 - Ex 2 \4 \4 \4 \4 \4\n\n"); printf("\n\t\20El nu...
C++
UTF-8
2,276
2.578125
3
[ "BSD-2-Clause", "BSD-3-Clause" ]
permissive
/*========================================================================= =========================================================================*/ #ifndef __itkTetrahedralMeshWriter_h #define __itkTetrahedralMeshWriter_h #include "itkMesh.h" #include "itkCellInterface.h" #include "itkTetrahedronCell.h" #include...
Markdown
UTF-8
8,505
3.265625
3
[ "MIT" ]
permissive
# README ## ABOUT * NAME : AMGDeliveryDispatch * Author : Abel Gancsos * Version : v. 1.0.0 ## Implementation Details This utility, AMGDeliveryDispatch, is a system that helps assign delivery orders to appropriate vans based on certain ...
Java
UTF-8
11,971
1.601563
2
[ "BSD-3-Clause", "MIT", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "LicenseRef-scancode-unknown" ]
permissive
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not ...
JavaScript
UTF-8
2,709
2.59375
3
[]
no_license
/* * @Author: xiangmin * @File: post和get请求函数 * @Date: 2017-10-24 10:11:04 * @Last Modified by: xiangmin * @Last Modified time: 2017-10-24 10:12:01 */ import Axios from 'axios'; import { Message } from 'element-ui'; /** * post * @param {String} url [地址] * @param {Object} params [参数] * @return {Object}...
Java
UTF-8
1,600
2.1875
2
[]
no_license
package com.afn.realstat; import static org.junit.Assert.assertEquals; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.c...
C++
UTF-8
1,603
3.234375
3
[]
no_license
#include "Character.hpp" Character::Character(std::string const & name) : _name(name), _ap(40), _weapon(NULL) { return; } Character::Character(Character const & src) { *this = src; } void Character::recoverAP(void) { this->_ap += 10; if (this->_ap > 40) this->_ap = 40; } void Character::...
PHP
UTF-8
790
2.5625
3
[]
no_license
<?php declare(strict_types=1); require 'src/Entity/Cliente.php'; require 'src/Entity/Producto.php'; require 'src/Database.php'; require 'src/Model/ClienteModel.php'; require 'src/Model/ProductoModel.php'; $title = "Movie FX"; try { //Conexion BD $pdo = Database::getConnection(); // ...
C#
UTF-8
653
2.578125
3
[]
no_license
using UnityEngine; using System.Collections; using UnityEngine.UI; using UnityEngine.SceneManagement; public class Player : MonoBehaviour { private const int MAX_HEALTH = 200; [SerializeField] int Health = MAX_HEALTH; [SerializeField] Image ImgHealth; [SerializeField] AudioSource myAudioSource; [SerializeFiel...
Markdown
UTF-8
1,724
2.796875
3
[]
no_license
## VINYL CUTTER In the sixth day of fab works I learned about vinyl cutter and how to operate it. It is simply like a printer.We can use Cut studio or coral draw for vinyl cutting. The vinyl cutter uses a small knife to precisely cut the outline of figures into a sheet or piece of vinyl, but not the release liner. ...
JavaScript
UTF-8
135
3.015625
3
[]
no_license
function calcularEdad(date, now) { var calcular = date - now; return calcular; } console.log(calcularEdad(2020, 1980))
C#
UTF-8
1,791
3.140625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Reactive.Linq; using System.Reactive.Subjects; using System.Text; namespace Subjects { class Program { static void Main(string[] args) { var carBooking = new PartialBooking("Car Hire"); var ...
JavaScript
GB18030
3,241
2.734375
3
[ "MIT" ]
permissive
var timer = window.setInterval(autoSave,30000); //ʱ function clear(){ window.clearInterval(timer); } function start(){ timer = window.setInterval(autoSave,30000); } function autoSave(){ var shortTitle = document.getElementById("shortTitle").value; if(shortTitle!=""){ shortTitle = encodeURI(encodeURI(shortTitle));...
Java
UTF-8
3,614
2.71875
3
[]
no_license
package com.example.illegalaliens.utilities.path; import org.junit.Test; import com.badlogic.gdx.utils.Array; import com.example.illegalaliens.utilities.Node; import com.example.illegalaliens.utilities.Radar; import com.example.illegalaliens.utilities.path.DijkstraSolver; import com.example.illegalaliens.utilities.pa...
Python
UTF-8
2,770
3.328125
3
[]
no_license
import time import board import pulseio import neopixel from adafruit_motor import servo import touchio pwm = pulseio.PWMOut( # (pulseio) is the directory. # (.PMWOut) is a folder inside of that directory. # The indented code below is the ...
Java
UTF-8
1,900
2.03125
2
[]
no_license
package com.example.minangkabau; import androidx.appcompat.app.AppCompatActivity; import android.graphics.Typeface; import android.os.Bundle; import android.widget.LinearLayout; import android.widget.TextView; public class pakaianActivity extends AppCompatActivity { TextView t; @Override protected void...
Markdown
UTF-8
4,605
2.65625
3
[]
no_license
--- description: "Simple Way to Make Quick South African Indian Crab Curry" title: "Simple Way to Make Quick South African Indian Crab Curry" slug: 1162-simple-way-to-make-quick-south-african-indian-crab-curry date: 2020-10-13T01:51:43.920Z image: https://img-global.cpcdn.com/recipes/6704548423925760/751x532cq70/south-...
TypeScript
UTF-8
1,000
3.234375
3
[]
no_license
/// <reference path="../reference.ts"/> module System { "use strict"; /** * Exception being thrown in case that an argument to a method or function is ineligibly <code>undefined</code> or * <code>null</code>. * * @author Christian Schaiter */ export class ArgumentUndefinedExcep...
C++
UTF-8
675
2.65625
3
[]
no_license
#include <stdio.h> #include <sys/time.h> #include <string.h> #include <time.h> #include <unistd.h> #include "TTime.h" #include "TcpClient_Linux.h" bool terminated = false; void TcpMessage(TcpClient* sender, const char* data, int dataLength) { printf("Message: %s\n", data); } int main(int argc, char **argv) { T...
JavaScript
UTF-8
1,870
2.5625
3
[ "MIT" ]
permissive
(function($) { $.fn.flexString = function() { var qs = $.QueryString, items, order, hide, remove; return this.each(function() { items = $(this).children(); for (key in qs) { if (qs.hasOwnProperty(key)) { if (key == "order") { if (qs[key] == "reverse") { $(this).css({ ...
C#
UTF-8
1,759
2.5625
3
[]
no_license
using System; using System.Net.Http; using System.Text; using System.Threading.Tasks; using IpAnalyzerMap.ExternalProviders.Models; using Newtonsoft.Json; using Newtonsoft.Json.Linq; namespace IpAnalyzerMap.ExternalProviders.Base { public abstract class BaseApiBaseLocationProvider : BaseLocationProvider { ...
Ruby
UTF-8
1,994
2.59375
3
[]
no_license
require 'rails_helper' RSpec.describe Player, type: :model do describe ".import_players!" do it "creates basketball player models" do #by default, this is stubbed out to return 2 results player_data_source = PlayerDataSource.new expect { Player.import_players!(player_data_source, ['bas...
Java
UTF-8
1,206
2.265625
2
[]
no_license
package com.dy.cmls.loader.bean; import java.util.List; /** * Created by lcjing on 2019/1/3. */ public class IndexBannerBean { private String status; private String message; private List<BannerInfo> info; public String getStatus() { return status; } public void setStatus(String...
Markdown
UTF-8
309
2.515625
3
[]
no_license
# codeceptjs-puppeteer-performance Repository with a reproducible example of performance downgrade when using CodeceptJs with Puppeteer ```sh npm install yarn start ``` See the difference in ms betwen the two tests: on my machine the first scenario lasts around 10263ms, and the second one - around 5935ms
Python
UTF-8
1,237
3.1875
3
[]
no_license
from local_library import * import matplotlib.pyplot as plt import pandas as pd import numpy as np import math n = 1000 #How many individuals will be in the world it = 100 #How many iterations of the algorithm samples = 5 #How many samples of the algorithm will be considered limit_time = 5 #How many interactions the p...
C++
UTF-8
4,982
2.53125
3
[ "BSD-3-Clause" ]
permissive
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen // SPDX-License-Identifier: BSD-3-Clause /** * @class vtkToneMappingPass * @brief Implement a post-processing Tone Mapping. * * Tone mapping is the process of mapping HDR colors to [0;1] range. * This render pass supports four d...
Python
UTF-8
722
2.703125
3
[]
no_license
import cv2 import numpy as np img = cv2.imread("../Resources/Photos/cats.jpg") cv2.imshow('cats', img) blank = np.zeros(img.shape, dtype = 'uint8') cv2.imshow("blank", blank) gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) cv2.imshow('Gray', gray) #ret, thresh = cv2.threshold(gray, 125, 255, cv2.THRESH_BINARY) #cv2....
Go
UTF-8
1,699
2.75
3
[ "Apache-2.0" ]
permissive
/* * Copyright 2020 Mooltiverse * * 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 agreed to ...
Java
UTF-8
212
1.75
2
[]
no_license
package com.mr2.mvvm_test.sample.dagger_and_view_model; import dagger.Provides; @dagger.Module public class InjectModule { @Provides Repository provideRepository(){ return new RepositoryImpl(null); } }
PHP
UTF-8
4,478
2.640625
3
[]
no_license
<?php try { $host = "db.ist.utl.pt"; $user ="ist426058"; $password = "vjwj7059"; $dbname = $user; $db = new PDO("pgsql:host=$host;dbname=$dbname", $user, $password); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->query("start transaction;"); $case = $_POST["case"]; switch($cas...
PHP
UTF-8
3,753
2.578125
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers\Admin; use Illuminate\Http\Request; use App\Http\Controllers\Controller; //正则验证表单 use App\Http\Requests\StoreCate; //模型 use App\Models\Cates; use DB; class CateController extends Controller { /** * 分类 主页面 显示 * * @return 第21行 * @return_param cates_data(栏目数据...
C++
UTF-8
1,872
2.59375
3
[]
no_license
#pragma once /* ---------------------------------------------------------------- name: SceneGraph.hpp purpose: scenegraph class declaration version: SKELETON CODE TODO: nothing (see SceneGraph.cpp) author: katrin lang computer graphics htw berlin --...
C#
UTF-8
1,579
2.640625
3
[ "MIT" ]
permissive
using Xunit; using System.Collections.Generic; using ArgentSea; using FluentAssertions; namespace ArgentSea.Test { public class StringExtensionTests { private static string Emoji { get { //return char.ConvertFromUtf32(System.Convert.ToInt32(0xF09f9883)); return char.ConvertFromUtf32(System.Conver...
Java
UTF-8
849
2.40625
2
[]
no_license
package cn.winxo.qunar.Utils; import java.io.InputStream; import java.util.HashSet; import org.apache.http.protocol.HTTP; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserFactory; public class XmlParserUtils { public static HashSet<String> getSet(InputStream is) throws Exception { HashSet...
Java
UTF-8
2,775
1.960938
2
[]
no_license
package com.aldogrand.kfc.pollingmanager.model; import com.aldogrand.kfc.pollingmanager.rules.Rule; public class EventAttributes { private Rule rule; private String integrationModuleName; private String integrationModuleId; private String sessionToken; private String baseUrl; private String e...
C
UTF-8
3,287
3.28125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include "fs.h" #include "disk.h" #define SET true #define RESET false void printbit2(char* ptr){ for(int i = 0; i < 4; i++){ for(int j = 7; j >= 0; j--){ printf("%d", (ptr[i] >> j) & 1); } printf(" "); } prin...
TypeScript
UTF-8
3,458
2.53125
3
[ "Apache-2.0" ]
permissive
module game { export class CarPartInfoItem extends eui.Component { center : eui.Group; LvUp : eui.Group; partIcon : eui.Image; partNameTxt : eui.Label; lvUpBtn : eui.Rect; expSlider : Slid...
JavaScript
UTF-8
409
3.46875
3
[]
no_license
// function fields(string) { // return string.match(/[\w\n]+/g); // } let fields = function (str) { return str.split(/[ \t,]+/); }; console.log(fields("Pete,201,Student")); // -> ['Pete', '201', 'Student'] console.log(fields("Pete \t 201 , TA")); // -> ['Pete', '201', 'TA'] console.log(fields("Pete \t 201")...
Markdown
UTF-8
2,991
3.171875
3
[]
no_license
# Dialogue Act Tagging Dialogue act (DA) tagging is an important step in the process of developing dialog systems. DA tagging is a problem usually solved by supervised machine learning approaches that all require large amounts of hand labeled data. A wide range of techniques have been investigated for DA tagging. In ...
JavaScript
UTF-8
650
3.84375
4
[]
no_license
// Exercise 1.0 // ------------ // Write an app that registers a click anywhere on the screen. // Once the user clicks, let them know that they did it! // Hints: // - Target the <body> const body = document.querySelector('body'); body.style.fontSize='3rem'; body.style.textAlign='center'; body.style.backgroundColor='l...
Shell
UTF-8
517
3.234375
3
[]
no_license
#!/bin/sh set -e if ! dpkg -s openjdk-8-jdk >/dev/null 2>&1; then apt-get update apt-get install openjdk-8-jdk android-tools-adb fi java -version update-alternatives --config java # download und unzip Android SDK Tools wget "https://dl.google.com/android/repository/$ANDROID_SDK_TOOLS" >/dev/null 2>&1 mkdir...
C#
UTF-8
1,148
2.703125
3
[ "Unlicense" ]
permissive
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 ProgramaFidelidade { public partial class CadastroCliente : Form { int posicao...
Markdown
UTF-8
583
3.546875
4
[ "MIT" ]
permissive
# Explicit Casting In the C++ language, you can use the following methods to convert or cast data from one type to another. - C styled casts - `reinterpret_cast` - `dynamic_cast` - `static_cast` - `const_cast` ## C Styled Casts In the standard C++ and C language, you can convert or "cast" similiar types of data. F...
Java
UTF-8
1,490
2.703125
3
[]
no_license
package external; public class DefaultExceptionHandler { private String featurePackageName; private String featureName; private String programUnitName; private String eventName; private String exceptionName; public String getFeaturePackageName() { return featurePackageName; } public void setFeaturePac...
Java
UTF-8
4,837
2.390625
2
[]
no_license
package ie.wit.witselfiecompetition; import android.content.res.Configuration; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.ProgressBar;...
Markdown
UTF-8
3,800
3.296875
3
[]
no_license
# Real-time-Driver-Distraction-Detection-System-with-Continuous-Face-Tracking INTRODUCTION TO THE PROJECT- This project detects driver's face and tracks continuously to check for driver's distraction. This also make sure if the same driver is driving the vehicle who gave the breath alcohol testing. The code is designe...
Markdown
UTF-8
808
4
4
[ "MIT" ]
permissive
# Disallow `new Array()` The ESLint built-in rule [`no-array-constructor`](https://eslint.org/docs/rules/no-array-constructor) enforces using an array literal instead of the `Array` constructor, but it still allows using the `Array` constructor with **one** argument. This rule fills that gap. When using the `Array` c...
Java
UTF-8
785
2.09375
2
[]
no_license
package com.cwn.wizbank.services; import java.io.IOException; import jxl.read.biff.BiffException; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import com.cwn.wizbank.base.BaseTest; public class AcFunctionServiceTest extends BaseTest { @Autowired AcFunctionService acFunct...
Java
UTF-8
2,423
2.46875
2
[]
no_license
package pinkpanthers.pinkshelters; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.Button; import java.util.Arra...
Markdown
UTF-8
25,804
2.921875
3
[ "Apache-2.0" ]
permissive
# 中山大学数据科学与计算机学院本科生实验报告 ## (2018年秋季学期) | 课程名称 | 手机平台应用开发 | 任课老师 | 郑贵锋 | | :------------: | :-------------: | :------------: | :-------------: | | 年级 | 2016级 | 专业(方向) | 计算机应用 | | 学号 | 16340030 | 姓名 | 陈斯敏 | | 电话 | 15917173057 | Email | 2540740154@qq.com | | 开始日期 | 2018.11.24 | 完成日期 | 2018.11.26 --- ## 一、实验题目 ### *...
Swift
UTF-8
1,873
3.125
3
[]
no_license
// // Item.swift // SettingScreen // // Created by Pham Quang Huy on 2020/12/20. // import Foundation enum SettingSectionType { case phone case privacy case general var description : String { switch self { case .phone: return "iPhone" case .priva...
C#
UTF-8
958
2.71875
3
[]
no_license
using System; using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Text; namespace RobotsVsDinosaursGame { class Dinosaur { string name; string health; int powerLevel; string weapon; int attackPower; int energy; string di...
Python
UTF-8
460
3.171875
3
[]
no_license
import sys sys.stdin = open('../input.txt', 'r') def gcd(n1, n2): while n1 % n2: n1, n2 = n2, n1 % n2 return n2 a = int(input()) a_nums = list(map(int, input().split())) b = int(input()) b_nums = list(map(int, input().split())) idx = 0 ans = a_num = b_num = 1 for na in a_nums: a_num *= na for nb...
Java
UTF-8
611
1.960938
2
[]
no_license
package com.jiangnanyidianyu.bean; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import org.apache.ibatis.type.Alias; import org.springframework.stereotype.Component; import java.util.List; /** * @ClassName Author * @Author: Qinnn、 * @Description: TODO * @Date: create in ...
JavaScript
UTF-8
2,626
2.59375
3
[ "GPL-3.0-only", "MIT" ]
permissive
define(['require', 'Core', 'component!logger'], function (require) { 'use strict'; var api = require('Core'), logger = require('component!logger'); describe('Logger spec', function () { it('Logs actions', function () { api.set('logs', []); logger.emergency('Test a...
Python
UTF-8
257
3.046875
3
[]
no_license
import math import sys def fat(a): if(a==0): return 1 else: return fat(a-1)*a while True: a = int(input()) if(a ==0): break b = fat(2*a) c = fat(a+1) print("%d"%(b//c))
Java
WINDOWS-1250
1,336
2.875
3
[]
no_license
package edu.senai.a5.heranca; public class Leve extends Veiculo { private byte numeroPortas; private ECombustivel combustivel; private float consumo; private int capacidadeTanque; public double getImpostoPadrao() { System.out.println("Imposto Leve"); return super.getImpostoPadrao() + (super.getImpostoPadrao(...
PHP
UTF-8
1,765
2.78125
3
[]
no_license
<?php namespace spec\App\Services\Factory\UserModel; use App\Services\Factory\UserModel\UserModelFactory; use App\Services\Factory\UserModel\UserModelFactoryInterface; use PhpSpec\ObjectBehavior; use App\Entity\User; use App\Form\Model\User\UserRegistrationFormModel; class UserModelFactorySpec extends ObjectBehavio...