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
633
2.0625
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 Negocios; import Datos.DProveClien; import javax.swing.table.DefaultTableModel; /** * * @author gates */ public class NPro...
Markdown
UTF-8
3,100
2.734375
3
[]
no_license
# terraform-framework ### Intro The aim of this repo is to reduce the terraform boiler plate code by using modules. All hard coded values between environments are extracted out into tfvars files. The concept is to develop the terraform module once and have it deploy everywhere without changing the underline terraform ...
Java
UTF-8
4,656
1.59375
2
[]
no_license
package com.iremote.dataprivilege.interceptorchecker; import com.iremote.common.processorstore.ClassMapper; import com.iremote.dataprivilege.admin.AdminPrivilegeChecker; import com.iremote.dataprivilege.camera.CameraModifyPrivilegeCheckerofPhoneUser; import com.iremote.dataprivilege.camera.CameraOperationPrivilegeChec...
C#
UTF-8
2,922
2.890625
3
[]
no_license
using System; using System.ComponentModel; namespace LED_PI_GMTest.Modules { internal class ConcentricSinusoidLissajous : IModule { private double _step; public ConcentricSinusoidLissajous() { Scale = 100; Step = 0.1; Vertical = 3; Hori...
Java
UTF-8
691
2.140625
2
[]
no_license
package eu.tsvetkov.x_empi.script; /** * @author Vadim Tsvetkov (dev@tsvetkov.eu) */ public class AppleScriptTest extends BaseScriptTest<AppleScriptOld> { @Override protected ITunesScript getLastTrackTags(String playlistName) { return new AppleScriptOld("set lastTrack to last track ofNumber playlist...
C
UTF-8
413
2.765625
3
[]
no_license
#include <stdio.h> #include <stdint.h> // needed for uinit_XX int main(){ printf("size of two ints: %zu\n", 2*sizeof(int)); printf("size of two ints: %zu\n", sizeof(int[2])); printf("size of a double: %zu\n", sizeof(double)); printf("size of uint32_t: %ld\n", sizeof(uint32_t)); printf("size of u...
Java
UTF-8
803
2.96875
3
[]
no_license
package com.somamultiplos; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import java.util.Scanner; @SpringBootApplication public class SomaMultiplosApplication { public static void main(String[] args) { SpringApplication.run(SomaM...
C
UTF-8
844
3.078125
3
[]
no_license
int dayofy( int year ) { if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) return 366 ; else return 365 ; } int dayofm( int day , int mon , int year ) { int i , temp , sum = 0 ; for ( i = 1 ; i < mon ; i++ ) { if ( i == 2 ) { if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)...
JavaScript
UTF-8
328
2.6875
3
[]
no_license
const calc = require('./calc'); // https://hyunseob.github.io/2016/11/21/misunderstanding-about-const console.log('모듈로 분리한 후 - calc.add 함수 호출 결과 : %d', calc.add(10, 10)); const calc2 = require('./calc2'); console.log('모듈로 분리한 후 - calc2.add 함수 호출 결과 : %d', calc2.add(10, 10));
C#
UTF-8
1,359
2.890625
3
[ "Apache-2.0" ]
permissive
using System.Collections; using System.Collections.Generic; using UnityEngine; /// <summary> /// 存储所有UI的信息,并可以创建或者销毁UI /// </summary> public class UIManager { /// <summary> /// 存储所有UI信息的字典,每一个UI信息都会对应一个GameObject /// </summary> private Dictionary<UIType, GameObject> dicUI; public UIManager() ...
Java
UTF-8
1,599
2.125
2
[]
no_license
package com.example.android.mygarden; import android.app.PendingIntent; import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; import android.content.Context; import android.content.Intent; import android.widget.RemoteViews; import com.example.android.mygarden.ui.MainActivity; public ...
Java
UTF-8
929
1.742188
2
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
package org.dvbviewer.controller.utils; import java.util.LinkedList; import java.util.List; public class ServerConsts { public static final String REC_SERVICE_URL = "http://dms-server"; public static String DMS_URL = "http://"; public static String REC_SERVICE_PROTOCOL = "http"; public ...
Markdown
UTF-8
1,808
2.546875
3
[]
no_license
<a name=top></a> --- <a href=../README.md#top><l style="font-size:30px">Home</l></a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<l style="font-size:35px">Papers</l>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href=../datasets/datasets.md#top><l style="font-size:30px">Datasets</l></a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp...
Python
UTF-8
717
4.1875
4
[ "MIT" ]
permissive
# # containsDuplicates # # Given an array of integers, write a function that determines whether the array contains any duplicates. Your function should return true if any element appears at least twice in the array, and it should return false if every element is distinct. # # Example # # For a = [1, 2, 3, 1], the out...
Python
UTF-8
8,509
2.765625
3
[]
no_license
#License MIT 2016 Ahmad Retha import pygame pygame.init() WIDTH = 1366 HEIGHT = 720 SCREEN_SIZE = (WIDTH, HEIGHT) screen = pygame.display.set_mode(SCREEN_SIZE) screen = pygame.display.set_mode(SCREEN_SIZE , pygame.RESIZABLE) class Background(pygame.sprite.Sprite): def __init__(self, image_file, loc...
C++
UTF-8
1,128
3.1875
3
[]
no_license
#include <vector> #include <iostream> #include <string> #include <unordered_set> #include <unordered_map> #include <stack> #include <queue> #include <map> using namespace std; // bianry的问题 能用bit运算就不用乘法除法 class Solution { public: string addBinary(string a, string b) { if(a.size()==0){return b;} if(b.s...
C++
UTF-8
1,206
3.953125
4
[]
no_license
#include <iostream> #include <string> using namespace std; // l values: // values that have names and are addressable // modifiable if they are not constants // r values: // a va;ie that's not an l-value // a literal // a temporary which is intended to be non-modifiable void l_r() { in...
C#
UTF-8
340
2.953125
3
[]
no_license
var exceptionDemoQuery = from file in files select file; foreach (var item in exceptionDemoQuery) { try { Console.WriteLine("Processing {0}", item); var n = SomeMethodThatMightThrow(item); } catch (Exception ex) { Console.WriteLine(e.Mess...
Markdown
UTF-8
4,613
3.6875
4
[ "MIT" ]
permissive
![Java](https://s2.ax1x.com/2019/10/29/KRNvw9.md.jpg) > 在 JVM 中允许一个程序有多个线程并发执行,并且每个线程都有优先级,优先级高的线程要优先于优先级低的线程执行。每个线程可能被标记为守护线程,也可能不被标记。当 JVM 运行时,通常就会有一个非守护线程。 ## 进程与线程 <font color="red">进程:就是受操作系统管理的基本运行单元。进程之间的内存是不共享的,进程之间使用 socket 通信。</font><br/> <font color="red">线程:可以理解成是在进程中独立运行的子任务;而多线程则可以理解为是多个线程在同一时间内运行不同种类的...
Java
UTF-8
2,383
2.40625
2
[ "Apache-2.0" ]
permissive
/* * * * Copyright 2015 Skymind,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 * * ...
C++
UTF-8
3,544
3.6875
4
[]
no_license
/* Author: Michael Ranciglio Location: Southeast Missouri State University Class: Computer Science II (CS 265-01) (21141) Date: 2/14/16 Data Type: complexType, a complex number representing a real and imaginary part */ #include <iostream> #include <cstdlib> #include "complexType.h" using namespace std; complexT...
Python
UTF-8
269
3.609375
4
[]
no_license
x=int(input("enter your x")) y=int(input("enter your y")) x2=int(input("enter your x2")) y2=int(input("enter your y2")) x3=int(input("enter your x3")) y3=int(input("enter your y3")) slope=x*(y2-y3)+x2*(y3-y)+x3*(y-y2) if slope==0: print("line check")
Java
UTF-8
231
2.1875
2
[]
no_license
package com.devproject.tediproject.exception; public class ProfessionalNotFoundException extends RuntimeException { public ProfessionalNotFoundException(Long id) { super("Could not find professional " + id); } }
C++
UTF-8
2,334
3.4375
3
[]
no_license
#include<iostream> #include<stdlib.h> using namespace std; class tree { typedef struct node { struct node *left, *right, *parent ; int data; }node; typedef struct list { struct list *next; node *sibling; }link; public: node *T ; ...
Python
UTF-8
1,034
2.953125
3
[]
no_license
import sys def change(N): if N == 0: N = 1 else: N = 0 return N N = int(sys.stdin.readline()) state = list(map(int,sys.stdin.readline().split())) state.insert(0,9999) Num_student = int(sys.stdin.readline()) for i in range(Num_student): stu_sex = ...
SQL
UTF-8
2,121
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 29-10-2021 a las 08:57:29 -- Versión del servidor: 10.4.14-MariaDB -- Versión de PHP: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
Java
UHC
846
3.625
4
[]
no_license
package chap08; import java.util.Scanner; public class ExceptionTest04 { public static void main(String[] args) { Scanner key = new Scanner(System.in); try { System.out.print("迭 Էϼ:"); int size = key.nextInt(); String[] arr = new String[5]; System.out.println("step01"); if (size > 3) {...
Java
UTF-8
506
2.109375
2
[]
no_license
package test.carros; import org.testng.Assert; import org.testng.annotations.Test; import pageObjects.CarroPage; import utils.BaseTest; import static utils.StaticValues.DELETE_SUCCESS; public class DeletarCarroTest extends BaseTest { @Test public void deveDeletarCarroExistente(){ CarroPage carroPage ...
Java
UTF-8
1,080
3.109375
3
[]
no_license
package simulator; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; public class FileWrite { private String filePath; private BufferedWriter bw; public FileWrite(String filePath) { this.filePath=filePath; initial(); } private void initial() { ...
Markdown
UTF-8
709
3.71875
4
[]
no_license
## 两数之和 使用哈希表存`元素值-索引` 这样就能快速的定位到对应的位置。 ```java class Solution { public int[] twoSum(int[] nums, int target) { Map<Integer, Integer> hashMap = new HashMap<>(); for ( int i = 0; i < nums.length; i++ ) { if ( hashMap.containsKey(target - nums[i]) ) { return new int[]{i, ...
Java
UTF-8
10,846
2.15625
2
[]
no_license
package NewTours; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.support.ui.Select; public class TestNewTours { public static void main(String[] args) { // TODO Auto-generated method stub System.setProperty("w...
Java
UTF-8
1,231
2.203125
2
[]
no_license
package com.atguigu.cache.service.impl; import com.atguigu.cache.bean.Department; import com.atguigu.cache.bean.Employee; import com.atguigu.cache.mapper.DepartmentMapper; import com.atguigu.cache.service.base.BaseServiceMyBatis; import org.springframework.stereotype.Service; @Service public class DepartService exten...
Java
UTF-8
762
2.109375
2
[]
no_license
package fr.inra.sad.bagap.apiland.analysis.matrix.process.metric.qualitative.value; import fr.inra.sad.bagap.apiland.analysis.VariableManager; import fr.inra.sad.bagap.apiland.analysis.matrix.process.counting.Counting; import fr.inra.sad.bagap.apiland.analysis.matrix.process.metric.MatrixMetric; import fr.inra.sa...
Java
UTF-8
5,997
1.976563
2
[]
no_license
package com.example.cassio.alunouesb.activity; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.Menu; import android.view.MenuItem; import an...
Markdown
UTF-8
4,784
3.140625
3
[ "BSD-3-Clause", "CC-BY-SA-4.0", "CC-BY-4.0" ]
permissive
--- id: 587d7fa7367417b2b2512bc5 title: Work with Dynamic Data in D3 required: - src: 'https://cdnjs.cloudflare.com/ajax/libs/d3/4.3.0/d3.min.js' challengeType: 6 videoUrl: '' localeTitle: Работа с динамическими данными в D3 --- ## Description <section id="description"> Последние две проблемы охватывают основы динам...
Ruby
UTF-8
564
3.375
3
[]
no_license
# Хэши по природе своей не упорядочены ни по ключам, ни по значениям. # Чтобы отсортировать хэш, Ruby преобразует его в массив, который затем сортирует. # Понятно, что и результатом является массив. names = {"Jack"=>"Ruby","Monty"=>"Python", "Blaise"=>"Pascal", "Minnie"=>"Perl"} p list = names.sort # list р...
Swift
UTF-8
2,671
2.828125
3
[]
no_license
// // LoginView.swift // gefen // // Created by or Leumi on 16/03/2018. // Copyright © 2018 Or. All rights reserved. // import UIKit import Cartography protocol LoginViewDelegate: class { func loginViewUserPressedLoginButton(withUserName UserName:String, andWithPassword password:String) } class LoginView: UI...
Python
UTF-8
3,330
2.796875
3
[]
no_license
# removes genes and species from the results file that are no longer in the new markers cutoff file import json import os import argparse import re import csv def pathfinder(outpath): '''makes output dir''' if not os.access(outpath, os.F_OK): os.mkdir(outpath) def reader(path): '''opens the report...
Markdown
UTF-8
983
2.625
3
[ "BSD-3-Clause" ]
permissive
# An MPI Contention Benchmark This repository contains a benchmark code that performs MPI communication and computation simultaneously. The computational kernel used in the code is the Triad kernel from the [STREAM Triad benchmark](https://www.cs.virginia.edu/stream/) originally developed by John D. McCalpin. ## Buil...
Python
UTF-8
8,763
2.71875
3
[]
no_license
from bs4 import BeautifulSoup import datetime import requests import time def sign_coordinate(coordinate): if 'W' in coordinate or 'S' in coordinate: direction = -1 coordinate = coordinate.rstrip('S') coordinate = coordinate.rstrip('W') elif 'E' in coordinate or 'N' in coordinate: ...
Java
UTF-8
1,239
1.820313
2
[]
no_license
package biz.mercue.impactweb.util; import java.util.Map; public class YamlProperty { private String ip; private Map<String, String> jdbc; private Map<String, String> hibernate; private Map<String, String> path; private Map<String, String> url; private Map<String, String> mail; private Map<String, String> t...
C++
UTF-8
1,815
2.546875
3
[ "MIT" ]
permissive
#include "letterboxedscreenbuffer.h" #include <QImage> #include <QPainter> class LetterboxedScreenBufferPrivate { public: ScreenBuffer *sourceBuffer; QSize size; QRect sourceRect; QTransform coordinateTransform; }; LetterboxedScreenBuffer::LetterboxedScreenBuffer(ScreenBuffer *source, QO...
Python
UTF-8
471
3.796875
4
[]
no_license
#!/usr/bin/env python3 import random # possible O(n) runtime! def bogo_sort(arr): def is_sorted(a): return all(a[i-1] <= a[i] for i in range(1, len(a))) while not is_sorted(arr): random.shuffle(arr) def main(): arr = [] size = input('How many numbers do you want to sort? ') for i in r...
C#
UTF-8
540
3.25
3
[]
no_license
//Not my code public class Solution { public int MajorityElement(int[] nums) { Dictionary<int, int> count = new Dictionary<int, int>(); for(int i=0; i<nums.Length; i++){ if(count.ContainsKey(nums[i])){ count[nums[i]]++; } ...
Java
UTF-8
908
2.953125
3
[]
no_license
/* * Employee.java * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package purchaseorder; import java.io.*; /** * * @author vincent */ public class Employee { // stores employee name public String fName = ""; //stores employees department name...
C#
UTF-8
5,496
2.59375
3
[ "MIT" ]
permissive
using System; using System.Collections; using System.Net; using System.Text; using System.Text.RegularExpressions; using System.Windows.Forms; namespace 爬虫 { public partial class Form1 : Form { Hashtable hashtable = new Hashtable(); private string _url; public string Url { ...
Java
UTF-8
1,281
2.875
3
[]
no_license
package com.github.marceloleite2604.manager.util.configuration; import java.util.Enumeration; import java.util.Properties; public class Configuration { public static final String DEFAULT_CONFIGURATION_FILE_PATH = "src/main/resources/application.properties"; private static Configuration INSTANCE; priv...
Swift
UTF-8
2,629
2.859375
3
[]
no_license
// // PresentView.swift // Is This Your Card? // // Created by Kinney Kare on 7/29/21. // import SwiftUI struct PresentView: View { @State var contentView: ContentView @State var oneIsTapped = false @State var twoIsTapped = false @State var threeIsTapped = false @State var fourIsTapped = false ...
PHP
UTF-8
24,370
2.53125
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\Session; class ControllerCarrito extends Controller { /* Carrito es un JSON de la siguiente estructura: {"carrito": { "items":[ { "id": "id1" "categoria": "vuelo", "cantidad" : "3", ...
Markdown
UTF-8
1,808
2.953125
3
[]
no_license
# <p align = 'center'>We Fire</p> ### <p align = 'center'>*"One man with a gun can control 100 without one. ~ Vladimir Lenin"* </p> # MANAN Using firearms(for non harming {**good word**} purposes obvoiusly!) is a thrilling luxury that isn't quite affordable for any general college student.Bbut for NCC cadets, it's j...
Rust
UTF-8
6,680
3.09375
3
[]
no_license
use std::ops; use crate::vector2::Vector2; #[derive(Debug, Clone, Copy, PartialEq)] pub struct Matrix2 { pub m11: f64, pub m12: f64, pub m21: f64, pub m22: f64, } impl Matrix2 { pub fn new(m11: f64, m12: f64, m21: f64, m22: f64) -> Matrix2 { Matrix2 { m11, m12, m21, m22 } } pub fn...
Shell
UTF-8
316
3.171875
3
[]
no_license
#!/bin/bash #se guarda en una variable el texto a=`cat "$3"` #se define la posición de inicio, -1 porque la posicion de los caracteres inicia en 0 i=$(($1-1)) #cantidad de letras que le siguen a la posición inicial f=$(($2 - $1 +1)) #imprime los f caracteres que están después de la posición $1 echo ${a:$i:$f}
Java
UTF-8
214
1.742188
2
[]
no_license
package com.zipcodewilmington.froilansfarm.Storage; import com.zipcodewilmington.froilansfarm.Animal.Horse; import java.util.ArrayList; import java.util.List; public class Stable extends StorageUnit <Horse>{ }
Java
UTF-8
272
2.203125
2
[]
no_license
package dndapp; import java.util.ArrayList; public class userList { private static ArrayList<String> usernames; public userList(){ } public void addItem(String username){ usernames.add(username); } }
Java
UTF-8
34,320
1.640625
2
[ "Apache-2.0" ]
permissive
package com.mohyaghoub.calculator; import android.app.AlertDialog; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Color; import android.media.AudioManager; import android.net.Uri; import an...
C++
UTF-8
995
3.015625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; void insertionsort(int *input, int size, unsigned long long int &comparisons){ for(int i = 1;i < size;i++){ for(int j = i-1;j >= 0;j--){ comparisons++; if(input[j] > input[j+1]){ int temp = input[j]; input...
Java
UTF-8
170
1.742188
2
[]
no_license
package in.ernet.iitr.puttauec.sensorutil; import java.util.Random; public class RandomSingleton { public static final Random instance = new Random(2); // 2 is seed }
Java
UTF-8
544
1.695313
2
[]
no_license
package com.example.satish.widgetlistviewdemo.activity; import android.os.Bundle; import android.os.PersistableBundle; import android.support.v7.app.AppCompatActivity; import com.example.satish.widgetlistviewdemo.R; /** * Created by satish on 24/11/15. */ public class SearchActivity extends AppCompatActivity { ...
JavaScript
UTF-8
1,367
2.5625
3
[]
no_license
module.exports = { createFolderStudied: (req, res, next) => { const db = req.app.get("db"); const { user_id } = req.params; const { folderName } = req.body; console.log(folderName); db.add_to_studied([user_id, folderName]) .then(studied => res.status(200).send(studied)) .catch(err => {...
Java
UTF-8
895
2.859375
3
[]
no_license
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Arrays; import java.io.FileInputStream; public class Main_백준_1475_방번호 { public static void main(String[] args) throws Exception { System.setIn(new FileInputStream("res/input_방번호.txt")); BufferedReader br = new BufferedReade...
TypeScript
UTF-8
1,401
2.546875
3
[]
no_license
import { prismaClient } from "../../utils/types"; interface CreateComment { userId: number postId: number content: string } export async function createComment({ content, postId, userId }: CreateComment, prisma: prismaClient) { const comment = await prisma.comment.create({ data: { ...
Markdown
UTF-8
1,186
2.8125
3
[ "MIT" ]
permissive
# go-httpresource - simple HTTP end-point The go stdlib `net/http` library is quite good for providing a simple routing experience but some times you want just a bit more. This library is designed to work in conjuction and add a dispatch on HTTP methods to the mix. Some times it's nice to have APIs being a bit more RE...
JavaScript
UTF-8
2,920
3.296875
3
[]
no_license
import Rx from 'rx'; import Immutable from 'immutable'; var code = { //Monkeys and Coconuts https://youtu.be/U9qU20VmvaU?t=43s // //<n> sailors are stranded on a desert island with one monkey. //The sailors gather coconuts into a pile and go to sleep. // //That night (without the knowledge of t...
C++
UTF-8
1,397
2.640625
3
[]
no_license
#include <string> #include <utility> #include <sys/types.h> #include <sys/socket.h> #include <unistd.h> #include <errno.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <openssl/bio.h> #include <openssl/ssl.h> #include <openssl/err.h> #include <iostream> using namespace std; class Request { pr...
JavaScript
UTF-8
480
2.84375
3
[ "Apache-2.0" ]
permissive
/** * Triggered from a message on a Cloud Pub/Sub topic. * * @param {!Object} event The Cloud Functions event. * @param {!Function} The callback function. */ exports.subscribe = (event, callback) => { // The Cloud Pub/Sub Message object. const pubsubMessage = event.data; // We're just going to log the messa...
Java
UTF-8
505
2.765625
3
[]
no_license
package com.src; import java.util.ArrayList; public class Customer { private String name; private ArrayList<Double> trans=new ArrayList<>(); public Customer(String name, double initialAmount) { // super(); this.name = name; this.trans = trans; addTransaction(initialAmount); } public void addTransaction(double init...
Java
UTF-8
613
2.171875
2
[]
no_license
package pages; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.remote.RemoteWebDriver; import hooks.SelBase; public class MyHomePage extends SelBase { public MyHomePage(RemoteWebDriver driver) { SelBase.driver=driver; } public MyLeadsPage clickonLead...
Python
UTF-8
1,155
2.890625
3
[ "BSD-2-Clause" ]
permissive
import logging from . import SimConcretizationStrategy class SimConcretizationStrategyLogging(SimConcretizationStrategy): """ Concretization strategy that logs concretization results from another strategy. """ def __init__(self, strategy: SimConcretizationStrategy, is_read_strategy: bool): su...
C++
UTF-8
739
2.890625
3
[]
no_license
#pragma once #include "Grid.h" namespace dae { class GameObject; } class Level { public: Level(float Width, float Height, int rows, int cols); Level(BinaryReader& reader, const char* filename); ~Level(); Level(const Level& other) = delete; Level(Level&& other) = delete; Level& operator=(const Level& other) = del...
SQL
UTF-8
375
2.8125
3
[]
no_license
USE codeup_test_db; SELECT * FROM albums; UPDATE albums SET sales = (sales * 10); -- ////////////////////// SELECT * FROM albums WHERE release_date < 1980; UPDATE albums SET release_date = release_date - 100 WHERE release_date < 1980; -- ////////////////////// SELECT name FROM albums WHERE artist = 'Michael Jack...
Java
UTF-8
1,339
2.546875
3
[]
no_license
package m1miage; import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.security.SecureClassLoader; import java.util.ArrayList; public class MyClassLoader extends SecureClassLoader { private ArrayList<File> path = null; public ...
Java
UTF-8
947
2.171875
2
[]
no_license
package com.fluent.job.handler; import com.alibaba.cola.dto.SingleResponse; import java.lang.reflect.InvocationTargetException; public abstract class JobHandler { /** success */ public static final SingleResponse<String> SUCCESS = SingleResponse.buildSuccess(); /** fail */ public static final SingleR...
Python
UTF-8
712
3.703125
4
[]
no_license
from collections import Counter from itertools import combinations def get_strings(): with open('data/2.txt', 'r') as f: return [line.strip() for line in f] def get_checksum(strings): counts = [Counter(s) for s in strings] twos = sum(1 for x in counts if 2 in x.values()) threes = sum(1 for x i...
C++
WINDOWS-1252
474
2.765625
3
[]
no_license
#pragma once #include "hand.h" class GenericPlayer : public Hand { friend ostream& operator <<(ostream& os, GenericPlayer& aGenericPlayer); public: GenericPlayer(const string& name = ""); virtual ~GenericPlayer(){} virtual bool IsHitting() ; bool IsBusted() const { return (GetTotal() > 21); } void Bust()const...
Java
UTF-8
2,517
2.25
2
[]
no_license
package com.bupt.ims.common.filter; import com.bupt.ims.common.lang.ResultCode; import com.bupt.ims.entity.IMSUser; import com.bupt.ims.serviceImpl.DataUserDetailService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.BadCredentialsException; import or...
Markdown
UTF-8
1,261
2.671875
3
[ "MIT" ]
permissive
# API DOCUMENTATION ## Routes #### GET *Route:* `data/artist?artistId=<id>` *Output:* ``` { "message": "Successfully retrieved artist", "artist": [ { "artist_id": 1, "artist_name": "Djay Van Der Bent", "artist_img_url": "https://images.unsplash.com/photo-153052178...
PHP
UTF-8
2,186
2.609375
3
[ "BSD-3-Clause" ]
permissive
<?php /** * Lithium: the most rad php framework * * @copyright Copyright 2010, Union of RAD (http://union-of-rad.org) * @license http://opensource.org/licenses/bsd-license.php The BSD License */ /** * This configures your session storage. The Cookie storage adapter must be connected first, sin...
Java
UTF-8
1,365
3.375
3
[]
no_license
/* 300. Longest Increasing Subsequence QuestionEditorial Solution My Submissions Total Accepted: 39482 Total Submissions: 110692 Difficulty: Medium Given an unsorted array of integers, find the length of longest increasing subsequence. For example, Given [10, 9, 2, 5, 3, 7, 101, 18], The longest increasing subsequen...
Java
UTF-8
3,826
1.953125
2
[]
no_license
package com.example.attendance.ui.Other; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.graphics.Bitmap; import android.os.Bundle; import android.provider.MediaStore; import android.view.LayoutInflater; import android.view.View; import android.view.View...
C#
UTF-8
1,153
2.828125
3
[ "MIT" ]
permissive
using StankinsCommon; namespace Stankins.FileOps { public class ReceiverCSVText : ReceiveCSV<ReceiverStreamingText> { public ReceiverCSVText(CtorDictionary dataNeeded) : base(dataNeeded) { this.Name = nameof(ReceiverCSVText); this.Text = GetMyDataOrThrow<string>(nameof(...
PHP
UTF-8
1,368
2.796875
3
[]
no_license
<?php namespace GraphQL\Application\Entity; use GraphQL\Utils\Utils; /** * Class User * Сущность пользователя. * (публичные GraphQL-методы см. в /src/graphql/Application/Type/UserType.php) * (поля объекта соответствуют полям таблицы, за которой прикреплена сущность - см. метод __getTable()) * * @package GraphQL\...
Python
UTF-8
2,577
2.53125
3
[]
no_license
from __future__ import print_function import numpy as np import tensorflow as tf from tensorflow.python.ops import rnn_cell from tensorflow.python.ops import seq2seq import re import os import itertools import sys import time import math from tensorflow.models.rnn.translate import seq2seq_model PAD_ID = 0 GO_ID = 1 ...
Python
UTF-8
3,234
3.078125
3
[]
no_license
# driver.find_element_by_id() # driver.find_element_by_name() # driver.find_element_by_xpath() # driver.find_element_by_link_text() # driver.find_element_by_partial_link_text() # driver.find_element_by_tag_name() # driver.find_element_by_class_name() # driver.find_element_by_css_selector() # drive.find_elemen...
C++
UTF-8
14,278
3.453125
3
[]
no_license
//functions file //define functions in this file //string library #include "class.h" //our own .h file //using namespace std; /* Function: one parameters: a string that is the first word in the current getline returns: 1 for label, 0 for instruction decription: checks to see if there is a colon next to the word. if...
Java
UTF-8
1,959
2.78125
3
[ "MIT" ]
permissive
package com.web.program; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import com.web.tools.FormatingTools; public class Command { private final String aPath; private final List<String> aParsedPath; private final List<String> aArgs; private final List<String> aFile;...
Markdown
UTF-8
1,221
2.84375
3
[ "MIT" ]
permissive
<div align="center"> <img width="250" src="./public/logo-header.png" /> </div> > An online and open source platform <div align="center"> <img width="1000" src="./public/fenixproject.png"/> </div> # 📌 Table of Contents - [About](#speech_balloon-About) - [Purpose](#Purpose) - [Motivation](#love_letter-Motivation)...
Python
UTF-8
858
3.234375
3
[]
no_license
import pandas as pd #separate xls to three CSVs xls=pd.ExcelFile("dataset_original.xls") df1 = xls.parse(sheetname="People", index_col=None, na_values=['NA']) df2 = xls.parse(sheetname="Men", index_col=None, na_values=['NA']) df3 = xls.parse(sheetname="Women", index_col=None, na_values=['NA']) df1.drop([0,1,2,3,4,5,6,...
Java
UTF-8
327
2.875
3
[]
no_license
package moderate; public class NumberSwapper { public static void main(String[] args) { int a = -12; int b = 89; System.out.println(a); System.out.println(b); a = a * b; b = a/b; a = a/b; System.out.println(a); System.out.println(b); ...
Markdown
UTF-8
1,378
3.15625
3
[]
no_license
# Blogo ## Synopsis Blogo is an util to generate blog template, you give a blog title, and generates title and tile and category intelligent by your title. This is great when you write a blog and don't want to specific an category. Those features are provided for now: * Support hexo blog templates; * Support automat...
Swift
UTF-8
896
2.640625
3
[]
no_license
// // Playlist.swift // E.Z Lean // // Created by Duy Anh on 3/13/17. // Copyright © 2017 E.Z Lean. All rights reserved. // import Foundation import RealmSwift import Firebase class Playlist: Object { dynamic var name = "" dynamic var imageLink = "" let song_ids = List<RealmString>() override...
TypeScript
UTF-8
416
2.65625
3
[]
no_license
import {colors} from '@constants' export const createHeaderColors = ( colScheme: options, ): { bg: string color: string } => { // dark by default const rets = { bg: colors.gray['900'], color: colors.white, } // if (colScheme === 'light') { // rets.bg = colors.gray['200'] // rets.co...
Python
UTF-8
2,524
3.15625
3
[]
no_license
import unittest import math from decimal import Decimal from Calculator.Calculator import Calculator from CsvReader.CsvReader import CsvReader class MyTestCase(unittest.TestCase): def setUp(self) -> None: self.calculator = Calculator() def test_Add(self): test_data = CsvReader('./Tests/Data/U...
Java
UTF-8
2,883
2.90625
3
[]
no_license
package dbEntities; import java.sql.Connection; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import javax.swing.JFrame; import javax.swing.JTable; import formsAndFrames.AnalysesDataFrame; /** * entity to perform sql requests * * @author DenRUS * ...
JavaScript
UTF-8
690
3.75
4
[]
no_license
// Daniel Shiffman // https://www.kadenze.com/courses/the-nature-of-code // http://natureofcode.com/ // Session 1: Random Walker var w; function setup() { createCanvas(640, 360); // Make a Walker object w = new Walker(); } function draw() { background(51); // Update and display object w.update(); w.dis...
Python
UTF-8
8,935
3.3125
3
[]
no_license
''' Created on Sep 16, 2021 @author joeypy ''' import os import sys import cfg import random import pygame # Check if game is over def is_game_over(board, size): assert isinstance(size, int) num_cells = size * size for i in range(num_cells - 1): if board[i] != i: return False retu...
C#
UTF-8
535
2.546875
3
[]
no_license
using OrderService.DataAccessLayer.Daos; using OrderService.Model; using System; namespace OrderService.DataAccessLayer { public static class DaoFactory { public static IDao<TModel> Create<TModel>(IDataContext dataContext) { return typeof(TModel) switch { ...
Java
UTF-8
2,046
1.921875
2
[]
no_license
package com.google.android.gms.internal; import java.util.List; import java.util.Map; public abstract interface zzblr { public abstract void initialize(); public abstract void interrupt(String paramString); public abstract boolean isInterrupted(String paramString); public abstract void purgeOutstandi...
C++
UTF-8
360
2.828125
3
[]
no_license
// HW6 13.18 Car.cpp // ZHUOZHAOJIN 12330443 #include <iostream> #include "Car.h" using namespace std; Car::Car( double g ) :gasCost( g ) { } double Car::getCarbonFootprint() const { return gasCost * 0.785; } double Car::getGasCost() const { return gasCost; } void Car::print() const { cout << "Th...
Python
UTF-8
310
3.59375
4
[]
no_license
# loop thru list cities = ['London','New York','Paris','Oslo','Helsinki' ] for city in cities: print(city) # output London New York Paris Oslo Helsinki # loop thru dict scores = {'Joe':95, 'Lou':86, 'Saman':91, 'Amin':75 } for s in scores: print(s, scores[s]) # output Amin 75 Lou 86 Saman 91 Joe 95
Java
UTF-8
1,145
2.9375
3
[]
no_license
package threadsstudy.future_task; import java.io.File; import java.util.Scanner; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executors; import java.util.concurrent.FutureTask; /** * Created by OTBA}|{HbIu` on 19.11.16. */ public class FutureTest { public static void main(String[]...