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
C#
UTF-8
414
2.6875
3
[]
no_license
using System; using System.Collections.Generic; using System.IO; using System.Text; namespace JsonParseLib.Data { public class JsonData<T> { public string GetJsonFile(string url) { var result = ""; using (StreamReader sr = new StreamReader(url)) { ...
Python
UTF-8
17,000
2.6875
3
[ "MIT" ]
permissive
''' Created on Feb 13, 2016 @author: hanhanwu Using sqlite3 as database Download sqlite here: http://www.sqlite.org/download.html Opern your terminal, cd to the sqlite folder, type "sqlite3" ''' from sqlite3 import dbapi2 as sqlite import urllib2 from bs4 import BeautifulSoup from sets import Set import re from nltk.s...
C++
UTF-8
5,068
2.859375
3
[]
no_license
#include "application.h" #include "HttpClient/HttpClient.h" unsigned int nextTime = 0; // Next time to contact the server HttpClient http; // Headers currently need to be set at init, useful for API keys etc. http_header_t headers[] = { // { "Content-Type", "application/json" }, // { "Accept" , "applica...
Java
UTF-8
2,606
2.0625
2
[]
no_license
package com.netoperation.model; import com.google.android.gms.ads.AdSize; import com.google.android.gms.ads.doubleclick.PublisherAdView; import com.google.gson.annotations.Expose; import com.taboola.android.api.TBRecommendationItem; public class AdData { @Expose private String type; @Expose private ...
SQL
UTF-8
3,870
3.34375
3
[]
no_license
Generate AWR – Automatic Workload Repository (AWR) in oracle 11g https://dbatricksworld.com/generate-awr-automatic-workload-repository-awr-in-oracle-11g/ Published 2 years ago by Jignesh Jethwa Oracle 11g Logo Many times DBA need to monitor specific loaded/heavy database related activity in order to fix database per...
C++
UTF-8
1,222
2.859375
3
[]
no_license
#include "MouseButtonsDetector.h" #include "DeviceLogger.h" #include "MouseAction.h" namespace Detector { bool MouseButtonsDetector::checkAction(const ButtonState &buttonState, IAction *action) { LOG_DEBUG(String("MouseButtonsDetector::checkAction() button1Pressed: ") + String(buttonState.button1Pre...
Python
UTF-8
616
3.09375
3
[]
no_license
import mysql.connector mydb = mysql.connector.connect(user='root', password='', host='127.0.0.1', database='mycustomers') cursor = mydb.cursor() sql = "select * from customers" cursor.execute(sql) data = cursor.fetchall() records = cursor.rowcount print("...
C++
UTF-8
538
2.765625
3
[]
no_license
#include "stdafx.h" #include "CDrawableObject.h" CDrawableObject::CDrawableObject() { // Default settings for objects lightingEnabled = 1; setColour(0.5f, 0.5f, 0.5f); setScale(1.0f, 1.0f, 1.0f); } CDrawableObject::~CDrawableObject() { } GLfloat * CDrawableObject::getColour() { return colour; } void CDrawabl...
Python
UTF-8
18,364
3.5625
4
[]
no_license
# AI Homework 3 - Sudoku Solver # Dylan Jones import re import copy # Function to read in sudoku puzzles from file def file_read(flag): puzzles = [] # The read in puzzle consists of a difficulty and a puzzle sudoku_puzzle = [[],[]] # Open test file with only two puzzles vs full puzzle list if f...
Java
UTF-8
1,344
2.390625
2
[ "Apache-2.0" ]
permissive
package nl.jqno.equalsverifier.internal.architecture; import static org.junit.jupiter.api.Assertions.assertTrue; import nl.jqno.equalsverifier.internal.reflection.Util; import org.junit.jupiter.api.Test; public final class TestPresenceTest { @Test public void javafxTestsArePresentOnJdk11() { assertT...
Markdown
UTF-8
2,174
2.875
3
[ "MIT" ]
permissive
--- layout: post title: "One-lined Python" date: 2015-01-30 categories: projects hieroglyph: "&#x13199;" --- [**One-liner**](https://github.com/csvoss/oneliner) is a "compiler" that converts any Python file into a single line of code with the same functionality. Really, just one line! No newlines or semicol...
JavaScript
UTF-8
2,340
2.921875
3
[]
no_license
$(document).ready(function () { let sizeChanging = false; let weatherShowing = false; // let currentTemp, feelingTemp, humidity; $('.headline').on('click', function () { if (sizeChanging) return; sizeChanging = true; const details = $(this).next(); c...
C#
UTF-8
1,150
2.734375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Halloumi.BassEngine { public class ExtendedMix { /// <summary> /// Gets or sets the track description of the track to mix in to. /// </summary> public string TrackDescription { get; ...
Java
UTF-8
5,627
3.9375
4
[ "MIT" ]
permissive
package com.utilib.data_structures; import java.util.NoSuchElementException; public class List<K, V> { private Node<K, V> _head; private Node<K, V> _tail; private int _numNodes = 0; private boolean _allowDuplicates = true; public List(final boolean allowDuplicates) { _allowDuplicates = allowDuplicates;...
Python
UTF-8
602
3.046875
3
[]
no_license
data = open("data", "r").read().splitlines() my_timestamp = int(data[0]) busses_list = data[1].split(',') closest_times = [] bus_dict = {} def get_closest_bus(busses): closest_time = 9999999999999999 closest_bus = 0 for bus in busses.items(): if bus[1] < closest_time: closest_time = bus[1] close...
Java
UTF-8
276
2.234375
2
[]
no_license
package Opg9_8; public class Fan { final int SLOW = 1; final int MEDIUM = 2; final int FAST = 3; private int speed = SLOW; private boolean on = false; private double radius = 5; String color = "blue"; public Fan() { new Fan(); } }
Python
UTF-8
1,495
2.59375
3
[]
no_license
pessoa_juridica = {'nome': 'Pessoa juridica teste', 'cnpj': '592915340001'} def test_status_code_200_ao_listar_pessoas_juridicas(client): assert client.get('/pessoas_juridicas').status_code == 200 def test_lista_de_pessoas_juridicas_vazia(client): assert client.get('/pessoas_juridicas').json == [] def test_...
JavaScript
UTF-8
5,636
4.0625
4
[]
no_license
function bubbleSort(array) { /* your code here */ /* loop over elements swap anything out of order repeat until no swaps */ var swapCount=1; var result = array; var left, right; if (array.length===0 || array.length === 1){ return result; } while (swapCount>0){ for ...
Java
UTF-8
1,524
2.46875
2
[]
no_license
package com.flybutter.consumer.model.vo; public class Consumer { private int user_No; private String new_Address; private String rec_Pno; private String user_Cel; private int money; private int sum_Price; public Consumer() { } public Consumer(int user_No, String new_Address, String rec_Pno, String use...
Java
UTF-8
1,818
3.453125
3
[]
no_license
package com.example.myapplication.bonuslevel; import java.util.Random; /** class Bonus Level Interactor */ class BonusLevelInteractor { /** interface onValidateNumberListener */ interface OnValidateNumberListener { /** method when number is too high */ void onNumberToHigh(); /** method when number ...
C++
UTF-8
373
3.375
3
[]
no_license
#include <iostream> using namespace std; class unar{ int x,y; public: void set_value() { cin>>x>>y; } void display() { cout<<x<<endl<<y<<endl; } void operator -() { x--; y--; } }; int main() { unar link; link.set_value(); link.displa...
Java
UTF-8
622
1.976563
2
[]
no_license
package com.ba.mapper; import com.ba.dto.TableCategoryDTO; import com.ba.entity.TableCategory; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; import java.util.List; @Mapper(componentModel = "spring") public interface TableCategoryMapper { // TableCategoryMapper INSTANCE = Mappers.getMapper(Tab...
Java
UTF-8
771
3.203125
3
[]
no_license
/** * */ package com.ocajp8.ch2.types; /** * @author Yashwanth * */ public class DataTypes { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub char character ='1'; byte byteValue=1; short integer =1; int intValue =1; long longValue =1L; float f...
C++
UTF-8
4,218
3.015625
3
[ "BSD-3-Clause" ]
permissive
#ifndef DOUBLE_INTEGRATOR_MINIMUM_TIME_H_ #define DOUBLE_INTEGRATOR_MINIMUM_TIME_H_ // Standard libarary #include <iostream> #include <utility> // std::pair #include <limits> // std::numeric_limits::infinity() #include <algorithm> // std::max and std::min #include <vector> // std::vector #include <chrono> ...
Java
UTF-8
562
1.75
2
[]
no_license
package com.itcast.test; import javax.annotation.Resource; import org.hibernate.SessionFactory; import org.hibernate.classic.Session; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @Service("testService") public class testService1 { @Resource privat...
Java
UTF-8
998
1.90625
2
[]
no_license
package com.litesite.dal; import org.springframework.jdbc.core.RowMapper; import javax.sql.DataSource; import io.github.huherto.springyRecords.BaseRecord; import io.github.huherto.springyRecords.BaseTable; import io.github.huherto.springyRecords.RecordMapper; /** * BaseBlcOrderAdjustmentTable – * Automatically ge...
Java
UTF-8
622
2.125
2
[]
no_license
package ua.dp.renessans.model.manager; import java.util.List; import ua.dp.renessans.model.entity.Album; public interface AlbumManager { void addAlbum(Album galleryAlbum) throws ManagerException; void deleteAlbum(int albumId) throws ManagerException; void setCoverImage(int albumId, String coverName) throws Mana...
Python
UTF-8
4,646
3.46875
3
[ "MIT" ]
permissive
#!/usr/bin/python3 """ Module for class Base """ import json import csv class Base: """ Class Base """ """ Private class attribute """ __nb_objects = 0 def __init__(self, id=None): """ Class constructor method Args: id (int): The id for the Base class ...
JavaScript
UTF-8
2,837
2.8125
3
[]
no_license
import React from 'react'; import logo from './logo.svg'; import './App.css'; import User from './User' const movies = [ { title: "The Godfather", director: "Francis Coppola" }, { title: "Star Wars", director: "Rian Johnson" }, { title: "The Shawshank Redemption", director: "Frank Darabont" } ] class App extend...
Java
UTF-8
975
2.09375
2
[]
no_license
package controller.admin; import bean.info.OrganizationBean; import utils.JsonUtils; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IO...
JavaScript
UTF-8
2,828
2.828125
3
[]
no_license
import { useEffect, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { selectAdjacent, selectReserveNumber, selectSeats, setProposedSeats, toggleProposed, } from '../../Redux/seatsSlice'; const useSeatsProposer = () => { // Redux state ref const adjacentSeats = useS...
SQL
UHC
343
3.09375
3
[]
no_license
-- CREATE USER khlove1 IDENTIFIED BY khlove1; -- ο GRANT connect TO khlove1; -- khlove1 kh ִ -- COFFEE ̺ ˻(SELECT) ִ -- ο GRANT SELECT ON kh.COFFEE TO khlove1; GRANT INSERT ON kh.COFFEE TO khlove1; REVOKE SELECT,INSERT ON kh.COFFEE FROM khlove1;
SQL
UTF-8
136,610
3.1875
3
[ "Apache-2.0" ]
permissive
-- -- TOC entry 2172 (class 0 OID 78993) -- Dependencies: 163 -- Data for Name: culture_keyword; Type: TABLE DATA; Schema: public; Owner: tdar -- COPY culture_keyword (id, definition, label, approved, index, selectable, parent_id) FROM stdin; 42 4201 Jewish f 4.2 t 4 43 Peoples of the Sudan f 4.3 t 4 49 Other North...
C++
UTF-8
637
3.171875
3
[]
no_license
#pragma once #include <random> class Random { public: static int get_int(int min, int max) { static std::random_device rd; // only used once to initialise (seed) engine static std::mt19937 rng(rd()); // random-number engine used (Mersenne-Twister in this case) static std::unifor...
Java
UTF-8
318
2.234375
2
[]
no_license
package com.luxoft.servlettest.entity; import java.util.List; public final class TodoUtils { public static Todo getTodoById(List<Todo> todoList, int id) { for(Todo todo : todoList) { if (todo.getId() == id) { return todo; } } return null; } }
Shell
UTF-8
679
3.703125
4
[]
no_license
#!/bin/bash # # execute the given sql command # dosql() { local l_sql="$1" local l_db="$2" echo "$l_sql" | mysql -u root -p="$rootpass" $l_db } # get root password from the command line rootpass="$1" # start the mysql daemon mysqld_safe --skip-grant-tables& sleep 3 mysql_upgrade --password="$rootpass" for table...
C
UTF-8
1,432
2.921875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include<errno.h> #include <signal.h> #include <unistd.h> #include <string.h> #include <arpa/inet.h> #include <sys/wait.h> #define Buffer_Len 256 int main(int argc,char* argv[]){ int s; in...
Java
UTF-8
699
2.765625
3
[]
no_license
package luokka4; /* Tehdään luokka Kieli, johon voi tallentaa kielen nimiä, sekä * niistä käytettäviä koodeja.' * On olemassa myös maa ja sillä omat standardit kielet sekä kielikoodit * nimi iso639-1 iso639-2 * Finnish fi fin * Swedish sv swe * French fr fra */ public class Kieli { private St...
Shell
UTF-8
234
3.140625
3
[ "MIT" ]
permissive
#!/bin/bash END=$1 for i in $(seq 1 $END) do git checkout -b feature-$i echo "# Feature-$i requirements" > README.md git commit -am "Updated feature-$i README.md" git push origin feature-$i done git checkout master
JavaScript
UTF-8
395
2.515625
3
[]
no_license
import { useState } from 'react'; const Input = ({ addTodo }) => { const [inputText, setInputText] = useState(''); const onSub = () => { addTodo(inputText); setInputText(''); } return <div> <input type='text' value={inputText} onChange={(event) => setInputText(event.target.value)} /> <button o...
Java
UTF-8
612
1.945313
2
[]
no_license
package tests; import static asserts.HardWebElementAsserts.assertThat; import static pageobjects.LogInPage.invalidErrorLogin; import org.testng.annotations.Test; import util.DataProvider; import util.TestRunner; public class InvalidUserLogInTest extends TestRunner { @Test(dataProvider = "testInvalidDataLogIn", da...
Java
UTF-8
293
2.09375
2
[]
no_license
package com.mytechtip.example.springjpatest; import java.util.List; public abstract class AbstractUserDao { protected static final int ONE_YEAR = 1000 * 60 * 60 * 24 * 365; public abstract List<User> getNameStartsWith(String namePrefix); public abstract User save(User u); }
Java
UHC
3,718
2.53125
3
[]
no_license
package somo.framework.lib; import java.util.*; import java.rmi.RemoteException; import javax.naming.*; import javax.rmi.PortableRemoteObject; import javax.sql.*; import somo.framework.prop.*; import somo.framework.expt.*; import somo.framework.log.*; /** * * <p>Copyright: Copyright by softonmobile (...
C#
UTF-8
334
2.75
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Lab_7 { public class Addition { public float Add(float firstNumber, float secondNumber) { float a = firstNumber + secondNumber; return a; ...
Ruby
UTF-8
1,669
2.59375
3
[]
no_license
require "tencent_cloud_sms/version" require "tencent_cloud_sms/configuration" require "tencent_cloud_sms/http_client" module TencentCloudSms URL = 'sms.tencentcloudapi.com' class Error < StandardError; end class << self attr_accessor :phone_number, :msg, :time_now, :nonce def send_msg(phone_number, msg)...
PHP
UTF-8
3,350
3.421875
3
[]
no_license
<?php namespace Gof\Datos\Errores\Mensajes; use Gof\Interfaz\Errores\Mensajes\Error as IError; /** * Dato de tipo error que almacena mensajes y un código * * Clase de tipo error que puede almacenar una lista de mensajes y un código de error. * * @package Gof\Datos\Errores\Mensajes */ class Error implements IEr...
Java
UTF-8
1,857
2.140625
2
[]
no_license
package br.com.api.tiagoverde.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import javax.persistence.*; import java.io.Serializable; import java.util.List; @Entity @Table(name = "usuarios") public class Usuario implements Serializable { private static final long serialVersionUID = 1L; ...
Markdown
UTF-8
192
2.890625
3
[]
no_license
## Selection sort **Type**: in-place **Average performance**: n^2 Algorithm: 1. Find min element in the array and place swap it with first element. 2. Move cursor to 1 index and proceed.
Java
UTF-8
349
2.890625
3
[]
no_license
package JavaJoe; public class joe32 { public static void main(String[] args) { // TODO Auto-generated method stub } } class joe321{ void m1() { System.out.println("joe321 m1()"); } } class joe322 extends joe321{ void m1() { //override 是用來延伸用法 super.m1(); System.out.println("joe322...
C++
UTF-8
947
2.765625
3
[]
no_license
// // MPI_CountPoweredElementsVisitor.h // // Description: // Count the number of MPI_PoweredElement objects (and subclasses) visited. // Visit all of the elments you want to count, and then call // getPoweredElementCount() to get the total number seen. // #ifndef __MPI_COUNTPOWEREDELEMENTSVISITOR_H__ #define _...
JavaScript
UTF-8
1,944
3.03125
3
[]
no_license
import { render, screen, fireEvent } from "@testing-library/react"; import App, { replaceCamelwithSpaces } from "./App"; test("button has correct initial color", () => { render(<App />); const colorButton = screen.getByRole("button", { name: "Change to Midnight Blue" }); //expect the button text to be "Change ...
Java
UTF-8
4,625
2.3125
2
[ "W3C-20150513", "W3C" ]
permissive
// $Id$ // From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr) // Rewritten 2010 Yves Lafon <ylafon@w3.org> // (c) COPYRIGHT MIT, ERCIM and Keio, 1997-2010. // Please first read the full copyright statement in file COPYRIGHT.html package org.w3c.css.properties.css; import org.w3c.css.parser.CssStyle; impor...
Ruby
UTF-8
155
3.34375
3
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
def reverse_each_word(in_the_sentence) new_reverse = in_the_sentence.split(" ").collect do |word| word.reverse end new_reverse.join(" ") end
C#
UTF-8
1,781
2.890625
3
[ "Apache-2.0" ]
permissive
using Microsoft.Xna.Framework.Input; namespace OpenKh.Game.Infrastructure.Input { class RepeatableKeyboard { public bool IsKeyPressed(Keys key) => GetKey(key).IsPressed; public void PressKey(Keys key) => KeyStatePool[(int)key] = new KeyState { IsPressed = true, KeyDownFirstChance = true }; ...
Markdown
UTF-8
1,058
3.140625
3
[]
no_license
# Project - Bayesian Coin Flip (Using Shiny App) ## Contents * [Background](#background) * [Dataset](#dataset) * [Application](#application) ## Background Shiny is a package created by [Rstudio](https://rstudio.com/). Users can easily use this package to build interactive web apps straight from R. Motivated by this, ...
Rust
UTF-8
1,718
2.84375
3
[ "MIT" ]
permissive
use reqwest::Client; use futures::{stream, StreamExt}; use std::collections::HashMap; use std::sync::{Arc, Mutex}; /// HTTP request method for scanning pub enum RequestMethod { Get, Post, Head, } pub async fn scan_uri(base_uri: &String, word_list: &Vec<String>, req_method: &RequestMethod, accept_invalid_c...
C
UTF-8
3,077
3.484375
3
[]
no_license
#include <stdlib.h> #include <ctype.h> #include <string.h> #include <stdio.h> #include "matrix.h" static const char* skipSpaces(const char*); size_t rowTableSize(const size_t count) { return sizeof(VECTOR*) * count; } size_t matrixMemorySize(const int rowSize, const int count) { return sizeof(MATRIX) + vectorMemo...
Ruby
UTF-8
4,453
2.890625
3
[ "MIT" ]
permissive
require "base64" require "time" module Keap module REST # Object used for managing OAuth2 tokens for the Keap REST API. # class Token # @attribute [r] access_token # @return [String] The access token returned by the API. # @attribute [r] refresh_token # @return [String] The re...
JavaScript
UTF-8
1,783
4.875
5
[]
no_license
/* Description Let's have some more practice with arrays! In this exercise we expect you to become more acquainted with arrays, and what we can do with them. So we start with an array of last names, and from there you're going to perform a bunch of operations in it! Instructions - Create an array with the following na...
C++
UTF-8
7,237
3.765625
4
[]
no_license
#ifndef BTree_h #define BTree_h #include <iostream> #include <stdio.h> using namespace std; template <int M> class BTreeNode { public: const static int m = M; int numKeys; bool isLeaf; string keys[M]; BTreeNode* children[M+1]; BTreeNode(); }; template <int M> class BTree { private: voi...
JavaScript
UTF-8
870
3.046875
3
[ "MIT" ]
permissive
class Point { constructor(x, y) { this.x = x; this.y = y; } ToString() { return `(${this.x},${this.y})`; } } class Converter { static ToBattleshipCoord(str) { // forced for battlefield size of 10x10 if (str.length === 2) { var first = str.charCodeAt(0); var second = str.charAt(1); if (((first >=...
C++
UTF-8
489
3.578125
4
[]
no_license
#include<iostream> #include<cmath> using namespace std; bool isPrime(int); int main() { long int limit = 0; long int count = 1; cout << "Enter the limit:"; cin >> limit; for(int i = 2; i < limit; i++) { if(isPrime(i)){ count++; } } cout << "There are " << count << " no of primes in the range" << en...
Python
UTF-8
306
3.90625
4
[]
no_license
#input 입력을 받아서 저장을 하는 개념 print("Enter your name:") somebody = input() print("hi", somebody) #문자를 찍으면 한 칸 뛰어서 됨. print("Hello World", "Hello Again") temperator = float(input("온도를 입력하세요 :")) print(temperator) print(type((temperator)))
Java
UTF-8
18,155
1.992188
2
[]
no_license
package logic; import java.awt.Color; import java.awt.Graphics; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.net.URL; import java.util.ArrayList; import java.util.List; import java.util.Random; import javax.swing.*; import static javax.swing.WindowConstants.EXIT_ON_CL...
Python
UTF-8
1,895
4.40625
4
[]
no_license
# 5. Программа запрашивает у пользователя строку чисел, разделенных пробелом. При нажатии Enter должна выводиться # сумма чисел. Пользователь может продолжить ввод чисел, разделенных пробелом и снова нажать Enter. Сумма вновь # введенных чисел будет добавляться к уже подсчитанной сумме. Но если вместо числа вводитс...
C++
UTF-8
5,214
2.734375
3
[]
no_license
#pragma once #include "DataTypes.h" enum class t_design_type { t_totalConstr = 0, t_canonical, t_simple, t_transitive, t_simpleTrans, t_design_type_total }; class CNumbInfo { public: CC CNumbInfo() { resetNumbInfo(); } CC ~CNumbInfo() {} CK inline ulonglong numMatrOfType(t_design_type t...
C#
UTF-8
704
3.046875
3
[]
no_license
using System; namespace FireXamarin.Resources { public static class Extensions { public static string ToUnicode(this string code) { var errorCode = "\uf00d"; try { if (code.Length != 4) return errorCode; i...
Java
UTF-8
544
1.835938
2
[]
no_license
package com.jsoft.ems.dao; import java.util.List; import com.jsoft.ems.model.CourseMaster; import com.jsoft.ems.model.EmpInOutTime; import com.jsoft.ems.model.WorkRemark; public interface LoginInOutDao { List<EmpInOutTime> getTimeDetails(Long empId); EmpInOutTime checkLoginDetails(Long empId, String curDate); voi...
Java
UTF-8
1,357
3.15625
3
[]
no_license
package br.com.confidencecambio.javabasico.segundodesafio.model; import org.springframework.util.StringUtils; public class Cliente { private String nome = " João Soares Silva "; public String getNome() { return validaNome(nome); } public String primeiroNome() { String[] lista = validaNome(nome).s...
Shell
UTF-8
951
3.828125
4
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-proprietary-license" ]
permissive
#!/usr/bin/bash path_cur=$(dirname $0) function check_env() { # set ASCEND_VERSION to ascend-toolkit/latest when it was not specified by user if [ ! "${ASCEND_VERSION}" ]; then export ASCEND_VERSION=ascend-toolkit/latest echo "Set ASCEND_VERSION to the default value: ${ASCEND_VERSION}" else...
Python
UTF-8
171
2.96875
3
[ "MIT" ]
permissive
class Solution: def singleNumber(self, N: List[int]) -> int: L, d = len(N), set() for n in N: if n in d: d.remove(n) else: d.add(n) return d
PHP
UTF-8
1,657
2.640625
3
[]
no_license
<?php class Admin_Form_CreatePage extends Zend_Form { private $templates = array(); public function __construct(array $templates) { $this->templates = $templates; parent::__construct(); } public function init() { $this->setMethod('post'); $this->setAttrib('id',...
Python
UTF-8
774
4.6875
5
[]
no_license
# -*- coding: utf-8 -*- #Escribir un programa que lea un año indicar si es bisiesto. #Nota: un año es bisiesto si es un número divisible por 4, pero no si #es divisible por 100, excepto que también sea divisible por 400. #1.almacenar año (entero) #2.comprobar que es divisible por 4 #3.comprobar si es divisi...
Shell
UTF-8
661
3.203125
3
[ "MIT" ]
permissive
#!/bin/bash # First argument is absolute file path to container start sh # Second argument is name of remote conatainer # Third argument is name of remote registry if [ "$1" == "" ] then echo "First argument should be remote image name (e.g., firmware)." exit fi if [ "$2" == "" ] then echo "Second argument shou...
Python
UTF-8
1,516
3.09375
3
[]
no_license
import pandas as pd import numpy as np from sklearn import svm, datasets import matplotlib.pyplot as plt iris = datasets.load_iris() X = iris.data[:, :2] # we only take the first two features. y = iris.target # Plot resulting Support Vector boundaries with original data # Create fake input data for predic...
SQL
UTF-8
154
2.71875
3
[]
no_license
--Query 2 --Give the name and address of every customer who lives on Park Lane SELECT cname, caddr address FROM customer WHERE caddr LIKE '%Park Lane%';
JavaScript
UTF-8
498
2.5625
3
[]
no_license
import actionTypes from '../actionTypes'; const initialState = { chefLoading: true, chef: {} } export default function (state = initialState, action) { switch (action.type) { case actionTypes.GET_CHEF_BY_ID: { return { ...state, chefLoading: true, chef: {} } } cas...
Python
UTF-8
386
3.703125
4
[]
no_license
'''IMPORTANT''' '''101 ---- 2^2 + 2^0 [ 1,0,1 ]''' a = list(input(" Enter Binary String ")) val =0 for i in range(len(a)): binary = a.pop() if binary=="1": val+=2**i print(val) # a = list((input("enter binarry number"))) # val = 0 # for i in range(len(a)): # binary =...
C#
UTF-8
419
3.25
3
[]
no_license
using System; class tableaux{ static void Main(){ int[,] tab = new int [3,3]; for(int i=0;i<tab.GetLength(0);i++){ for(int i2=0;i2<tab.GetLength(1);i2++){ tab[i,i2]=i2; } } for(int i3=0;i3<tab.GetLength(0);i3++){ for(int i4=0;i4<tab...
Java
UTF-8
1,223
2.578125
3
[]
no_license
package ponyvet.utilities; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import ponyvet.gui.articulo.JDFormularioArticulo; public class ImageUtilities { public static byte...
Python
UTF-8
26,770
2.703125
3
[]
no_license
# -*- coding: utf-8 -*- #--------------------------------------------------------------------------- # Name: sphinxtools/utilities.py # Author: Andrea Gavana # # Created: 30-Nov-2010 # Copyright: (c) 2010-2020 by Total Control Software # License: wxWindows License #-------------------------------...
Java
UTF-8
2,305
2.90625
3
[]
no_license
package library; import java.text.NumberFormat; import java.time.LocalDate; public class Cd implements Item { public String title; public String authName; public String publisher; public int isbn; public LocalDate dueDate = LocalDate.now(); public double lateFine = 0.50; public Cd(String title1, String authNa...
Python
UTF-8
411
2.671875
3
[]
no_license
name = input("enter file: ") if len(name) < 1: name = 'mbox-short.txt' handle = open(name) counts = dict() for line in handle: if line.startswith('From '): line.split() counts[line[1]] = counts.get[line[1], 0] + 1 bigword = none bigcount = 0 for key, val in counts.items(): if bigcount == ...
Java
UTF-8
147
1.765625
2
[]
no_license
package proxy.statical; /** * Create by lixinglin on 2018/9/21. * At 8:56 */ public interface IUserService { Integer getAge(String name); }
Swift
UTF-8
4,075
2.875
3
[]
no_license
// // UIButton+Layout.swift // TumblrMenu // // Created by TT on 2020/5/16. // Copyright © 2020 tTao. All rights reserved. // import UIKit enum ButtonImageStyle: Int { case imageTop case imageLeft case imageRight case imageBottom } extension UIButton { /// 布局按钮 func layoutButton(with styl...
Java
UTF-8
2,118
2.34375
2
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.epam.andrii_loievets.haircutsystem.dao; import com.epam.andrii_loievets.haircutsystem.entity.ClientStatistics; i...
Markdown
UTF-8
2,376
2.671875
3
[]
no_license
# Angular Learning This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.3. ## Install ```sh # 授予被访问目录可读写权限,避免出现 # Error: EACCES: permission denied, access '/usr/local/node-v14.15.0/lib/node_modules' 的错误 sudo chmod -R 777 /usr/local/node-v14.15.0 # 配置 NPM 国内淘宝镜像源 npm co...
C++
UTF-8
660
3.46875
3
[]
no_license
#include<iostream> #include<string> #include<cmath> using namespace std; bool prime(int); int main() { string n; int sum=0; //cin>>n; while(cin>>n) { sum=0; for(unsigned int i=0;i<n.size();++i) { if(n[i]>96) { sum+=static_cast<int>(n[i]-96); } else { sum+=static_cast<int>(n[i]-38...
Java
UTF-8
2,480
1.804688
2
[]
no_license
package com.example.yebonkim.etawett; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.widget.Toast; import com.facebook.AccessToken; import com.facebook.CallbackManager; import com.facebook.FacebookCallback; i...
Python
UTF-8
1,703
3.90625
4
[]
no_license
# This code is to learn Python by Andre Gonzaga # This code is the simulator for Rock, Paper, Scissor import random def print_options(): print('Lets play this... ') print('') print(' Rock ') print(' Paper ') print(' Scissor ') print('') def ask_option(): user_option=input('Your option now ...
Java
UTF-8
3,159
2.296875
2
[]
no_license
package com.gmail.a2vplugin.plugins.soapui.api.tool; import com.gmail.a2vplugin.api.common.messages.Parent; import com.gmail.a2vplugin.api.tools.extensiontools.messages.ExtensionToolsRequest; import com.gmail.a2vplugin.api.tools.extensiontools.messages.ExtensionToolsResponse; import com.gmail.a2vplugin.api.tools.exten...
TypeScript
UTF-8
1,039
3.546875
4
[]
no_license
export class TickerUtil { /** 开始时刻 */ public static startTick: number = 0; /** 上次时刻 */ public static lastTick: number = 0; /** 当前时刻 */ public static currentTick: number = 0; /** 次数 */ public static count: number = 0; /** 间隔 */ public static interval: number = 0; /** 当前间隔 */ public st...
Java
UTF-8
4,399
3.09375
3
[]
no_license
package com.zcj.util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.*; import java.net.HttpURLConnection; import java.net.URL; import java.util.ArrayList; import java.util.List; /** * 文件操作工具类 */ public abstract class FileUtils { private static final Logger logger = LoggerFactory.getL...
Java
GB18030
968
2
2
[]
no_license
package com.smart.platform.gui.control; import java.awt.HeadlessException; import java.io.File; import javax.swing.table.TableModel; import org.apache.log4j.Category; import com.smart.platform.gui.ste.Querycond; public class CHovbaseGeneral extends CHovBase { Category logger = Category.getInstance(CHovbaseGenera...
Python
UTF-8
2,206
3.15625
3
[ "MIT" ]
permissive
#!/usr/local/bin/python3 import os, sys, getopt, hashlib import requests class SubtitlesDownloader(): """Used to download subtitles from SubDB""" def __init__(self, inputfile, outputfile=None): self.inputfile = inputfile self.outputfile = outputfile if self.outputfile is None: ...
Ruby
UTF-8
879
2.84375
3
[]
no_license
class Main def self.licz(moje_dane) wynik = 0 moje_dane.each do |jeden_zbior| if jeden_zbior.is_a?(Hash) jeden_zbior.each do |nazwa_klucza, jeden_podzbior| #p jeden_podzbior if jeden_podzbior.is_a?(Hash) jeden_podzbior.each do |klucz, wart| #p wart...
C++
UTF-8
692
2.84375
3
[]
no_license
// // SortedList.hpp // Lists // // Created by Randy McLain on 7/5/17. // Copyright © 2017 RM. All rights reserved. // #ifndef SortedList_hpp #define SortedList_hpp #include <stdio.h> const int MAX_SORTED_LENGTH=100; class SortedList { public: SortedList(); bool isEmpty(); bool isFull(); void empty...
Java
UTF-8
3,063
2.359375
2
[]
no_license
package sg.edu.np.madassignment; import androidx.appcompat.app.AppCompatActivity; import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.os.Handler; import android.util.Log; import android.widget.TextView; import android.widget.To...
Java
UTF-8
1,266
1.914063
2
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
package com.reactnativenavigation; import android.app.Activity; import android.view.View; import android.view.ViewGroup; import org.junit.After; import org.junit.Before; import org.junit.runner.RunWith; import org.robolectric.Robolectric; import org.robolectric.RobolectricTestRunner; import org.robolectric.annotation...
Java
UTF-8
9,614
2.296875
2
[]
no_license
package com.storemanagement.controllers; import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.se...