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 |
|---|---|---|---|---|---|---|---|
Go | UTF-8 | 550 | 2.828125 | 3 | [] | no_license | package main
import (
"fmt"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/mysql"
)
type myTable struct {
gorm.Model
MyColumn1 string
MyColumn2 Annotation
}
func main() {
connectionString := fmt.Sprintf("myconnectionString")
database, err := gorm.Open("mysql", connectionString)
if err != nil {... |
C++ | UTF-8 | 2,804 | 2.671875 | 3 | [] | no_license | #include <MilightTransport.h>
// default constructor
MilightTransport::MilightTransport(NRF24L01Simple &radioref): radio(radioref) {
}
// open an communicaiton channel for give (5 byte long) address
bool MilightTransport::openChannel (uint8_t* address, uint8_t len, uint8_t channel){
uint8_t rev_address[5];
reve... |
Ruby | UTF-8 | 513 | 4.59375 | 5 | [] | no_license | # Write a method called `palindrome?` which should accept a string as a parameter and return
# a boolean that indicates whether the string is a palindrome.
# A palindrome is a word that reads the same both forwards and backwards. Examples: eye, madam, racecar
# ```p palindrome?("racecar") #=> true
# p palindrome?("... |
Python | UTF-8 | 159 | 4.0625 | 4 | [] | no_license | def factors(n):
for i in range(1,n+1):
if (n%i==0):
print(i)
n=int(input("Enter the number"))
print("Factors of %d are"%n)
factors(n) |
Markdown | UTF-8 | 1,864 | 2.625 | 3 | [] | no_license | #
# 题目描述
<p>
<img border="0" src="/source/joyoi/tyvj-2697/img/aHR0cDovL3d3dy5qb3lvaS5jbi9wcm9ibGVtL3R5dmotMjY5Ny9wcm9ibGVtc19pbWFnZXMvMzE4Ni8xOTIwXzEuanBn.jpg"> </p>
# 输入格式
<p>
<img border="0" src="/source/joyoi/tyvj-2697/img/aHR0cDovL3d3dy5qb3lvaS5jbi9wcm9ibGVtL3R5dmotMjY5Ny9wcm9ibGVtc19pbWFnZXMvMzE4Ni8xOT... |
TypeScript | UTF-8 | 477 | 3.59375 | 4 | [] | no_license | interface Animal {
mover(distancia: number);
}
class Minhoca implements Animal {
mover(distancia: number) {
console.log('Minhoca rasteja ' + distancia + ' metros');
}
}
class Cavalo implements Animal {
mover(distancia: number) {
console.log('Cavalo trotou ' + distancia + ' metros');
... |
C++ | UTF-8 | 2,285 | 2.625 | 3 | [] | no_license | // This file is part of Barrel project. Read README for more information.
// Author: peuhkura@gmail.com
#include "Exporter.hpp"
#include <Grapevine/Core/Exception.hpp>
#include <iostream>
#include <fstream>
Exporter::Exporter()
{
}
Exporter::~Exporter()
{
}
void Exporter::addMesh(FBX2Vanda::Mesh* mesh)
{
meshes... |
C++ | UTF-8 | 3,778 | 2.609375 | 3 | [] | no_license | #include <entity/common.h>/*{{{*/
#include <entity/group_dim.h>
#include <entity/vector_dim.h>
#include <boost/lexical_cast.hpp>
#include <boost/tokenizer.hpp>
#include <boost/algorithm/string.hpp>
/*}}}*/
using namespace boost;
using namespace std;
namespace logs
{
namespace entity
{
/*}}}*/
vector_dimension::vec... |
Python | UTF-8 | 3,079 | 2.890625 | 3 | [] | no_license | #!/usr/bin/python3
import json
import time
import re
import requests
secrets_file = 'slack_secret.json'
f = open(secrets_file, 'r')
content = f.read()
auth_info = json.loads(content)
token = auth_info["access_token"]
f.close()
from slackclient import SlackClient
sc = SlackClient(token)
def Message_Match(user_ID, m... |
Java | UTF-8 | 2,362 | 2.0625 | 2 | [
"Apache-2.0"
] | permissive | package com.stylefeng.guns.modular.business.service;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.stylefeng.guns.modular.system.model.YddSealmail;
import com.baomidou.mybatisplus.service.IService;
import java.util.Date;
import java.util.List;
/**
* <p>
* 下件信息表 服务类
* </p>
*
* @author stylefen... |
PHP | UTF-8 | 877 | 2.796875 | 3 | [] | no_license | <?php
require_once './lib.php';
class SmsJob{
private $name;
private $mobile;
/**
* 预处理
*/
public function setUp(){
$this->name = $this->args['name'];
$this->mobile = $this->args['mobile'];
stdout('新注册用户信息:');
stdout('姓名:'.$this->name);
stdout('手机号:'... |
JavaScript | UTF-8 | 2,063 | 3.9375 | 4 | [] | no_license | // on body tag
function startGame() {
// 1 establish default 1st turn
document.turn = "👽";
// 2 display this message and switch it based on who's turn it is
setMessage(document.turn + " is up next!")
}
// 3 where that message gets displayed?
function setMessage(msg) {
document.getElementById("me... |
C# | UTF-8 | 11,566 | 2.578125 | 3 | [
"MIT"
] | permissive | /*
The MIT License (MIT)
Copyright (c) 2014 Kolibri
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publ... |
JavaScript | UTF-8 | 1,976 | 3.203125 | 3 | [
"MIT"
] | permissive |
$(document).ready(function(){
$("input[type='button']").click(function(){
//create an array for storing name ie quiz1 to quiz10
arr = [];
for (i = 1; i <= 10; i++) {
query = "quiz"+i;
arr.push(query);
}
//Do a form validation to check if all the questions have been answered
var inputs = document.getElem... |
JavaScript | UTF-8 | 2,781 | 3.34375 | 3 | [] | no_license | var rollsSlider = document.getElementById("rolls");
var rollsOutput = document.getElementById("rollsValue");
rollsOutput.innerHTML = rollsSlider.value;
rollsSlider.oninput = function() {
rollsOutput.innerHTML = this.value;
calculateRolls();
}
var daysSlider = document.getElementById("days");
var daysOutput = doc... |
C++ | UTF-8 | 504 | 2.828125 | 3 | [] | no_license | #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "../include/doctest.h"
#include "../src/word_treatment.h"
using namespace std;
TEST_CASE("split") {
vector <string> expected = {"teste", "123", "456"};
CHECK(split("teste 123 456", " ") == expected);
}
TEST_CASE("treat") {
string a = "aBcDe";
treat... |
PHP | UTF-8 | 1,137 | 2.75 | 3 | [] | no_license | <?php
namespace FormBuilder;
use \SER\BSPA\Form\FormBuilder;
use \SER\BSPA\Form\StringField;
use \SER\BSPA\Form\TextField;
use \SER\BSPA\Form\SelectField;
use \SER\BSPA\Form\MaxLengthValidator;
use \SER\BSPA\Form\NotNullValidator;
class AdminCommentFormBuilder extends FormBuilder
{
public function build()
{
... |
JavaScript | UTF-8 | 645 | 2.734375 | 3 | [] | no_license | const ADD_MESSAGE = 'reducers/chat/add-message';
export function addMessage(message, human) {
return {
type: ADD_MESSAGE,
message,
human,
};
}
function addMessageReducer(state, action) {
const message = {
type: 'message',
id: state.messages.length,
message: action.message,
human: act... |
C++ | UTF-8 | 978 | 2.78125 | 3 | [
"MIT"
] | permissive | #include <math.h>
#include <string>
#include <algorithm>
#include <queue>
#include <vector>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int i, n, escalador, ngrupos, tammin, tammax, tamtemp, vlento, flag;
while (1) {
cin >> n;
if (!n) {
return 0;
}
tammin... |
Java | UTF-8 | 948 | 2.21875 | 2 | [
"MIT"
] | permissive | package com.baeldung.logging;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import... |
Java | UTF-8 | 1,865 | 2.671875 | 3 | [] | no_license | package com.example.david.reddit_android;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import android.util.Log;
public ... |
Python | UTF-8 | 799 | 2.578125 | 3 | [] | no_license | from Cube import *
from Configurator import *
from itertools import product
import cPickle
repo_filename = 'repo.dat'
def get_repo(filename):
try:
f = open(filename, 'r')
except:
return create_repo(filename)
return cPickle.load(f)
def create_repo(filename, depth=4):
repository = ... |
C# | UTF-8 | 3,058 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace Ver
{
public sealed class AssemblyVersionWriter : IAssemblyVersionWriter
{
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
private const string VersionS... |
Java | UTF-8 | 588 | 1.867188 | 2 | [] | no_license | package com.freetsinghua.redisdemo2;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
/** @author z.tsinghua */
@SpringBootAppli... |
JavaScript | UTF-8 | 4,788 | 2.703125 | 3 | [] | no_license | import React, { Fragment, useEffect, useState } from "react";
import formData from "./data.json";
export default () => (
<>
<h1>Welcome to React Parcel Micro App!</h1>
<p>Hard to get more minimal than this React app.</p>
<Form formData={formData} />
</>
);
const Form = ({ formData }) => {
const [pa... |
Markdown | UTF-8 | 6,923 | 3.625 | 4 | [
"MIT"
] | permissive | # let,const와 블록레벨 스코프
## 1. var 키워드 문제점
> 같은 스코프 내에서 변수를 중복 선언하면 나중에 작성된 변수 선언문은 자바스크립트 엔진에 의해 var 키워드가 없는 것처럼 동작한다. 이때 에러는 발생하지 않는다.
### 1.1. 변수 중복선언 가능
> 만약 동일한 변수 이름이 이미 선언되어 있는 것을 모르고 변수를 중복 선언하면서 값까지 할당했다면 의도치 않게 먼저 선언된 변수값이 변경되는 부작용이 발생한다. 따라서 **변수의 중복 선언은 문법적으로 허용되지만 사용하지 않는 것이 좋다.**
### 1.2. 함수레벨 스코프
> var 변수는... |
Java | UTF-8 | 2,620 | 2.28125 | 2 | [] | no_license | package com.jekirdek.client.dto;
import java.io.Serializable;
import java.util.Date;
import com.google.gwt.user.client.rpc.IsSerializable;
public class DocumentGrid implements IsSerializable, Serializable {
private static final long serialVersionUID = -859340668983893170L;
private String documentNa... |
Shell | UTF-8 | 189 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | #!/bin/bash
echo ${TILER_LIB} | wget --no-use-server-timestamps --base=`cat $TILER_URL` --input-file=- -O lib/libtile.a
if [ $? != 0 ]; then
rm $TILER_URL
rm -f lib/libtile.a
exit 1
fi
|
C | UTF-8 | 186 | 3.25 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
void insertnodetotail(struct node *head,struct node *new)
{
while(head->next!=NULL)
{
head=head->next;
}
head->next=new;
new->next=NULL;
}
|
TypeScript | UTF-8 | 2,164 | 2.59375 | 3 | [
"MIT"
] | permissive | import * as Faker from "faker"
import { IFakerOption, IPluginMessage } from "./faker"
figma.showUI(__html__, { height: 340, width: 240 })
const textNodes: TextNode[] = []
function traverseNodes(parentNode: SceneNode) {
if (parentNode.type === "TEXT") {
textNodes.push(parentNode)
} else if ("children" in pare... |
C++ | UTF-8 | 591 | 2.640625 | 3 | [] | no_license | void setup() {
Serial.begin(115200);
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
if (Serial.available()){
Serial.read();
// char inChar = Serial.read();
// Serial.println(inChar);
// int num = Serial.parseInt();
// Serial.println(num);
// if (inChar == '1'){
// Serial.print... |
Java | ISO-8859-1 | 2,716 | 2.859375 | 3 | [] | no_license | package de.dhbw.muehle.model.database;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.Date;
public class dbconnection {
Connection c;
Statement stmt;
public dbconnection(){
Conne... |
Java | UTF-8 | 2,603 | 2.078125 | 2 | [] | no_license | package com.workana.bluecare;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.KeyguardManager;
import android.app.KeyguardManager.KeyguardLock;
import android.content.Context;
import android.os.Bundle;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
impo... |
Markdown | UTF-8 | 7,199 | 2.75 | 3 | [
"LicenseRef-scancode-public-domain",
"CC0-1.0"
] | permissive | ##### cc) Des Propheten Jehu Gerichtsdrohung gegen Baesa
__16__
<sup>1</sup>Da erging das Wort des HERRN an Jehu, den Sohn Hananis, gegen Baesa also:
<sup>2</sup>»Weil ich dich aus dem Staub erhoben und dich zum Fürsten über mein Volk Israel gemacht habe, du aber auf dem Wege Jerobeams gewandelt bist und mein Volk Isr... |
Java | UTF-8 | 4,380 | 2.046875 | 2 | [] | no_license | package com.king.block.user;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.Toast;
import com.king.block.Global;
import com.king.block.R;
im... |
Java | UTF-8 | 2,578 | 2.453125 | 2 | [] | no_license | package com.sxzhongf.mscx.passbook.security;
import com.sxzhongf.mscx.passbook.constant.Constants;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
import javax.s... |
Java | UTF-8 | 1,328 | 3.828125 | 4 | [] | no_license | package Offer;
import org.junit.Test;
import java.util.Stack;
/**
* 剑指 Offer 09. 用两个栈实现队列
* 用两个栈实现一个队列。队列的声明如下,请实现它的两个函数 appendTail 和 deleteHead ,分别完成在队列尾部插入整数和在队列头部删除整数的功能。(若队列中没有元素,deleteHead 操作返回 -1 )
*
*/
public class LCFO09 {
@Test
public void test(){
CQueue obj = new CQueue();
... |
C | UTF-8 | 708 | 3.390625 | 3 | [] | no_license | #include <stdlib.h>
#include <stdio.h>
#include <float.h>
#include <limits.h>
#include "rand.h"
int
main(int argc, char *argv[])
{
unsigned i, n = 30;
double x;
double sum0 = 0, sum1 = 0, sum2 = 0;
double xmin = DBL_MAX;
double xmax = -DBL_MAX;
struct rand *rng = rand_new();
... |
C++ | UTF-8 | 5,233 | 3.34375 | 3 | [] | no_license | #include <fstream>
#include <string>
#include <sstream>
#include <iostream>
#include <numeric>
#define partOne False
using namespace std;
int get_size(string filename)
{
// Open the file
ifstream file(filename);
if(file.fail())
{
cout << "No suck file.\n";
return 0;
}
// Read... |
Markdown | UTF-8 | 915 | 3.859375 | 4 | [] | no_license | # Intersection of Two Linked Lists
```java
public class Solution {
public ListNode getIntersectionNode(ListNode headA, ListNode headB) {
int lenA = 0;
ListNode iterA = headA;
while (iterA != null) {
lenA++;
iterA = iterA.next;
}
int len... |
C++ | UTF-8 | 708 | 2.859375 | 3 | [] | no_license | //
// Created by Ruud Andriessen on 13/05/2017.
//
#include "Midpoint.h"
void Midpoint::simulateStep(System *system, float h) {
// Get the initial state
VectorXf oldState = system->getState();
// Evaluate a deriv step
VectorXf deriv = system->derivEval();
// Compute the halfway point
Vector... |
Java | UTF-8 | 785 | 1.929688 | 2 | [] | no_license | package pt.isep.nsheets.server.lapr4.green.s1.ipc.n1160818.userAuthentication.persistence;
import pt.isep.nsheets.server.lapr4.white.s1.core.n4567890.workbooks.persistence.PersistenceSettings;
import java.util.Properties;
/**
* @author Rui Almeida<1160818>
*/
public class GetPropertiesService {
/**
* Get... |
PHP | UTF-8 | 558 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Poppy\System\Events;
use Illuminate\Auth\SessionGuard;
use Poppy\System\Models\PamAccount;
/**
* 登录成功事件
*/
class LoginSuccessEvent
{
/**
* @var PamAccount 用户账户
*/
public $pam;
/**
* @var string 平台
*/
public $platform;
/**
* @var SessionGuard|null
... |
PHP | UTF-8 | 657 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class RolesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
for ($i=0; $i < 4; $i++) {
$rec = new App\Role;
if($i==0){
$rec->name = 'The highest ... |
Java | UTF-8 | 758 | 3.59375 | 4 | [] | no_license | package p1sortandsearch.sortofcomparison;
import java.util.Calendar;
import java.util.Date;
public class MainTest {
public static void integerInner(Integer x) {
x = new Integer(3);
}
public static void stringInner(String x) {
x = new String("4");
}
public static void dateInner(... |
SQL | UTF-8 | 1,138 | 3.546875 | 4 | [] | no_license | /**
This is the main script for `comment system` application
@author : AQM Saiful Islam
*/
DROP DATABASE IF EXISTS commentSystem;
CREATE DATABASE commentSystem;
USE commentSystem;
DROP TABLE IF EXISTS `posts`;
CREATE TABLE `posts` (
`post_Id` int(11) NOT NULL AUTO_INCREMENT,
`post_title` varchar(200) DEFAULT... |
SQL | UTF-8 | 4,458 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10.10
-- http://www.phpmyadmin.net
--
-- Máquina: 127.3.135.130:3306
-- Data de Criação: 14-Jul-2015 às 06:50
-- Versão do servidor: 5.5.41
-- versão do PHP: 5.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE... |
Java | UTF-8 | 1,490 | 2.1875 | 2 | [] | no_license | package com.example.intel.kospenmove02.db;
import android.arch.persistence.room.Database;
import android.arch.persistence.room.Room;
import android.arch.persistence.room.RoomDatabase;
import android.content.Context;
/*
|
| Singleton Pattern - for Database instance
|
*/
@Database(entities = {Kospenuser.class, Scree... |
Ruby | UTF-8 | 1,342 | 4.84375 | 5 | [] | no_license | #Exercise 1
# Create an emotions hash, where the keys are the names of different human emotions and the values are the degree to which the emotion is being felt on a scale from 1 to 3.
emotions_hash = {
:happy => 1,
:sad => 3,
:excited => 2,
:angry => 1
}
#Exercise 2
#Write a Person class with the follow... |
Java | UTF-8 | 8,113 | 1.851563 | 2 | [
"Apache-2.0"
] | permissive | package com.chocozhao.wanandroid.mvp.ui.fragment;
import android.content.Intent;
import android.os.Bundle;
import android.os.Message;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.GridLayoutManager;
import... |
C++ | UTF-8 | 1,310 | 3.359375 | 3 | [] | no_license | #include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<int> GetNextArray(string str)
{
if(str.length() == 1)
{
vector<int> next = {-1};
return next;
}
vector<int> next(str.length(),0);
next[0] = -1;
next[1] = 0;
int i = 2;
int cn = 0;
w... |
Java | UTF-8 | 423 | 2.609375 | 3 | [] | no_license | package com.twj.gfx;
public class GeometryUtils {
public static double pointToPlaneDistance(Vector4d point, Vector4d plane) {
return plane.dotProduct(point);
}
public static Vector4d getPlaneFromPolygon(Polygon polygon) {
double D = polygon.D();
Vector4d normal = polygon... |
Python | UTF-8 | 1,378 | 2.6875 | 3 | [] | no_license | import cv2
import numpy as np
from UserInterface.rescaleImageToUser import rescaleImageToUser
from UserInterface.rescaleImageToUser import rescalePosToUser
from UserInterface.rescaleImageToUser import rescaleCounur
from Tracking.GetPositionFromContour import getPositionFromContour
#Pre1: list of objects
#Pre2: frame
d... |
Markdown | UTF-8 | 1,045 | 2.796875 | 3 | [] | no_license | # 1.什么是DevOps ?
1.一组过程方法与系统的统称,用于促进开发、运维和质量保障部门之间的沟通、协作与整合
2.一种文化转变,或者说是一个鼓励很好的交流和协作,以便于更好的构建可靠性更高、质量
更好的软件的运动
3.一种能力,具备此能力的团队可以高质量,快速的交付软件产品 或服务
解决的主要问题:按时、快速、高质量的交付软件产品和服务
通过流程的自动化,节约成本
*答案请使用斜体*
# 2.用原生JS实现传入CSS代码改变样式。
*答案请使用斜体*
**题目来源是前端面试题,不强制写答案,大家自己对自己负责,希望大家去了解。请求合并信息写明姓名。**
```javascript
//此处编... |
JavaScript | UTF-8 | 1,238 | 4.5 | 4 | [] | no_license | /* Couting Sort implementation in JavaScript */
function countingSort(arr) {
var i,
min = 0,
index = 0,
aux = [],
sortedArray = [];
var maxVal = Math.max.apply(null, arr); //If the max value of the array given, this line can be removed
for (i = min; i <= maxVal; i++) { //initializing the auxiliary array wi... |
Markdown | UTF-8 | 2,277 | 3.21875 | 3 | [] | no_license | # Master Lock Speed Dial(r) lock simulation
Master Lock's Speed Dial(r) combination lock is a readily available,
affordable, and reasonably secure combination lock. I wanted to
better understand the combination space of this lock (and just its
functionality) a little better.
This simulator exhausts the combination s... |
Python | UTF-8 | 18,579 | 2.875 | 3 | [] | no_license | import math
import numpy as np
import matplotlib.pyplot as plt
import scipy.ndimage
import SimpleITK as sitk
#######################################################################################
# Visualizer class for ndimages
#######################################################################################
c... |
Java | UTF-8 | 629 | 1.773438 | 2 | [] | no_license | package com.example;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
/**
* @Description: Hystrix可以用在... |
Java | UTF-8 | 6,230 | 2.390625 | 2 | [] | no_license | package com.laka.libnet.rx;
import android.content.Context;
import com.laka.libnet.constant.AppConstant;
import com.laka.libnet.converter.JsonConverterFactory;
import com.laka.libnet.intercepter.AuthorizationInterceptor;
import com.laka.libnet.intercepter.LoggingInterceptor;
import com.laka.libnet.intercepter.NetWork... |
Markdown | UTF-8 | 1,390 | 2.75 | 3 | [] | no_license | ## 0x17. Web stack debugging #3

When debugging, sometimes logs are not enough. Either because the software is
breaking in a way that was not expected and is the error is not being logged, or
because logs are not prov... |
Markdown | UTF-8 | 3,342 | 3.046875 | 3 | [] | no_license | ### 技术
react全家桶(react react-router-dom redux antd)
flex
echarts
### 用户及用户功能
该系统用户分为两类: 管理员和标准用户(不是客户)
我们做的是该系统的管理员(其实以后两个都得做,需要根据请求添加各种权限),现在只需要做一个管理员即可。一个管理员手下可以有多个标准用户。
管理员可以进行所有信息的查看功能。
管理员可以管理普通用户,给普通用户分配任务。
管理员还可以管理活动信息,活动信息的添加、删除、编辑等。
### 流程
#### 登录
管理员登陆 ---> 首页(展示该管理员的所有信息包括组员,以及管理的客户。)
简单介绍:
首页的导航三个按钮 只有客户... |
Markdown | UTF-8 | 3,884 | 3.3125 | 3 | [] | no_license | ---
title: FATE
category: administration
order: 3
---
Accumulo must implement a number of distributed, multi-step operations to support
the client API. Creating a new table is a simple example of an atomic client call
which requires multiple steps in the implementation: get a unique table ID, configure
default table p... |
Markdown | UTF-8 | 847 | 2.59375 | 3 | [
"MIT"
] | permissive | # Aroma
Video chatting with a dash of telecreativity. It is an exploration as to how to enable creativity in a virtual environment.
## Instructions
Requires: nodejs and npm
1) npm install
2) npm run dev [developing] or npm start [production]
4) It will be available on locahost:5000 by default
## Planned feature set... |
Java | UTF-8 | 5,077 | 2.28125 | 2 | [] | no_license | /*
* Copyright (C) 2015 Arthur Gregorio, AG.Software
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This ... |
Java | UTF-8 | 646 | 2.609375 | 3 | [] | no_license | package cashless.vo;
import cashless.domain.Product;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
public class ProductVOMapper {
public static List<ProductVO> map(Collection<Product> products) {
ArrayList<ProductVO> vos = new ArrayList<>();
for (Product product... |
Java | UTF-8 | 1,273 | 1.929688 | 2 | [] | no_license | package weixin.test;
import weixin.popular.bean.EventMessage;
import weixin.popular.util.XMLConverUtil;
public class WeixinTest {
public static void main(String[] args) {
String xml = "<xml>"
+ " <ToUserName><![CDATA[]]></ToUserName>"
+ " <FromUserName><![CDATA[fromUser]]></FromUserName>"
+ " <Cre... |
Python | UTF-8 | 884 | 3.15625 | 3 | [] | no_license | #-*- coding:utf-8-*-
import jieba
from collections import Counter
#完整演示了制作一个词云的过程
#从文件中读取文本,并使用jieba类将文本序列化
def gettext(filename):
text = ''
with open(filename) as fin:
for line in fin.readlines():
line = line.strip('\n')
text += '//'.join(jieba.cut(line))
text += '//'
return te... |
Java | UTF-8 | 17,813 | 3.109375 | 3 | [] | no_license | import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.Set;
public class BPlusTree extends StringTree {
private Node root;
private int minDegree;
private ArrayList<String> leafNode = new ArrayList<>();
BPlusTree(int minDegree) {
if (minDegree < 2) {
... |
C | UTF-8 | 795 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | #include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
/*
* redis-cli del foo; gcc -o test test.c && ./test redis-cli set foo bar;echo $?;redis-cli get foo;rm -rf test
*/
int main(int argc, char *argv[])
{
int r, child_status;
pid_t child_pid = vfork();
... |
C++ | UTF-8 | 680 | 3.390625 | 3 | [] | no_license | class Solution {
public:
int countNumbersWithUniqueDigits(int n) {
if (n < 0) return 0;
if (n == 0) return 1;
if (n == 1) return 10;
int cur = 9, k = 9, res = 10; //cur为位数为i的不含重复位的数字,res为总数
for (int i = 2; i <= n && k > 0; ++ i) {
cur = cur * k;
... |
Markdown | UTF-8 | 3,213 | 3.015625 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: "Propriétés et arguments | Microsoft Docs"
ms.custom: ""
ms.date: "03/30/2017"
ms.prod: ".net-framework"
ms.reviewer: ""
ms.suite: ""
ms.tgt_pltfrm: ""
ms.topic: "article"
ms.assetid: 14651389-4a49-4cbb-9ddf-c83fdc155df1
caps.latest.revision: 3
author: "Erikre"
ms.author: "erikre"
mana... |
PHP | UTF-8 | 2,117 | 2.609375 | 3 | [] | no_license | <?php
/**
* Smarty plugin
*
* Kept for XOOPS 2.0 backward compatibility only !!!
*
* Use the new xotpl: handler to access XOOPS templates
* -------------------------------------------------------------
* File: resource.db.php
* Type: resource
* Name: db
* Purpose: Fetches templates ... |
Ruby | UTF-8 | 2,928 | 3.078125 | 3 | [] | no_license | require "rubygems"
require "sequel"
#require 'mysql2'
#require 'data_objects'
#================================= connect to an in-memory database
DB = Sequel.sqlite
# create an items table
DB.create_table :items do
primary_key :id
String :name
Float :price
end
# create a dataset from the items t... |
Java | ISO-8859-1 | 816 | 3.703125 | 4 | [] | no_license | package eins;
public class ObjectSortieren implements Comparable{
/*
* Bei Zahlen oder bei Strings ist es uns klar, wie sie sortiert werden
* mssen
*
* Wie ist es bei z.B. Mitarbeitern oder Fahrzeugen?
* Um solche Objekte vergleichen zu knnen mssen sie das
* Comparable-Interface implementieren... |
Markdown | UTF-8 | 1,145 | 2.71875 | 3 | [] | no_license | Welcome to the Top 20 practice project
The project is a "Top 20" music voting application.
The user will add artists, then add songs.
Then the user will be asked to submit a vote for each song.
The following "Tops" can be displayed:
* The most popular song ever
* the most popular artist ever
* The most popular song... |
PHP | UTF-8 | 720 | 3.640625 | 4 | [] | no_license | <?php
namespace Brain\Games\Gcd;
use Brain\Games\Engine;
function gcd(int $num1, int $num2): int
{
$result = 1;
$limit = $num1 < $num2 ? $num1 : $num2;
for ($i = 2; $i <= $limit; $i++) {
if ($num1 % $i === 0 && $num2 % $i === 0) {
$result = $i;
}
}
return $result;
}
f... |
TypeScript | UTF-8 | 6,483 | 3.109375 | 3 | [] | no_license | namespace Aufgabe05 {
//Erstelle Interface
interface Produkt {
bild: string;
preis: string;
titel: string;
beschreibung: string;
}
//Produkte erstellen >>> "Tische"
const tisch1: Produkt = {
bild: "images/Tische/Tisch1.png",
preis: "100",
tit... |
C++ | UTF-8 | 2,437 | 2.765625 | 3 | [
"MIT"
] | permissive | // This file is distributed under the MIT license.
// See the LICENSE file for details.
#pragma once
#ifndef VSNRAY_COMMON_INIFILE_H
#define VSNRAY_COMMON_INIFILE_H 1
#include <cstdint>
#include <fstream>
#include <map>
#include <string>
#include <utility>
#include "export.h"
namespace visionaray
{
//------------... |
Java | UTF-8 | 1,534 | 2.453125 | 2 | [] | no_license | package com.mobile.pickup;
import android.support.test.runner.AndroidJUnit4;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.mobile.pickup.Model.Customer;
import org.junit.Test;
import org.junit.runner.RunWith;
/**
* Created by Yanqing on 4/5/... |
Ruby | UTF-8 | 134 | 3.15625 | 3 | [] | no_license | =begin
Unique Strings by Vladislav Trotsenko.
=end
def uniq_count(string)
string.chars.permutation.map(&:join).uniq.size
end
uniq_count('aba') |
C++ | UTF-8 | 19,162 | 2.640625 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | /*=======================================================================
Copyright (c) 2018-2019 Marcelo Kallmann.
This software is distributed under the Apache License, Version 2.0.
All copies must contain the full copyright notice licence.txt located
at the base folder of the distribution.
======... |
C# | UTF-8 | 1,295 | 2.859375 | 3 | [] | no_license | <Query Kind="Program" />
Dictionary<string, Dictionary<string, int>> graph = new Dictionary<string, Dictionary<string, int>> {
{"start", new Dictionary<string, int> {{"a", 6}, {"b", 2}}},
{"a", new Dictionary<string, int> {{"end", 1}}},
{"b", new Dictionary<string, int> {{"a", 3}, {"end", 5}}},
{"end", new Dic... |
Markdown | UTF-8 | 778 | 2.546875 | 3 | [
"MIT"
] | permissive | ---
ID: 1894
post_title: Common JavaScript “Gotchas”
author: Shwuzzle
post_date: 2013-01-20 18:48:31
post_excerpt: ""
layout: post
published: true
aktt_notify_twitter:
- 'yes'
ratings_users:
- "0"
ratings_score:
- "0"
ratings_average:
- "0"
aktt_tweeted:
- "1"
---
If you are a beginner to JavaScript you might... |
Python | UTF-8 | 247 | 2.96875 | 3 | [] | no_license |
'''
* File Name : utility.py
* Language : Python
* Creation Date : 05-01-2021
* Last Modified : Tue Jan 5 11:51:38 2021
* Created By : David Hanson
'''
def multiply(num1, num2):
return num1*num2
def divide(num1, num2):
return num1/num2
|
C# | UTF-8 | 2,187 | 2.875 | 3 | [
"MIT"
] | permissive | using System;
using System.IO;
using System.Net;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Updater;
using System.Windows;
using System.Web;
namespace BackRunner
{
class BRDownloader
{
public static long currentFileLength = 0;
pu... |
JavaScript | UTF-8 | 1,091 | 2.84375 | 3 | [
"MIT"
] | permissive | var expect = require('expect.js');
var exclude = require('../util/exclude');
describe('exclude(obj, keys…):Object', function() {
it('returns a new object', function() {
var a = {};
var b = exclude(a);
expect(b).to.be.an('object');
expect(Object.getPrototypeOf(b)).to.equal(Object.prototype);
expec... |
Java | UTF-8 | 3,727 | 2.796875 | 3 | [] | no_license | /*
* This code is part of the project "Audio Analyzer for the Android"
* developed for the course CSE 599Y
* "Mobile and Cloud Applications for Emerging Regions"
* at the University of Washington Computer Science & Engineering
*
* The goal of this project is to create an audio analyzer that
* allows the user t... |
Java | UTF-8 | 1,134 | 3.53125 | 4 | [] | no_license | package thread.concurrent;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Created by jhui on 2018/3/23.
*/
public class ThreadFactoryTest {
public static void main(String[] args) {
MyThreadFactory factory = MyThreadFactory.getInstance();
for (... |
Java | UTF-8 | 1,247 | 2.03125 | 2 | [] | no_license | package org.nacos.server.one;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscove... |
Java | UTF-8 | 1,917 | 2.8125 | 3 | [] | no_license | package com.superfast.cache.main;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
import com.superfast.cache.KVStore;
import com.superfast.cache.exception.CacheException;
import com.superfast.cache.impl.KVStoreFactory;
import com.superfast.cache.store.DiskAsyncWriter;... |
Java | UTF-8 | 4,866 | 2.4375 | 2 | [] | no_license | /*
=====================================================================
SortHeaderRenderer.java
Created by Claude Duguay
Copyright (c) 2002
Taken freely from:
http://www.fawcette.com/javapro/2002_08/magazine/columns/visualcomponents/
at the 'download code' link.
Heavily modified to use the head... |
C++ | UTF-8 | 4,653 | 3 | 3 | [] | no_license | #include<iostream>
#include<math.h>
typedef long long int lld;
using namespace std;
struct Coordinate
{
lld x,y;
};
int slopecheckifptinbet(Coordinate c1 ,Coordinate c2 , Coordinate c3)
{
// c1 c3 same slop c3 c2
// if ( (float)((c3.y-c1.y )/(c3.x-c1.x)) == (float)((c2.y-c3.y )/(c2.x-c3.x)) )
// {
... |
PHP | UTF-8 | 1,299 | 2.578125 | 3 | [] | no_license | <?php
/**
* Note 1: Replace the popup ID used below ('#popmake-123') with the
* value '#popmake-{integer} used with your popup. From the WP Admin, refer
* to 'Popup Maker' -> 'All Popups' -> 'CSS Classes (column)' -> to find
* the popup ID.
*
* Note 2: Use the cookie ID ('pum-{integer}' linked to the popup ... |
Markdown | UTF-8 | 3,739 | 2.953125 | 3 | [
"MIT"
] | permissive | # SSSSBC - Single Seven Segment Serial Binary Clock
There's lots of LED clocks out there. There's lots of binary clocks out there. This is a mix of them both. On a single seven
segment display, you can get to within about five minutes accuracy of what time of day it is.
## Hardware
My first cut at this was to use an... |
C# | UTF-8 | 4,308 | 3.109375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Text;
namespace Lib.Office
{
public static class ConvertHelper
{
#region IEnumerable<T>转换DataTable
/// <summary>
///
/// Description:IEnumerable<T>转换DataTable
... |
Java | UTF-8 | 2,665 | 2.515625 | 3 | [] | no_license | package br.com.etorcedor.entity;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.per... |
Markdown | UTF-8 | 2,181 | 2.65625 | 3 | [] | no_license | 
---
# CZPullToRefresh
These `UIScrollView` categories makes it super easy to add pull-to-refresh to any UIScrollView (or any of its subclass). Instead of relying on delegates and/or subclassing `UIViewController`, CZPullToRefresh uses the Objective-C runt... |
Shell | UTF-8 | 256 | 3.484375 | 3 | [] | no_license | #!/bin/bash
read -p "Enter number of elements: " count
a=1
sum=0
while [ $a -le $count ]
do
read -p "Enter number $a:" n
sum=`expr $sum + $n`
a=`expr $a + 1`
done
avg=`expr $sum / $count`
echo "Avergae of given $count numbers: $avg" |
C++ | UTF-8 | 624 | 2.625 | 3 | [] | no_license | #include<iostream>
#include<fstream>
using namespace std;
int main()
{
ifstream infile("A1P2in1.txt");
//ofstream outfile("A1P2out1.txt");
unsigned long int m;
unsigned long int n;
while(infile >> n >> m)
{
if(n==0 && m==0)
break;
double val1;
double val2;
double result =... |
C | UTF-8 | 1,968 | 2.671875 | 3 | [] | no_license | /*
NAME: Keyu Ji
EMAIL: g.jikeyu@gmail.com
ID: 704966744
*/
#include <stdio.h>
#include <stdlib.h>
//#include <sys/stat.h>
//#include <sys/types.h>
#include <sys/wait.h>
//#include <sys/time.h>
//#include <sys/resource.h>
#include <time.h>
#include <ctype.h>
#include <fcntl.h>
#include <string.h>
#inc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.