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,535
3.6875
4
[]
no_license
package level3; import java.math.BigInteger; public class Answer2 { public static BigInteger gen = new BigInteger("0"); public static BigInteger f; public static BigInteger m; public static final String IMP = "impossible"; public static String answer(String M, String F) {//compareTo -1 is le...
Python
UTF-8
1,171
3.4375
3
[ "BlueOak-1.0.0" ]
permissive
class Object: """Represents a generic object. Supported Operations: +-----------+--------------------------------------+ | Operation | Description | +===========+======================================+ | x == y | Checks if two objects are equal. | +-----------+---------------...
PHP
UTF-8
1,835
3.015625
3
[ "MIT" ]
permissive
<?php use WP_CLI\Utils; class EvalFile_Command extends WP_CLI_Command { /** * Regular expression pattern to match the shell shebang. * * @var string */ const SHEBANG_PATTERN = '/^(#!.*)$/m'; /** * Loads and executes a PHP file. * * Note: because code is executed within a method, global variables ne...
Python
UTF-8
2,351
2.78125
3
[ "MIT" ]
permissive
import sys from pytaxize import col class Ids(object): ''' ids: A class for taxonomic identifiers Usage:: import pytaxize res = pytaxize.Ids('Poa annua', db='col') res.get_colid() ''' def __init__(self, name, db): # super(ids, self).__init__() self.db = db ...
Markdown
UTF-8
1,232
2.9375
3
[]
no_license
--- title: 'Healthcare.gov & the Scalability Problem' author: Will type: post date: 2013-11-21T05:13:32+00:00 url: /2013/healthcare-gov-the-scalability-problem/ categories: - Uncategorized --- [Scalability problems][1] plague the creation of large web sites. This is especially poignant, given the Healthcare.gov web ...
Java
UTF-8
8,559
2.125
2
[ "BSD-3-Clause", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LGPL-3.0-only", "LGPL-2.1-only" ]
permissive
/* Copyright 2018 Samsung SDS 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 in writing, software dis...
JavaScript
UTF-8
2,565
2.578125
3
[]
no_license
'use strict' const questions = require('../models/index').questions; function register (req, h) { // Si el usuario ya está logeado por lo tanto ya está registrado // No podrá acceder a la página de register y cuando lo intente lo mandaremos a '/' if (req.state.user) { return h.redirect('/'); ...
Python
UTF-8
1,273
3.921875
4
[]
no_license
""" https://www.youtube.com/watch?v=XZ2G29ZUaII&index=27&list=PL6lxxT7IdTxGoHfouzEK-dFcwr_QClME_ Produce a GUI using python an tkinter thas has three buttons and a label. Arrange for the clicking of a button to set the background colour of the label to red, gren and blue i.e. clicking one button changes the bak...
Java
UTF-8
264
1.570313
2
[]
no_license
package com.wntime.customer.repo; import com.wntime.customer.region.BusDriveStationInfo; import org.springframework.data.gemfire.repository.GemfireRepository; public interface BusDriveStationInfoRepository extends GemfireRepository<BusDriveStationInfo,Long> { }
Java
UTF-8
447
2.71875
3
[]
no_license
package duke.exception; public class InvalidDeadlineException extends InvalidTaskException { private static final String ERROR_MESSAGE = "Please input the correct details for the deadline task.\n" + "deadline *description* /by *yyyy-mm-dd* *HH:mm*"; /** * Signals that the deadline task provid...
SQL
UTF-8
5,014
3.234375
3
[ "Apache-2.0" ]
permissive
-- Generated by Oracle SQL Developer Data Modeler 19.2.0.182.1216 -- at: 2020-09-12 14:34:27 BDT -- site: Oracle Database 12c -- type: Oracle Database 12c DROP TABLE jersey CASCADE CONSTRAINTS; DROP TABLE points_and_time CASCADE CONSTRAINTS; DROP TABLE rider CASCADE CONSTRAINTS; ...
C#
UTF-8
820
3.0625
3
[ "MIT" ]
permissive
using System; namespace Basement.Common { public class Lazy<T> { public bool isCreated { get; private set; } public Action<T> onCreate { get; set; } private T _value; private Func<T> _initFunc; public Lazy(Func<T> initFunc) { _initFunc = i...
Java
UTF-8
3,678
2.0625
2
[ "Elastic-2.0", "Apache-2.0", "SSPL-1.0", "LicenseRef-scancode-other-permissive" ]
permissive
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License * 2.0 and the Server Side Public License, v 1; you may not use this file except * in compliance with, at your election, the Elastic License 2.0 or the Server...
C
UTF-8
732
3.25
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #define bool int #define false 0 #define true 1 struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; }; struct ListNode { int val; struct ListNode *next; }; int main() { return 0; } bool is_same(struct TreeNode* p,struct TreeNode* q); ...
Java
UTF-8
299
2.765625
3
[]
no_license
import java.util.*; public class 과자 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int k=sc.nextInt(); int n=sc.nextInt(); int m=sc.nextInt(); int ans=(n*k)-m; if(ans<=0) { System.out.println(0); }else { System.out.println(ans); } } }
C#
UTF-8
536
3.046875
3
[]
no_license
using System.ComponentModel; using System.Reflection; public class EnumReflection { public static string GetDescription(Profession val) { FieldInfo fi = val.GetType().GetField(val.ToString()); if (fi != null) { object[] profs = fi.GetCustomAttributes(typeof(DescriptionAtt...
C
UTF-8
1,243
3.921875
4
[]
no_license
// // Created by kevin on 2019/11/19. // #include <stdlib.h> #include <stdio.h> /** * 数组指针 (int (*p)[n] 一个指向整型数组的指针变量) * * * 指针数组 (int *p[n] 一个保存n个整型指针的数组) * []优先级高,先与p结合成为一个数组,再由int*说明这是一个整型指针数组,它有n个指针类型的数组元素。这里执行p+1时,则p指向下一个数组元素 * p=a;因为p是个不可知的表示,只存在p[0]、p[1]、p[2]...p[n-1],而且它们分别是指针变量可以用来存放变量地址。 * 但可以这样 *p...
Markdown
UTF-8
791
3.578125
4
[]
no_license
Delete one Problem Description Given an integer array A of size N. You have to delete one element such that the GCD(Greatest common divisor) of the remaining array is maximum. Find the maximum value of GCD. Problem Constraints 2 <= N <= 105 1 <= A[i] <= 109 Input Format First argument is an integer array A. ...
C++
UTF-8
289
3.09375
3
[]
no_license
//6. Remove Vowels #include<bits/stdc++.h> using namespace std; int main(){ string s; getline(cin,s); char t; //cout<<s.find('a');//cout<<s.length()<<endl; for(int i=0 ; i<s.length() ; i++){ t=s[i]; if(t=='a'||t=='e'||t=='i'||t=='o'||t=='u') { s.erase(i,1); i--; } } cout<<s; }
Markdown
UTF-8
5,244
3
3
[ "MIT" ]
permissive
--- layout: post title: "[컴퓨터 구조] 연산(Multiplication, division, Booth),소수" excerpt: "[컴퓨터 구조] 연산(Multiplication, division, Booth),소수" date: 2019-09-24 14:00:00 categories: [computer architecture] comments: true --- # 곱셈 Multiplication - multiplicand * multiplier = product - 피승수 * 승수 = 곱 - 3 * 2 = 6 - 곱셈의 경우 숫자가 조금...
Java
UTF-8
1,737
2.328125
2
[]
no_license
package com.zxg.ssmcurd.tests; import com.zxg.ssmcurd.beans.Department; import com.zxg.ssmcurd.dao.DepartmentMapper; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springfra...
Markdown
UTF-8
2,465
2.84375
3
[]
no_license
# Paintball! I denne oppgaven skal vi lage et multiplayer minigame! Spillet ligner litt på helt vanlig paintball, men vi spiller med egg og snøballer. NB: Her ligger det stortsett bare kode og ingen instruksjoner. # Steg 1: Bygg en arena! Det første vi må gjøre er å bygge en arena vi kan spille på. Bygg en helt f...
JavaScript
UTF-8
564
2.6875
3
[]
no_license
// Routers for every component const usersRouter = require('./components/user/routes') /** * Takes the company identifier from the url parameter ':company' * and put into the req.body object so that next middleware * functions can access its value * * @param {*} req * @param {*} res * @param {*} next */ const...
Java
UTF-8
3,502
2.546875
3
[]
no_license
package org.iiitb.facebook.dao.impl; import java.io.InputStream; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import org.iiitb.facebook.dao.LoginDAO; import org.iiitb.facebook.model.User; import org.iiitb.facebook.ut...
Java
UTF-8
2,084
2.8125
3
[]
no_license
package controller.requests; import controller.Dispatcher; import model.fileHandler.FileHandler; import model.player.Player; import view.gui.ErrorFrame; import view.gui.UI; import java.io.IOException; import java.util.ArrayList; import java.util.List; /** * Represents a request for saving the scores of the players ...
JavaScript
UTF-8
1,195
2.9375
3
[]
no_license
let fs = require("fs"); let path = require("path"); let uuid = require("uuid"); module.exports = function () { let mo = { }; untreefy(arguments[0], arguments[1], mo); fs.writeFile(path.join(arguments[1], "metadata.json"), JSON.stringify(mo), function(){ }); } // this will update the object with cor...
JavaScript
UTF-8
219
2.984375
3
[]
no_license
let exclamation = "" let sunshine = () => { exclamation +="!" console.log("I miss you too!" + exclamation) } module.exports = () => { for (let i = 0; i < 10; i++){ setTimeout( sunshine, 100* i) } }
JavaScript
UTF-8
1,346
2.671875
3
[]
no_license
const express = require('express'); const morgan = require('morgan'); const app = express(); app.use(morgan('common')); const plays = require('./playstore.js') const playStore = require('./playstore'); app.get('/apps', (req, res) => { const {sort, genre} = req.query; let returnData = [...playStore]; if(genre ...
Shell
UTF-8
396
3.125
3
[]
no_license
#!/usr/bin/env bash # Compiles the JAM source code and creates jam.jar JAMDIR=$(pwd) COMPILE_CP="-cp .:$JAMDIR/src:$JAMDIR/lib/junit-4.12.jar:$JAMDIR/lib/hamcrest-core-1.3.jar:$JAMDIR/lib/gson-2.8.5.jar:$JAMDIR/lib/commons-cli-1.4.jar" echo $JAMDIR echo $COMPILE_CP javac $COMPILE_CP $(find src | grep ".java") pushd ...
C#
UTF-8
7,106
3.34375
3
[ "MIT" ]
permissive
using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Nvelope.IO { public static class Folder { /// <summary> /// Get the part of the path representing the folder /// </summary> /// <param name="path"></param> /...
Python
UTF-8
181
3.4375
3
[]
no_license
def solve(): sum = 0 for i in range(1, 1001): sum += (i**i) print(f'The last ten digits of sum are: {str(sum)[-10:]}') if __name__ == '__main__': solve()
Markdown
UTF-8
2,738
3.015625
3
[]
no_license
# A. Interactor - Ограничение времени 1 секунда - Ограничение памяти 256Mb - Ввод стандартный ввод или input.txt - Вывод стандартный вывод или output.txt Лена руководит разработкой тестирующей системы, в которой реализованы интерактивные задачи. До заверщения очередной стадии проекта осталось написать модуль, определ...
JavaScript
UTF-8
440
4.46875
4
[]
no_license
/* Complete the function below to find the max number of the passing array of numbers. */ function max(numbers) { var max_num = numbers[0]; for (let i = 1; i < numbers.length; i++) { if (numbers[i] > max_num) { max_num = numbers[i]; } } return max_num; } max([1, 2, 4, 5]); ...
Java
UTF-8
7,295
2.578125
3
[ "LicenseRef-scancode-warranty-disclaimer", "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
package org.irods.jargon.core.pub; import java.util.List; import org.irods.jargon.core.exception.DuplicateDataException; import org.irods.jargon.core.exception.InvalidGroupException; import org.irods.jargon.core.exception.InvalidUserException; import org.irods.jargon.core.exception.JargonException; import org.irods.j...
TypeScript
UTF-8
2,150
2.828125
3
[]
no_license
import { Injectable } from '@angular/core'; @Injectable({ providedIn: 'root' }) export class ProductService { private products: Product[] = [ new Product(1,"第一个商品",1.99,3.5,"这是第一个商品,是我再学习angular入门实战是创建的",["电子产品","硬件设备"]), new Product(2,"第二个商品",2.99,2.5,"这是第二个商品,是我再学习angular入门实战是创建的",["电子产品","硬件设备"]), n...
C#
UTF-8
5,038
2.9375
3
[ "MIT" ]
permissive
using UnityEngine; using System.Collections; using System; namespace CGLA { public struct Mat3x3f { public float m00; public float m01; public float m02; public float m10; public float m11; public float m12; public float m20; public float m21; public float m22; public static Mat3x3f New() ...
Java
UTF-8
478
2.359375
2
[]
no_license
package com.yzblog.datacenter.web.modules.sysmonitor.util; /** * 请求状态 * * @author yuzhou * @create 2017-10-19 17:52 **/ public enum RequestStatus { /** * {@code 0 success}. * 成功 */ SUCCESS((short) 0), /** * {@code 1 fail}. * 异常失败 */ FAIL((short) 1); private shor...
Java
UTF-8
686
2.40625
2
[]
no_license
package com.example.user.glujam; /** * Created by User on 2018-02-24. */ public class MusicDto2 { private String path; private int index; public MusicDto2(){ } public MusicDto2(int index, String path) { this.index = index; this.path = path; } public String getPath() {...
Ruby
UTF-8
1,080
2.890625
3
[]
no_license
class App ALL_FORMATS = ['year', 'month', 'day', 'hour', 'min', 'sec'] def call(env) @path = env['PATH_INFO'] @query = env['QUERY_STRING'] [status, headers, body] end private def status if false_path? 404 elsif false_format? 400 else 200 end end def fa...
Python
UTF-8
236
3.03125
3
[]
no_license
def f1(x): return x // 3 - 2 def f2(x): a = x // 3 - 2 if a <= 0: return 0 return a + f2(a) def solve(fl, f): return sum(map(lambda x : f(int(x)), open(fl).read().split())) print(solve('in', f1)) print(solve('in', f2))
C#
UTF-8
759
2.71875
3
[ "MIT" ]
permissive
namespace Fun { using System; public struct Unit { public static Unit Value = new Unit (); public override Boolean Equals (Object obj) { var local = this; return If.Else ( obj is Unit, () => local.Equals ((Unit) obj), ...
Shell
UTF-8
591
2.671875
3
[]
no_license
#!/bin/bash for work in get-6k.cnf set-6k.cnf; do for iso in "" "--enable"; do for active in mem udp udp,mem; do file=serv-iso$iso-work$work-active$active.png plot_rate.py -f \ memcached-mtu9000-iso$iso-work$work-active$active/l{1,2,3,4}/net.txt \ -i total -l l1 l2 l3 l4 \ --title "TX rates at $active servers...
Java
UTF-8
6,498
2.421875
2
[ "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
/*- * #%L * Image-Registration * %% * Copyright (C) 2019 Oliver Loeffler, Raumzeitfalle.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....
Go
UTF-8
803
3.65625
4
[ "Apache-2.0" ]
permissive
package main import ( "log" "time" ) // coalesce events on a channel within a window, and then call fn() // http://blog.gopheracademy.com/advent-2013/day-24-channel-buffering-patterns/ //TODO this doesnt quite work right... It fires fn() immediately on first event in ch func coalesceEvents(ch <-chan string, window ...
Markdown
UTF-8
2,757
3.265625
3
[]
no_license
# ContextReplacementPlugin _上下文\(Context\)_与一个[带表达式的 require 语句](https://doc.webpack-china.org/guides/dependency-management/#require-with-expression)相关,例如`require('./locale/' + name + '.json')`。遇见此类表达式时,webpack 查找目录 \(`'./locale/'`\) 下符合正则表达式 \(`/^.*\.json$/`\)的文件。由于`name`在编译时\(compile time\)还是未知的,webpack 会将每个文件都作为模块引...
Java
UTF-8
470
2.6875
3
[]
no_license
package com.slokam.Stream; public class Mobile { private long mobileNumber; private String network; public Mobile(long mobileNumber, String network) { super(); this.mobileNumber = mobileNumber; this.network = network; } public long getMobileNumber() { return mobileNumber; } public String getNetwork() { ...
Java
UTF-8
9,781
2.390625
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 agp.matricula.modelo; import javax.xml.crypto.Data; import org.junit.After; import org.junit.AfterClass; import org.junit.Befo...
Markdown
UTF-8
2,686
3.25
3
[]
no_license
# Machine Learning Project 1 - Higgs Boson Project 1 of the Machine Learning course given at the EPFL Fall 2020. ## Team Members - Marijn VAN DER MEER - Bradley MATHEZ - Timothée DURAN ## Idea: In this project, we implemented simple machine learning models: Least Squares Regression (Normal, with GD/SGD), Ridge Regr...
C++
UTF-8
3,039
3.046875
3
[]
no_license
#include <Adafruit_NeoPixel.h> #define PIN 3 //pixel pin #define BUTTON_PIN 7 // button pin #define NUMPIXELS 16 Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); int helen = 100; // delay for half a second int oldState = 0; int showType = 0; void setup() { p...
Markdown
UTF-8
2,219
2.703125
3
[]
no_license
1. 启动 Apache 服务器 ``` sudo apachectl start ``` > 其他命令: > sudo apachectl restart:重启服务器 > sudo apachectl stop:停止服务器 2. 浏览器访问 __http://localhost__,显示 It works!,确认启动成功 ![](../assets/images/itWorks.png) 3. 修改 /etc/apache2/httpd.conf 1. 进入 /etc/apache2/,备份 httpd.conf ``` ...
Java
UTF-8
1,559
1.96875
2
[ "Apache-2.0" ]
permissive
package com.checkmarx.sdk.dto; import java.io.Serializable; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclud...
C++
UTF-8
442
2.90625
3
[]
no_license
#include<iostream> #include<bits/stdc++.h> using namespace std; void tower_of_h(long long n ,int from ,int dest ,int help) { if(n==1) { cout<<"Move "<<from <<" to "<<dest<<endl; return; } tower_of_h(n-1,from,help,dest); cout<<"Move "<<from <<" to "<<dest<<endl; tower_of_h(n-1,hel...
Java
UTF-8
157
1.90625
2
[]
no_license
package oob.fingerprinttest.Domain.Main.CheckUsernameStoredUseCase; public interface CheckUsernameStoredUseCaseRepositoryInterface { boolean check(); }
TypeScript
UTF-8
2,216
2.5625
3
[]
no_license
import {Injectable} from '@angular/core'; import {AvailableKurseMap, SetupStore} from './setup.store'; import {Kurs, Kurse} from '../../../../types/Kurs'; import {SetupQuery} from './setup.query'; import {serviceInCypress} from '../../../util'; @Injectable() export class SetupService { constructor(public store: Setu...
C#
UTF-8
9,208
2.515625
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; using static SemanticType; using static RenderingOptions; class DrawInfo { public Argument Argument { get; } public int X { get; } public int Y { get; } public DrawInfo(Argument argument, int x, int y) { Argument =...
JavaScript
UTF-8
530
2.578125
3
[]
no_license
var url = require('url'); // var urlObj = { // protocol: 'http:', // slashes: true, // hostname: 'baidu.com', // port: 80, // pathname:'index', // hash: '#home', // search: '?search=aiqiyi', // path: '/nodejs?search=aiqiyi' // } /* url字符串 ===> url Object parse url Object ===...
JavaScript
UTF-8
2,633
2.65625
3
[]
no_license
import React, { Component } from "react"; import SongForm from "./components/SongForm"; import SongList from "./components/SongList"; import SongFilter from "./components/SongFilter"; import NavBar from "./components/NavBar"; import Background from "./components/Background"; import "./css/SongOverview.css"; class Song...
Java
UTF-8
1,642
2.5
2
[]
no_license
package course.labs.activitylab; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class ActivityTwo extends SuperActivity { // String for LogCat documentation private final static String TAG = "Lab-ActivityTw...
SQL
UTF-8
1,337
4.28125
4
[]
no_license
#table: company #Member_id, Company, Year_Start #1, Microsoft, 2000 #1, Google, 2006 #1, Facebook, 2012 #2, Microsoft, 2001. more info on 1point3acres.com #2, Oracle, 2004 #2, Google, 2007 #... -- how many members ever moved from Microsoft to Google? (both member #1 and member #2 count) SELECT COUNT(DISTINCT c1.Memb...
Shell
UTF-8
500
3.390625
3
[ "MIT" ]
permissive
#!/bin/sh # Add a user's IP address to the EdgeOS Firewall # e.g. ./lan-auth.sh 48 oliverw92 192.168.0.82 echo "$@$@" ################ # START CONFIG # AUTH_GROUP=authed_lan_users # END CONFIG # ################ # Execute commands without running configure run=/opt/vyatta/sbin/vyatta-cfg-cmd-wrapper # Go into ...
Python
UTF-8
3,717
2.5625
3
[]
no_license
# -*- coding=utf-8 -*- import os import sys import numpy as np import keras from keras.preprocessing import image from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten from keras.layers import Conv2D, MaxPooling2D from keras.optimizers import RMSprop import resnet IMG_HEIGHT = 320 IMG_W...
PHP
UTF-8
1,206
2.71875
3
[ "MIT" ]
permissive
<?php namespace FSQL\Queries\AlterTableActions; use FSQL\Environment; use FSQL\Functions; class SetDataType extends BaseAction { private $tableName; private $columnName; private $type; public function __construct(Environment $environment, array $tableName, $columnName, $type, Functions $functions) ...
PHP
UTF-8
1,633
2.9375
3
[ "MIT" ]
permissive
function runQuery() { global $global_data; $runner = new QueryRunner(); $data = $runner->process(); return $data; } class QueryRunner { /** * @var DBBase */ private $db; public function process() { global $jQuery, $window; try { switch($jQuery('#dbtype')->val()) { case 'postgres': $this...
Python
UTF-8
1,660
3.03125
3
[]
no_license
''' Created on 02.12.2011 @author: christian.winkelmann@plista.com ''' import math import random class histogramm(object): def __init__(self, binnum = 5, min = 0, max = 2 ): self.binnum = binnum self.minx = min self.maxx = max self.histogram = {} def bi...
Java
UTF-8
8,804
2.359375
2
[]
no_license
package com.wcedla.wcedlaweather.view; import android.animation.ValueAnimator; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.RectF; import android...
C++
UTF-8
466
3.734375
4
[]
no_license
#include <iostream> using namespace std; class Stack { private: int* arr; int size; public: Stack() { arr = new int(); size = 0; } ~Stack() { size = -1; delete arr; } void push(int a) { arr[size++] = a; } int pop() { if(size >= 0) { return arr[--size]; ...
Python
UTF-8
1,783
2.578125
3
[]
no_license
import os import shutil import re # Variables ALL_SUBMISSIONS = 'lab3-submissions.zip' ROLL_LIST = 'Lab3/roll_list.txt' EXTRACT_DIR = 'Lab3/my_batch' # Name of submission archive # Keep as generic as possible unless strictly specified beforehand # ?: is for not capturing that bracket as a group SUBMISSION_N...
C
UTF-8
2,505
2.59375
3
[]
no_license
/* * strPool.c * * Created on: 2011-1-18 * Author: wuyulun */ #include "../inc/config.h" #include "strPool.h" #include "str.h" #ifdef NBK_MEM_TEST int strPool_memUsed(const NStrPool* pool) { int size = 0; if (pool) { size += sizeof(NStrPool); if (poo...
Java
UTF-8
178
1.789063
2
[]
no_license
package pokerHelper.strategy; import pokerHelper.core.Card; public class StartPositionHandler { public StartPositionHandler(int Position, Card card1, Card card2){ } }
Java
UTF-8
1,005
4.1875
4
[]
no_license
import java.util.Scanner; public class P6_3 { public static void main(String args[]) { Scanner input = new Scanner(System.in); System.out.print("Enter a number to see if it is a palindrome: "); int num = input.nextInt(); boolean isPalindrome = isPalindrome(num) ; if (isPalindrome == true) { System.out.print(num...
C++
UTF-8
753
3.25
3
[]
no_license
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: struct pointer { ListNode *node = nullptr; bool has_changed_list = false; }; ListNode *getIntersectionNode(ListNode *l1,...
Java
UTF-8
558
1.882813
2
[]
no_license
package com.kevinguanchedarias.owgejava; import io.restassured.http.ContentType; import io.restassured.module.mockmvc.RestAssuredMockMvc; import io.restassured.module.mockmvc.specification.MockMvcRequestSpecification; import lombok.experimental.UtilityClass; import java.nio.charset.StandardCharsets; @UtilityClass pu...
Java
UTF-8
1,361
2.34375
2
[]
no_license
package com.heverage.zhanyebao.client.model; import android.os.Parcel; import android.os.Parcelable; public class Address implements Parcelable{ private int addressType; private String region; private String address; public int getAddressType() { return addressType; } public void setAddressType(int ad...
Java
UTF-8
2,467
2.25
2
[ "Apache-2.0" ]
permissive
package com.huangjie.sell.controller; import com.huangjie.sell.VO.ProductInfoVO; import com.huangjie.sell.VO.ProductVO; import com.huangjie.sell.VO.ResultVO; import com.huangjie.sell.dataobject.ProductCategory; import com.huangjie.sell.dataobject.ProductInfo; import com.huangjie.sell.service.ProductCategoryService; im...
C++
UTF-8
4,408
3.109375
3
[]
no_license
/* Simple calculator Revision history: Originally written by Mei Shuyao April 2020 Second editon by Mei Shuyao April 2020 Third edition by Mei Shuyao May 2020 This program implements a basic expression calculator. Designed for pyhsics and engineering cases. Support user_defined variable and function. Support solv...
Java
UTF-8
183
1.953125
2
[]
no_license
package com.aisino.adapter.objectmode; /** * * @author zhukaishengy * @date 2018-3-13 */ class Source { void method01(){ System.out.println("method01 ..."); } }
Java
UTF-8
712
3.71875
4
[ "MIT" ]
permissive
public class BankAccountClient { public static void main(String[] args) { // Initialize object using constructor (args) BankAccount b1 = new BankAccount("Jake", 40); // Add 500 to object's balance b1.deposit(500); System.out.println(b1); // Subtract 300 fro...
Java
UTF-8
622
2.953125
3
[]
no_license
/** * */ package msb.j2se.common; /** * @author oradba * */ public class TestCountJava { /** * @param args */ public static void main(String[] args) { String s = "sunjavahpjavaokjavajavahahajavajavagoodjava"; int count = countSpecificString(s, "java"); System.out.println(c...
Markdown
UTF-8
3,922
2.890625
3
[]
no_license
--- layout: post title: Why Must LAMP Setup Suck? date: '2009-11-17T12:15:00-08:00' tags: - lamp - opinion tumblr_url: https://seanmonstar.com/post/708843270/why-must-lamp-setup-suck --- LAMP is common lingo for web developers. It’s an incredibly popular software stack to run dynamic websites. Many hosting companies in...
Markdown
UTF-8
674
2.671875
3
[ "Apache-2.0" ]
permissive
# Node-RED ![Node-RED img](pic/nr-image.png) ***Node-RED***: 是构建物联网(IOT, Internet of Things)应用程序的一个强大工具,其重点是简化代码块的“连接”以执行任务。它使用可视化编程方法,允许开发人员将预定义的代码块(称为“节点”,Node)连接起来执行任务。连接的节点,通常是输入节点、处理节点和输出节点的组合,当它们连接在一起时,构成一个“流”(Flows)。 ## 生态 - 官网: https://nodered.org - Github: https://github.com/node-red - 英文社区: ht...
JavaScript
UTF-8
491
2.9375
3
[]
no_license
class Poge extends HTMLElement { constructor() { super(); let template = document.querySelector("#poge"); this.append(template.content.cloneNode(true)); } } class Poggers extends HTMLElement { constructor() { super(); let template = document.querySelector("#poggers")...
Markdown
UTF-8
2,346
2.796875
3
[]
no_license
### 解决 连接问题 提示你:(node:80655) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. - 添加参数`{useNewUrlParser: true, useUnifi...
Java
UTF-8
4,189
2.25
2
[]
no_license
package com.lzh.weatherforecast.widget; import android.content.Context; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; impo...
Python
UTF-8
20,883
2.671875
3
[]
no_license
from tkinter import * import random, math,os from tkinter import messagebox class Bill_App(): def __init__(self,screen): self.screen = screen self.screen.geometry("1350x750+0+0") self.screen.title("Garlica Multicusine Restaurant") bg_colour = "deep sky blue" title = Label(sel...
Python
UTF-8
397
4.125
4
[]
no_license
# Takes 2 integer values and returns True if n is multiple of m # so n = mi for some integer i # returns False o/wise print('Is it a multiple') print('Please enter 2 numbers to be evaluated.') def is_multiple(n, m): if n%m ==0: return True else: return False n = int(input("Please enter a numb...
Java
UTF-8
18,398
1.921875
2
[]
no_license
package com.ice.server.dao.model; import java.util.Date; public class IceBase { /* * * This field was generated by MyBatis Generator. * This field corresponds to the database column tb_ice_base.id * * @mbg.generated */ private Long id; /* * * This field was generated b...
Python
UTF-8
666
3.46875
3
[]
no_license
str1='00000000000 my name is sriansha 000000000000000000000' print(str1.lstrip('0')) # print(str1.split()) # print(sorted(str1)) # print(''.join(sorted(str1))) # print(str1.upper()) # str2='\n' # print(str2.join(str1)) # print(str1.count('s')) # print(str1.count('a')) # print(str1.count('n')) # str2='my name is sriansh...
PHP
UTF-8
3,757
2.921875
3
[]
no_license
<?php class DB { private static $instance = null; private $pdo, $error=false, $results, $query, $count = 0; private function __construct(){ $host=Config::get('mysql/host'); $db=Config::get('mysql/db'); $username=Config::get('mysql/username'); ...
PHP
UTF-8
858
2.515625
3
[]
no_license
<?php $mysqli = new mysqli("mysql.hostinger.es", "u432353203_final", "123456", "u432353203_final"); if ($mysqli->connect_errno) { printf("Falló la conexión: %s\n", $mysqli->connect_error); exit(); } $result =$mysqli->query("SELECT Eposta FROM ERABILTZAILEA WHERE Onartua=0"); if (mysqli_num_rows($result) =...
C
UTF-8
185
2.953125
3
[]
no_license
#include <stdio.h> int main() { float w, h, b; float mb = 0; scanf("%f %f %f", &w, &h, &b); mb = w * h * b /8 /1024 /1024; printf("%.2f MB\n", mb); return 0; }
Python
UTF-8
901
2.609375
3
[ "BSD-3-Clause" ]
permissive
import unittest2 as unittest from celery import states class test_state_precedence(unittest.TestCase): def test_gt(self): self.assertGreater(states.SUCCESS, states.PENDING) self.assertGreater(states.FAILURE, states.RECEIVED) self.assertGreater(states.REVOKED, states.STARTED) self...
Java
UTF-8
2,281
2.3125
2
[ "Apache-2.0" ]
permissive
package tane.mahuta.buildtools.vcs; /** * Configuration for branches in the VCS. * * @author christian.heike@icloud.com * Created on 06.06.17. */ public interface VcsFlowConfig { /** * @return the production branch name */ String getProductionBranch(); /** * Set the production...
Markdown
UTF-8
8,951
3.453125
3
[]
no_license
# Stage 1 - 가장 간단하게 저장해보자 첫번째 스테이지에서는 간단한 문법으로 쉽게 데이터를 저장할 수 있는 방법에 대해 알아봅니다. 사용이 간단한만큼 저장된 데이터도 복잡한 형태를 가지기 힘든 txt나 csv파일이 되지만, 닭 잡는데 소 잡는 칼을 쓸 필요가 없듯 간단한 형태로 저장하는 경우도 필요할 때가 있습니다. 또한 파이썬이 외부 파일을 다루는 구조에 대해 이해하기 쉬우니 먼저 이 방법으로 시작해 보겠습니다. ## 파이썬코드로 파일 열기 ```python f = open('test.txt', 'w') ``` 시작부터 코드부터 나와 당황하셨겠지만...
PHP
UTF-8
444
2.875
3
[]
no_license
<?php include_once "funcs.php"; /** * MapData class to represent maps. Should always match the one in FurkieBot. */ class MapData { public $name = ""; public $id = -1; public $filepath = ""; public $author = ""; public $acceptedBy = ""; public $accepted = false; public function __cons...
Markdown
UTF-8
2,387
2.890625
3
[]
no_license
# iOS Sign & Install Bash script for signing and installing iOS 11 apps to Electra JB iOS device. Also can be used to sign and install ATV4 app on 10.2.2 with greenGoblin by NitoTV. ## How this work This bash script sign any ipa file with jtool than copy app to device and install it. Script tested and work only wit...
Java
UTF-8
3,822
2.8125
3
[]
no_license
package de.beuth_hochschule.s790642.recorder; import android.content.Context; import android.content.pm.PackageManager; import android.media.MediaRecorder; import android.os.Environment; import android.widget.Toast; import java.io.File; import java.io.IOException; /** * Created by Robin on 16.01.2016. */ public cl...
Java
UTF-8
763
2.125
2
[]
no_license
package com.in28minutes.microservices.limitsservice.api; import com.in28minutes.microservices.limitsservice.config.Configuration; import com.in28minutes.microservices.limitsservice.domain.LimitConfiguration; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.G...
JavaScript
UTF-8
1,499
3.796875
4
[]
no_license
const sphere = { type: 'sphere', radius: 2, }; // Output: 33.5102; // const cone = { // type: 'cone', // radius: 3, // height: 5, // }; // // Output: 47.12385; const prism = { type: 'prism', height: 3, width: 4, depth: 5, }; // Output: 60; const largeSphere = { type: 'sphere', radius: 40, }; const smallS...
Markdown
UTF-8
2,865
2.921875
3
[]
no_license
# excelVisualBasic Excel Visual Basic information and code snippets ``` Dim lastRow As Long, lastColumn As Long, ws As Worksheet Set ws = ActiveSheet ' Get the number of the last row that has data lastRow = ws.Cells.Find(What:="*", _ After:=ws.Cells(1), _ Lookat:=xlPart, _ LookIn:=xlFormulas, ...
Java
UTF-8
27,940
1.789063
2
[]
no_license
package cs.controller.management.auxiliaryDecision; import java.net.URLDecoder; import java.text.ParseException; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.sn.framework.odata.Odata; imp...