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 | 891 | 2.234375 | 2 | [] | no_license | package com.example.boot.user;
import javax.persistence.Entity;
import javax.persistence.*;
@Entity
@Table(name="user_table")
public class User {
@Id
// @GeneratedValue(strategy=GenerationType.AUTO)
private int uid;
private String name;
private String email;
private Integer mgr_id;
public User(int uid,String ... |
C++ | UTF-8 | 3,806 | 2.875 | 3 | [] | no_license | #include <sys/stat.h>
#include <fstream>
#include <vector>
#include <iostream>
#include "json.hpp"
#include "file_segment.hpp"
using json = nlohmann::json;
const string FileSegment::kSegmentFileNum = "SegmentNum";
const string FileSegment::kSourceFileName = "SourceFileName";
const string FileSegment::kSegmentFile... |
Python | UTF-8 | 152 | 2.953125 | 3 | [] | no_license | from time import sleep
target_time=11
def up_timer(secs):
for i in range(0,secs):
print(i)
sleep(1)
up_timer(target_time) |
Python | UTF-8 | 623 | 4.40625 | 4 | [] | no_license | # Write 2 recursive functions that will reverse a list of numbers.
# 1. you are not allowed to change the original list. You will return a new list.
def reverse_list01(list):
list = str(list)
new_list = []
if len(new_list)==len(list):
return new_list
return new_list.append((reverse_list01(list[... |
Java | UTF-8 | 9,658 | 1.96875 | 2 | [] | no_license | package com.hakami1024.vk_news;
import java.util.ArrayList;
import java.util.Arrays;
import org.json.JSONArray;
import org.json.JSONObject;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.... |
JavaScript | UTF-8 | 595 | 2.578125 | 3 | [] | no_license | /*
Author: Joanne
Date: 2018-05-07
Description: 描述背景类
属性:
img: 传进来的图片对象
speed: 移动的速度
step: 移动的距离
*/
define(function(require, exports, module) {
function Background(img, speed) {
this.img = img;
this.speed = speed;
this.step = 0;
}
Backgro... |
Markdown | UTF-8 | 20,143 | 2.921875 | 3 | [
"LicenseRef-scancode-boost-original"
] | permissive | # 正規表現 {regular_expressions}
## イントロダクション {introduction}
正規表現は、テキストのマッチのための領域固有言語です。テキストのマッチのために小さなプログラムをゼロから作ることもできますが、間違いを起こしやすいですし、面倒くさいですし、あまりポータブルでもフレキシブルでもありません。
代わりにマッチを(シンプルなケースでは)マッチする文字タイプとどれだけの文字をマッチさせたいかを決める数量詞を文字列として表現する正規表現を使います。
例えば、普通の文字と数字は文字通りマッチします。`\w`は単語の文字にマッチし、`\s`は(スペース、タブ、改行など)の空白文字にマッチします。... |
JavaScript | UTF-8 | 9,909 | 2.515625 | 3 | [] | no_license | const _ = require('underscore');
const errors = require('web3-core-helpers').errors;
const Ws = require('@web3-js/websocket').w3cwebsocket;
const isNode = Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
let _btoa = null;
let parseURL = null;
if (isNode) {
_btoa ... |
Swift | UTF-8 | 459 | 2.953125 | 3 | [] | no_license | import Foundation
public extension Data {
func toInt<I: FixedWidthInteger>(_ format: I.Type) -> Int {
return Int(converted() as I)
}
var toBool: Bool { converted() }
private func converted<T>() -> T {
withUnsafeBytes { $0.load(as: T.self) }
}
var toString: String {
String(data: self, encoding: .utf8)!
... |
Python | UTF-8 | 977 | 2.796875 | 3 | [] | no_license | #!/usr/bin/env python
import csv
import sys
import math
import matplotlib.pyplot as plt
import numpy as np
if (len(sys.argv) != 2):
print "Usage: " + sys.argv[0] + "file.csv"
sys.exit()
try:
csvfile = open(sys.argv[1], 'rb')
except:
print "Error while trying to open " + sys.argv[1]
sys.exit()
reader = csv.read... |
Java | UTF-8 | 7,287 | 1.882813 | 2 | [
"MIT"
] | permissive | package com.example.a1news;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityOptionsCompat;
import androidx.core.util.Pair;
import androidx.core.view.ViewCompat;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import and... |
Python | UTF-8 | 234 | 3.65625 | 4 | [] | no_license | user_sec = int(input("Введите количество секунд: "))
hours = user_sec // 3600
minutes = (user_sec - hours * 3600) // 60
seconds = user_sec - hours * 3600 - minutes * 60
print(hours, minutes, seconds, sep=":")
|
SQL | UTF-8 | 517 | 3.25 | 3 | [] | no_license | CREATE TABLE [scc].[Parent] (
[ParentID] SMALLINT IDENTITY (1, 1) NOT NULL,
[FirstName] NVARCHAR (70) NULL,
[MiddleName] NVARCHAR (70) NULL,
[LastName] NVARCHAR (70) NULL,
[PhoneNumber] NVARCHAR (50) NULL,
[Identification] BIT NULL,
[PersonID] IN... |
TypeScript | UTF-8 | 3,656 | 3.53125 | 4 | [
"MIT"
] | permissive | import { getHashBuffer } from '@casual-simulation/crypto';
/**
* Defines an interface for normal JS objects that represent Atom IDs.
*/
export interface StorableAtomId {
site: number;
timestamp: number;
priority: number;
}
/**
* Defines an ID for an atom.
*
* 16 bytes per ID. (each number is 8 bytes)... |
Java | UTF-8 | 3,340 | 2.03125 | 2 | [] | no_license | package com.minpostel.mvc.entities;
import javax.persistence.*;
import java.util.Date;
import java.io.Serializable;
@Entity
@Table(name = "archivePapier")
public class ArchivePapier implements Serializable {
@Id
@GeneratedValue
private Long archivePapierID;
private int nbrePage;
private int nbreFeuille;
pr... |
Python | UTF-8 | 1,278 | 3.65625 | 4 | [] | no_license | #1 p = open('text.txt', 'r') # открыть в режиме чтение
# a = p.read()
# print(a)
# p.close()
#2 with open('text1.txt', 'r') as a: #построчно читать файл и сохранять его в виде списка
# b = a.readlines()
# print(b)
#3 p = open('text.txt', 'r') # открыть в режиме чтение cтрока за строкой читала файл
# for li... |
C++ | UTF-8 | 3,435 | 2.90625 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Form.cpp :+: :+: :+: ... |
C# | UTF-8 | 4,464 | 2.609375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Windows;
using System.Diagnostics;
using System.IO;
using System.Xml.Serialization;
using DFA2.Model;
using DFA2.ViewModel;
namespace DFA2
{
/// <summary>
/// Логика взаимодействия для MainWindow.xaml
/// </summary>
public partial class Main... |
JavaScript | UTF-8 | 2,778 | 3.0625 | 3 | [] | no_license | // Written by Funnbot on November 23, 2018
const Logger = require("./Util/Logger");
const path = require("path");
// New promise based api for fs
const fs = require("bluebird").promisifyAll(require("fs"));
// Database object cache
let cache = {};
let location; // = "database.json"
// For database concurency, only one ... |
C++ | UTF-8 | 1,608 | 3 | 3 | [] | no_license | #include <bits/stdc++.h>
#define ll long long
using namespace std;
char c[3][3];
bool isWinV(char x, int col) {
int cnt = 0;
for (int i = 0; i < 3; i++) {
if (c[i][col] == x) {
cnt++;
}
}
return (cnt == 3);
}
bool isWinH(char x, int row) {
int cnt = 0;
for (int i = 0; i < 3; i++) {
if (c[row][i] == x) ... |
C++ | UTF-8 | 386 | 2.890625 | 3 | [] | no_license | #include <cstdio>
#include "FJ64_16k.h" // For a fast `is_prime` function: http://ceur-ws.org/Vol-1326/020-Forisek.pdf
int main() {
double ans = 0.5;
for (uint64_t p = 0; ; ++p) {
if (p % 1000000 == 0) {
printf("%lld %.9f\n", p, ans);
}
if (!is_prime(p)) continue;
if (p % 3 == 1) ans *= (p - ... |
Java | UTF-8 | 1,516 | 3.46875 | 3 | [
"Apache-2.0"
] | permissive | package com.zingking.javadesignmode.mediator;
/**
* Copyright © 2018, www.zingking.cn All Rights Reserved.
* Create by Z.kai 2019/1/21
* Describe: 具体中介者,协调各同事类行为
*/
public class Mediator extends AbstractMediator {
private static final String TAG = "Mediator";
@Override
public void buyComputer(int num... |
C# | UTF-8 | 2,222 | 2.625 | 3 | [] | no_license | using OpenQA.Selenium;
using System;
namespace EbayAutoFramework.Webdriver
{
public class WebDriverContext
{
private static WebDriverContext _instance;
private IWebDriver _webDriver = null;
private WebDriverContext()
{
}
public static WebDriverContext getInst... |
Markdown | UTF-8 | 3,552 | 3.09375 | 3 | [] | no_license | # piTunes monorepo [](https://github.com/bernhardfritz/pitunes/actions/workflows/ci.yml)
<img src="pitunes.png" align="right">
Host your music yourself and stream it from anywhere using a web browser.
* Password protected
* Encrypted H... |
Java | UTF-8 | 2,106 | 1.890625 | 2 | [
"Apache-2.0"
] | permissive | package com.service.Impl;
import java.util.List;
import org.apache.catalina.util.CharsetMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.controller.LoginController;
import com.mapper.pojo.Cart;
import com.mapper.pojo.CartExample;
import c... |
Markdown | UTF-8 | 33,180 | 2.65625 | 3 | [] | no_license | # 大标题
## 二级标题
### 三级标题
* 记住*的作用
- 记住-的作用
# Html 部分
### 7月17日
* 注册 github
* 开始使用Markdown格式文件
### git操作
* git add . 暂存文件夹下所有文件 git add <文件名> 暂存该文件
* git commit -m "提交信息" 把代码提交到本地
* git push 将代码提交到远程
### vscode的操作
* crtl + a 选中所有, alt + shift + f 格式化代码, crtl + f 查找, crtl + s 保存代码
### 7月22号
* 链接分类 锚点... |
Java | UTF-8 | 5,062 | 2.328125 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2006 The eFaps Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... |
C | UTF-8 | 3,673 | 3.515625 | 4 | [] | no_license | /**
* 动态数组的实现
*
*/
#include <stdio.h>
#include <stdlib.h>
#include "darray.h"
struct _DArray
{
void** data;
int size;
int alloc_size;
void* data_destroy_ctx;
DataDestroyFunc data_destroy;
};
static void darray_destroy_data(DArray* thiz, void* data)
{
if(thiz->data_destroy != NULL) {
thiz->data_d... |
C# | UTF-8 | 3,821 | 2.765625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EmawEngineLibrary.Messaging;
using EmawEngineLibrary.Terrain;
using Microsoft.Xna.Framework;
namespace EmawEngineLibrary.Physics
{
public class CollisionManager : GameComponent, ICollisionManager
{
/// <summary... |
Swift | UTF-8 | 4,793 | 2.546875 | 3 | [] | no_license | //
// RegisterPageViewController.swift
// run 2 gether
//
// Created by Shahd Alblu on 10/8/1438 AH.
// Copyright © 1438 Shahd Alblu. All rights reserved.
//
//refrence https://www.letsbuildthatapp.com/
import UIKit
import Firebase
import FirebaseAuth
import FirebaseDatabase
import MapKit
class RegisterPageViewCo... |
Java | UTF-8 | 376 | 1.585938 | 2 | [] | no_license | package io.appform.oncall24x7;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.NotEmpty;
/**
* Secrets for slack connectivity
*/
@Data
@NoArgsConstructor
public class SlackSecrets {
@NotEmpty
private String clientId;
@NotEmpty
private String clientSec... |
Python | UTF-8 | 4,894 | 2.53125 | 3 | [] | no_license | import autograd.numpy.random as npr
from rnn_fun import *
class Weights(object):
def __init__(self, w_config, w_init_scale):
self.w_num = 0
self.idxs_and_shapes = {}
self.config = w_config
self.init_scale = w_init_scale
self.data = False
for config in self.config:
... |
JavaScript | UTF-8 | 309 | 3.625 | 4 | [] | no_license | const countLetters = function(string) {
const result = {};
for (const char of string) {
if (char === ' ') {
continue;
}
if (char in result) {
result[char] += 1;
} else {
result[char] = 1;
}
}
return result;
};
console.log(countLetters("lighthouse in the house")); |
Java | UTF-8 | 3,191 | 2.140625 | 2 | [
"Apache-2.0"
] | permissive | package com.aplex.webcan;
import java.util.Iterator;
import java.util.List;
import android.app.ActivityManager;
import android.app.Application;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import com.aplex.webc... |
JavaScript | UTF-8 | 2,585 | 4.46875 | 4 | [] | no_license | //ЗАДАНИЕ
//Напиши скрипт со следующим функционалом:
//При загрузке страницы пользователю предлагается в prompt ввести число. Ввод сохраняется в переменную input и добавляется в массив чисел numbers.
//Операция ввода числа пользователем и сохранение в массив продолжается до тех пор, пока пользователь не нажмет Cancel ... |
Java | UTF-8 | 6,162 | 2.28125 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright (c) 2010-2014 Sonatype, Inc. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/lic... |
Java | ISO-8859-2 | 3,421 | 2.609375 | 3 | [] | no_license | package br.com.project.geral.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bi... |
JavaScript | UTF-8 | 371 | 2.59375 | 3 | [] | no_license | "use strict";
const fs = require("fs"), spawn = require("child_process").spawn, filename = "target.txt";
try {
if (!filename)
throw Error("A file must be specified or it exists");
fs.watch(filename, () => {
const ls = spawn("ls", ["-l", "-h", filename]);
ls.stdout.pipe(process.stdo... |
Java | UTF-8 | 2,783 | 2.84375 | 3 | [] | no_license | package com.test.app.factory;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import com.test.app.bootstrap.DataModel;
import com.test.app.exception.InvalidOrderException;
public class BeverageFactory {... |
Swift | UTF-8 | 1,936 | 2.734375 | 3 | [] | no_license | //
// MealDBAAPIClientTests.swift
// MealDBAppTests
//
// Created by Aldrich Co on 7/17/20.
// Copyright © 2020 Aldrich Co. All rights reserved.
//
import XCTest
@testable import MealDBApp
class APIClientTests: XCTestCase {
func testGetIngredients() {
let expect = expectation(description: "api response re... |
C++ | GB18030 | 1,629 | 4.125 | 4 | [] | no_license | #include<iostream>
#include<vector>
using namespace std;
/*
ԭ⣺Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only constant space. You may not modify the values in the list, only nodes itself can... |
Java | UTF-8 | 889 | 2.28125 | 2 | [] | no_license | package com.rutine.troubleshoot.index;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.RepeatedTest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
/**
* @author rutine
* @date 2020/1/15 13:51
*/
@SpringJUnitC... |
Markdown | UTF-8 | 1,263 | 2.8125 | 3 | [] | no_license | # A (nearly) offline map
Based on: leaflet.js, mapbox

You should be able to run this example **out of the box** after you put in your own Mapbox API key.
An offline map in one html file, without having to run a (localhost) server: explore geospatial data without having to upl... |
Markdown | UTF-8 | 11,985 | 3.140625 | 3 | [] | no_license | WebScript Coursework 3 - University Of Portsmouth
Student Number: UP837518
The purpose of my dashboard was to create a general business purpose
environment. I chose this because based on the mark scheme we want to
attempt to have some sort of industry standard for things like our
design, to which I though... |
Go | UTF-8 | 1,508 | 3.59375 | 4 | [
"MIT"
] | permissive | package bytecode
import (
"encoding/binary"
"io"
)
// Writer is used to serialize as3 bytecode
type Writer interface {
io.Writer
WriteU8(uint8) error
WriteU16(uint16) error
WriteS24(int32) error
WriteU30(uint32) error
WriteU32(uint32) error
WriteS32(int32) error
WriteD64(float64) error
}
type writer struct... |
C# | UTF-8 | 848 | 2.6875 | 3 | [] | no_license | using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class WalkAction : Actions
{
Actor actorWalking;
public override void Initialise(Actor actorActingThisAction)
{
actorWalking = actorActingThisAction;
}
public override bool Perform()
{... |
Markdown | UTF-8 | 2,431 | 3.015625 | 3 | [] | no_license | ## Introduction
Lychee was originally developed by [electerious][1] ([Tobias Reich][2]). Lychee aims to be a great looking and easy-to-use photo-management-system that nearly anyone can use on their web server.
Since April 1st, 2018 this project has moved to it's own Organisation (LycheeOrg) where people are able to ... |
JavaScript | UTF-8 | 3,124 | 4.0625 | 4 | [
"MIT"
] | permissive |
var student = {
"name": "Bob",
"pizzaPreference": "black olives and mushrooms",
"grades": {
"html": [90, 77],
"css": [82],
"js": [91, 90, 89]
},
"languages": [
"html", "css", "js"
],
"cars": [
{
"make": "honda",
"model": "... |
Markdown | UTF-8 | 5,364 | 2.96875 | 3 | [] | no_license | # Instalación
Existe dos versiones de Docker, una libre y otra que no lo es. Nos ocuparemos exclusivamente de la primera: [Docker CE (Community Edition)](https://docs.docker.com/install/).
## Disponibilidad
Docker CE está disponible para los siguientes sistemas GNU/Linux: CentOS, Debian, Fedora y Ubuntu. No todas es... |
Shell | UTF-8 | 1,368 | 3.109375 | 3 | [
"Apache-2.0"
] | permissive | pkg_name=sudo
pkg_origin=core
pkg_version=1.9.8p2
pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
pkg_description="Execute a command as another user"
pkg_upstream_url=https://www.sudo.ws/
pkg_license=('ISC')
pkg_source="https://www.sudo.ws/dist/${pkg_name}-${pkg_version}.tar.gz"
pkg_shasum=9e3b8b8da7def43b... |
PHP | UTF-8 | 8,078 | 2.640625 | 3 | [] | no_license |
<?php
class calendar {
protected $_db;
protected $_global;
protected $_reminderText = array("0" => "At Time of Start", "5" => '5 Minute before start', "15" => '15 Minute before start', "30" => '30 Minute before start', "60" => '1 Hour before start', "120" => '2 Hours before start', "1440" => '1 Day befor... |
Python | UTF-8 | 249 | 3.484375 | 3 | [] | no_license | def testEqual(output, expected_out):
if output == expected_out:
print("Pass")
return True
else:
print("Wanted this: ", expected_out)
print("Got this crap: ", output)
print("Fail")
return False
|
C++ | UTF-8 | 5,670 | 3.4375 | 3 | [] | no_license | #include <iostream>
#include<vector>
#include<queue>
#include<stack>
#include "State.h"
#include "Node.h"
#include<string>
#include <stdlib.h>
#include<time.h>
#include<unordered_set>
#include<map>
State setManualInitialState();
void Astar(Node initNode,State goalState);
pair<State, State> problemGenerator(int, int)... |
JavaScript | UTF-8 | 17,428 | 3.0625 | 3 | [
"MIT"
] | permissive | /* first serious attempt at an Isopath AI:
* - based on a negamax search, but cutting down the search space
* by not searching every possibility of tile placement
* - algorithm is mostly as intended, but efficiency is poor
*/
function Sirius(isopath, searchdepth) {
this.isopath = isopath;
this.searchd... |
Java | UTF-8 | 4,212 | 2.296875 | 2 | [] | no_license | package com.modularity.common.base;
import android.annotation.TargetApi;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import com.readystatesoft... |
C++ | ISO-8859-1 | 3,069 | 3 | 3 | [] | no_license | #pragma once
#include "ceMath.h"
namespace ceEngineSDK
{
class CE_UTILITY_EXPORT ceVector2D
{
public:
float X;
float Y;
/************************************************************************************************************************/
/* Constructores y Destructores ... |
Python | UTF-8 | 5,019 | 2.546875 | 3 | [
"MIT"
] | permissive | import argparse
from pathlib import Path
from typing import Dict
import pandas as pd
from emotion_recognition.stats import alpha
emotion_map = {
'A': 'anger',
'D': 'disgust',
'F': 'fear',
'H': 'happy',
'S': 'sad',
'N': 'neutral',
}
def write_labelset(name: str, labels: Dict[str, str]):
... |
C | UTF-8 | 927 | 3.546875 | 4 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
void printid(int space,int tata);
void tab(int num);
int main()
{
int i;
int parent;
printid(0,getpid());
for(i=0;i<3;i++)
{
parent=fork();
switch (parent)
{
case -1:
perror(... |
C++ | UTF-8 | 2,838 | 3.515625 | 4 | [] | no_license | // Шаблоны: класс размерной величины
// !!! ВЫПОЛЕНЫ ВСЕ УПРАЖНЕНИЯ !!!
#include <iostream>
//Упражнение 1
// метр килограмм секунда ампер кельвин моль кандела
//Упражнение 3,4,5
//Перегрузка операторов
template<int L, int M, int T, int I, int K, int N, int J>
class DimQ {
double value;
public:
DimQ(d... |
C++ | UTF-8 | 666 | 2.90625 | 3 | [] | no_license |
#include<bits/stdc++.h>
using namespace std;
#define lli long long int
lli maxSubArraySum(lli a[], lli size)
{
lli max_so_far = INT_MIN, max_ending_here = 0;
for (lli i = 0; i < size; i++)
{
max_ending_here = max_ending_here + a[i];
if (max_so_far < max_ending_here)
max_so_far = max_ending_h... |
Java | UTF-8 | 583 | 1.710938 | 2 | [] | no_license | package com.cyriii.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cyriii.entity.OutStoreInfo;
import com.cyriii.entity.OutStoreInfoVO;
import com.cyriii.entity.PageVO;
public interface OutStoreInfoService extends IService<OutStoreIn... |
Go | UTF-8 | 1,343 | 2.828125 | 3 | [] | no_license | package main
import (
"context"
"log"
"strings"
"time"
)
// AuthEvent is the payload of a Firestore Auth event.
type AuthEvent struct {
Email string `json:"email"`
Metadata struct {
CreatedAt time.Time `json:"createdAt"`
} `json:"metadata"`
UID string `json:"uid"`
}
// HelloAuth is triggered by Firestor... |
SQL | UTF-8 | 652 | 3.125 | 3 | [
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-proprietary-license",
"MIT"
] | permissive | # chromAlias.sql was originally generated by the autoSql program, which also
# generated chromAlias.c and chromAlias.h. This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly
# automatic way.
#correspondence of UCSC chromosome names to refseq, genbank, and ensembl... |
Java | UTF-8 | 1,258 | 2.6875 | 3 | [] | no_license | package com.packtpub.springhibernate.ch06.list.xml;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import java.util.List;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.junit.Test;
public class UnitTest {
... |
Java | UTF-8 | 12,876 | 1.742188 | 2 | [] | no_license | package com.example.chatbase;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.annotation.SuppressLint;
import android.cont... |
SQL | UTF-8 | 575 | 3.84375 | 4 | [] | no_license | -- ORIGINAL TO ALTER:
-- DROP PROCEDURE IF EXISTS legsCount;
-- CREATE PROCEDURE legsCount()
-- SELECT [..] as summary_legs
-- FROM creatures
-- ORDER BY id;
-- SOLUTION:
DROP PROCEDURE IF EXISTS legsCount;
CREATE PROCEDURE legsCount()
SELECT SUM(CASE WHEN type='human' THEN 2 ELSE 4 END) as summary_le... |
C | UTF-8 | 2,007 | 4.09375 | 4 | [] | no_license | #include<stdio.h>
#include<math.h>
int sum();
double div();
int mult();
int subs();
int power();
int main(){
printf("\nPlease Enter two number for sum\n");
printf("Sum\n");
sum();
printf("Multiply\n");
mult();
printf("Division\n");
div();
printf("Substraction\n");
subs();
... |
C++ | UTF-8 | 704 | 2.765625 | 3 | [] | no_license | #pragma once
#include <string>
using namespace std;
struct autor
{
int id;
string imie;
string nazwisko;
string data;
bool books;
autor* kolejny{};
void drukuj_a();
};
using Autor = autor * ;
struct ksiazka
{
int id_a;
string tytul;
string data;
string wydawnictwo;
ksiazka* kolejna{};
};
using... |
Java | UTF-8 | 3,199 | 2.203125 | 2 | [] | no_license | package cn.believeus.admin.controller;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.ServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import cn.believeus.model.Admin;
import cn.be... |
Go | UTF-8 | 948 | 2.515625 | 3 | [
"MIT"
] | permissive | package player
import (
"fgame/fgame/game/player"
playertypes "fgame/fgame/game/player/types"
welfaretemplate "fgame/fgame/game/welfare/template"
"time"
)
const (
taskRefreshTime = time.Second * 20
)
//运营活动刷新数据
type RefreshActivityTask struct {
pl player.Player
}
func (t *RefreshActivityTask) Run() {
welfare... |
Java | UTF-8 | 14,018 | 1.953125 | 2 | [] | no_license | package com.app.hci.flyhigh;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.ColorStateList;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.os.AsyncTask;
import android.os.Bundle;
import... |
Python | UTF-8 | 2,559 | 2.890625 | 3 | [
"Apache-2.0"
] | permissive | """
mysql数据库连接配置
"""
import pymysql.cursors
from os.path import abspath, dirname
import configparser as cparser
# ======== Reading db_config.ini setting ===========
base_dir = dirname(dirname(abspath(__file__)))
base_dir = base_dir.replace('\\', '/')
file_path = base_dir + "/Config/db_config.ini"
cf = cparser.ConfigP... |
C++ | UTF-8 | 8,859 | 2.78125 | 3 | [
"MIT"
] | permissive | #pragma once
#include <functional>
#include <vector>
#include <string>
#include "CUtilJson.h"
#include "SCueSheet.h"
class CDbDiscogsElem : protected CUtilJson
{
friend class CDbDiscogs;
public:
CDbDiscogsElem(const std::string &data, const int disc=1, const int offset=0);
CDbDiscogsElem(const std::strin... |
JavaScript | UTF-8 | 3,362 | 2.734375 | 3 | [] | no_license | $(document).ready(function () {
$("#btnExit").click(function () {
$("#page").fadeOut(2000);
$("#goodbye").delay(1000).show(2000);
function convertToC() {
var far = parseFloat(document.getElementById('far').value);
var cel = (fTempVal - 32) * (5 / 9);
document.getElementById('cel').... |
Python | UTF-8 | 571 | 3.8125 | 4 | [] | no_license | """Problem 34: Improve the above program to print the words in the descending order of the number of occurrences."""
def word_frequency(words):
frequency = dict()
for w in words:
frequency[w] = frequency.get(w, 0) + 1
return frequency
def read_words(filename):
return open(filename).read().split()
def sortf... |
C++ | UTF-8 | 1,728 | 3.78125 | 4 | [] | no_license | // CPS 271 Machine Problem 4
// Name: Amy Calliham
// Student ID: 00683394
// Purpose of Program: Create point, circle, and cylinder classes to demonstrate knowledge of inheritance and composition.
// Allow user to input data about each object, calculate and print data
#include <iostream>
#include <string>
#inc... |
Python | UTF-8 | 1,121 | 3.71875 | 4 | [] | no_license | def auto_fill_column(rows, column_name):
"""
Take a column name (for exm: 'Title')
and list of columns that follows this pattern:
Title Actor ...
The Huge Wave John Doe ...
Alice Doe ...
Ka... |
Python | UTF-8 | 4,761 | 2.875 | 3 | [
"MIT"
] | permissive | import argparse
import torchvision
from torchvision.models.alexnet import alexnet
import Model
import data_loader
import torch
import torchvision
parser = argparse.ArgumentParser(
description='This for training a network you choose.\n First, you need an existing available architecture to load such as VGG16 or VGG1... |
Java | UTF-8 | 1,774 | 2.28125 | 2 | [] | no_license | package net.castelluciv.asynchttpsample.controller;
import net.castelluciv.asynchttpsample.controller.handler.MovieHandler;
import net.castelluciv.asynchttpsample.model.Movie;
import net.castelluciv.asynchttpsample.repository.MovieRepository;
import java.util.concurrent.CompletableFuture;
import org.asynchttpclient.As... |
Python | UTF-8 | 4,134 | 2.9375 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Sat Dec 15 16:07:39 2018
@author: Sabya
"""
from __future__ import print_function, division
from builtins import range
import numpy as np
import matplotlib.pyplot as plt
class Hidden(object):
def __init__(self,fanin,fanout):
self.W = np.random.randn(fanin,... |
C | UTF-8 | 10,968 | 2.640625 | 3 | [] | no_license | /*
* file : ftp_curl.c
* desc : ftp functions based on libcurl, modified from libcurl examples
* author : Peter Xu
* time : 2009.10.11
*/
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <errno.h>
#include <time.h>
#include <stdarg.... |
Python | UTF-8 | 23,942 | 2.609375 | 3 | [
"MIT"
] | permissive | # -*- encoding:utf-8 -*-
"""封装常用的分析方式及流程模块"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import os
import matplotlib.cbook as cbook
import matplotlib.pyplot as plt
import numpy as np
from scipy import interp
from sklearn import metrics
... |
TypeScript | UTF-8 | 1,411 | 2.546875 | 3 | [] | no_license | import { Injectable } from '@angular/core';
import { SQLite, SQLiteObject } from '@ionic-native/sqlite';
@Injectable()
export class DbProvider {
db : SQLiteObject = null;
constructor( public sqlite: SQLite ) {
console.log('Hello DbProvider Provider');
}
public openDb(){
return this.sqlite.create({... |
Shell | UTF-8 | 2,591 | 2.546875 | 3 | [] | no_license | #!/bin/bash
# chemin vers les fichiers muxa pour se connecter aux cartes
PATH_XML_MUXA_FSP_ECU=/home/ft055062/prog/4g/all_hyper/HYPER-FSP-ECU/muxa-FSP-ECU-V01R03.xml
PATH_XML_MUXA_SSM_ECU=/home/ft055062/prog/4g/all_hyper/HYPER-SSM-ECU/HYPER-SSM-ECU-V01R05/muxa-SSM-ECU-V01R05.xml
PATH_XML_MUXA_MB_SPU=/home/ft055062/pro... |
Go | UTF-8 | 669 | 3.0625 | 3 | [] | no_license | package main
import (
"../utils"
"fmt"
)
func maxPoints(points [][]int) int {
n := len(points)
if n < 3 {
return n
}
res := 0
for i,point1 := range points {
hash := make(map[float64]int)
for j, point2 := range points {
if i != j {
hash[lineSlope(point1,point2)]++
}
}
for _, v := range hash ... |
Markdown | UTF-8 | 3,139 | 2.78125 | 3 | [] | no_license | # RDS Relational Database Service
RDS is PARTIALLY MANAGED service, Dynamo is FULLY MANAGED Service
RDS can have public IP Address and be access from the internet.
When deplying to VPC - VPC must have at least one subnet in at least 2 AZ
## Supported Engines
- MySQL
- Postgres
- MariaDB
- Oracle
-... |
Rust | UTF-8 | 7,426 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | use super::util::{
table_is_array, table_is_timestamp, table_to_array, table_to_map, table_to_timestamp,
timestamp_to_table,
};
use crate::event::Value;
use rlua::prelude::*;
impl<'a> ToLua<'a> for Value {
fn to_lua(self, ctx: LuaContext<'a>) -> LuaResult<LuaValue> {
match self {
Value:... |
Markdown | UTF-8 | 683 | 2.578125 | 3 | [] | no_license | # Styled vs Scss

styled-component
* props에 의해 [변화](https://velog.io/@qksud14/portfolio-05)가 통제
scss
* BEM, OOCSS, ITCSS 등 방법론
#### **정리**
[https://www.reddit.com/r/reactjs/comments/my6dnw/styled\_components\_vs\_sass\_sheets/](https://www.r... |
Python | UTF-8 | 492 | 3.578125 | 4 | [] | no_license | companies = {}
while True:
command = input()
if 'End' in command:
break
company, employee = command.split(' -> ')
if company not in companies:
companies[company] = []
if employee not in companies[company]:
companies[company].append(employee)
ordered_companies = dict(sorted(... |
Java | UTF-8 | 4,182 | 1.976563 | 2 | [] | no_license | package me.osm.tools.translator.rest;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.util.Calendar;
import java.util.Set;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform... |
Java | UTF-8 | 5,605 | 2 | 2 | [] | no_license | package br.com.sicredi.backendtest.service;
import br.com.sicredi.backendtest.entity.Discussion;
import br.com.sicredi.backendtest.entity.Session;
import br.com.sicredi.backendtest.entity.Summary;
import br.com.sicredi.backendtest.exception.ConflictException;
import br.com.sicredi.backendtest.exception.ExpectationExce... |
Swift | UTF-8 | 1,914 | 2.5625 | 3 | [
"MIT"
] | permissive | //
// DLFlowLayoutCollectionNode.swift
// NodeExtension
//
// Created by Daniel Lin on 08/09/2017.
// Copyright (c) 2017 Daniel Lin. All rights reserved.
//
import AsyncDisplayKit
open class DLFlowLayoutCollectionNode: ASCollectionNode {
public var numberOfColumns = 2
public init(collectionViewFlowL... |
C | UTF-8 | 7,420 | 2.671875 | 3 | [] | no_license |
#include "token.h"
#include "dynstring.h"
#include "dynarray.h"
#include "hash.h"
#include "stream.h"
#include "log.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
char ch;
int token;
struct TkWord *tk_hashtable[MAXKEY];
struct DynArray tktable;
struct DynString tkstr;
struct TkW... |
Java | UTF-8 | 495 | 3.375 | 3 | [] | no_license |
public class ConvertSortedArraytoBinarySearchTree {
public TreeNode sortedArrayToBST(int[] nums) {
return buildTree(nums, 0, nums.length-1);
}
private TreeNode buildTree(int[] nums, int start, int end) {
if(start > end) return null;
if(start == end) return new TreeNode(nums[start]);
int mid = s... |
Python | UTF-8 | 4,120 | 2.625 | 3 | [] | no_license | import Distance
import config
from RPi import GPIO
import time
import signal
import sys
config.init()
GPIO.setup(config.left_motor_pwm, GPIO.OUT)
GPIO.setup(config.left_motor_direction, GPIO.OUT)
GPIO.setup(config.left_motor_direction_inv, GPIO.OUT)
GPIO.setup(config.right_motor_pwm, GPIO.OUT)
GPIO.setup(config.right... |
Java | UTF-8 | 923 | 2.0625 | 2 | [] | no_license | package com.example.table;
public class Recipe {
private String Rno;
private String Rdate;
private String Mno;
private String Mname;
private String Pno;
private String Dno;
private String Moperator;
public String getRno() {
return Rno;
}
public void setRno(String rno) {
Rno = rno;
}
public String getRd... |
Python | UTF-8 | 1,034 | 3.234375 | 3 | [] | no_license | #!/usr/bin/env python
# -*- coding:utf-8 -*-
__author__ = 'sunjiyun'
from collections import defaultdict, OrderedDict
mydefaultDict = defaultdict(lambda: 'sunjiyun')
mydefaultDict["age"] = 31
mydefaultDict["name"] = "sunjiyun2"
print mydefaultDict['age']
print mydefaultDict['name']
print mydefaultDict.keys()
d = dict... |
Markdown | UTF-8 | 4,414 | 2.765625 | 3 | [
"MIT"
] | permissive | # Requirements
Aside from a CSV of document identifiers and their OCR'd text, you will need to have the latest versions of Go and Python 3 installed. As well as the python packages for `sqlite3` and `zlib`.
# Running a Signature Method
## Preparations
Given an input CSV file, run the `splitcsv` tool to split it into... |
Python | UTF-8 | 441 | 3.65625 | 4 | [] | no_license | #!/usr/bin/python
import sys
OPEN_BRACKET = '('
CLOSED_BRACKET = ')'
def calculate(brackets):
floor = 0
for bracket in brackets:
if bracket == OPEN_BRACKET:
floor += 1
elif bracket == CLOSED_BRACKET:
floor -= 1
return floor
if __name__ == '__main__':
with open... |
Markdown | UTF-8 | 1,189 | 2.609375 | 3 | [] | no_license | # django-meeting-room-book
Following the Pluralsight https://app.pluralsight.com/library/courses/django-getting-started/table-of-contents
The Github link for course material: https://github.com/codesensei-courses/django_getting_started
## instllation instructions
pip install -r requirements.txt
## Setups
```
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.