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 | 403 | 1.640625 | 2 | [] | no_license | package com.oracle.intelagr.service;
import com.oracle.intelagr.common.PageModel;
import com.oracle.intelagr.entity.WaterMoni;
public interface IWaterMoniService {
public void queryForPage(PageModel pageModel);
public void save(WaterMoni waterMoni);
public void update(WaterMoni waterMoni);
public WaterMoni select... |
C++ | UTF-8 | 1,186 | 2.796875 | 3 | [] | no_license | #pragma once
#include <iostream>
#include <string>
#include "OutputController.h"
/*****************************************************
* InputController:
* Класс, отвечающий за обработку и хранение аргументов
* командной строки при запуске приложения.
*****************************************************/
class In... |
Java | UTF-8 | 2,451 | 1.617188 | 2 | [] | no_license | package com.yundaren.user.po;
import java.util.Date;
import lombok.Data;
@Data
public class UserInfoPo {
// 用户ID
private long id;
// 姓名
private String name;
// 性别(0女1男)
private int sex;
// 出生日期
private String birthday;
// 手机
private String mobile;
// 行业
private String industry;
// 邮箱
private String ema... |
PHP | UTF-8 | 1,599 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use App\User;
class AuthController extends Controller
{
public function __construct(){
$this->middleware('guest')->except(['logout']);
}
public function l... |
Java | UTF-8 | 7,640 | 2.171875 | 2 | [] | no_license | package com.geek.shengka.gold.entity;
import java.io.Serializable;
import java.util.Date;
/**
* sk_user_task_record
* @author
*/
public class SkUserTaskRecord implements Serializable {
private static final long serialVersionUID = 8367881871946791737L;
public static final Byte HANDLESTATE_WAITINGPROCESS=0; //... |
Java | UTF-8 | 1,407 | 2.265625 | 2 | [] | no_license | package net.dsdev.lailai.clientes.model.users;
import net.dsdev.lailai.clientes.util.Constants;
import com.google.gson.annotations.SerializedName;
public class Accounts {
public Accounts() {
}
public Accounts(String user) {
this.user = user;
}
public Accounts(String user,String actualC... |
TypeScript | UTF-8 | 1,169 | 2.75 | 3 | [] | no_license | import { Subject, PartialObserver } from 'rxjs';
import { filter } from 'rxjs/operators';
import { Injectable } from '@nestjs/common';
export interface DeviceLocatedEvent {
deviceId: string;
geohash: string;
lat: number;
long: number;
timestamp: number;
}
@Injectable()
export class DeviceLocationEvents {
... |
C++ | UTF-8 | 1,405 | 3.265625 | 3 | [] | no_license | //
// Created by Nandiin Borjigin on 14/04/2017.
//
#include <gtest/gtest.h>
#include "header.h"
namespace _173 {
class Solution {};
class BSTIterator {
public:
BSTIterator(TreeNode* root) {
while(nullptr != root) {
s.push(root);
root = root->left;
... |
Java | UTF-8 | 780 | 2.125 | 2 | [] | no_license | package com.kreditplus.eform.model.response.objecthelper;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
/**
* Created by Iwan Nurdesa on 21/07/16.
*/
public class Signature {
@SerializedName("Applicant")
@Expose
public String applicant;
@SerializedNam... |
Markdown | UTF-8 | 6,387 | 2.75 | 3 | [] | no_license | #Blog powered by web.py and MongoDB
#Introduce
学习Python的第一个Web框架就是[web.py](http://webpy.org/),没想到它的作者Aaron Swartz已经于2013年1月11日自杀。 2012年年末计划用Python将此博客重写,其中Web框架经过一翻[选型](http://wiki.woodpecker.org.cn/moin/PyWebFrameList),便确定使用web.py。本打算利用周末时间,希望能在年前完成,但因迫近年关诸事繁忙,现在才刚刚搭建起基本的项目框架。真是诸行无常,现在唯一能纪念的,就是作为一个程序员,学习吸收Aaron ... |
Shell | UTF-8 | 8,423 | 4.09375 | 4 | [
"MIT"
] | permissive | #!/bin/bash
#
# TODO: consider symlinking the icon rather than copying
set -e
usage () {
echo >&2 "${0##*/} [OPTIONS] GAME [GAME_TYPE]"
echo >&2
echo >&2 "GAME may be a game .app, if a Game symlink inside it points to"
echo >&2 "the game data directory, otherwise it must be the path to the"
echo >... |
JavaScript | UTF-8 | 1,165 | 3.171875 | 3 | [] | no_license | /**
* Created by Administrator on 14-8-10.
*/
var LinkedList=require("./double_linked_list");
/**
* 栈 LIFO
* @constructor
*/
function Stack(){
this.l=new LinkedList();
Object.defineProperty(this,"length",{
get:function(){
return this.l.length;
}.bind(this)
});
}
/**
* 如当前堆栈为空,
* isEmpty() 函数 返回 true
... |
Markdown | UTF-8 | 1,703 | 3.171875 | 3 | [] | no_license | # The Starttech Ventures Library
## About
This GitHub repository acts as a simple managment system of the growing Starttech Ventures Library.
## How it works
Books in the library are represented by [Issues](https://github.com/StarttechVentures/Library/issues). Each Issue represent a book in the STV Library.
[Op... |
PHP | UTF-8 | 1,089 | 2.75 | 3 | [] | no_license | <?php
class taglib
{
public function __construct($module, $tagfile) {
$this->getInstance($module, $tagfile);
}
public function getInstance($module, $tagfile = '') {
$tagfile = (empty($tagfile)) ? $module : $tagfile;
$tagfile = 'taglib_'.$tagfile;
$files = array (
APP_PATH.config('DEFAULT_H_LAY... |
C++ | UTF-8 | 4,268 | 3.15625 | 3 | [
"BSD-3-Clause"
] | permissive | //
// Created by Syed Haris Ali on 1/18/17.
//
#include <gtest/gtest.h>
#include "Tree/BinarySearchTree.h"
using namespace ds::tree::binary;
class BinarySearchTreeTest : public ::testing::Test {
protected:
Node<int> *mRootWithChildren;
SearchTree *mTree;
BinarySearchTreeTest() {
populateChildren... |
Java | UTF-8 | 3,603 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | package lecho.lib.hellocharts.formatter;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import lecho.lib.hellocharts.model.AxisValue;
import lecho.lib.hellocharts.util.FloatUtils;
public class SimpleAxisValueFormatter implements AxisValueFormatter {
protected static final int DEFAULT_DIGITS_NUMBER =... |
JavaScript | UTF-8 | 930 | 2.90625 | 3 | [
"MITNFA",
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | var colors = require('colors');
var ConsoleOutput = function() {
this.passedTests = 0;
this.failedTests = 0;
this.completedCallback = null;
this.pendingGivens = 0;
};
ConsoleOutput.prototype = {
beginWhen: function() {
this.pendingGivens++;
},
writeWhen: function(statement) {
console.log('\n' + ... |
TypeScript | UTF-8 | 1,423 | 2.65625 | 3 | [
"MIT"
] | permissive | import { jwtDecode } from "./jwtDecode";
import { getPreLocation } from "./preLocationUtils";
import ls from "./localStorageHelper";
const getToken = (): string | undefined => {
const preLocation = getPreLocation();
const rootPath =
window.location.pathname.split("/")[0] ||
(preLocation && preLocation.spli... |
Java | UTF-8 | 742 | 1.773438 | 2 | [] | no_license | package com.jcool.dev.travel.iactivityview;
import com.jcool.dev.travel.base.IBaseActView;
import com.jcool.dev.travel.bean.TravelInfoBean;
import com.jcool.dev.travel.bean.CallBackVo;
import java.util.List;
public interface TravelInfoActivityView extends IBaseActView {
void excuteSuccessCallBack(CallBackVo<Trav... |
C++ | UTF-8 | 17,584 | 3.265625 | 3 | [
"MIT"
] | permissive | #include <iostream>
#include <iomanip>
#include <cstdio>
#include <ctime>
#include <cctype>
#include <algorithm>
#include <sstream>
#include "../include/tinytasks.h"
using namespace tinytasks;
void PrintHelp()
{
std::cout << "\nTinyTasks v" << tinytasks_lib_version() << " example | Usage and allowed commands\n\n"... |
C++ | UTF-8 | 664 | 3.828125 | 4 | [] | no_license | #include <iostream>
#include <string>
using namespace std;
//定义圆周率常量
const double PI = 3.14;
//设计一个圆类,求圆的周长
//圆求周长的公式:2*PI*半径
//class 代表设计一个类,类后面紧跟着的就是类名称
class Circle
{
//访问权限
//公共权限
public:
//属性:
//半径
int m_r;
//行为:(函数)
//获取圆的周长
double calculateZC()
{
return 2 * PI * m_r;
}
};
int main15()
{
//通过圆类,创建具... |
Python | UTF-8 | 586 | 2.859375 | 3 | [] | no_license | import re
from collections import defaultdict
class Solution(object):
def mostCommonWord(self, paragraph, banned):
word = re.split('[!,?.;\'\ ]', paragraph)
word_count, max_count, res= defaultdict(lambda: 0), 0, None
banned = set(banned)
for i in range(len(word)):
if len(... |
Python | UTF-8 | 8,088 | 3.171875 | 3 | [] | no_license | import re
en_to_9 = '(zero|one|two|three|four|five|six|seven|eight|nine)'
cn_to_9 = '(零|一|二|三|四|五|六|七|八|九)'
cn_to_09 = '(零一|零二|零三|零四|零五|零六|零七|零八|零九)'
en_xty = '(twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety)'
cn_xty = '(二十|三十|四十|五十|六十|七十|八十|九十)'
en_to_19 = '(ten|eleven|twelve|thirteen|fourteen|fifteen' \
... |
Java | UTF-8 | 1,549 | 2.453125 | 2 | [] | no_license | import com.sun.xml.internal.ws.api.ha.StickyFeature;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
public class Logss {
public static void main(String[] args) {
String fileLocation = "log.txt";
System.out.println(print... |
Java | UTF-8 | 1,282 | 1.90625 | 2 | [] | no_license | package com.demo.model.rq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import java.util.List;
/**
* @Classname NacosTransitionConfigUpdateRQ
* @Description
* @Date 2020/12/1 14:21
* @Created by fanshuaibing
*/
@ApiModel(value = "流转状态",de... |
Java | UTF-8 | 3,414 | 3.734375 | 4 | [] | no_license | package com.heiduo;
import java.util.HashSet;
import java.util.Set;
public class LeetCode2303 {
public static void main(String[] args) {
/**
* 2395. 和相等的子数组
*/
System.out.println("result:" + findSubarrays(new int[]{1, 2, 3, 4, 5}));
/**
* 2373. 矩阵中的局部最大值
... |
Java | UTF-8 | 1,486 | 2.96875 | 3 | [] | no_license | import java.util.*;
public class C {
static int [] dx = {-1,0,0,1};
static int [] dy = {0,-1,1,0};
static int H,W;
static final String key = "welcome to code jam";
static final int M = 10000;
public static void main (String [] arg) throws Throwable {
int N = nextInt();
for (int ii = 1; ii<=N; ++ii) {
St... |
C++ | UTF-8 | 6,818 | 2.609375 | 3 | [
"MIT"
] | permissive | #include "cc17.h"
#include "mp_helper.h"
#include <array>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>
namespace tv {
namespace detail {
template <typename Os, typename T, typename = void>
struct is_ostream_avail... |
Ruby | UTF-8 | 614 | 2.671875 | 3 | [] | no_license | namespace :user do
desc "Create a new user."
task :create_root => :environment do
printf "E-mail: "
email = STDIN.readline.chomp
printf "Password: "
password = STDIN.readline.chomp
user = User.create!(:email => email, :root => true,
:password => password, :password_confirmation => passwor... |
Go | UTF-8 | 13,908 | 2.703125 | 3 | [
"BSD-1-Clause",
"BSD-2-Clause"
] | permissive | // Copyright (c) 2014 The scanner Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package scanner // import "github.com/skycoin/cx/cmd/goyacc/scanner/yacc"
import (
"bytes"
"fmt"
"go/token"
"testing"
"unicode"
)
// func dbg(s ... |
PHP | UTF-8 | 1,576 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of SyliusFixturesPlugin.
*
* (c) Akawaka
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Story;
use Akawakaweb\SyliusFixtur... |
C# | UTF-8 | 3,309 | 2.828125 | 3 | [] | no_license | using System;
using Meebey.SmartIrc4net;
using MySql.Data.MySqlClient;
using System.Collections.Generic;
namespace Botler.Commands.Core.Seen
{
class get
{
static public void command(string[] args, string Channel, string Nick, IrcClient irc)
{
if (args.Length != 2) { irc.SendMessage... |
C# | UTF-8 | 3,248 | 2.59375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Pump_house.Data_Access;
namespace Pump_house
{
public partial class Default : System.Web.UI.Page
{
GardenerModelContainer dbContext... |
Java | UTF-8 | 1,552 | 1.617188 | 2 | [] | no_license | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.qihoo.security.widget.material;
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
im... |
TypeScript | UTF-8 | 1,866 | 2.65625 | 3 | [
"MIT"
] | permissive | const tasks = "[tasks]";
export type CardTypes = {
_id: string;
text: string;
description: string;
};
export type TaskTypes = {
_id: string;
title: string;
cards: CardTypes[];
priority: boolean;
done: boolean;
};
export const ADD_TASK_LIST = `${tasks} ADD_TASK_LIST`;
export const REMOVE_TASK_LIST = `... |
C# | UTF-8 | 787 | 2.609375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.IO;
namespace RejestracjaCzasuPracy
{
/// <summary>
/// Logika interakcji dla klasy App.xaml
/// </summary>
public partial ... |
JavaScript | UTF-8 | 521 | 3.125 | 3 | [] | no_license | var parent_ = function () {
var local_parent = 0;
var local_method = function () { return local_parent; }
return { parent_method : local_method, parent_value : local_parent };
}
var child = (function () {
var child = parent_ ();
var local_child = 10;
child.child_method = function () { return local_child; }
chil... |
C# | UTF-8 | 1,249 | 2.625 | 3 | [] | no_license | using System;
using System.Threading.Tasks;
namespace RngBreak
{
class Program
{
static async Task Main(string[] args)
{
var rand = new Random();
string accId = rand.Next().ToString();
CasinoCaller caller = new CasinoCaller();
var offset = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
var acc = awai... |
C# | UTF-8 | 5,322 | 2.578125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class ClearForm : Form
{
... |
Java | UTF-8 | 939 | 2.265625 | 2 | [] | no_license | package Assemblies;
import edu.wpi.first.wpilibj.AnalogChannel;
import edu.wpi.first.wpilibj.Counter;
import edu.wpi.first.wpilibj.DigitalOutput;
import edu.wpi.first.wpilibj.Encoder;
import edu.wpi.first.wpilibj.Jaguar;
/**
*
* @author brad
*/
public class MagneticRotaryAssembly {
public static Jaguar ge... |
Java | UTF-8 | 639 | 1.65625 | 2 | [
"Apache-2.0"
] | permissive | package com.event.discovery.agent.google.model;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.event.discovery.agent.framework.model.broker.BrokerAuthentication;
import com.event.discovery.agent.framework.model.broker.NoAuthBrokerAuthentication;
import lombok.Data;
import lombok.NoArgsCon... |
PHP | UTF-8 | 14,397 | 3.140625 | 3 | [] | no_license | <?php
class Text
{
static function cutStr($str,$cword){
$nstr='';
$str_exp = explode(" ", $str);
for ($a = 0; $a <= $cword; $a++) {
$nstr.=$str_exp[$a].' ';
}
$nstr=trim($nstr);
if(isset($str_exp[$a+1]))$nstr.=' ...';
return $nstr;
}
static function cutStrBySym... |
Markdown | UTF-8 | 15,581 | 3.078125 | 3 | [] | no_license | ---
title: 2021年09月23日 SQL专项练习
categories:
- 牛客网
- 专项练习
- 数据库
abbrlink: d07385b1
date: 2021-09-23 11:02:05
updated: 2021-09-23 11:02:05
---
# 考点1:数据操纵语言 SQL语言分类
SQL语言共分为三大类(亦有说法分为四大类),那么不属于数据操纵语言的有()
- A update
- B grant
- C delete
- D insert
<details><summary>显示答案/隐藏答案</summary>正确答案: B</details>
## 数据操纵语言
- 数据... |
SQL | UTF-8 | 5,912 | 3.46875 | 3 | [] | no_license | set names utf8;
set foreign_key_checks = 0;
drop database if exists ecsite;
create database if not exists ecsite;
use ecsite;
drop table if exists login_user_transaction;
create table login_user_transaction(
id int not null primary key auto_increment,
login_id varchar(16) unique,
login_pass varchar(16),
... |
JavaScript | UTF-8 | 4,406 | 2.640625 | 3 | [
"MIT"
] | permissive | // @moduledoc
//
// This is the base API client, it acts as a container for Authentication,
// Login, user settings, base endpoints, etc.
// It is meant to be easy to mock.
import axios from "axios";
import btoa from "btoa";
const logRequests = typeof DEV !== "undefined" && DEV;
const requestColor = "CornflowerBlue";... |
Java | UTF-8 | 174 | 1.609375 | 2 | [
"Apache-2.0"
] | permissive | package com.github.skjolber.extend.core.transform;
@FunctionalInterface
public interface ArchiveFileTransformer {
byte[] transformFile(String file, byte[] classFile);
}
|
Markdown | UTF-8 | 472 | 3.015625 | 3 | [] | no_license | # CECS 277 Lab 11
* Adapter design pattern
# DistanceTester.java
* The main of the program, calculates the distance you travel by converting the miles to kilometers, then back to miles
# KilometersAdapter.java
* Returns the distance from the equation kilometers times hours
# MilesAdapter.java
* Calculates the distan... |
PHP | UTF-8 | 3,535 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php declare(strict_types=1);
/*
* This file is part of the feed-io package.
*
* (c) Alexandre Debril <alex.debril@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace FeedIo;
use FeedIo\Factory\MissingDependency... |
JavaScript | UTF-8 | 2,084 | 3.5 | 4 | [
"CC0-1.0"
] | permissive | /*
* @lc app=leetcode.cn id=617 lang=javascript
*
* [617] 合并二叉树
*
* https://leetcode-cn.com/problems/merge-two-binary-trees/description/
*
* algorithms
* Easy (74.75%)
* Likes: 403
* Dislikes: 0
* Total Accepted: 57K
* Total Submissions: 74.4K
* Testcase Example: '[1,3,2,5]\n[2,1,3,null,4,null,7]'
... |
SQL | UTF-8 | 911 | 4.09375 | 4 | [] | no_license | /*
Give the five most popular starting stations between 7am and 10am in 2019.
start_station --> trip occurence
3057 --> 1791
3010 --> 1054
3054 --> 1053
3190 --> 887
3108 --> 836
*/
-- Enter your SQL query here
WITH hours_table as (
SELECT start_station, EXTRACT(HOUR FROM start_time) as start_time
FROM ... |
Shell | UTF-8 | 1,278 | 2.59375 | 3 | [] | no_license | # HOMEBREW
brew analytics off
HOMEBREW_NO_INSECURE_REDIRECT=1
HOMEBREW_CASK_OPTS=--require-sha
# Default PATH
export PATH="$PATH:$HOME/.bin"
# Deno
export PATH="$PATH:$HOME/.deno/bin"
# GPG
export GPG_TTY=$(tty)
# Flutter
export PATH="$PATH:$HOME/bin/flutter/bin"
# Brew path
if [[ "$OSTYPE" == "darwin"* ]]; then
... |
Python | UTF-8 | 1,066 | 2.828125 | 3 | [] | no_license | import cv2
import numpy as np
from matplotlib import pyplot as plt
#
img = cv2.imread('lena.jpg', 0)
#img = np.zeros((200, 200), np.uint8) 200x200 pixel black image
#cv2.rectangle(img, (0, 100), (200, 200), (255), -1)
# Half of the image will become white, -1 will fill the rectangle
#cv2.rectangle(img, (0, 50), (... |
Java | UTF-8 | 406 | 3.515625 | 4 | [] | no_license | package Fundamentos;
public class ConversaoNumeroString {
public static void main(String[] args) {
Integer num1=1000;
System.out.println(num1.toString().length());
int num2 =10000;
System.out.println(Integer.toString(num2));
//quando se joga uma variavel e quer transformar ela
//em String, prec... |
Markdown | UTF-8 | 8,993 | 2.96875 | 3 | [] | no_license | ---
layout: post
title: 揭秘 Github 上那些开源项目的 star 数
author: Longerian
---
> 声明:转载请注明出处。
前段时间团队内开源了两个小项目:[vlayout]和[LazyScrollView],一般我们可以通过它们的 star 数(即被其他人收藏的数量)来了解它们的受欢迎程度。但是一个项目到底集齐多少个 star 才算受欢迎呢?Github 上那些开源项目的 star 分布是怎样的?......只有了解这些才能更好的评估一个项目的流行程度。好在 Github 有开放第三方接口,提供了足够多的有用信息,我稍微整理了一下,感觉有点意思,分享一下。(以下数据统计于2... |
SQL | UTF-8 | 964 | 2.75 | 3 | [] | no_license | -- Table: tipo_docs_garantias_comunitarias
-- DROP TABLE tipo_docs_garantias_comunitarias;
CREATE TABLE tipo_docs_garantias_comunitarias
(
id serial NOT NULL,
reg_status character varying(1) NOT NULL DEFAULT ''::character varying,
dstrct character varying(4) NOT NULL DEFAULT ''::character varying,
nombre char... |
Shell | UTF-8 | 959 | 3.21875 | 3 | [] | no_license | #!/bin/sh
if [ -z "$DOCKER_CERT_PATH" ]; then
if [ -e "/usr/local/bin/boot2docker" ]; then
`boot2docker shellinit`
fi
fi
if ! docker port devbox 22/tcp > /dev/null 2>&1; then
if docker ps -a | grep devbox > /dev/null 2>&1; then
echo "Booting devbox..."
docker start devbox > /dev/null
sleep 1
e... |
TypeScript | UTF-8 | 7,977 | 2.640625 | 3 | [] | no_license | import { Colors, EmbedBuilder } from 'discord.js';
import { COLOR } from '../../utilities/types/globals';
import {
Category,
DisplayType,
ICategory,
} from '../database/entities/category.entity';
import { ReactRole } from '../database/entities/reactRole.entity';
import { codeBlock } from '@discordjs/builders';
im... |
Python | UTF-8 | 2,064 | 2.65625 | 3 | [] | no_license | # -*- coding: utf-8 -*-
from openpyxl import Workbook
from openpyxl import load_workbook
import python_query as query
import python_email as email
import time
import datetime
import python_constant as constant
date_time = datetime.datetime.now()
dayOfWeek = date_time.weekday()
#假如是星期五则执行查询
if dayOfWeek == 4:
start... |
Java | UTF-8 | 9,654 | 2.046875 | 2 | [] | no_license | package us.lucidian.instacount;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.ImageView;
imp... |
Ruby | UTF-8 | 146 | 3.296875 | 3 | [] | no_license | #!/usr/bin/ruby
class Sample #definition
def hello
puts "Hello Ruby!"
end
end
#instantiation
object = Sample.new
object.hello |
C# | UTF-8 | 566 | 2.828125 | 3 | [] | no_license | //A simple bounding box used for oct-trees
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BoundingBox {
//public
public Vector3 Min;
public Vector3 Max;
public BoundingBox(Vector3 min, Vector3 max){
Max = max;
Min = min;
}
public bool Contains (Transform t, ... |
TypeScript | UTF-8 | 622 | 4.03125 | 4 | [] | no_license | /**
* {Maybe.Type<T> is a return value that is either undefined or a T
*
* To determine what the value is, dereference it like this:
*
* function sometimesNull(): Maybe.Type<string> {
* if (Math.random() > 0.5) {
* return "Hello";
* } else {
* return undefined;
* }
* }
* const result ... |
C# | UTF-8 | 1,373 | 2.828125 | 3 | [] | no_license | using lifebet.dataaccess.Context;
using lifebet.entity;
using Microsoft.EntityFrameworkCore;
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
namespace lifebet.dataaccess.Repositories
{
internal class Repository<TEntity, TId> : IRepository<TEnti... |
Java | UTF-8 | 1,283 | 4.125 | 4 | [] | no_license | /** This Demo program seeks to provide insight and learning opportunities into the concept of polymorphism,
* inheritance, and encapsulation - the founding principles of OO design.
* +The Demo program creates two Animal objects instantiated in the form of a Cat object and a Dog object, and
* then prints out the resu... |
JavaScript | UTF-8 | 957 | 2.53125 | 3 | [] | no_license | 'use strict'
const AWS = require('aws-sdk')
AWS.config.update({ region: process.env.AWS_REGION })
const lambda = new AWS.Lambda({region: "us-east-1"}) // If you use other region change this value
const s3 = new AWS.S3()
const URL_EXPIRATION_SECONDS = 300
// Main Lambda entry point
exports.handler = async (event, co... |
JavaScript | UTF-8 | 3,424 | 2.890625 | 3 | [
"MIT"
] | permissive | import {
Button,
Modal,
ModalHeader,
ModalBody,
Form,
FormGroup,
Label,
Input,
Alert,
} from "reactstrap";
import { useState, useEffect } from "react";
import { getItems, addItem } from "../actions/itemActions";
/**
* Modal for making an entry into the database
* Asks for a name and team, and will... |
JavaScript | UTF-8 | 1,218 | 2.6875 | 3 | [] | no_license | class Chick extends MovableObject {
height = 45;
width = 45;
energy = 5;
IMAGES_WALKING = [
'img/3.Secuencias_Enemy_básico/Versión_pollito/1.Paso_derecho.png',
'img/3.Secuencias_Enemy_básico/Versión_pollito/2.Centro.png',
'img/3.Secuencias_Enemy_básico/Versión_pollito/3.Paso_... |
PHP | UTF-8 | 736 | 3.015625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<!-- Escribe un programa que pinte por pantalla una pirámide rellena a base de asteriscos. La base de la
pirámide debe esta... |
Java | UTF-8 | 291 | 1.640625 | 2 | [] | no_license | package test.igniteprobejava;
import org.apache.ignite.examples.sql.SqlDdlExample;
public class Main {
public static void main(String[] args) {
try {
new SqlDdlExample().main(null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
Python | UTF-8 | 133 | 3.125 | 3 | [] | no_license | # printing table of 10
#inialisation
no =10
while no<=100:
print("no : %d" %no)
no+=10
else:
print("done") |
Java | UTF-8 | 2,192 | 1.945313 | 2 | [] | no_license | //
// Decompiled by Procyon v0.5.34
//
package rx.internal.operators;
import rx.plugins.RxJavaHooks;
import rx.Subscriber;
import rx.Subscription;
import rx.subscriptions.SerialSubscription;
import rx.SingleSubscriber;
import rx.Observable;
import rx.Single;
public final class SingleOnSubscribeDelaySubscriptionOth... |
Python | UTF-8 | 3,791 | 2.890625 | 3 | [
"MIT"
] | permissive | #! /usr/bin/env python
from .url import Url
from lxml import etree
# The XPath functions available in lxml.etree do not include a lower()
# function, and so we have to provide it ourselves. Ugly, yes.
import string
def lower(dummy, l):
return [string.lower(s) for s in l]
ns = etree.FunctionNamespace(None)
ns['lo... |
JavaScript | UTF-8 | 3,748 | 2.578125 | 3 | [] | no_license | import React, { Component } from "react";
import { Collapse, Button, CardBody, Card, Table, Container } from "reactstrap";
import "./MatchCard.css";
export default class MatchCard extends Component {
constructor(props) {
super(props);
this.state = {
team1Details: [],
team2Details: []
};
}
... |
Java | UTF-8 | 5,228 | 2.359375 | 2 | [] | no_license | package com.techelevator;
import static org.junit.Assert.*;
import java.math.BigDecimal;
import java.sql.SQLException;
import java.text.DecimalFormat;
import java.time.LocalDate;
import java.util.List;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import ... |
C++ | UTF-8 | 445 | 3.71875 | 4 | [] | no_license | #include <iostream>
#include <vector>
using namespace std;
void ReverseVector(vector<int>& v){
cout<<"Reverse한 Vector값 :"<<endl;
for(int x = 9; 0 <= x; x--)
cout<<v[x]<<'\t';
cout<<endl;
}
int main() {
vector<int> v{1,2,3,4,5,6,7,8,9,10};
cout<<"기본 Vector 값 :"<<endl;
for(int vec =... |
C++ | UTF-8 | 5,900 | 2.671875 | 3 | [] | no_license | #include "GL/glew.h"
#include "FlumenEngine/Utility/Voronoi.hpp"
#include "FlumenEngine/Render/DataBuffer.hpp"
#include "FlumenEngine/Render/ShaderManager.hpp"
#include "FlumenEngine/Render/Shader.hpp"
#include "Kernel.hpp"
#include "FlumenCore/Utility/Utility.hpp"
Shader* Voronoi::shader_ = nullptr;
Map <DataBuffer... |
Rust | UTF-8 | 2,125 | 2.6875 | 3 | [] | no_license | use crate::genealogist::typed_relation::TypedRelation;
use crate::post::Post;
use genealogy_java_apis::exception::Exception;
use genealogy_java_apis::function::bi_function::BiFunction;
use std::fmt::{Debug, Display, Formatter};
use std::hash::{Hash, Hasher};
use std::rc::Rc;
pub mod genealogist_service;
pub mod relati... |
Java | UTF-8 | 283 | 3.203125 | 3 | [] | no_license | package datastructures.counter;
public class Counter {
private int count;
private String id;
public Counter(String id) {
this.id = id;
}
public void increment() {
count++;
}
@Override
public String toString() {
return id + ": " + count;
}
}
|
C# | UTF-8 | 4,052 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CsvHelper;
using FinanceSharp;
using FinanceSharp.Consolidators;
using FinanceSharp.Examples.Data;
using FinanceSharp.Indic... |
TypeScript | UTF-8 | 408 | 2.75 | 3 | [] | no_license | import { HeaderActionTypes, HeaderActionsUnion } from "./header.actions";
export const HeaderReducer = (
state = initialState,
action: HeaderActionsUnion
) => {
switch (action.type) {
case HeaderActionTypes.SET_ACTIVE_NAV:
return {
...state,
activeNav: action.activeNav,
};
de... |
Markdown | UTF-8 | 73,166 | 2.625 | 3 | [] | no_license | ---
layout: docs_page
title: OAuth 2.0
---
# OAuth 2.0 API
Okta is a fully standards-compliant [OAuth 2.0](http://oauth.net/documentation) authorization server and a certified [OpenID Provider](http://openid.net/certification).
The OAuth 2.0 APIs provide API security via scoped access tokens, and OpenID Connect provi... |
Java | UTF-8 | 881 | 2.921875 | 3 | [
"MIT"
] | permissive | package geren_memoria;
public class Processo {
private int end_base;
private int end_limite;
private boolean in_memoria; // indica se esta na memoria principal(true) ou na secundaria(false)
private int end_swap;
public Processo(int end_base, int end_limite) {
this.setEnd_base(end_base);
this.setEnd_... |
PHP | UTF-8 | 1,462 | 2.59375 | 3 | [] | no_license | <?php session_start(); ?>
<form action="" method="POST">
<h2>增加分數</h2>
<input type="text" name="UserID" value="" placeholder="名稱" required>
<input type="text" name="Item" value="" placeholder="原因" required>
<input type="text" name="Point" value="" placeholder="分數" required>
<input type="submit" name="Button" v... |
TypeScript | UTF-8 | 4,256 | 2.671875 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | import { v4 as uuidV4 } from 'uuid';
import AccountVisibility from '../enums/AccountVisibility';
import BitcoinUnit from '../enums/BitcoinUnit';
import UTXOCompatibilityGroup from '../enums/UTXOCompatibilityGroup';
import SubAccountDescribing from './SubAccountInfo/Interfaces';
import { Satoshis } from '../typealiases/... |
Markdown | UTF-8 | 908 | 3.265625 | 3 | [
"MIT"
] | permissive | ---
title: "Adding New Glyphs to a Font"
date: "2018-12-05"
---
Ever wanted to add your own glyphs to a font? It's surprisingly easy once you know the. I chose [BirdFont](https://birdfont.org/) as my font editor after a cursory look over the free options. It did not disappoint:

In the scre... |
Markdown | UTF-8 | 1,450 | 3.421875 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | ---
layout: post
title: java面试宝典(三)
subtitle: 值传递和引用传递
date: 2018-01-18
author: 戴林甫
header-img: img/post-bg-ios9-web.jpg
catalog: true
tags:
- 面试
- java
---
下列程序会输出什么
class value{
public int i = 15;
}
public class ValueTransmit {
public static void main(Strin... |
TypeScript | UTF-8 | 1,240 | 2.578125 | 3 | [] | no_license | export enum BroadcastType {
INCLUSIVE = 'INCLUSIVE',
EXCLUSIVE = 'EXCLUSIVE',
}
export enum MessageLevel {
INFO = 'INFO',
WARN = 'WARN',
ERROR = 'ERROR',
}
export enum EventType {
SESSION_TIMEOUT_EVENT = 'SessionTimeoutEvent',
SYSTEM_SHUTDOWN_EVENT = 'SystemShutdownEvent',
DATA_REFRESH_EVENT = 'DataRe... |
Python | UTF-8 | 5,342 | 3.71875 | 4 | [] | no_license | #http://www.rmunn.com/sqlalchemy-tutorial/tutorial.html
'''from sqlalchemy import *
db = create_engine('sqlite:///tutorial.db')
db.echo = False # Try changing this to True and see what happens
metadata = MetaData(db)'''
'''users = Table('users', metadata,
Column('user_id', Integer, primary_key=True),
Colum... |
C++ | UTF-8 | 2,753 | 3.359375 | 3 | [] | no_license | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Antonio Santos
* CSCI 271 - Spring 2017
* Program 5 - Due 4/11/17
* This program is used to study how different load factors
* affect searching time using hash tables.
*
* To run:
* $time ./a.out 'table_size (must be > 200000)'
* * * * * * * * * *... |
Java | UTF-8 | 1,374 | 2.09375 | 2 | [] | no_license | package group8.tkgd.menurestaurantapp.activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Handler;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowMan... |
Python | UTF-8 | 4,231 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | from collections import Counter
from re import compile, Pattern
import sys
from typing import cast, ClassVar, ForwardRef, Optional, Type
from tanuki.data_store.index.index_alias import IndexAlias
from tanuki.data_store.metadata import Metadata
from .column import Column
from .column_alias import ColumnAlias
class S... |
C++ | UTF-8 | 18,295 | 3.0625 | 3 | [] | no_license | #include <cctype>
#include <cstdlib>
#include <string>
#include <sstream>
#include "posint.h"
using namespace std;
/******************** BASE ********************/
int PosInt::B = 0x8000;
int PosInt::Bbase = 2;
int PosInt::Bpow = 15;
void PosInt::setBase(int base, int pow) {
Bbase = base;
Bpow = pow;
B = base;... |
JavaScript | UTF-8 | 2,178 | 2.953125 | 3 | [] | no_license | function Cell(i,j, siz) {
this.i = i;
this.j = j;
this.siz = siz;
this.x = this.i * this.siz;
this.y = this.j * this.siz;
this.mina = false;
this.odkryty = false;
this.ile = 0;
this.flag = false;
}
Cell.prototype.Render = function() {
rect(this.x,this.y,this.siz,this.siz);
if(this.odkryty) {
... |
Java | UTF-8 | 3,430 | 2.625 | 3 | [] | no_license | package com.jiang.localspringbootdemo.util.zip;
import sun.net.www.protocol.ftp.FtpURLConnection;
import javax.imageio.ImageIO;
import javax.imageio.ImageReader;
import javax.imageio.stream.ImageInputStream;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
impor... |
Java | UTF-8 | 39,914 | 1.585938 | 2 | [] | no_license | package com.example.mobile;
import android.Manifest;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardw... |
Java | UTF-8 | 1,545 | 2.515625 | 3 | [] | no_license | package com.dd.ddsq.util;
import android.content.Context;
import android.view.Gravity;
import android.widget.TextView;
import android.widget.Toast;
import com.dd.ddsq.R;
/**
* Created by admin on 2017/2/28.
*/
public class ToastUtil {
private static Toast toast;
public static void showToast(Context cont... |
C++ | UTF-8 | 544 | 3.125 | 3 | [] | no_license | #include "SalesData.h"
// 在类的外部定义构造函数
SalesData::SalesData(std::istream &is)
{
read(is, *this); // 注意这里可以直接把 *this 对象传入,具体原因见 《C++ 对象模型》
}
// 定义 SalesData 的成员函数
double SalesData::avg_price() const
{
if (units_sold)
{
return revenue / units_sold;
}
else
{
return 0;
}
}
... |
Python | UTF-8 | 1,297 | 3.296875 | 3 | [] | no_license | from fundamentals.test_time import test_time
class Solution():
def __init__(self):
pass
'''我的方法'''
@test_time
def findAnagrams(self, s, p):
window = {}
needs = {}
for item in p:
window[item] = 0
needs[item] = needs.get(item, 0) + 1
vali... |
Java | UTF-8 | 10,820 | 2.515625 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | /**** efw3.X Copyright 2016 efwGrp ****/
package efw.db;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Map;
import javax.script.ScriptException;
import efw.efwException;
i... |
PHP | UTF-8 | 663 | 2.6875 | 3 | [] | no_license | <?php
namespace Allian\Models;
use Database\DataObject;
class Stripe extends DataObject {
public static function customerToken($CustomerID){
$conn = parent::connect();
$sql = "SELECT token, Email FROM " . getenv('TBL_CUSTLOGIN') . " WHERE CustomerID= :CustomerID";
try {
$st = $conn->prepare( $sql );
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.