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
9,471
1.726563
2
[]
no_license
package com.nbcuni.test.cms.backend.tvecms.pages.panelizer; import com.nbcuni.test.cms.backend.tvecms.pages.MainRokuAdminPage; import com.nbcuni.test.cms.elements.Button; import com.nbcuni.test.cms.elements.DropDownList; import com.nbcuni.test.cms.elements.Link; import com.nbcuni.test.cms.elements.TextField; import co...
Python
UTF-8
582
3.203125
3
[]
no_license
import pandas as pd import numpy as np import matplotlib.pyplot as plt s = pd.Series([1,3,5,np.nan,6,8]) print(s) print('\n') dates = pd.date_range('20170101',periods=100) print(dates) print('\n') col_name = ['A', 'B', 'C', 'D'] df = pd.DataFrame(np.random.randn(100,4),index=dates,columns=col_name) print(df) print(d...
Java
UTF-8
3,079
2.375
2
[ "MIT" ]
permissive
package org.jasonxiao.demo.service; import org.jasonxiao.demo.exception.user.UserAlreadyExistException; import org.jasonxiao.demo.exception.user.UserNotFoundException; import org.jasonxiao.demo.model.User; import org.jasonxiao.demo.repository.UserRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; imp...
Python
UTF-8
1,194
4.125
4
[]
no_license
''' process a list of numbers and return each pair of numbers that adds up to zero ''' ex = [0,-1,5,0,3,1] def sum_zero(ex): pairs = [] for index, elem in enumerate(ex): # for i in range(len(ex[index+1:])): for i in ex[index+1:]: if (elem + i) == 0: pairs.append((...
JavaScript
UTF-8
148
2.84375
3
[ "MIT" ]
permissive
const flattenDeep = (arrs) => arrs.reduce( (acc, cur) => Array.isArray(cur) ? [...acc, ...flattenDeep(cur)] : [...acc, cur], [] )
Java
UTF-8
5,205
2.828125
3
[]
no_license
/** * Java Image Science Toolkit (JIST) * * Image Analysis and Communications Laboratory & * Laboratory for Medical Image Computing & * The Johns Hopkins University * * http://www.nitrc.org/projects/jist/ * * This library is free software; you can redistribute it and/or modify it * under the terms ...
JavaScript
UTF-8
4,632
2.546875
3
[ "MIT" ]
permissive
// @flow import { createPortal } from 'react-dom'; import { PureComponent, createElement } from 'react'; import type MapboxMap from 'mapbox-gl/src/ui/map'; import type MapboxMarker from 'mapbox-gl/src/ui/marker'; import type LngLat from 'mapbox-gl/src/geo/lng_lat'; import type { PointLike } from '@mapbox/point-geometr...
JavaScript
UTF-8
783
2.53125
3
[]
no_license
// Son kiritish var num1 = +prompt("1-sonni kiriting") var num2 = +prompt("2-sonni kiriting") var num3 = +prompt("3-sonni kiriting") // Shartlar va Javoblar if (num1 > num2 && num1 < num3 || num1 > num3 && num1 < num2) { alert('Siz kiritgan sonlar: ' + num1 + ', ' + num2 + ', ' + num3 + '.\nBularning ichida o`rt...
Java
ISO-8859-1
2,523
1.984375
2
[]
no_license
package fr.intervia.controller; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.b...
C
UTF-8
513
3.1875
3
[]
no_license
#include "3-calc.h" #include <stdio.h> #include <stdlib.h> /** *main - description *@ac: count the elements *@av: put the arguments *Return: 0 **/ int main(int ac, char *av[]) { if (ac != 4) { printf("Error\n"); exit(98); } if ((av[2][0] == '/' || av[2][0] == '%') && av[2][1] == '\0' && av[3][0] == '0...
Java
UTF-8
27,694
2.578125
3
[]
no_license
package AntMe.Simulation; import java.util.ArrayList; import java.util.HashMap; import java.util.Locale; import java.util.Random; import java.util.ResourceBundle; /// <summary> /// Abstrakte Basisklasse für alle Insekten. /// </summary> /// <author>Wolfgang Gallo (wolfgang@antme.net)</author> public abstract class Co...
Python
UTF-8
12,659
2.65625
3
[ "MIT" ]
permissive
import numpy as np from numpy.random import Generator, PCG64 import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matplotlib.patches import Patch from modpy.stats import metropolis_hastings from modpy.stats._core import auto_correlation, auto_correlation_time from modpy.plot.plot_util impor...
Shell
UTF-8
581
2.96875
3
[ "BSD-3-Clause", "MIT" ]
permissive
#!/bin/sh ### BEGIN INIT INFO # Provides: unrealircd # Required-Start: $local_fs # Required-Stop: $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # X-Interactive: false # Short-Description: Init script for unrealircd # Description: Start/stop unrealircd ### END INIT INFO DES...
Java
UTF-8
1,131
3.484375
3
[]
no_license
import java.util.*; public class TestBoard { public static void main(String[] args) { //Piece colorBlanco = Piece.Color.WHITE; //Color color = Color.WHITE; Board myboard = new Board(8,8); System.out.println(myboard.drawBoard()); myboard.boardToLetters(); //System.out.prin...
Java
UTF-8
335
1.773438
2
[]
no_license
package com.edu.sxue.injector.component; import android.support.v4.app.Fragment; import com.edu.sxue.injector.module.FragmentModule; import dagger.Component; /** * 王少岩 在 2017/3/15 创建了它 */ @Component(modules = FragmentModule.class) public interface FragmentComponent { // provide Fragment getFragMent(); }
Java
UTF-8
509
2.6875
3
[]
no_license
package com.company; public class Main { public static void main(String[] args) { LinkedList ll = new LinkedList(); System.out.println(ll.getSize()); ll.add(8); System.out.println(ll.getSize()); ll.add(17); ll.add(5); ll.add(10); ...
Python
UTF-8
4,657
3.34375
3
[]
no_license
import re from jsonpointer import resolve_pointer def list_pointers(input_data, pointer=None): """ Recursive function which lists all available pointers in a json structure :param input_data: the input data to search :param pointer: the current pointer :return: generator of the json pointer paths...
C++
UTF-8
412
2.515625
3
[ "MIT" ]
permissive
bool checksequenece(char large[] , char*small) { if(small[0] == '\0'){ return true; }else{ if(large[0] == '\0'){ return false; } } int i = 0; while(large[i] != '\0' && large[i] != small[0]){ i++; } if(large[i] == '\0'){ return false; ...
Shell
UTF-8
143
3.015625
3
[]
no_license
#/bin/bash if [ $# -eq 0 ] then echo "Please enter the container name" exit fi sudo docker run -ti --name $1 csvworkshop /bin/bash
Java
UTF-8
5,360
1.765625
2
[]
no_license
package net.minecraft.world.level.levelgen; import com.mojang.serialization.Codec; import com.mojang.serialization.DataResult; import com.mojang.serialization.codecs.RecordCodecBuilder; import java.util.BitSet; import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.function.Functio...
C++
UTF-8
259
2.53125
3
[]
no_license
#include "Entry.hpp" class Nonet { public: Nonet(void); void insertEntry(int place, int value); Entry* getEntry(int place); void checkForLonersAndSolveThemIfTheyExist(); void removeChoices(); bool isSolved(); private: Entry* entries[9]; };
C++
UTF-8
1,487
2.78125
3
[]
no_license
#include <stdio.h> #include <string.h> #include <ctype.h> #include <string> using namespace std; char in[1000000]; int inx; char buf[100000]; bool parse(string tag, bool has_tag) { while (in[inx]) { if (in[inx] < 32 || in[inx] > 127) return false; if (in[inx] == '>') return false; if (in[inx] == '&') { inx++;...
SQL
UTF-8
9,746
2.8125
3
[]
no_license
# ************************************************************ # Sequel Pro SQL dump # Version 3408 # # http://www.sequelpro.com/ # http://code.google.com/p/sequel-pro/ # # Host: 127.0.0.1 (MySQL 5.5.31-0ubuntu0.12.04.1) # Database: dclarke # Generation Time: 2014-03-22 16:09:08 +0000 # ********************************...
Python
UTF-8
1,909
2.8125
3
[]
no_license
# IPPP Final Project - Regression Analysis ### Long-term Health Impact ### # outcome vars are: sick(dummy for person sick), days sick, import pandas as pd import numpy as np import statsmodels.api as sm #read investment data investments = pd.DataFrame(pd.read_stata("investments_data.dta", convert_categoricals=False))...
Java
UTF-8
315
1.632813
2
[ "MIT" ]
permissive
package com.babyspeak.speechtracker.models.data; import com.babyspeak.speechtracker.models.nWordsFinal; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; @Repository public interface NwordsFinalRepository extends CrudRepository<nWordsFinal, Integer> { }
Markdown
UTF-8
3,971
2.6875
3
[ "MIT" ]
permissive
# Arduino based 433MHz transmitter This Arduino sketch imitates an RF remote that uses OOK (On Off Keying). Specifically it was meant to clone a Dooya DC1602 remote for shades. It is meant to be linked to this Homebridge plugin for control of shades. ### [Homebridge Dooya Plugin](https://github.com/rjcarlson49/homeb...
Python
UTF-8
1,384
2.765625
3
[]
no_license
# Copyright 2014 WUSTL ZPLAB # Erik Hvatum (ice.rikh@gmail.com) from PyQt5 import QtCore import serial from acquisition.device import Device class BrightfieldLed(Device): enabledChanged = QtCore.pyqtSignal(bool) powerChanged = QtCore.pyqtSignal(int) def __init__(self, parent=None, deviceName='Brightfiel...
C#
UTF-8
3,066
2.640625
3
[]
no_license
using System; using System.Windows.Forms; namespace PF_Downtime { /// <summary> /// Allows user to edit Organization information /// </summary> public partial class OrgDisplay : Form { /// <summary> /// Instantiates /// </summary> public OrgDisplay() { ...
C#
UTF-8
874
2.953125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Problem_2 { class Program { static void Main(string[] args) { Dictionary<int, string> students = new Dictionary<int, string>(); ...
C#
UTF-8
701
3.6875
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _2_circleAreaPerimeter { class Program { static void Main() { Console.WriteLine("Enter radius:"); double radius = float.Parse(Console.ReadLine()...
PHP
UTF-8
7,586
2.75
3
[]
no_license
<?php /** * Created by PhpStorm. * User: Yuri * Date: 08/11/2017 * Time: 14:32 */ namespace Guiageeks\lib; class ferramentas { public static function SetConfigPath(){ /*Diretorio raiz do servidor*/ define('ROOT', $_SERVER['DOCUMENT_ROOT']); /*Raiz do projeto */ // define('ROO...
C++
UTF-8
3,741
2.734375
3
[ "BSD-3-Clause" ]
permissive
/* +------------------------------------------------------------------------+ | Mobile Robot Programming Toolkit (MRPT) | | https://www.mrpt.org/ | | | | Cop...
JavaScript
UTF-8
3,283
2.609375
3
[]
no_license
/* Canvas2D效果对象构造器 */ void function (TeaJs) { "use strict"; function C2Effect() { /// <summary>Canvas2D效果对象构造器</summary> /// <returns type="Canvas2DEffect">Canvas2D效果对象</returns> if (!arguments.length) return; constructor(this, arguments); } // 创建Canvas2D效果构造器 ...
Java
UTF-8
217
1.507813
2
[]
no_license
package com.abhishek.app.repositories; import org.springframework.data.jpa.repository.JpaRepository; import com.abhishek.app.entities.User; public interface UserRepository extends JpaRepository<User, Long> { }
Python
UTF-8
1,610
2.71875
3
[]
no_license
import ipdb from app.exceptions.posts_exceptions import InvalidPost, PostNotFound from flask import Flask, request, jsonify from app.models.post_model import Post def init_app(app: Flask): @app.post('/create-post') def create_post(): data = request.json try: post = Post(**data) ...
SQL
UTF-8
38,004
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Apr 25, 2018 at 05:27 PM -- Server version: 5.6.38 -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `spoc` -- -- ------------------------------------...
PHP
UTF-8
7,262
2.8125
3
[]
no_license
<?php /** * Description of Mark *create table Mark(Markid varchar(10) primary key,Assignment int(5) default '0',Paper int(5) default '0',Empty varchar(3) default 'T',RegistrationId varchar(10) references Student (RegistrationId),Examid varchar(10) references Exam(Examid)); * @author Kanishka */ include_once("Con...
JavaScript
UTF-8
1,922
2.671875
3
[]
no_license
const template = require('art-template') const fs = require('fs'); const queryString = require('querystring'); const model=require('./05-读取相关的json文件-数据模型层') let controller={ // 加载静态文件 loadstaticfile:function(req,res){ // 处理css抬头 if (req.url.endsWith('.css')) { res.setHeader('Content-Type', 'text/css');...
Markdown
UTF-8
8,010
2.71875
3
[]
no_license
--- title: kernel_mtd date: 2019-06-25 11:43:30 tags: - mtd categories: - drivers --- ## 1. Flash 大致分类 - Nor Flash (intel 开发) - Nand Flash (Toshiba 开发) - OneNand Flash(Samsung 开发) <!--more--> NAND Flash在容量、功耗、使用寿命、写速度快、芯片面积小、单元密度高、擦除速度快、成本低等方面的优势使其成为高数据存储密度的理想解决方案。 NOR Flash的传输效率很高,但写入和擦除速度较低; OneNAND结合了N...
Ruby
UTF-8
66
3.265625
3
[]
no_license
# reverse_eachメソッド [1,2,3,4,5].reverse_each{|i| puts i}
JavaScript
UTF-8
322
2.96875
3
[]
no_license
function getInfo(obj){ let pet=""; if(typeof obj.pet == "object") { pet = obj.pet.join(", "); } else if(typeof obj.pet == "string"){ pet = obj.pet; } else { pet = "none"; } return obj.name + "<br>" + obj.email + "<br>" + obj.phone + "<br>" + pet + "<br>"; } module.exports = getInfo;...
C
UTF-8
343
3.890625
4
[]
no_license
//simple operations #include<stdio.h> int main() { int a; a=0; float b; b=0.0; a=a+10; b=a*11; a=a%7; a=b/13; return 0; } /*Expected Output :- Valid Expressions : 1 goto 1: 2 a: 0 3 b: 0.0 4 T0: a + 10 5 a: T0 6 T1: a * 11 7 b: T1 8 T2: a % 7 9 a: T2 10 T3: b / 13 11...
Markdown
UTF-8
1,628
2.96875
3
[]
no_license
## 第一节:机器学习 - TensorFlow ### 1. 安装 #### Step 1: 登录 DataFoundry。如果你还没有账号,请点击注册。 ![](img/login.png) #### Step 2: 登录后的页面如下所示,点击“后端服务”,进行实例申请。 ![](img/backing_service_apply.png) #### Step 3: 创建 TensorFlow 服务的实例,输入服务名称后点击“创建”。 ![](img/create_instance.png) #### Step 4: 在我的后端实例中找到 TensorFlow 实例,点击 Dashboard 图标,进入 ju...
C++
UTF-8
31,289
2.640625
3
[]
no_license
// C++11 #include <algorithm> #include <cstdlib> #include <iostream> #include <map> #include <sstream> #include <vector> #include <set> #include <string> #include <set> #include <unordered_set> #include <map> #include <unordered_map> #include <queue> #include <utility> #include <cstdlib> #include <complex> #include <ar...
Markdown
UTF-8
16,409
3.015625
3
[ "MIT" ]
permissive
--- date: "1" --- # Building an App example - Buy me a Coffee ![](imgs/buy-me-coffee-example.png) We're going to build a very simple application called "Buy me a coffee". A simple button that when pressed, requests a connection to the Plug wallet and a transfer! A [live demo](http://demo.plugwallet.ooo/buy-me-a-co...
Java
UTF-8
1,576
2.5
2
[]
no_license
package net.kzn.shoppingbackend.daoImpl; import java.util.ArrayList; import java.util.List; import org.springframework.stereotype.Repository; import net.kzn.shoppingbackend.dao.CategoryDAO; import net.kzn.shoppingbackend.dto.Category; @Repository("categoryDAO") public class CategoryDAOImpl implements Cat...
C++
UTF-8
1,778
3.6875
4
[]
no_license
// This program uses the address of each element in the array. #include <iostream> #include <iomanip> using namespace std; int main() { // The following definition of pint is legal because myValue is an integer. int myValue1; int * pint1 = &myValue1; // The following definition of point is illegal becau...
C#
UTF-8
1,168
3.578125
4
[]
no_license
using System; using System.Collections.Generic; using System.Text; namespace Task3 { public class Employee { public string name; public decimal basepay; public Employee(string name, decimal basepay) { this.name = name; this.basepay = basepay; } ...
PHP
UTF-8
3,040
2.78125
3
[]
no_license
<?php namespace Oza75\MakeRepository\Commands; use Exception; use Illuminate\Console\Command; use Illuminate\Contracts\Filesystem\FileNotFoundException; use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; class MakeRepositoryCommand extends Command { /** ...
JavaScript
UTF-8
3,585
2.59375
3
[ "MIT" ]
permissive
/** * overrides methods in Node.prototype and build NodeList.prototype * @author : yiminghe@gmail.com */ KISSY.add("node/override", function(S, DOM, Node) { var NodeList = Node.List, NLP = NodeList.prototype, NP = Node.prototype; // selector S.mix(NP, { /** * Re...
Shell
UTF-8
1,531
3.265625
3
[]
no_license
#!/bin/bash # check if root, when not define alias with sudo if [[ $EUID -ne 0 ]]; then alias docker='sudo '$(which docker) alias docker-compose='sudo '$(which docker-compose) fi alias dk='docker' alias dklc='docker ps -l' # List last Docker container alias dklcid='docker ps -l -q' # List last Docker container ...
Rust
UTF-8
9,077
2.6875
3
[ "Apache-2.0" ]
permissive
//! Common structures for secure channels. use byteorder::{ByteOrder, LittleEndian}; use sodalite; use ekiden_common::error::{Error, Result}; use ekiden_common::random; use super::api; // Nonce context is used to prevent message reuse in a different context. pub const NONCE_CONTEXT_LEN: usize = 16; type NonceContex...
TypeScript
UTF-8
19,592
2.828125
3
[]
no_license
/** * Loads history and gameplay data of all civs. * * @param selectableOnly {boolean} - Only load civs that can be selected * in the gamesetup. Scenario maps might set non-selectable civs. */ function loadCivFiles(selectableOnly) { let propertyNames = [ "Code", "Culture", "Name", "Emblem", "His...
C++
UTF-8
10,058
2.703125
3
[]
no_license
#include <iostream> #include <fstream> #include <ctime> #include <dirent.h> #include <sys/stat.h> using namespace std; ///////////////////////////////////////////////////////////////////////////////////////////////////////////// // global data string author_name; string home_path = "/etc/newacm/com/iCoding";...
Java
UTF-8
1,150
1.859375
2
[]
no_license
package com.karengin.libproject.UI; import com.karengin.libproject.UI.component.MainLayout; import com.karengin.libproject.UI.view.AuthorsView; import com.karengin.libproject.UI.view.BooksView; import com.karengin.libproject.UI.view.ErrorView; import com.karengin.libproject.UI.view.UsersView; import com.vaadin.annotat...
Java
UTF-8
5,196
2.09375
2
[]
no_license
package com.campiador.respdroid.model; import com.google.gson.Gson; /** * Created by behnam on 6/11/17. */ public class RespNode { public String getActivity_name() { return activity_name; } public void setActivity_name(String activity_name) { this.activity_name = activity_name; } ...
PHP
UTF-8
2,559
2.796875
3
[]
no_license
<?php namespace TimeControlManager\Entities; use TimeControlManager\Exceptions\UnprocessableEntityException; class UserGroup extends BaseEntity { /** * Группы пользователей (типы конфигураций) */ const TABLE_NAME = 'users_groups'; /** * Комментарий к группе * * @var string ...
PHP
UTF-8
2,267
3.1875
3
[]
no_license
<?php namespace landingSILEX\DAO; use Doctrine\DBAL\Connection; use landingSILEX\Custom\Ville; class VilleDAO { /** * Database connection * * @var \Doctrine\DBAL\Connection */ private $db; /** * Constructor * * @param \Doctrine\DBAL\Connection The database connection o...
Python
UTF-8
2,995
3.1875
3
[]
no_license
import time from rooms import directory home = 'reading_room' # home = 'chiefs_office' directory[home].check_banana = True class Player(object): def __init__(self, inventory=None): self.alive = True self.location = home self.shape = 'human' self.size = 'medium' self.flying...
Markdown
UTF-8
1,888
2.578125
3
[]
no_license
# sFlow-Monitoring-Tool ## Introduction This tool utilizes the sFlow packet sampling technology to determine the Top Talkers in the network. To decode sFlow data the tool utilizes a Python library called `python-sflow` (https://github.com/auspex-labs/sflow-collector/blob/develop/sflow.py). The errors are calculated...
Python
UTF-8
3,825
2.59375
3
[ "MIT" ]
permissive
import argparse import functools import gc import random import time from redis import Redis from reliableredisqueue import Queue random.seed(73) _NUM_JOBS = 10000 _NUM_ROUNDS = 3 def benchmark(func): @functools.wraps(func) def wrapper(queue, num_jobs, **kwargs): gc.disable() timings = [] ...
JavaScript
UTF-8
2,326
2.640625
3
[]
no_license
/* global describe beforeEach it */ const { expect } = require("chai"); const request = require("supertest"); const db = require("../../db"); const app = require("../../index"); const Order = db.model("order"); // const User = db.model("user"); //let's set up the data we need to pass to the login method describe("O...
Python
UTF-8
2,086
2.890625
3
[]
no_license
from flask import Flask, render_template, request, send_file, Response from PIL import Image import StringIO import imageio app = Flask(__name__) @app.route('/', methods=['GET', 'POST']) def home(): pictures = request.files.getlist('photos') feature = request.form.get('feature') contents = [] if feature == 'fil...
Ruby
UTF-8
191
3.640625
4
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
def fizzbuzz(num) output=nil if (((num%3)==0)&&((num%5)==0)) output="FizzBuzz" elsif ((num%3)==0) output="Fizz" elsif ((num%5)==0) output="Buzz" end return output end
TypeScript
UTF-8
675
2.6875
3
[]
no_license
export interface IBill { b_id: number; o_id: number; u_id: number; ammount: number; due_ammount: number; // TODO : Find the correct type. issue_timestamp: Date isdeleted: boolean; // Application audit columns c_date?: Date; u_date?: Date; } export interface ICreateBill { ...
TypeScript
UTF-8
1,531
2.84375
3
[]
no_license
import { GeneAdapter } from '../genetic' import Network from './Network' import Buffer from '../helpers/Buffer' export class NetworkBinaryGeneAdapter extends GeneAdapter<Network> { public get(individual: Network): Buffer { let bytes = 0 for (const layer of individual.layers) { for (const { weights } o...
Java
UTF-8
994
2.65625
3
[]
no_license
package com.javaclimb.music.dao; import com.javaclimb.music.domain.Singer; import org.springframework.stereotype.Repository; import java.util.List; @Repository /** * @Repository注解便属于最先引入的一批,它用于将数据访问层 (DAO 层 ) 的类 * 标识为 Spring Bean。具体只需将该注解标注在 DAO类上即可。同时, * 为了让 Spring 能够扫描类路径中的类并识别出 @Repository 注解, * 需要在 XML 配置文件...
C++
ISO-8859-1
496
3.65625
4
[]
no_license
/* Criar uma funo para somar dois nmeros e retornar o resultado da soma. A assinatura da funo : int somar(int a, int b) Criar um main para fazer a chamada a esta funo */ #include <stdio.h> #include <stdlib.h> int somar(int a,int b); int main() { int a,b; printf("Informar numero A: "); scanf("%d",&a); prin...
Shell
UTF-8
184
2.515625
3
[]
no_license
#!/bin/bash while true; do humidity=$(wget http://192.168.1.105/humidity -q -O -) #echo $humidity influx -database=loggers -execute "INSERT humidity value=$humidity" sleep 10 done
JavaScript
UTF-8
731
3.328125
3
[]
no_license
var itemNum = 1; function createNewItemLabel(num) { var element = document.createElement("div"); element.innerHTML = "Item #" + num + ":"; return element; } function createNewItem(num) { var element = document.createElement("input"); element.setAttribute("type","text"); element.required = true; element.setAttri...
Shell
UTF-8
2,682
3.765625
4
[ "BSD-2-Clause" ]
permissive
#!/usr/bin/env bash # Useful script that we run @reboot # Author: Daniel Zhelev @ https://zhelev.biz ################################ Begin config EMAIL="root" DELAY="480" POST_BOOT_LOG="/var/log/postboot.log" ERROR_PATTERN="crit|error|warn|fail|unable" IGNORE_PATTERN="PNP0A03" ################################ End con...
Java
UTF-8
2,758
2.21875
2
[]
no_license
package com.lyh.guanbei.ui.activity; import android.text.Editable; import android.text.TextWatcher; import android.view.View; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import com.lyh.guanbei.R; import com.lyh.guanbei.base.BaseActivity; import com.lyh.guanbei.bean.Use...
PHP
ISO-8859-1
89,030
2.609375
3
[]
no_license
<? if(!class_exists('bancos')) require 'bancos.php';//CASO EXISTA EU DESVIO A CLASSE ... //Fico indignado com a minha tcnica em orientao a objetos, sem palavras class intermodular { function importar_patopi($id_produto_acabado) { //Aqui eu verifico se o PA j foi importado alguma vez p/ PI ... $sql = "SELECT...
Java
UTF-8
2,312
2.140625
2
[]
no_license
package com.example.sandy.cardviewexample; import android.os.AsyncTask; import android.support.v4.app.Fragment; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.Rec...
Java
UTF-8
5,092
2.796875
3
[ "Apache-2.0" ]
permissive
package com.belladati.sdk; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import com.belladati.sdk.exception.InvalidImplementationException; /** * Serves as the entry point to the BellaDati SDK. Use either of the connect * methods to connect to a server, then authenticate...
PHP
UTF-8
12,632
2.625
3
[ "Apache-2.0" ]
permissive
<?php /**********************************************************\ | | | hprose | | | | Official WebSite: http://www.hprose.com/ | | ...
Java
UTF-8
881
3.296875
3
[]
no_license
import java.util.ArrayList; public class HumanResources { public void issueBadge(Employee[] employees){ for(int i =0; i <employees.length; i++){ System.out.println(employees[i]); } } public void printPaymentInfo(IPayable person){ System.out.println(person.getClass().getSimple...
Python
UTF-8
3,144
2.859375
3
[]
no_license
import math import numpy as np import matplotlib.pyplot as plt import random dx=0.1 L=15. c=400 N=1000 x0=[] y0=[] with open('case0.txt','r') as f: for line in f: splitline=line.split("\t") x0.append(float(splitline[0])) y0.append(float(splitline[1])-3) flin0=np.poly1d(np.po...
Python
UTF-8
527
2.9375
3
[]
no_license
# -*- coding: utf-8 -*- from datetime import datetime from datetime import time from datetime import timedelta def get_time_diff(val_to: time, val_from: time): val_from_del = timedelta(hours=val_from.hour, minutes=val_from.minute) val_to_del = timedelta(hours=val_to.hour, minutes=val_to.minute) if val_fr...
C#
UTF-8
873
3.671875
4
[]
no_license
using System; using System.Linq; namespace GrabAndGo { class Program { static void Main(string[] args) { long[] input = Console.ReadLine().Split().Select(long.Parse).ToArray(); long number = long.Parse(Console.ReadLine()); long index = -1; for ...
C++
UTF-8
13,040
3.015625
3
[]
no_license
/* * Wee Siang Wong * willydk@gmail.com * CPSC 566 * Spring 2012 * CWID# 802852186 * * Open courseware from MIT * http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-837-computer-graphics-fall-2003/assignments/ * with some modification * */ #include <stdio.h> #include <string.h> #incl...
PHP
UTF-8
345
2.75
3
[]
no_license
<?php include_once "api-header.php"; // connect to database $result = $mysqli->query("SELECT * FROM user"); while ($row = $result->fetch_assoc()) { // return with json format echo '<option value="' .$row['email']. '">' .$row['first_name']. '&nbsp;' .$row['last_name']. ' (' .$row['email']. ')</option>'; } m...
Markdown
UTF-8
2,324
3.671875
4
[]
no_license
--- category: etc date: '2010-08-10' layout: article slug: 'first-class-classes-in-csharp' tags: - c - functional-programming title: '(sort of) First Class Classes in C#' summary: It seems, at first, that C# doesn't have first-class classes. But ... --- I find myself writing some C# code while still thinking ...
Java
UTF-8
1,336
2.203125
2
[]
no_license
package com.didichuxing.ctf.controller.user; import com.didichuxing.ctf.model.Flag; import com.didichuxing.ctf.service.FlagService; import java.io.PrintStream; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.Pa...
C
UTF-8
1,024
4.125
4
[]
no_license
#include <stdio.h> #include <stdlib.h> typedef struct _Calculator { int A, B; int (*add)(const int, const int); int (*substract)(const int, const int); int (*multiple)(const int, const int); int (*divide)(const int, const int); } Calculator; int add(const int A, const int B) { return A + B; } int subtract(con...
C++
UTF-8
1,745
3.15625
3
[ "MIT" ]
permissive
#include "timer.h" namespace can { Timer::Timer(const TimeoutFunc &timeout_func) : timeout_func_(timeout_func) { } Timer::Timer(const TimeoutFunc &timeout_func, const Interval &interval, bool single_shot) : is_single_shot_(single_shot), interval_(interval), ...
Python
UTF-8
2,291
3.0625
3
[ "Apache-2.0" ]
permissive
"""Catalog search strategies.""" import os import gettext from public import public class _BaseStrategy: """Common code for strategies.""" def __init__(self, name): """Create a catalog lookup strategy. :param name: The application's name. :type name: string """ self...
Java
UTF-8
571
2.5
2
[ "Apache-2.0" ]
permissive
package indi.joynic.joodoo.websupport.support; public class RequestPath { private String val; public RequestPath(final String val) { this.val = val; } public String getVal() { return val; } public static RequestPath valueOf(final String val) { return new RequestPath(v...
C#
UTF-8
548
2.8125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Petri { public class Network { private readonly IList<Place> _places; private readonly Sequence _sequence = new Sequence(); public Network() { _places = new List<Place>(...
Java
UTF-8
2,569
2.203125
2
[]
no_license
package com.training.reactive.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpMethod; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.Reques...
Java
UTF-8
1,993
3.25
3
[]
no_license
package HomeWork; import com.collections.Student; public class Data_Structures { public static void main(String[] args) { // TODO Auto-generated method stub int sum=0; int avg; int temp; int top; Student s[]=new student[10]; s[0]=new student(); s[0].name="Sraya"; s[0].marks=95; ...
Markdown
UTF-8
8,976
3.53125
4
[]
no_license
+-- {: .rightHandSide} +-- {: .toc .clickDown tabindex="0"} ### Context #### Higher category theory +--{: .hide} [[!include higher category theory - contents]] =-- =-- =-- # Contents * table of contents {: toc} ## Idea Given an ordinary [[category]] $C$, a pasting diagram in $C$ is a sequence of co...
Java
UTF-8
447
1.648438
2
[ "MIT" ]
permissive
package ca.ualberta.elasticsearch; import ca.ualberta.elasticsearch.index.ElasticIndex; public class test { public static void main(String[] args) { // TODO Auto-generated method stub ElasticSearchManager testelas = new ElasticSearchManager(); //testelas.advancedSearchTitleAndBody("tennis"," Andre"); ...
Java
UTF-8
2,160
1.9375
2
[]
no_license
package com.wetuo.wepic.publish.service; import java.util.List; import java.util.Map; import com.wetuo.wepic.common.hibernate.Pager; import com.wetuo.wepic.publish.beans.PublishCat_Story; import com.wetuo.wepic.publish.dao.PublishCat_StoryDao; public class PublishCat_StorySeviceImpl implements PublishCat_StorySevice...
C#
UTF-8
728
2.828125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.UI.Xaml.Data; namespace PrimeTube.Converter { public class StringURIToURIConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter...
Java
UTF-8
9,407
2.28125
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "licens...
C++
GB18030
845
2.78125
3
[]
no_license
#pragma once #ifndef BASEGROUP_H #define BASEGROUP_H #ifdef DLL_FILE #define EX_IM_PORT _declspec(dllexport) // #else #define EX_IM_PORT _declspec(dllimport) // #endif #include <vector> #include <string> #include <algorithm> using namespace std; class EX_IM_PORT BaseGroup { public: BaseGroup(void):edges_num(0),n...
Python
UTF-8
281
2.75
3
[]
no_license
import os path="./plik.txt" with open(path,"w") as f: f.write("Ciemnosc widze za oknem i wgl") def fun(path): with open(path,"r") as f: text=f.read() ilosc_slow=len(text.split()) print("Ilosc slow:",ilosc_slow) result=os.path.isfile(path) and fun(path)
TypeScript
UTF-8
2,261
2.84375
3
[ "MIT" ]
permissive
import { ref, onUnmounted, Ref } from "../api"; import { PASSIVE_EV, NO_OP, isClient } from "../utils"; export interface BroadcastMessageEvent<T> extends MessageEvent { readonly data: T; } export interface BroadCastChannelReturn<T> { supported: boolean; data: Ref<T | null>; messageEvent: Ref<MessageEvent | ...
C
UTF-8
413
3.5
4
[]
no_license
#include "lists.h" /** * get_dnodeint_at_index - returns specified node * @head: pointer to head of the LL * @index: position of the required node * * Return: Specified node is returned */ dlistint_t *get_dnodeint_at_index(dlistint_t *head, unsigned int index) { unsigned int i = 0; while (head != NULL) { if...