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
Ruby
UTF-8
1,233
3.71875
4
[]
no_license
def minilang(str) stack = [] register = 0 str.split(' ').each do |command| begin case command when /\d+/ register = command.to_i when 'PUSH' stack.push register when 'POP' register = stack.pop when 'ADD' register += stack.pop when 'SUB' ...
Markdown
UTF-8
2,313
2.703125
3
[]
no_license
--- layout: post title: "刷新本地DNS缓存的方法" date: 2012-08-31 19:09:00 author: 司徒正美 categories: program --- ## 刷新本地DNS缓存的方法 ### by 司徒正美 ### at 2012-08-31 19:09:00 ### original <http://www.cnblogs.com/rubylouvre/archive/2012/08/31/2665859.html> <p>常有人问到域名解析了不是即时生效的嘛,怎么还是原来的呢?答案就是在本地DNS有解析缓存,电脑第一次访问后,在一定的时间内就将其缓存下来,下次访问该域...
Java
UTF-8
532
2.21875
2
[ "Apache-2.0" ]
permissive
/** * */ package org.nick.wwwjdic.utils; import android.content.Context; import android.content.Intent; import android.text.style.ClickableSpan; import android.view.View; public class IntentSpan extends ClickableSpan { private Context context; private Intent intent; public IntentSpan(Con...
C++
UTF-8
2,581
3.203125
3
[ "ISC", "BSL-1.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#include <Annealer.hpp> #include <random> #include <catch.hpp> class LinearAnnealer : public simanneal_cpp::Annealer<double> { public: typedef simanneal_cpp::Annealer<double> super; LinearAnnealer(state_t const &initialState) : super(initialState, getEnergy(initialState)), m_gen(), m_ra...
Python
UTF-8
1,319
2.515625
3
[]
no_license
def generate_app(apps): apps.create('test', '/tmp', 20) def test_apps(apps): test_apps_app(apps) test_update(apps) test_delete(apps) test_reset(apps) test_clean(apps) def test_apps_app(apps): generate_app(apps) assert len(apps.get_all()) == 1 app = apps.get_all()[0...
Java
UTF-8
3,085
2.34375
2
[]
no_license
package com.zw.malldemo.service.impl; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.ObjectMapper; import com.zw.malldemo.cache.JedisUtil; import com.zw.malldemo.dao.HeadLineDao; import com.zw.malldemo.entity.HeadL...
Markdown
UTF-8
2,853
3.1875
3
[ "MIT" ]
permissive
--- title: My Jest Mock Calls Are Missing Data. Now What? desc: Let me save you some time. I spent hours debugging this and another 20 minutes writing up a draft Stack Overflow question before the answer came to me. img: /img/2021/dumbbell.jpg date: 2021-06-03 tags: - learning in public - testing - jest - async...
JavaScript
UTF-8
671
2.890625
3
[ "MIT" ]
permissive
async function commentFormHandler(event) { event.preventDefault(); const comment_text = event.target.querySelector("#comment-body").value.trim(); const offer_id = parseInt(event.target.getAttribute("data-offer-id")); if (comment_text) { const response = await fetch("/api/comments", { method: "POST", ...
Markdown
UTF-8
2,608
2.859375
3
[]
no_license
# Uninstall Code Ocean The following article describes the process of tearing down a Code Ocean private cloud deployment. ## Export Data Before uninstalling Code Ocean please make sure to preserve any required user generated content in the system. *Uninstalling Code Ocean will delete all data in the system.* To pres...
Java
UTF-8
1,440
2.359375
2
[]
no_license
package com.sso.yt.commons.utils; import org.junit.Test; /** * Created by yt on 2017-7-10. */ public class UnderlineToCamelUtilsTest { @Test public void underlineToCamel() throws Exception { String s="user_id"; LogUtils.LOGGER.info(UnderlineToCamelUtils.underlineToCamel(s,true)); LogUtils.LOGGER.info(Underl...
JavaScript
UTF-8
312
3.03125
3
[]
no_license
function counter() { var counter = document.createElement('div'); counter.innerHTML = 1; counter.setAttribute('id', 'counter'); counter.onclick = function() { counter.innerHTML = parseInt(counter.innerHTML, 10) + 1; } document.body.appendChild(counter); } export default counter;
C
UTF-8
297
3.265625
3
[]
no_license
#ifndef __BUBBLE_SORT__ #define __BUBBLE_SORT__ void bubble_sort(int a[], int last) { int i, j = 0; int tmp = 0; for (i = last; i >= 1; i--) { for (j = 0; j < i; j++) { if (a[j] > a[j + 1]) { tmp = a[j + 1]; a[j + 1] = a[j]; a[j] = tmp; } } } return; } #endif
C++
UTF-8
2,559
2.859375
3
[ "LicenseRef-scancode-public-domain" ]
permissive
/* Aereo di Daniele Prototipo: F8 Bearcat Output: 2 LED PWM ai lati con lampeggio alternato 2 LED PWM alle estremita ali Input: 2 interrupts per th e alettone PIN 2: alettone PIN 3: throttle PIN A1: interruttore On/Off TODO * Vedere la calibrazione automatica * Min e max a 1000 - 2000 p...
C
UTF-8
279
3.390625
3
[]
no_license
int ft_str_is_uppercase(char *str); int ft_str_is_uppercase(char *str) { int i; int count_upper; i = 0; count_upper = 0; while (str[i] != '\0') { if (str[i] >= 'A' && str[i] <= 'Z') count_upper++; i++; } if (count_upper == i) return (1); else return (0); }
Markdown
UTF-8
1,097
3.46875
3
[]
no_license
# 经典题目 > 多线程交替输出12 # 题解 主要思路就是加锁。 ```java package pers.jssd.test; /** * 两个线程交替输出12121212 * * @author wangjingjing@bonc.com.cn * @date 2021/1/6 10:04 */ public class Test01 { public static void main(String[] args) { new Test01().result(); } public void result() { new Thread(new R...
Markdown
UTF-8
962
2.671875
3
[]
no_license
# Cenário 031 - Criar vídeos sob demanda ## Título * Criar vídeos sob demanda. ## Objetivo * Arquivar um vídeo transmitido anteriormente para que os seguidores do [Streamer](Streamer) possa assistir vídeos perdidos. ## Contexto * O [streamer](Streamer) deseja salvar vídeos para aumentar a popularidade do seu canal. ...
Python
UTF-8
4,081
3.65625
4
[ "MIT" ]
permissive
# Prompt: # Create a reservation system which books airline seats or hotel rooms. # It charges various rates for particular sections of the plane or hotel. # Example, first class is going to cost more than coach. # Hotel rooms have penthouse suites which cost more. # Keep track of when rooms will be available and c...
Python
UTF-8
9,130
2.640625
3
[]
no_license
import tensorflow as tf from tensorflow.python.framework import ops import numpy as np def firstExample(): from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets('MNIST_data', one_hot=True) x = tf.placeholder(tf.float32, shape=[None, 784]) y_ = tf.placeholder(tf....
C++
UTF-8
3,537
2.890625
3
[]
no_license
#ifndef DEVICEFINDER_H #define DEVICEFINDER_H #include "interface/IfceSerialFinder.h" #include <QSerialPortInfo> #include <QSerialPort> /** * @brief The DeviceFinder class is responsible for finding serial devices. * * The class seeks for available serial devices. When discovered, it connects * to each other (one...
C++
UTF-8
1,007
3.59375
4
[ "MIT" ]
permissive
#include<iostream> /** * 初始化不是赋值,而是创建变量时赋予一个初始值,而赋值的含义是把当前值换成另外一个值 * * 程序代码描述:定义一个名为units_sold的int型变量并初始化为0 * * @return [description] */ int main() { //C++11新标准中,使用花括号来初始化变量得到全面的应用,也叫做列表初始化 int units_sold = 0; int units_sold1(0); int units_sold2 {0}; int units_sold3 = {0}; printf("%d \n", units_s...
C#
UTF-8
2,898
3.0625
3
[]
no_license
using System; using System.Collections.Generic; using System.Drawing; using System.Text; namespace Screens.Hosting { public class BufferManager { public Terminal Terminal { get; } public Buffer CurrentBuffer { get; private set; } public Buffer LastBuffer { get; private set; } ...
C++
UTF-8
457
2.6875
3
[]
no_license
#pragma once #include "GameObject.h" //Actually used as a player class but renaming it will cause chaos in other files. //The "ball" (player) is capable of moving in all 4 directions and has an associated collision box. //This is used in the dodgeball game. class GameObjectBall : public GameObject { public: //A defau...
Python
UTF-8
1,946
2.703125
3
[]
no_license
from flask import flash, Flask, render_template, request import requests import sqlite3 from flask_mail import Mail, Message app = Flask(__name__) app.secret_key = "super secret key" app.config['MAIL_SERVER']='smtp.gmail.com' app.config['MAIL_PORT'] = 465 #mail id and password fields can be filled up and execution ca...
JavaScript
UTF-8
1,307
3.765625
4
[]
no_license
//this is an array which contains two objects!!!! var cars = [ { company: "honda", colors: [ { name: "burntRed", }, { name: "springGreen", }, ], }, { company: "ford", colors: [ { name: "burntOrange", }, { name: "black", ...
JavaScript
UTF-8
6,206
3.59375
4
[]
no_license
var externalContex = this; //window describe("(03) variables declaration: ", function () { it("without 'var', even inside a function, is global", function () { function defineGlobalFoo() { foo = "I'm global!"; } function callFoo() { return foo; } de...
Python
UTF-8
527
3.265625
3
[]
no_license
cars=100 space_in_car=4.0 drivers=30 passengers=90 cars_not_driven=cars - drivers cars_driven=drivers carpool_capacity=cars_driven*space_in_car average_passengers_per_car=passengers/cars_driven print("there are {} cars available".format(cars)); print("there are only ",drivers,"drivers available.") print("there will be...
C++
UTF-8
359
3.15625
3
[]
no_license
#include <iostream> using namespace std; void selectionSort(int v[], int numItems){ if (numItems>1){ int maxIdx = 0; for (int i = 1; i<numItems; i++){ if (v[i]>v[maxIdx]){ maxIdx = i; } } } } int main() { double v[] = {1, 8, 3, 9, 2}; cout ...
C
UTF-8
3,836
2.671875
3
[ "MIT", "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
/* * Copyright 2016-2017, 2019 Uber Technologies, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
C++
UTF-8
627
2.78125
3
[]
no_license
#include <local_leetcode.hpp> class Solution { public: vector<vector<int>> minimumAbsDifference(vector<int>& arr) { sort(arr.begin(), arr.end()); vector<vector<int>> res; int diff = INT_MAX; for (size_t i = 1; i < arr.size(); ++i) { if (arr[i] - arr[i-1] > diff) contin...
Markdown
UTF-8
5,654
2.515625
3
[]
no_license
--- title: Co nám může přinést reforma autorského práva? layout: post category: blog author: Jakub Michálek, Jan Loužek image: posts/cats.jpg tags: EU date: 2015-06-26 --- Právní výbor Evropského parlamentu dne 16. 6. hlasoval o zprávě Julie Redy. Kromě shození celoevropské svobody panoramatu ze stolu však výbor rozho...
TypeScript
UTF-8
4,376
2.796875
3
[]
no_license
import { Injectable } from '@angular/core'; import { BehaviorSubject, Observable } from 'rxjs'; import { connectableObservableDescriptor } from 'rxjs/internal/observable/ConnectableObservable'; import { Filter } from '../models/filtering.model'; import { Todo } from '../models/todo.model'; import { LocalStorageService ...
Python
UTF-8
1,197
4.28125
4
[]
no_license
# 通过前序遍历(根左右),可以得到root(前序遍历第一个元素); # 通过中序遍历(左根右),root左半部分构成左子树,右半部分构成右子树。 # 递归 class BinaryTree: def __init__(self, root): self.key = root self.leftChild = None self.rightChild = None def preordertree(self): print(self.key) if self.leftChild: self.leftChild.preordertree() if self.rightChild: self.r...
Markdown
UTF-8
2,263
3.25
3
[ "Apache-2.0" ]
permissive
## 地址族与数据序列 #### 分配给套接字的IP地址与端口号 - IP(Internet Protocol)为收发网络数据而分配给计算机的值。 #### 网络地址 - IP地址分为网络地址和主机地址,分为A、B、C、D、E等类型。 - A类地址:0~127,以0开头 - B类地址:128~191,以10开头 - C类地址:192~223,以110开头 </br> #### 端口号 - IP地址用于区分计算机,端口号用于区分计算机中的应用程序。 - 端口号由同一操作系统内区分不同套接字设置,16位 - 可分配端口号范围:0~65535 - 知名端口号:0~1023,分配给特定应用程序 </br>...
Java
UTF-8
1,717
2.046875
2
[ "Apache-2.0" ]
permissive
/** * Copyright (c) 2013-2022 Contributors to the Eclipse Foundation * * <p> See the NOTICE file distributed with this work for additional information regarding copyright * ownership. All rights reserved. This program and the accompanying materials are made available * under the terms of the Apache License, Versio...
C#
UTF-8
2,019
3.078125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace aorc.gatepass { public static class ConvertNumbers { private static char[] baseChars = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ...
Java
UTF-8
1,179
2.4375
2
[]
no_license
package de.kitaggmbhtrier.bistro.portal.controller; import java.util.List; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import com.fasterxml.jackson.core.JsonProcessingException; import com.faster...
Python
UTF-8
2,786
2.75
3
[]
no_license
''' Morgan Strong code from Teachable Machines page edited based on feedback on using tensorflow.lite instead https://heartbeat.fritz.ai/running-tensorflow-lite-image-classification-models-in-python-92ef44b4cd47 some errors encountered, does not fully work. error thrown when executing tensorflow, now has issues with ...
JavaScript
UTF-8
454
3.453125
3
[]
no_license
console.log("Welcome to Array"); const persondDetails = [ 'Aravinda', 'HB', 35, 'Trainer', ['aru', 'hary', 'gopi'] ]; const pDetails = { firstName: 'Aravinda', lastName: 'HB', age: 35, occupation: 'Trainer', friends: ['aru', 'hary', 'gopi'] }; console.log(pDetails.firstName); console....
PHP
UTF-8
940
2.796875
3
[]
no_license
<?php try{ $base = new PDO('mysql:host=localhost; dbname=bursserver_bd', 'root', ''); $retour = $base->query("SELECT * FROM tblLED;"); $x =0; while ($data = $retour->fetch()){ $Ids[$x] = $data['Id']; $Etats[$x] = $data['Etat']; $Emplacements[$x] = $data['Emplacement']; $x++; } AfficherLED($Id...
Java
UTF-8
1,912
2.1875
2
[]
no_license
package com.gump.service_impl; import java.io.File; import java.sql.SQLException; import java.util.List; import com.gump.dao.IDocumentDao; import com.gump.dao_impl.DocumentDaoImpl; import com.gump.service.IDocumentService; import com.gump.vo.Document; import com.gump.vo.Page; public class DocumentServiceImpl impleme...
Java
UTF-8
1,415
3.71875
4
[]
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 Objeto_002; /** * * @author User */ public class TestCercle { public static void main (String [] a...
Java
UTF-8
1,975
2.671875
3
[]
no_license
/** * */ package me.gorillabo.multimediaanalysis; import org.opencv.core.Mat; import org.opencv.core.MatOfRect; import org.opencv.core.Point; import org.opencv.core.Rect; import org.opencv.objdetect.CascadeClassifier; import java.util.ArrayList; import java.util.List; /** * @author gorillaimo * */ public class...
PHP
UTF-8
1,051
2.59375
3
[]
no_license
<?php session_start(); function consult($user, $password){ if ( $link = (mysql_connect('localhost:3306', "$user", "$password") )) { $db_selected = mysql_select_db('yogaetcaetera', $link); $requete = "SELECT * FROM adherent"; $reponse = mysql_query($requete); if(!$reponse){ //Si la requêt...
Python
UTF-8
4,609
2.90625
3
[]
no_license
import jieba import re from gensim import corpora, models, similarities import time import sys # 1.文件预处理:读取文本文件,构造分词向量 def Get_file(doc): # doc = open(path, 'r', encoding='UTF-8').read()**************** data = jieba.lcut(doc,cut_all=False) data1 = "" for i in data: # 去符号 data1 +=...
PHP
UTF-8
1,881
3.109375
3
[]
no_license
<?php class MyDB { private $dblogin = "root"; // логин бд private $dbpass = "123"; // пароль бд private $db = "Main"; // название бд private $dbhost = "localhost";//расположение бд private $link = ''; private $query = ''; private $err = ''; public $result = ''; public $da...
Java
UTF-8
2,505
2.578125
3
[]
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 Entity; /** * * @author RoAnn */ public class Component { private int id; private String name; pr...
Markdown
UTF-8
13,314
2.984375
3
[ "Apache-2.0" ]
permissive
[![](https://jitpack.io/v/xinaiz/web-driver-support.svg)](https://jitpack.io/#xinaiz/web-driver-support) # Web Driver Support WebDriver utility library for Kotlin which encapsulates common logic into simple syntax. * Exclude WebDriver reference from code - of course we use WebDriver, no need to write it every time. * R...
Java
UTF-8
2,272
1.570313
2
[]
no_license
/** * <copyright> * * Copyright (c) See4sys, itemis and others. * All rights reserved. This program and the accompanying materials are made * available under the terms of the Artop Software License Based on AUTOSAR * Released Material (ASLR) which accompanies this distribution, and is * available at http...
C++
UTF-8
1,553
2.671875
3
[]
no_license
/* ** Audio.cpp for Shared in /Users/gmblucas/Desktop/Shared/cpp_arcade/sources/utils/data ** ** Made by Lucas Gambini ** Login <gmblucas@epitech.net> ** ** Started on Tue Mar 14 02:32:06 2017 Lucas Gambini ** Last update Fri Mar 17 02:34:42 2017 Full Name */ #include "Audio.hpp" Audio::Audio (std::string const & ...
JavaScript
UTF-8
73
2.90625
3
[]
no_license
let sum = 0 for(let i = 0; i < 15; i++) { sum += i } console.log(sum)
Java
UTF-8
4,604
2.078125
2
[]
no_license
package com.epikat.chaipaani; import android.content.Intent; import android.os.AsyncTask; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; import com.android.volley.AuthFailureErr...
Swift
UTF-8
280
2.984375
3
[]
no_license
// // Point.swift // Swift 3 TestProject // // Created by Maximilian Hünenberger on 27.7.16. // // import Foundation struct Point: Equatable { var x: Double var y: Double // MARK: - Equatable static func == (p1: Point, p2: Point) -> Bool { return p1.x == p2.x && p1.y == p2.y } }
Markdown
UTF-8
566
2.609375
3
[]
no_license
I find myself with an increasing number of bash scripts, and increasing modifications, so I'm creating this git repo to hold them! The nature of these scripts will vary a good bit. Some will be specific to my laptop or current Linux distro, others might be utility scripts I'm using to manage Amazon EC2 instances, etc....
JavaScript
UTF-8
880
4.4375
4
[]
no_license
//Questao - 1 let a = new Number(7) let b = new Number(-55) let c = new Number(389) let d = new Number(1000) let e = new Number(3.1459) let f = new Number(-46.267) console.log(a, b, c, d, e, f) console.log("Somar a primeira variável com a última variável: ") console.log(a + f) console.log("Multiplicar a primeira vari...
Java
UTF-8
653
2.421875
2
[]
no_license
package com.anthony.playstation.calculation.operators; import com.anthony.playstation.calculation.AOperator; import com.anthony.playstation.data.dataseries.DataSeries; import com.anthony.playstation.data.dataseries.UniformType; import com.anthony.playstation.data.dataunit.DataUnitType; import com.anthony.playstation.e...
Ruby
UTF-8
180
2.65625
3
[ "MIT" ]
permissive
#!/usr/bin/env ruby require 'zipf' max = ARGV[0].to_i i = 0 while line = STDIN.gets if tokenize(line).size <= max puts i else STDERR.write line end i += 1 end
Java
UTF-8
5,055
1.96875
2
[]
no_license
package com.example.johnluu.duan1.adapter; import android.app.Activity; import android.content.Context; import android.content.DialogInterface; import android.support.annotation.NonNull; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManage...
C++
UTF-8
5,109
2.625
3
[]
no_license
#include <iostream> #include <iomanip> #include <algorithm> #include <string> #include <random> #include <mpi.h> // 归并 void multi_merge(int arr[], int arr_len, int offsets[], int size, int output[]) { int *starts[size]; int *ends[size]; for (int i = 0; i < size; ++i) { starts[i] = arr + offsets[i];...
Java
UTF-8
601
1.992188
2
[]
no_license
package com.npng.onepiece.user.view; import javax.swing.JFrame; import com.npng.onepiece.battle.view.main.BattleView; import com.npng.onepiece.sound.Playsound; public class MainFrame extends JFrame { public static MainFrame mf; public MainFrame() { super("Random Luffy RPG"); ...
Java
UTF-8
5,090
2.546875
3
[]
no_license
package com.techelevator.model; import java.util.ArrayList; import java.util.List; import javax.sql.DataSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.support.rowset.SqlRowSet; import org.springframework.stereo...
C++
UTF-8
594
2.65625
3
[]
no_license
class Solution { public: int uniquePaths(int m, int n) { vector<vector<int>> nm; for(int i=0;i<m;i++){ vector<int> sm; for(int j=0;j<n;j++){ sm.push_back(-1); } nm.push_back(sm); } nm[0][0]=1; for(int i=0;i<n;i++...
JavaScript
UTF-8
1,394
3.125
3
[]
no_license
/* Treehouse FSJS Techdegree * Project 4 - OOP Game App * app.js */ //Dynamic background via css document.body.style.transition = 'all 1s'; //Add a new message box for interactive messages FOR EXCEEDS AND BEYOND? const phraseContainer = document.getElementById('phrase'); const messageBox = document.createElement('d...
Python
UTF-8
594
3.5625
4
[]
no_license
import pandas as pd from matplotlib import pyplot dataset=pd.read_csv("pollution.csv",header=0,index_col=0)#读入csv文件,行0为头部(标题),索引为第0列 #print(dataset.head(10)) values=dataset.values#获取dateset中的值,返回一个二维矩阵 #print(values) #下面开始对每一列数据进行绘图,以便观察其变化趋势 groups=[0,1,2,3,4,5,6,7] i=1 pyplot.figure()#初始化一个画布空间 for group in groups:...
JavaScript
UTF-8
759
3.171875
3
[]
no_license
const readline = require('readline') const rl = readline.createInterface({ input: process.stdin, output: process.stdout }) const maxLine = 2 let input = []; function isRun(year) { if(year % 400 === 0) return true; return year % 4 === 0 && year % 100 !== 0; } function solution(input) { ...
JavaScript
UTF-8
4,774
2.609375
3
[ "MIT" ]
permissive
function createMeshesFromStoryboard (storyboard, w, h) { var actors = []; var animation; // 1) Colleziono tutti gli attori for (var i in storyboard.segments) { var segment = storyboard.segments[i]; var tmpActors = actors.filter (function (element) { ...
SQL
UTF-8
7,000
4.46875
4
[]
no_license
-- Sub Query -- emp 테이블에서, 전체 직원의 급여의 평균보다 더 많은 급여를 받는 직원들의 레코드를 검색 -- 1) 전체 직원의 급여 평균 select avg(sal) from emp; -- 2) 평균보다 급여를 더 많이 받는 직원 select * from emp where sal > 2073; select * from emp where sal > ( select avg(sal) from emp ); -- emp 테이블에서, ALLEN보다 적은 급여를 받는 직원들의 사번, 이름, 급여를 출력 -- 1) all...
Java
UTF-8
11,344
1.992188
2
[]
no_license
package ipcconnect4.ui.home; import DBAccess.Connect4DAOException; import ipcconnect4.Main; import static ipcconnect4.Main.rb; import static ipcconnect4.Main.stage; import static ipcconnect4.Main.styleSheet; import ipcconnect4.model.GameWithAI.Difficulty; import ipcconnect4.ui.auth.RegisterController; import ipcconnec...
Java
UTF-8
684
2.9375
3
[]
no_license
package day04; /** * TODO * * @author admin * @version 1.0 * @date 2021/4/21 9:12 */ //线程中线程栈的大小 public class StackSize { private static int count = 0; public static void main(String[] args) { Thread t1 = new Thread(null, new Runnable() { @Override public void run(){ ...
C++
UTF-8
4,391
2.71875
3
[]
no_license
#include "SkySphere.h" SkySphere::SkySphere(const std::string& material, Ogre::Real r) : radius(r) { Ogre::Entity* skySphereEntity = Game::getScene()->createEntity("SkySphereEntity", "SkySphere"); skySphereEntity->setMaterialName(material); skySphereEntity->setRenderQueueGroup(Ogre::RENDER_QUEUE_WORLD_GEOMETRY_1)...
C
UTF-8
430
3.75
4
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> main() { char str1[20],str2[20]; int x; printf("\n\n\t\t Enter string 1: \t"); gets(str1); printf("\n\n\t\t Enter String 2: \t "); gets(str2); x=strcmp(str1,str2); if(x==0) { printf("\n\n\t\t Strings are equal. "); ...
Python
UTF-8
348
3.625
4
[]
no_license
import utility_positive print("Enter 5 integers:") #n1 = n2 = n3 = n4 = n5 = 0 #n = [n1,n2,n3,n4,n5] n1 = int(input("")) n2 = int(input("")) n3 = int(input("")) n4 = int(input("")) n5 = int(input("")) positive_sum = utility_positive.sum_of_positive(n1,n2,n3,n4,n5) print("Sum of positive integers = ", end = ...
Java
UTF-8
2,631
2.96875
3
[]
no_license
package agent; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.net.Socket; import abstraction.GameAbstraction; import acpc.Action; import acpc.MatchState; ...
Java
UTF-8
332
2.625
3
[]
no_license
package top.tinn.Over200.Problem_1342; public class Solution { public int numberOfSteps (int num) { int step = 0; while (num != 0){ if ((num & 1) == 0){ num >>= 1; }else { num ^= 1; } step++; } return st...
Python
UTF-8
380
4.15625
4
[]
no_license
num1 = int(input('Enter a value of Day from 1 to 7 ')) if num1 == 1: print("It's Monday") elif num1 == 2: print("It's Tuesday") elif num1 == 3: print("It's Wednesday") elif num1 == 4: print("It's Thursday") elif num1 == 5: print("It's Friday") elif num1 == 6: print("It's Saturday") elif num1 ==...
PHP
UTF-8
1,264
2.5625
3
[]
no_license
<?php class HomeController extends BaseController { public function index() { return View::make('hello'); } public function flash() { Session::flash('message', "It's a flash"); return View::make('flash'); } public function back() { return Redirect::ba...
Python
UTF-8
669
3.890625
4
[]
no_license
print('The Invoice Program') cust=input('Enter Customer Type(r/w):') inv=float(input('Enter The Invoice Rate:')) if cust.lower()== "r": if inv>0 and inv<100: discount=0 elif inv>100 and inv<200: discount=.1 elif inv>200 and inv<500: discount=.2 elif inv>500: ...
C++
UTF-8
342
2.671875
3
[ "MIT" ]
permissive
// Abdullah Naveed // ROLL # 18I-0654 (A) // OOP_Project #ifndef POSITION_H_ #define POSITION_H_ class Position { private: int posX; int posY; public: Position(); Position(int x, int y); Position(const Position& rhs); int getPosX() const; void setPosX(int posX); int getPosY() const; void setPosY(int posY)...
Python
UTF-8
3,160
3.34375
3
[]
no_license
class Nodo(object): def __init__(self, dato = None, proximo = None): self.dato = dato self.proximo = proximo def __str__(self): return str(self.dato) class Lista_enlazada(object): def __init__(self): self.primer_elemento = None self.ultimo_elemento = None self.largo = 0 def __str__(self): if(sel...
C++
UTF-8
914
2.65625
3
[]
no_license
/* * EventLoopThreadPool.h * * Created on: Jun 23, 2014 * Author: damonhao */ #ifndef SIMPLEV_NET_EVENTLOOPTHREADPOOL_H_ #define SIMPLEV_NET_EVENTLOOPTHREADPOOL_H_ #include <vector> #include <boost/noncopyable.hpp> #include <boost/ptr_container/ptr_vector.hpp> namespace simplev { namespace net { class E...
Java
UTF-8
2,279
2.25
2
[]
no_license
/** * */ package org.asendar.url.shortener.service.url; import java.util.List; import java.util.Optional; import org.asendar.url.shortener.entity.ShortenedUrlEntity; import org.asendar.url.shortener.entity.UrlAccessEntity; import org.asendar.url.shortener.entity.UserEntity; import org.asendar.url.shortener.reposit...
C++
UTF-8
8,444
2.609375
3
[ "BSD-2-Clause-Views" ]
permissive
// Geometric Tools, LLC // Copyright (c) 1998-2014 // Distributed under the Boost Software License, Version 1.0. // http://www.boost.org/LICENSE_1_0.txt // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt // // File Version: 5.0.1 (2010/04/18) #include "Wm5MathematicsPCH.h" #include "Wm5VEManifoldM...
Java
UTF-8
810
2.015625
2
[]
no_license
package com.example.mmz.englishofcivilengineering; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class add_page_back extends AppCompatActivity { Butt...
Go
UTF-8
871
2.96875
3
[]
no_license
package gochat import ( "flag" log "github.com/sirupsen/logrus" ) // Conf holds all our server config type Conf struct { ListenOn string MaxMsgSize int } // NewConfFromFlags parses CLI flags and returns a config object func NewConfFromFlags() (conf *Conf, err error) { var ( listenOn string logLevel st...
JavaScript
UTF-8
597
2.65625
3
[]
no_license
import * as d3 from 'd3'; export default class ChartBase { constructor(options) { this.data = options.data; const domNode = this._initDomNode(options); this.height = domNode.clientHeight; this.width = domNode.clientWidth; this.element = d3.select(domNode); } _initDomNode(options) { let domNode; if (...
C#
UTF-8
383
3.265625
3
[ "MIT" ]
permissive
using System; namespace Crice_Area { class Program { static void Main(string[] args) { double radius = double.Parse(Console.ReadLine()); double area = Math.PI * radius * radius; double perimeter = 2 * Math.PI * radius; Console.WriteLine(area);...
JavaScript
UTF-8
870
2.578125
3
[ "MIT" ]
permissive
const Discord = require("discord.js"); module.exports = { name: "ping", aliases: ["🏓"], category: "botinfo", description: "Returns bot and API latency in milliseconds.", usage: "ping", clientPermissions: ["EMBED_LINKS", "SEND_MESSAGES", "VIEW_CHANNEL"], userPermissions: [], clearanceLevel: 0, run: (client, m...
Swift
UTF-8
1,797
2.625
3
[]
no_license
// // UserDefaultsManager.swift // NetworkExtensions // // Created by Henrik Peters on 31.12.19. // Copyright © 2019 Henrik Peters. All rights reserved. // import Foundation // MARK: - UserDefaults Extension extension UserDefaults { static var group: UserDefaults? { return UserDefaults(suiteName: Cons...
Python
UTF-8
4,738
3.171875
3
[]
no_license
import pyautogui def drop_all_ores(self): if self.num_ores >= self.capacity: """Drops all ores from the player's inventory""" cv2.waitKey(4000) first_ore_x, first_ore_y = self.ores[0][0], self.ores[0][1] pyautogui.doubleClick(first_ore_x, first_ore_y) ...
Markdown
UTF-8
617
2.703125
3
[]
no_license
# CookBook ## It is a one stop for all your recipes. - Browse through multiple categories of cuisines/seasonal foods/ingredient special recipes. <br> - You can get a customized diet plan from our experts with recipes of your all day intake.<br> - Find special articles about each ingredient.<br> - Get inspiration...
Java
UTF-8
1,465
2.34375
2
[]
no_license
package sut.se.G09.Backend.Entity; import javax.persistence.Entity; import javax.persistence.*; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.validation.constraints.NotNull; import lombok.*; @Entity //บอกว่าเป็น class com.okta.developer.demo.Entity class ที่เก็บขอมูล @D...
Java
GB18030
1,418
2.359375
2
[]
no_license
package com.gyic.claim.dto.custom; import java.io.Serializable; import com.gyic.claim.dto.domain.HousepolicylistDto; import com.sinosoft.claim.dto.domain.PrpCmainDto; /** * HERDPOLICYLISTݴ<br> */ public class IdcardRegistDto implements Serializable{ private static final long serialVersionUID = 1L; privat...
C++
UTF-8
3,897
2.96875
3
[]
no_license
#include "Torus.h" #include <cstdio> #include <cmath> #include <gtc/constants.hpp> namespace ShadingCookbook { Torus::Torus(float outerRadius, float innerRadius, int nsides, int nrings) : _rings(nrings), _sides(nsides) { _faces = _sides * _rings; int nVerts = _sides * (_rings + 1); float* v = new fl...
Java
UTF-8
382
1.867188
2
[]
no_license
package org.dei.perla.context; import java.util.List; public interface IComposerManager { public void composeBlock(Context c); public void addPossibleContext(Context ctx); public Context getPossibleContext(String ctxName); public void removePossibleContext(Context toDetect); public List<Context> getPossibl...
Python
UTF-8
1,311
2.828125
3
[]
no_license
import matplotlib.pyplot as plt import pandas as pd from racing_reference_constants import * racing_data = pd.read_csv('../data/racing_reference2.csv', encoding='latin1', parse_dates=['Date']) def scatter_by_race(column1, column2): for race in racing_data['Race'].unique(): qualifying_data = racing_data[...
Markdown
UTF-8
1,066
2.546875
3
[ "MIT" ]
permissive
# httpaccess `httpaccess`服务提供了供设备注册、登录的HTTP[接口](../api-doc/device.md)。 ## 启动参数 * `-etcd` etcd服务的访问地址,必需参数。如`http://localhost:2379`,如果etcd是多副本部署,可以用分号隔开访问地址,如`http://192.168.0.2:2379;http://192.168.0.3:2379`。 * `-httphost` HTTP服务地址,必须参数。格式为`ip:port`如`localhost:443`,强烈建议开启https选项。一般情况下绑定到外网的443端口(https默认端口)。 * `-usehtt...
Shell
UTF-8
915
3.5
4
[ "Apache-2.0" ]
permissive
#!/bin/bash echo "Liberty Hello World to OpenShift using UrbanCode Deploy" BUILD_VERSION=0.0.0 echo "Parameters are:" while true; do case $1 in -v | --version ) BUILD_VERSION=$2; echo "Version for new build=$BUILD_VERSION"; shift 2 ;; -- ) echo "-- $1"; shift; break ;; * ) bre...
JavaScript
UTF-8
1,378
2.875
3
[]
no_license
const mongoose = require('mongoose'); const { Skill } = require("../models/skill.model"); exports.create = (req, res) => { // Validate request if (!req.body) { res.status(400).send({ message: "Content can not be empty!"}); return; } // Create a skill const skill = new Skill({ name: req.body...
Python
UTF-8
1,353
2.953125
3
[]
no_license
#!/usr/bin/env python import uuid, random, string from src.main.xsys.core.SuperBase import SuperBase from src.main.xsys.cryptography.CryptoManager import CryptoManager class DelegateCore(SuperBase, CryptoManager): """ [Description] __init__ - Construct a SuperBase Object """ def __...
Python
UTF-8
1,348
3.21875
3
[]
no_license
import matplotlib.pyplot as plt import functions as fn import pandas as pd import numpy as np # Import and format Crypto Price files df_btc = fn.read_format("coin_Bitcoin.csv") df_eth = fn.read_format("coin_Ethereum.csv") df_btc_eth = fn.merge_data(df_btc, df_eth, "Date", "_btc", "_eth") df_btc_eth.index = df_btc_eth...
JavaScript
UTF-8
1,922
2.65625
3
[ "MIT" ]
permissive
const initialState = { loading: false, error: null, directories: [] } const HomeReducer = (state=initialState, action) => { switch (action.type) { case 'FETCH_DIRECTORIES_BEGIN': return { ...state, loading: true, error: null, ...