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
3,793
2.5625
3
[]
no_license
package Model; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.Calendar; import java.util.List; import java.util.stream.Collectors; import Controller.HashingUtils; import org.javatuples.Decade; import org.javatuples.En...
Markdown
UTF-8
5,006
3.28125
3
[]
no_license
# FinalProject Git repository to hold the code for my Msci final year project. I am investigating the importance of the crossover and mutation operators when evoling neural networks. I will evaluate the implemented operators on the board game Pentago. # Pentago Pentago is a variation of noughts and crosses. It is pl...
Python
UTF-8
1,143
3.203125
3
[]
no_license
from errors import NotNegative def parser_number(number): if '-' in number: raise NotNegative if len(number) == 1 and number.isalpha(): raise ValueError if 'b' == number[-1]: return int(number.replace('b', ''), 2) elif 'd' == number[-1]: return int(number.replace('d', '...
C++
UTF-8
2,356
2.890625
3
[]
no_license
#include <gtest/gtest.h> #include <fccl/semantics/JntArraySemantics.h> #include <vector> using namespace fccl::semantics; class JntArraySemanticsTest : public ::testing::Test { protected: virtual void SetUp() { joint_names.push_back("joint0"); joint_names.push_back("joint1"); joint_names....
C#
UTF-8
1,806
2.890625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Input; namespace FindInFile.Wpf.ViewModels.Commands { /// <summary> /// Usage within view model: /// public ICommand Command { get; set; } /// public ViewMo...
Python
UTF-8
1,156
3.265625
3
[]
no_license
#!/bin/env python #coding:UTF8 import csv def encode(s): "将unicode解码为utf8" if isinstance(s, unicode): return s.encode('utf8') else: return s def write(file_name,iter_obj,heads=[]): "定义写入CSV文件,iter_obj是List或者db-cursor,heads是标题列" with open(file_name,'ab') as csv_fi...
Java
UTF-8
7,380
2.140625
2
[]
no_license
package davgeo.github.tickettoridescoreboard; import android.content.DialogInterface; import android.content.Intent; import android.content.res.Resources; import android.graphics.Typeface; import android.support.v7.app.AlertDialog; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View;...
Java
UTF-8
1,459
2.890625
3
[ "MIT" ]
permissive
package view.grid; import javafx.scene.Group; /** * @author Teddy Franceschi, Harshil Garg */ public class EngineGrid extends Grid { private static final int CELL_PIXELS = 50; public EngineGrid(int gridWidth, int gridHeight, int renderWidth, int renderHeight) { super(gridWidth, gridHeight, renderW...
JavaScript
UTF-8
819
2.9375
3
[ "MIT" ]
permissive
/******************************************************************* * @file: Light.js * @author: Aniket Dashpute * @description: Lights file with Phong shading parameters * Northwestern University *******************************************************************/ function CLight(lightPos) { // light positio...
PHP
UTF-8
514
2.625
3
[]
no_license
<?php require 'model.php'; $message = ""; switch($userStatus){ case '3': $message = "Welcome superadministrator"; $class = "superadmin"; break; case '2': $message = "Welcome administrator"; $class = "admin"; break; case...
Markdown
UTF-8
723
3.171875
3
[]
no_license
## Installation Begin by installing this package through Composer. Edit your project's `composer.json` file to require `varmad/laravel-haml`. It might look something like: ```php "require": { "laravel/framework": "4.0.*", "varmad/laravel-haml": "dev-master", } ``` Next, update Composer from the Terminal...
Java
UTF-8
326
2
2
[]
no_license
package com.sisveco.dao; import java.util.List; import java.util.Map; import com.sisveco.entity.Control; import com.sisveco.entity.Producto; public interface ProductoDao { int create(Producto co); int update(Producto co); int delete(int key); Producto read(int key); List<Map<String, Object>> readAll...
C#
UTF-8
4,688
2.59375
3
[]
no_license
using System; using System.Linq; using System.Collections.Generic; using System.Text; using C2LP.PDA.Datas.Model; using System.Data; namespace C2LP.PDA.Datas.BLL { public class RegionServer : BaseServer { /// <summary> /// 清空所有区域信息 /// </summary> /// <returns></returns> ...
SQL
UTF-8
258
3.828125
4
[]
no_license
-- 11. How to find 2nd highest salary without using a co-related subquery? (solution) -- Using CROSS JOIN SELECT max(e.salary) as second_highest_salary FROM Employee e cross join Employee e2 WHERE e.salary < e2.salary ; -- Using RANK in PostgreSQL
Markdown
UTF-8
569
2.625
3
[ "Apache-2.0" ]
permissive
--- layout: post title: "Video: What's new in Strimzi 0.33.0" date: 2023-01-25 author: jakub_scholz --- Strimzi 0.33.0 has been released with multiple new features and improvements. As with previous releases, we created a video that introduces the main changes. You can watch the video here or on our [YouTube channel]...
Markdown
UTF-8
1,896
2.6875
3
[]
no_license
# YouCompleteMe ### Required Vim Features YouCompleteMe requires vim to have support for python scripting. Run the following and ensure that there is a + before python3: ``` vim --version | grep python ``` If not, you will need to [compile vim from source](https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim...
Markdown
UTF-8
709
2.609375
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: "Additional Termination Considerations | Microsoft Docs" ms.custom: "" ms.date: "11/04/2016" ms.technology: ["cpp-language"] ms.topic: "language-reference" dev_langs: ["C++"] helpviewer_keywords: ["quitting applications", "exiting applications", "programs [C++], terminating"] ms.assetid: acbe2332-9d8a-4a58-a...
Shell
UTF-8
298
2.609375
3
[ "MIT" ]
permissive
#! /bin/bash ldapadd -x -D "cn=admin,$LDAP_BASE_DN" -w "$LDAP_ADMIN_PASSWORD" -f /container/service/slapd/assets/default_nodes/add_nodes.ldif code=$? if [[ "$code" != "0" && "$code" != "68" ]]; then echo "Adding default nodes failed. Try to set bigger timeout" pkill -f /container/tool/run fi
C#
UTF-8
848
3.375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _10.Unicode_Characters { class Program { static void Main(string[] args) { var input = Console.ReadLine().ToCharArray(); foreach (var VARIABLE...
C++
UTF-8
1,019
4.125
4
[]
no_license
// C++ program for implementation of Heap Sort #include <iostream> using namespace std; void heapify(int arr[],int n, int i){ int largest = i; int l = 2*i + 1; int r = 2*i +2; if(l<n && arr[largest] < arr[l]) largest = l; if(r<n && arr[largest]<arr[r]) largest = r; if(large...
Markdown
UTF-8
1,713
2.640625
3
[ "MIT" ]
permissive
--- layout: post title: "Perceptual Compressive Sensing" date: 2018-02-01 07:19:18 categories: arXiv_CV tags: arXiv_CV CNN author: Xuemei Xie, Jiang Du, Guangming Shi, Chenye Wang, Xun Xu mathjax: true --- * content {:toc} ##### Abstract This paper proposes perceptual compressive sensing. The network is composed of a...
Shell
UTF-8
383
2.921875
3
[ "MIT" ]
permissive
#!/bin/bash if [ ! -f '/config/config.xml' ]; then # Run syncthing to generate initial configuration files, stop it, then edit # config.xml to remove 127.0.0.1 limit from the GUI address. /syncthing -home=/config & sleep 5 pkill syncthing sed -i 's/<address>127.0.0.1:8384<\/address>/<address>:8...
C#
UTF-8
1,520
2.90625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Monitoring.GeometricMonitoring.MonitoringType { public abstract partial class MonitoringScheme { public sealed class SketchedChangeDistance : MonitoringScheme, IEquatable<Sketc...
Markdown
UTF-8
3,286
2.6875
3
[]
no_license
# PI-shutdown-push-button A header mounted push button that will safely shutdown the Raspberry PI This project describes a very simple but very very usefull tool that allows you to safely shutdown your Raspberry PI. This might be particularly usefull when, for instance, your headless PI is unreacheable because your ne...
Java
UTF-8
921
2.734375
3
[]
no_license
package jaffa.physics; import org.junit.Assert; import org.junit.Test; public class QuadraticEquationTest { @Test public void testGetNegativeX() throws ImaginaryNumberException, DivideByZeroException { QuadraticEquation q = null; q = new QuadraticEquation(1, 3, -4); double x = q.getNegativeX(); Assert.ass...
JavaScript
UTF-8
1,858
2.65625
3
[]
no_license
import { useState, useEffect } from "react"; import axios from "axios"; export default function useCasesBiz(props) { const [cases, setCases] = useState([]); const [loading, setLoading] = useState(false); const [countries, setCountries] = useState([]); const [dateIndex, setDateIndex] = useState(0); const [cou...
Markdown
UTF-8
5,335
2.921875
3
[ "Apache-2.0" ]
permissive
--- layout: post title: "淡如水的爱" subtitle: "爱不可言 清淡如水" image: feature: "23.jpg" date: 2016-05-13 author: "小粒玲" header-img: "img/postcover/丹顶鹤.jpg" tags: [tag04] categories: [cat04] comments: true --- 如果说爱情一定要像火焰一样热情,我想,那只能存在于热恋期才会有的状态,如果说爱情一定要像水一样平静,我想,那是相濡以沫,共守一生的状态,时常把爱情比做水那再也合适不过了。...
Java
UTF-8
1,343
2.140625
2
[]
no_license
package com.inno72.machine.vo; /** * @Auther: wxt * @Date: 2018/7/4 14:01 * @Description: */ public class AppStatus { private String machineId; private String appPackageName; private String versionName; private int versionCode; private String appName; private int appStatus;// 0 未启动 1前台运行 2 后台运行 private int...
C
UTF-8
10,453
2.515625
3
[]
no_license
/* C########################################################### SUBROUTINE LSOL(FI) C########################################################### C In this solver the TDMA algorithm is applied line-by-line C alternately along J and I lines. C Warning: arrays A() and C() should be dimensioned C ...
JavaScript
UTF-8
686
3.125
3
[ "Unlicense" ]
permissive
function Ack(m, n) { if (m == 0) { return n + 1; } else if(n == 0) { return Ack(m - 1, 1); } else { return Ack(m - 1, Ack(m, n - 1)); } } let inicio = process.hrtime(); inicio = inicio[1]; let inicioRuntime = process.memoryUsage().heapUsed; // let resultado = Ack(1, 1)...
C++
UTF-8
398
3.046875
3
[]
no_license
#pragma once #include <string> class Ratio { public: Ratio(const std::string &string) { if (string == "-") { c = -INF; } else if (string == "+") { c = INF; } else { c = std::stod(string); } } Ratio() = default; [[nodiscard]] bool ma...
Python
UTF-8
1,866
2.890625
3
[]
no_license
from .base_object import * import datetime as dt class Person(BaseObj): # _id = None _login = None _surname = None _forename = None _dob = None _gender = None _phone = None def __init__(self, **init_dict): super(Person, self).__init__() if init_dict is None: ...
Java
UTF-8
987
2.46875
2
[ "MIT" ]
permissive
package org.usfirst.frc.team2503.r2016.subsystem; import org.usfirst.frc.team2503.r2016.subsystem.base.DataSpeedControllerSubsystem; import org.usfirst.frc.team2503.r2016.subsystem.base.DataSubsystem; import edu.wpi.first.wpilibj.SpeedController; public class RhinoTrackSubsystem extends DataSpeedControllerSubsystem ...
Python
UTF-8
1,223
3.890625
4
[]
no_license
""" 105. Construct Binary Tree from Preorder and Inorder Traversal Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder is the inorder traversal of the same tree, construct and return the binary tree. """ # Definition for a binary tree node. # class Tree...
Java
UTF-8
865
2.1875
2
[]
no_license
package kilanny.shamarlymushaf.data.alarms; import android.content.Context; import androidx.room.Database; import androidx.room.Room; import androidx.room.RoomDatabase; import androidx.room.TypeConverters; import kilanny.shamarlymushaf.data.RoomConverters; @Database(entities = {Alarm.class}, version = 1, exportSche...
C++
UTF-8
1,939
2.8125
3
[ "MIT" ]
permissive
#ifndef _graphics #define _graphics #include <stdio.h> #include <stdlib.h> #include <iostream> #include "../qif/qif.hpp" // Cartesian plan origin #define ORIGIN_X -0.1 #define ORIGIN_Y -0.5 // Number of triangles that make up a circle #define CIRCLES_SIDES 300 // Prior probability distribution radius #define PRIOR...
C++
UTF-8
1,746
3.671875
4
[]
no_license
#pragma once #include<iostream> #include<vector> #include"Container.h" using namespace std; template <typename T> class Stack : public Container<T> { int size; char type; Object<T>* top; public: Stack(); Stack(std::vector<T>& other); bool member(const T& x); void print()const; void push(const T& x); //void r...
C#
UTF-8
4,426
2.84375
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Calculator { public partial class Calculadora : Form { double num1 = 0; ...
Java
UTF-8
155
2.65625
3
[]
no_license
package ex4; public class demo { double a,b; demo(double i,double j){ this.a=i; this.b=j; } double average(){ return (a+b)/2; } }
Markdown
UTF-8
1,355
2.78125
3
[ "MIT" ]
permissive
![](https://ga4gh.datainsights.cloud/api?repo=CFCD-exercises/platform_security&empty) # Platform Security ## Topics - Roles & Permissions - Application security groups ## Exercises ### List users in an org called 'my_org' by their assigned roles <details><summary>show</summary> <p> ```bash cf org-users my_org ```...
Python
UTF-8
442
3.53125
4
[]
no_license
# http://www.practicepython.org/exercise/2014/03/05/05-list-overlap.html import random #a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] #b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] a = random.sample(range(120), k = 10) b = random.sample(range(101), k = 8) #common = set(a).intersection(set(b)) #clean version of the belo...
Java
UTF-8
1,225
2.234375
2
[]
no_license
package com.reiras.reservationmicroservice.repository; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import java.util.Optional; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.spr...
Java
UTF-8
5,970
1.71875
2
[]
no_license
/** * Copyright 2018-2020 stylefeng & fengshuonan (https://gitee.com/stylefeng) * <p> * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 ...
C
UTF-8
2,365
3.53125
4
[]
no_license
#include <time.h> #include <string.h> #include <assert.h> #include "cache.h" #define CACHE_SIZE 50 #define URL_SIZE 100 typedef struct CacheBlock{ char* url; char* content; int content_length; time_t last_accessed; } *CacheBlock; struct T { CacheBlock cache[CACHE_SIZE]; int total_elements; }...
Java
UTF-8
575
1.921875
2
[]
no_license
package com.sisdent.repository.helper.produto; import java.util.List; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import com.algaworks.brewer.dto.ProdutoDTO; import com.algaworks.brewer.dto.ValorItensEstoque; import com.sisdent.model.Produto; import com.sisdent.repos...
JavaScript
UTF-8
3,144
3
3
[]
no_license
/** * ****************IMPORTS ********************************* */ const express = require("express"); const cors = require("cors"); const { getUID, getPhoto } = require("./Services/lookup"); /** * *****************SET-UP SERVER *************************** */ const server = express(); server.use(cors()); server.us...
PHP
UTF-8
436
2.6875
3
[]
no_license
<?php namespace model; use \library\Session as Session; use \library\Database as Database; class Model { protected $database; public function __construct($session = false, $database = false) { if ($session === true) { new Session(43200, false, 64800); } if ($database === true) {...
C#
UTF-8
1,836
2.59375
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.SceneManagement; public class GameController : MonoBehaviour { [SerializeField] private Text gameOverText; [SerializeField] private Text restartText; [SerializeField] private Text timeText; ...
C#
UTF-8
1,464
2.90625
3
[]
no_license
using MyPropertiesMachine.Data; using MyPropertiesMachine.Entities; using System; namespace MyPropertiesMachine.Business { public class MachineBL { //Obtiene información de maquina y consume capa de datos para almacenar en BD. Retorna entidad de tipo maquina. public Machine GetMachinePropertie...
Java
UTF-8
540
2.4375
2
[]
no_license
package EntitySets; import poj.EntitySet.*; import Resources.GameResources; import Resources.GameConfig; import poj.linear.*; import poj.Render.ImageRenderObject; import Components.*; /** * Power-up to allow the player to do more damage * @author Alex * @version 1.0 - 03/18/19 */ public class PowerUp extends Coll...
Markdown
UTF-8
2,161
2.609375
3
[ "Apache-2.0" ]
permissive
--- layout: layout.pug navigationTitle: dcos edge-lb show title: dcos edge-lb show menuWeight: 54 excerpt: Reference for the dcos edge-lb show command enterprise: false --- Use this command to show the pool definition for a given pool name. If you don't specify a pool name, the command returns information for all pool...
Python
UTF-8
1,713
3.296875
3
[]
no_license
import random import math import matplotlib.pyplot as plt numnodes = 500 q = 3 graph = [[0 for node in xrange(numnodes)] for node in xrange(numnodes)] degrees = [0 for node in xrange(numnodes)] def init_clique(graph, q): for i in xrange(2*q + 1): for j in xrange(2*q + 1): if i != j: graph[i][j] = 1 def ad...
Python
UTF-8
2,588
3.0625
3
[]
no_license
#!/usr/bin/env python """ Pong | . | """ import field import weapon import sprites import key class Game(object): def __init__(self): self.time = 0 self.tick = 0 self.is_running = False self.players = [] self.zombies = [] self.scores = [] self.collidab...
Java
UTF-8
862
1.96875
2
[]
no_license
package it.gov.pagopa.hubpa.payments.mock; import it.gov.pagopa.hubpa.payments.model.partner.CtReceipt; import it.gov.pagopa.hubpa.payments.model.partner.PaSendRTReq; import it.gov.pagopa.hubpa.payments.model.partner.StOutcome; public class PaSendRTReqMock { public final static PaSendRTReq getMock() { C...
C++
UTF-8
693
2.65625
3
[ "MIT" ]
permissive
// Copyright (c) 2018 The Kore Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef KORE_SUPPORT_CSVROW_H #define KORE_SUPPORT_CSVROW_H #include <fstream> #include <iostream> #include <iterator> #include <sst...
C++
UTF-8
585
3.125
3
[ "Unlicense" ]
permissive
/* * @lc app=leetcode id=35 lang=cpp * * [35] Search Insert Position */ // @lc code=start #include <vector> using namespace std; class Solution { public: int searchInsert(vector<int> &nums, int target) { auto lhs = nums[0]; if (target <= lhs) { return 0; } if (target > nums[nums.size() -...
Python
UTF-8
154
4.03125
4
[]
no_license
def fact(n): f = 1 for i in range(1,n+1): f*=i; return(f) n = int(input("-----FACTORIAL-----\nEnter the value of n: ")) print(n,"! = ",fact(n))
Java
UTF-8
2,164
3.578125
4
[]
no_license
import java.util.HashSet; import java.util.Set; /* https://leetcode.com/problems/continuous-subarray-sum/ Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size at least 2 that sums up to a multiple of k, that is, sums up to n*k where n i...
Java
UTF-8
564
3.25
3
[]
no_license
package top.sde.util; import java.util.Scanner; /** * Hello world! * */ public class Example { public static void main( String[] args ) { Scanner scan = new Scanner(System.in); while (true) { System.out.println("Please input a line to find the max length word or Enter/Return to quit:"); ...
Python
UTF-8
579
2.953125
3
[]
no_license
import re import requests from bs4 import BeautifulSoup def url_to_soup_converter(url): #Some header settings to get everything in english, with US IP headers = {'Accept-Language': 'en','X-FORWARDED-FOR': '2.21.184.0'} #url request by given url paramter and soup conversion url_request = requests.get(ur...
Markdown
UTF-8
1,776
3.40625
3
[]
no_license
# CONTENTS * [Headings](#headings) * [Styling](#styling) * [Blocks](#blocks) * [Links](#links) * [Lists](#lists) * [Dividers](#dividers) * [Tables](#tables) # HEADINGS Denoted by strings of `#` ``` # Size 1 ## Size 2 ### Size 3 #### Size 4 ##### Size 5 ###### Size 6 ``` # Size 1 ## Size 2 ### Size 3 #### Size 4 ###...
Java
UTF-8
1,000
2.484375
2
[]
no_license
package by.bsuir.ddjames.techrepair.dao.impl; import by.bsuir.ddjames.techrepair.dao.entity.Client; import by.bsuir.ddjames.techrepair.util.HibernateUtil; import java.util.List; import org.hibernate.HibernateException; import org.hibernate.criterion.Restrictions; public class ClientDao extends EntityDao<Client> { ...
Python
UTF-8
948
3.34375
3
[ "MIT" ]
permissive
import abc class NatBase(object): @abc.abstractmethod def clear(self): raise NotImplementedError @abc.abstractmethod def unify(self, t): raise NotImplementedError @abc.abstractmethod def subst(self): raise NotImplementedError class NatLiteral(NatBase): def __ini...
Markdown
UTF-8
3,920
2.578125
3
[]
no_license
# 5. Thymeleaf 사용법 ## Thymeleaf 사용법 기존의 JSP에서 벗어나 템플릿 기반의 화면 처리가 지원된다. 따라서 FreeMarker , Mustache, Thymeleaf를 이용해 확장자가 html인 페이지를 개발할 수 있다. ### Tymeleaf를 이용하기 위해 필요한 사항 1. 별도의 라이브러리\(STS4 에서 프로젝트 생성시에 추가하면 됨\) 2. application.properties에 필요한 설정 이유 : Thymeleaf로 개발된 화면을 수정하면 매번 프로젝트를 재시작해야되기 때문에 서버 내부에 Cache 보관 못하게 끄...
Python
UTF-8
204
3.46875
3
[]
no_license
def isPalindrome(string): # Write your code here. reverse_chars = [] for i in reversed(range(len(string))): reverse_chars.append(string[i]) return "".join(reverse_chars) == string
Python
UTF-8
944
3.015625
3
[]
no_license
from scipy.special import comb dp = {} def main(): k = 7 X = 150 p = 0.51 E = 0.0 for x in range(X + 1): tmp = (k + 2 * x + 2) * combinations(k + 1, x) tmp *= (p ** (k + x + 2)) tmp *= ((1 - p) ** x) E += tmp print(E) def combinations(ahead, X): ''' ahe...
C#
UTF-8
758
3.125
3
[]
no_license
using Lingua.Core.Extensions; namespace Lingua.Core.Tokens { public abstract class Word : Element { public int VariationIndex { set => Modifiers |= GetVariationModifier(value); } protected virtual Modifier GetVariationModifier(int variationIndex) => Modifier.None; ...
Java
UTF-8
687
2.625
3
[ "Apache-2.0" ]
permissive
package com.trunk.rx.jdbc.sql; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; /** * A function to defer the creation of {@link PreparedStatement}s so we can * safely manage their lifecycle. * * @see Execute * @see ExecuteQuery * @see ExecuteUpdate */ @FunctionalInt...
C
UTF-8
1,838
2.75
3
[ "BSD-2-Clause" ]
permissive
/** * Copyright (C) 2017, Hao Hou **/ #include <testenv.h> runtime_servlet_binary_t* binary; runtime_servlet_t* servlet; runtime_task_t* task; int task_started = 0; static void trap(int id) { if(id == 0) { task = runtime_task_current(); } else if(id == 1) { task = runtime_task_current(); if(task->flags =...
C#
UTF-8
1,223
2.5625
3
[]
no_license
public class DisplayNameEnforcingDescriptor : PropertyDescriptor { private PropertyDescriptor _descriptor; public DisplayNameEnforcingDescriptor(PropertyDescriptor descriptor) : base(descriptor) { this._descriptor = descriptor; } public override string Name { get { return string.IsNullO...
Java
UTF-8
649
1.890625
2
[]
no_license
package com.hfut.dao; import com.hfut.entity.ClazzEntity; import com.hfut.entity.CourseEntity; import com.hfut.entity.SelectCourseEntity; import org.springframework.data.jpa.repository.JpaRepository; import java.util.List; /** * Created by chenjia on 2017/3/11. */ public interface SelectCourseDao extends JpaReposi...
PHP
UTF-8
427
2.546875
3
[]
no_license
<?php namespace Scrapertests\Unit; class CsvTest extends \ScraperTests\Lib\BaseTestCase { public function test_getConverted() { $toConvert = [ ['col1' => 'a,b', 'col2' => 'row1'], ['col1' => 'c' , 'col2' => 'row2'], ]; $filter = new \Scraper\Format\Csv(); ...
C
UTF-8
11,682
2.953125
3
[]
no_license
/* * mm-naive.c - The fastest, least memory-efficient malloc package. * * In this naive approach, a block is allocated by simply incrementing * the brk pointer. A block is pure payload. There are no headers or * footers. Blocks are never coalesced or reused. Realloc is * implemented directly using mm_malloc an...
Java
UTF-8
1,326
2.234375
2
[]
no_license
package com.study.controllers; import java.util.Map; import javax.servlet.http.HttpSession; import com.study.annotation.Component; import com.study.bind.DataBinding; import com.study.dao.OilDAO; import com.study.vo.MemberVO; @Component("/Fee/oilDelete.do") public class OilDeleteController implements Controller, Dat...
Java
UTF-8
1,832
3.703125
4
[]
no_license
/* * [2] Add Two Numbers * * https://leetcode.com/problems/add-two-numbers * * Medium (27.26%) * Total Accepted: * Total Submissions: * Testcase Example: '[2,4,3]\n[5,6,4]' * * Can you solve this problem? 🤔 */ /** * Definition for singly-linked list. * public class ListNode { * int ...
C#
UTF-8
445
2.71875
3
[ "Unlicense", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SpotyScraper.Utils { public static class CollectionsExtensions { public static void AddRange<TItem>(this ICollection<TItem> collection, IEnumerable<TItem> values) { ...
JavaScript
UTF-8
2,324
2.515625
3
[ "MIT" ]
permissive
#!/usr/bin/env node var fs = require('fs') var path = require('path') var split2 = require('split2') var sort = require('lodash.sortby') var range = require('lodash.range') var shuffle = require('lodash.shuffle') var config = require('rc')('shuf', { n: null, lc: null }) begin() function begin () { if (config._....
Java
UTF-8
2,366
2.140625
2
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.miudelar.server.ejb; import com.miudelar.server.logic.entities.Estudiante_Curso; import java.util.List; import javax.ejb.S...
JavaScript
UTF-8
757
2.578125
3
[]
no_license
const { MessageEmbed } = require("discord.js") module.exports = { name: "avatar", aliases: ["av"], run: async (client, message, args, db, prefix) => { let usuario = args[0] ? message.mentions.users.first() || await client.users.fetch(args[0]).catch(_ => message.author) : message.author let png = usuario.a...
Java
UTF-8
433
2.3125
2
[]
no_license
package com.github.brigade; /** * <b>TODO</b>: Class that keeps track of the following: * <ul> * <li>Wins / Losses (And Percent Wins)</li> * <li>Total units killed, units controlled</li> * <li>Units lost</li> * <li>Buildings made / destroyed (Chandler said Cities will have a build queue * a player can interact ...
Markdown
UTF-8
2,083
2.984375
3
[ "BSD-3-Clause" ]
permissive
# Transformer: PLY to LAS converter This extractor converts PLY 3D point cloud files into LAS files. ### Docker The Dockerfile included in this directory can be used to launch this Transformer in a container. ### Sample Docker Command Line Below is a sample command line that shows how the .ply to .las file conver...
SQL
UTF-8
1,325
4.28125
4
[]
no_license
-- timestamps for lowest flyby select   time_stamp as nadir,   altitude from flyby_altitudes where flyby_altitudes.altitude=28.576 and date_part(‘year’, time_stamp) = 2008 and date_part(‘week’, time_stamp) = 41; -- the lowest timestamp for that week select   min(time_stamp) +   (max(time_stamp) - min(time_stamp))/2 ...
C#
UTF-8
871
2.828125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
using System.IO; using System.Security.AccessControl; namespace Scalar.Common { public static class DirectoryEx { public static DirectorySecurity GetAccessControl(string path) { var di = new DirectoryInfo(path); return di.GetAccessControl(); } public sta...
Markdown
UTF-8
2,539
3.03125
3
[ "Apache-2.0" ]
permissive
project_path: /web/tools/_project.yaml book_path: /web/tools/_book.yaml description:爲您反覆使用的命令行任務設置快捷方式。如果您發現自己在命令行中反覆鍵入相同的內容,這將爲您帶來很大方便。 {# wf_updated_on:2015-04-13 #} {# wf_published_on:2014-09-24 #} # 設置命令行快捷方式 {: .page-title } {% include "web/_shared/contributors/megginkearney.html" %} {% include "web/_shared/con...
Ruby
UTF-8
4,306
2.875
3
[]
no_license
require 'json' require 'time' # #iso8601 require 'blog-generator/post' require 'blog-generator/models' require 'blog-generator/file-system-actions' module BlogGenerator class ValidationError < StandardError; end class ContentDirectoryHandler # content_directory: i. e. drop-area/, it doesn't have any name spec...
Markdown
UTF-8
7,992
2.515625
3
[]
no_license
二六 宫燕秋立刻想到了普慈庵发生的怪事,先是有人被杀,看似是自戕。守庵的妇人失踪,接着来了武林判官,要完成未完成的杀人买卖,剑拔弩张之际,一向仅属传闻的蓬莱三翁之中的"铁头翁"突然现身,指出看似自杀的汉子是死于推元反戕……..心念之中,向小二挥手道:"小二哥,你可以自便了,没什麽事。"小二迟疑地退了出去。 "浪子,你到底是弄什么鬼?"紫薇大声问。 宫燕秋没答腔,心里在苦苦地想:二先生当时并不在场,他怎么知道推元反戕这档事?照字条表面解释,他怀疑自己与推元反戕这门失传功夫的门人有关,所以才有不宜留难之语…"浪子,你怎么啦?"紫薇似已动了火。 "我……没什么!""你不肯说拉倒,反正我们之间谈不上...
Go
UTF-8
1,106
2.515625
3
[ "MIT" ]
permissive
package tasks import ( "flag" "fmt" "github.com/gsmake/gsmake" "github.com/gsmake/gsmake/vfs" ) // TaskUpdate . func TaskUpdate(runner *gsmake.Runner, args ...string) error { var flagSet flag.FlagSet nocache := flagSet.Bool("nocache", false, "also update cached package") if err := flagSet.Parse(args); err !...
Java
UTF-8
2,193
3.40625
3
[]
no_license
class Payment{ /* void payFromWallet (int amount) { System.out.println("Amount Paid from Wallet"); } void payFromUPI(int amount, String upi) { System.out.println("Amount Paid From UPI: "+upi); } void payFromBank(int amount, String userName, String password) { System.out.println("Amount Paid from Bank")...
Java
UTF-8
907
3.078125
3
[]
no_license
package ex1_cliente; public class Cliente { int cpf; int cod; String primeiroNome; String sobrenome; public Cliente(int cpf, int cod, String primeiroNome, String sobrenome) { this.cpf = cpf; this.cod = cod; this.primeiroNome = primeiroNome; this.sobrenome = sobrenome; } public String nomeCompleto...
Java
UTF-8
566
1.867188
2
[ "Apache-2.0" ]
permissive
package com.creactiviti.piper.config; public class GitProperties { private boolean enabled = false; private String url; private String[] searchPaths; public String getUrl() { return url; } public void setUrl(String aUrl) { url = aUrl; } public String[] getSearchPaths() { return sea...
C++
UTF-8
1,832
3.703125
4
[]
no_license
/* We stack glasses in a pyramid, where the first row has 1 glass, the second row * has 2 glasses, and so on until the 100th row. Each glass holds one cup (250ml) * of champagne. * * Then, some champagne is poured in the first glass at the top. When the top most * glass is full, any excess liquid poured will fall equ...
Markdown
UTF-8
1,235
2.890625
3
[ "MIT" ]
permissive
--- order: 3 title: zh-CN: 切换方向 en-US: Vertical --- ## zh-CN 默认情况下,`direction` 为 `horizontal`。通过设置 `direction` 为 `vertical` 来使用垂直方向切换。 ## en-US The default value for `direction` is `horizontal`. Use the vertical direction switch by setting `direction` to `vertical`. ```js import { Carousel } from '@arco-design...
Java
UTF-8
690
2.328125
2
[]
no_license
package com.okliu.util; import java.time.LocalDateTime; /** * @author liuhaolie * @Time 2020/3/17-3:07 */ public class LogUtils { private static String IN = ">---IN-->>|"; private static String OUT = "<<--OUT--<|"; public static void errOut(String error) { String prefix = OUT + LocalDateTime....
C#
UTF-8
2,081
2.546875
3
[]
no_license
 using System; using System.Collections.Generic; using System.Linq; using System.Text; using Modelo; using System.Data; using System.Data.Objects; namespace DataAccess { public class MaterialxPreparadoDA { #region MaterialxPreparado public List<MaterialxPreparadoEntity> GetMaterialxPreparado()...
C#
UTF-8
1,711
2.625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace TerraViewer { public partial class LanguageSelect : Form { public Language Language; public LanguageSelect() { ...
Markdown
UTF-8
803
3.515625
4
[]
no_license
# Tutorial: Python programming for everyone ## Summary This python programming tutorial is not only suitable for a complete beginner who wants to learn python programming, but also for experienced programmers. Using many examples, I explain the basics as well as some useful tricks to write python codes more effective...
Java
UTF-8
410
2.234375
2
[]
no_license
package com.mz.exception; /** * * @ProjectName :SpringMvcMz * @ClassName:ServiceException * @Description: 自定义服务异常 * @author:Ma Zhen * @date:2016-04-22 * @version */ public class ServiceException extends Exception { /** * 自定义服务异常 */ private static final long serialVersionUID = 1L; pub...
Java
UTF-8
397
3.0625
3
[]
no_license
import java.util.Scanner; public class Main { public static void main(String[] args) { //put your code here Scanner s = new Scanner(System.in); int a = Integer.parseInt(s.nextLine()); if(a <= 12 && a > -15){ System.out.println("True"); }else if (a >= 19 || a ==15 ||a == 16){ System.o...
Java
UTF-8
1,353
2.6875
3
[]
no_license
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) public class FakeTimer extends Actor { public int stepsLeft = 0,rest_d; public int count_down_flag=0; long TimerStart = System.currentTimeMillis(); public FakeTimer(int startValue) { //stepsLeft = startValue; ...
Java
UTF-8
3,088
2.09375
2
[ "Apache-2.0" ]
permissive
package com.example.maps; import java.text.SimpleDateFormat; import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.app.ActionBarActivity; import android.view....