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 | 1,891 | 2.71875 | 3 | [] | no_license | package com.study.week5.spring;
import com.study.week5.spring.bean.Kclass;
import com.study.week5.spring.bean.ManualSpringBean;
import com.study.week5.spring.bean.School;
import com.study.week5.spring.bean.Student;
import com.study.week5.spring.manualwired.ManualSpringBeanConfig;
import org.junit.jupiter.api.Test;
im... |
Python | UTF-8 | 2,544 | 3.75 | 4 | [] | no_license | # Udacity Data Structures and Algorithms
# Part 2 - Data Structures
# Project 2 - Problem #2 - File Recursion
import os
def find_files(suffix, path):
"""
Find all files beneath path with file name suffix.
Note that a path may contain further subdirectories
and those subdirectories may also contain fu... |
PHP | UTF-8 | 1,668 | 2.609375 | 3 | [] | no_license | <?php
$host = 'localhost';
$basededatos = 'toldosmty';
$usuario = 'root';
$contraseña = '';
$conexion = new mysqli($host, $usuario,$contraseña, $basededatos);
if ($conexion -> connect_errno)
{
die("Fallo la conexion:(".$conexion -> mysqli_connect_errno().")".$conexion-> mysqli_connect_error());
}
$tabla="";
$query="... |
Java | UTF-8 | 1,864 | 2.5 | 2 | [] | no_license | package com.marsassignment.dto;
import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import... |
Go | UTF-8 | 689 | 3.890625 | 4 | [] | no_license | // You can think of it as an counterpart of try and catch in python
package main
import ("time"
"fmt"
"sync")
var wg sync.WaitGroup
func cleanup(){
defer wg.Done()
if r:= recover(); r!=nil{// We assign recover() to r and check if it is nil or not
fmt.Println("Recovered in cleanup", r... |
C++ | UTF-8 | 6,672 | 4.0625 | 4 | [] | no_license | #include <iostream>
using namespace std;
//Node structure
struct Node {
int data;
struct Node *lchild;
struct Node *rchild;
struct Node *parent;
};
//Class for node functions and root initialization
class bst {
private:
Node *root;
public:
bst() {
root = NULL;
}
//Function to ... |
Java | UTF-8 | 873 | 2.765625 | 3 | [] | no_license | package extension;
import java.util.*;
import org.joda.time.DateTime;
import org.joda.time.Minutes;
import org.joda.time.Seconds;
import play.templates.BaseTemplate.RawData;
import play.templates.JavaExtensions;
import utils.*;
public class CustomExtensions extends JavaExtensions{
public static String removeNewLi... |
C++ | UTF-8 | 2,269 | 2.796875 | 3 | [] | no_license | #include "primitives/triangle.h"
Triangle::Triangle(Vector3 p0, Vector3 p1, Vector3 p2, QObject *parent)
: Figure(parent),
p0(std::move(p0)),
p1(std::move(p1)),
p2(std::move(p2)),
l0(p1 - p0),
l1(p2 - p1),
l2(p0 - p2)
{
normal = Vector3::crossProduct(p1 - p0, p2 - p0).norma... |
Java | UTF-8 | 966 | 2 | 2 | [] | no_license | package nuc.gml.mall.service;
import com.baomidou.mybatisplus.extension.service.IService;
import nuc.gml.mall.dataobject.CartDO;
import nuc.gml.mall.dataobject.SysUserDO;
import nuc.gml.mall.error.BusinessException;
import nuc.gml.mall.service.model.CartModel;
import java.util.List;
public interface CartSe... |
Go | UTF-8 | 310 | 2.96875 | 3 | [] | no_license | package main
import (
"fmt"
"net"
)
//获取随机端口
func getPort() int {
laddr := net.TCPAddr{IP:net.IPv4(127,0,0,1),Port:0}
l,err := net.ListenTCP("tcp4", &laddr)
if err == nil {
addr := l.Addr()
return addr.(*net.TCPAddr).Port
}else {
return 0
}
}
func main() {
fmt.Println(getPort())
} |
C | UTF-8 | 624 | 2.796875 | 3 | [] | no_license | #include <stdio.h>
#include "y.tab.h"
#include "lex.yy.c"
extern int yylex(void);
extern char *yytext;
int main(int argc,char** argv)
{
int token;
while (token = yylex()) {
if(token>=283 && token<=305)
{
printf("<KEYWORD, %s >\n",yytext);
}
else if(token==IDENTIFIER)
printf("<IDENTIFIER, %s >\n",... |
Java | UTF-8 | 1,817 | 3.90625 | 4 | [] | no_license | package creature;
import java.util.*;
import creature.calabash.*;
public class CreatureSort {
/**
* Sort a LinkedList consists of CalabashBoys
* @param list The LinkedList which consists of CalabashBoys to be sorted.
* @param type Define the Sort operation: 0 is for Ascending, 1 is for Descending, ... |
Python | UTF-8 | 2,557 | 2.59375 | 3 | [] | no_license | from objects import Raquete, Bola, bolaDir
class GameCore:
def __init__(self):
self.score = {
'1': 0,
'2': 0,
}
self.sets = {
'1': 0,
'2': 0,
}
self.deuce = False
self.pausado = False
self.numOfSets = 5
... |
Java | UTF-8 | 1,178 | 3.703125 | 4 | [] | no_license | //Complete this code or write your own from scratch
import java.util.*;
import java.io.*;
class Solution{
private Hashtable<String, Integer> phonebook;
public Solution(int n){
this.phonebook = new Hashtable<>(n);
}
public void addEntry(String name, Integer number){
this.phone... |
C | UTF-8 | 41,368 | 2.53125 | 3 | [] | no_license | #include "umc.h"
void leerArchivoConfig()
{
system("clear");
t_config *config = config_create("config.conf");
if (config == NULL) {
log_error(logger, "Error al leer archivo config.conf\n");
free(config);
abort();
}
infoConfig.ip = config_get_string_value(config, "IP_SWAP");
infoConfig.puertoUMC = confi... |
Java | UTF-8 | 2,167 | 2.171875 | 2 | [] | no_license | package softikoda.com.ourculture;
import android.app.Activity;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
imp... |
Markdown | UTF-8 | 2,121 | 3.09375 | 3 | [] | no_license | ---
layout: post
title: REST and Software Architecture
---
## REST Resource Methods
* Roy Fielding has never mentioned any recommendation around which method to be used in which condition. All he emphasizes is that it should be <font color=red>uniform interface</font>.
* E.g.: GET/PUT/POST/DELETE
* Ideally, everythi... |
Shell | UTF-8 | 5,460 | 2.96875 | 3 | [] | no_license | #!/bin/bash
#
#
#Get the current board type.
BOARD_TYPE=`dmidecode | grep "Product Name:" | sed -n "1p" | awk -F ' ' '{print $NF}'`
#Automated data files exported in test cases.
TEST_CASE_DB_FILE="data/sas_test_case.table"
#Test case execution result save file.
OUTPUT_TEST_DB_FILE="data/report.csv"
#700k performance... |
JavaScript | UTF-8 | 222 | 3.171875 | 3 | [] | no_license | 'use strict';
const names = ['María', 'Lucía', 'Susana', 'Rocío', 'Inmaculada'];
const helloName = (name) => (name = `Bienvenida ${name}`);
const helloMessage = names.map(helloName);
console.log(helloMessage);
|
PHP | UTF-8 | 966 | 2.75 | 3 | [
"MIT",
"BSD-4-Clause-UC",
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"TCL",
"ISC",
"Zlib",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"blessing"
] | permissive | --TEST--
ob_start(): Ensure unerasable buffer cannot be erased by ob_clean(), ob_end_clean() or ob_end_flush().
--FILE--
<?php
function callback($string) {
static $callback_invocations;
$callback_invocations++;
return "[callback:$callback_invocations]$string\n";
}
ob_start('callback', 0, false);
echo "All of the f... |
PHP | UTF-8 | 1,713 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* 彩色瓶子表白生成器
*
* @author chenfenghua<843958575@qq.com>
* @copyright Copyright 2014-2017
* @version 2.0
*/
namespace app\play\controller;
use think\Request;
class Pingzi
{
/**
* 入口页
*/
public function index()
{
$this->data['title'] = '彩色瓶子表白生成器';
$this->rende... |
Java | UTF-8 | 1,265 | 1.90625 | 2 | [] | no_license | package com.travisgray.foodchain;
import android.content.res.AssetManager;
import android.content.res.Resources;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Butto... |
Swift | UTF-8 | 415 | 2.65625 | 3 | [] | no_license | //
// Protocols.swift
// DiscoveryTest
//
// Created by Jason Chitla on 5/18/16.
// Copyright © 2016 Jason Chitla. All rights reserved.
//
import UIKit
protocol TableViewCellReusable {
static var reuseableIdentifier: String { get }
}
extension TableViewCellReusable where Self: UITableViewCell {
static va... |
C++ | UTF-8 | 812 | 4 | 4 | [] | no_license | #include <iostream>
#include <string>
#include <cstddef>
using namespace std;
void count_substr(string str1, string substring);
int main()
{
string str1;
string substr;
cout << "Enter a string: ";
getline(cin, str1);
cout << "Enter the substring: ";
getline(cin, substr);
... |
Ruby | UTF-8 | 460 | 2.75 | 3 | [] | no_license | require_relative './require_helper'
require_relative './find'
require 'csv'
class Directory
attr_accessor :directory
include Find
def initialize
end
def load_content(file_name)
csv_data = CSV.open "data/" + "#{file_name}", headers: true, header_converters: :symbol
@directory = csv_data.map do |... |
Java | UTF-8 | 1,714 | 3.140625 | 3 | [] | no_license | package com.syntax.java.homework;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Work... |
Python | UTF-8 | 4,103 | 3.3125 | 3 | [] | no_license | class Item(object):
def __init__(self, name):
self.name = name
class Weapon(Item):
def __init__(self, name, damage):
super(Weapon, self).__init__(name)
self.damage = damage
class Knife(Weapon):
def __init__(self): # Dam. Dura.
super(Knife, self).__init__... |
C++ | UTF-8 | 2,881 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | #include "oclint/AbstractASTVisitorRule.h"
#include "oclint/RuleSet.h"
#include<fstream>
using namespace std;
using namespace clang;
using namespace oclint;
class LowerPriorityOfConditionalExpressionRule : public AbstractASTVisitorRule<LowerPriorityOfConditionalExpressionRule>
{
public:
virtual const string name()... |
Java | UTF-8 | 5,112 | 3.328125 | 3 | [] | no_license | import java.util.Random;
public class Virus {
//parametri sanitari della simulazione
//infettivita' del virus
private static int INFETTIVITA;
//letalita' del virus
private static int LETALITA;
//sintomaticita' del virus
private static int SINTOMATICITA;
//durata della malattia
p... |
Python | UTF-8 | 1,791 | 2.78125 | 3 | [] | no_license | import numpy as np
import featureVector as fvec
# Size of label
groups = 0
with open("../data/newsgrouplabels.txt",'r') as f:
for line in f:
groups += 1
f.closed
# Size of vocabulary
voca = 0
with open("../data/vocabulary.txt",'r') as f:
for line in f:
voca += 1
f.closed
# Load training data and label
trainDa... |
Markdown | UTF-8 | 16,331 | 2.90625 | 3 | [] | no_license | <h1># 作者:single430
时间:2016.10.11</h1>
<p>
<span style="color: rgb(12, 12, 12); font-size: 20px;"><strong>一,首先(Linux环境)</strong></span>
</p>
<p>
<span style="font-size: 18px; color: rgb(31, 73, 125);">(1):先来记录一下最近的一个项目,登录注册注销</span>
</p>
<p>
&nbs... |
TypeScript | UTF-8 | 930 | 3.171875 | 3 | [
"MIT"
] | permissive | export const padStart = (
num: any,
len: number = 2,
ch: string = "0"
): string => {
let output = `${num}`;
while (output.length < len) {
output = `${ch}${output}`;
}
return output;
};
export const getFormatDate = (
d?: string | number | Date | null,
format: string = "YYYY-M... |
PHP | UTF-8 | 2,018 | 2.609375 | 3 | [] | no_license | <?php
namespace Siakad\Scheduling\Infrastructure;
use Phalcon\Db\Column;
use Siakad\Scheduling\Domain\Model\Dosen;
use Siakad\Scheduling\Domain\Model\Mahasiswa;
use Siakad\Scheduling\Domain\Model\MahasiswaPerwalianRepository;
use Siakad\Scheduling\Exception\MahasiswaPerwalianNotFoundException;
class SqlMahasiswaPerw... |
Java | UTF-8 | 3,321 | 2.09375 | 2 | [] | no_license | package myfirstapp.miguel.com.tvapp;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.method.ScrollingMovementMethod;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import java.util.concurrent.atom... |
JavaScript | UTF-8 | 2,335 | 2.765625 | 3 | [] | no_license | var R = require('ramda');
var firstAnswer;
module.exports = [
function(input) {
module.exports.wires = input.reduce(parseLine, {});
firstAnswer = module.exports.wires.a();
return firstAnswer;
},
function(input) {
module.exports.wires = input.reduce(parseLine, {});
mo... |
Python | UTF-8 | 154 | 4.03125 | 4 | [] | no_license | a = int(input("Unesi broj a: "))
b = int(input("Unesi broj b: "))
zbroj = a + b
print("Zbroj brojeva {0} i {1} iznosi {2}".format(a, b, zbroj))
|
Python | UTF-8 | 1,462 | 2.8125 | 3 | [
"MIT"
] | permissive | import os
from arff2pandas import a2p
import pandas as pd
DATASET_DIR = './tests/data/datasets/'
def get_dataset_path(dataset_filename):
return os.path.join(DATASET_DIR, dataset_filename)
def _read_arff_dataset(infile_path):
""" Loads and ARFF file to a pandas dataframe and drops meta-info on column type.... |
SQL | UTF-8 | 157 | 3.203125 | 3 | [] | no_license | USE exercise;
-- SELECT Email FROM email GROUP BY Email HAVING COUNT(*)>1;
SELECT Email, COUNT(*) AS Duplicate FROM email
GROUP BY Email
HAVING COUNT(*)>1; |
Python | UTF-8 | 259 | 2.671875 | 3 | [] | no_license | from kuankr_utils.dicts import *
def test_recursive_merge_with_list():
a = [{'a': 3}, {'b': [1,2,3]}]
b = [{'b': 5}, {'c': 6, 'b': ['a']}, []]
c = recursive_merge_with_list(a, b)
assert c == [{'a': 3, 'b': 5}, {'c': 6, 'b': ['a', 2, 3]}, []]
|
Java | UTF-8 | 8,135 | 2.234375 | 2 | [
"Apache-2.0"
] | permissive | package de.codescape.jira.plugins.scrumpoker.service;
import com.atlassian.jira.user.ApplicationUser;
import com.atlassian.jira.user.util.UserManager;
import com.atlassian.plugin.spring.scanner.annotation.component.Scanned;
import com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport;
import de.codesc... |
Java | UTF-8 | 2,800 | 2.09375 | 2 | [] | no_license | package com.rezalwp.training.activity.ui.tambahTraining;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import androidx.ann... |
Python | UTF-8 | 884 | 3.1875 | 3 | [] | no_license | import spacy
nlp = spacy.load('en')
doc = nlp(u'The elderly Bruno knows he is not far from death. One of his last wishes is to contact his estranged son, Miles, whose marriage to an Indian woman drove a decades-long wedge between father and son. When Miles comes back into his father’s life, Bruno must confront his gu... |
C | UTF-8 | 6,086 | 3.921875 | 4 | [] | no_license | /**
* @file test_main.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <assert.h>
#include <string.h>
#include "libresistance.h"
/**
* @brief Defines the red colour
*/
#define ANSI_COLOR_RED "\x1b[31m"
/**
* @brief Defines the green colour
*/
#define ANSI_COLOR_GREEN "\x1b[32m"
/**
* @br... |
Python | UTF-8 | 985 | 4.46875 | 4 | [] | no_license | """
Write a program which repeatedly reads numbers until the
user enters “done”. Once “done” is entered, print out the total, count,
and average of the numbers. If the user enters anything other than a
number, detect their mistake using try and except and print an error
message and skip to the next number.
"""
#... |
PHP | UTF-8 | 1,472 | 2.71875 | 3 | [] | no_license | <?php
require './config/config.php';
require_once './hooks/signup.hook.php';
require_once './hooks/login.hook.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if(isset($_POST['login_form'])){
//process the login
$email = $_POST['email'];
$password = md5($_POST['password']);
... |
Markdown | UTF-8 | 2,075 | 2.546875 | 3 | [
"MIT"
] | permissive | # dev 🤓
Contains some hopefully helpful scripts for development.
- [Usage](#usage)
- [checkBuild](#checkbuild)
- [checkCoverage](#checkcoverage)
- [checkForFlaggedTests](#checkforflaggedtests)
## Usage
To make use of these scripts you can clone this repository to your preferred
location like:
git clone https:... |
Swift | UTF-8 | 1,089 | 2.859375 | 3 | [] | no_license | //
// Users+CoreDataClass.swift
//
//
// Created by Kiarash Teymoury on 6/20/17.
//
//
import Foundation
import CoreData
@objc(Users)
public class Users: NSManagedObject {
convenience init(dictionary:NSDictionary, insertIntoManagedObjectContext context: NSManagedObjectContext) {
let entityName =... |
C# | UTF-8 | 1,097 | 2.515625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
namespace FitBull.WebService
{
/// <summary>
/// WebService için özet açıklama
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.... |
Python | UTF-8 | 28,709 | 3.046875 | 3 | [] | no_license | #coding:utf-8
import sys, os
sys.path.append(os.getcwd())
from server import Post, User, db
def add_data():
db.drop_all()
db.create_all()
user1 = User("leiyi")
user2 = User("leiyi2")
user2.id = 2222
db.session.add(user1)
db.session.add(user2)
db.session.commit()
post1 = Post("a")... |
Markdown | UTF-8 | 2,210 | 3.375 | 3 | [] | no_license | # Codice Rest
Esempio di "Hello World" REST
Il codice seguente crea un servizio Web RESTful utilizzando il framework Node.js Express. Un singolo / ciao / endpoint risponde alle richieste GET.
---
Assicurati di aver installato Node.js, quindi crea una nuova cartella chiamata restapi. Crea un nuovo file package.json ... |
Python | UTF-8 | 1,542 | 3.796875 | 4 | [] | no_license | # Write a function to return the maximum number of fruits in both the baskets. Same as Longest substring with K chars but k=2
def fruits_into_baskets(fruits):
start_ptr = 0
baskets = {}
max_number_of_fruits = 0
current_number_of_fruits = 0
for end_ptr in range(len(fruits)):
if fruits[end_ptr... |
Python | UTF-8 | 3,699 | 2.890625 | 3 | [
"Apache-2.0"
] | permissive | """
Generate the "Releases" table on the main readme. Update the versions lists, run this script, and copy the output
into the markdown file.
"""
from distutils.version import LooseVersion
from datetime import datetime
from typing import NamedTuple
def table_line(display_name, name, date, bold=False):
bold_str = ... |
Java | UTF-8 | 1,294 | 2.453125 | 2 | [] | no_license | package yummycherrypie.dal.default_records;
import java.util.Date;
import java.util.Random;
import yummycherrypie.base_classes.BookingMan;
import yummycherrypie.business_logic.Extensions.LogExtension;
import yummycherrypie.dal.DBHelper;
/**
* Created by Nikolay_Piskarev on 12/1/2015.
*/
public class BookingMenDefa... |
Java | UTF-8 | 102 | 2.125 | 2 | [] | no_license | package design.pattern.abstracted.factory.model;
public interface Model {
String getMessage();
}
|
C# | UTF-8 | 1,076 | 2.796875 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MH4U_Database.Database
{
public class Sharpness
{
public int Red { get; set; }
public int Orange { get; set; }
public int Yellow { get; set; }
public int Green { get; set; }
... |
C++ | UTF-8 | 2,248 | 3.171875 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <cstring>
using namespace std;
int Answer;
class Line{
public:
short next[2002];
short end[2002];
Line(){
memset(next, -1, sizeof(short)*2002);
memset(end, -1, sizeof(short)*2002);
}
};
int go... |
Markdown | UTF-8 | 994 | 2.609375 | 3 | [] | no_license | # js
javascript 是一种具有头等函数的轻量级解释型或即时编译型的编程语言,是一种基于原型编程、多范式的动态脚本语言,并且支持面向对象、命令式和声明式(如函数式编程)
> 一种编程语言被称为具有头等函数时,语言中的函数将会像任何其他变量一样被对待。例如, 在这样的语言中, 一个函数可以作为参数传递给其他函数,可以被当作返回值被另一个函数返回,可以当作值指定给一个变量
## 基本数据类型
undefined,null,string,boolean,number
对undefined,null的理解涉及两者有啥不同,三等和双等返回的布尔值
对string的理解涉及string和其他类型诸如数组,json转化,正则... |
Java | UTF-8 | 3,292 | 3.484375 | 3 | [] | no_license | public class NQueens {
private int[][] board;
private int size;
//Constructor
public NQueens(int n) {//Constructor
this.size = n;
this.board = new int[n][n];
}
public boolean isSafe(int row, int col){
if(board[row][col]==0){
//Checks the vertical and horizon... |
Python | UTF-8 | 772 | 3.21875 | 3 | [] | no_license | dikt = dict()
def add(n, v):
if n in dikt :
dikt[n].append(v)
else:
dikt[n]= [v]
def create(n, p):
for k,v in dikt.items():
if k == p:
dikt[k].append(n)
def get(n, p):
for k, v in dikt.items():
if (n, p) == (k, [v]):
if k == p:
print(k)
return k
def find_path(dikt, start, end, path= []):
... |
JavaScript | UTF-8 | 2,995 | 2.984375 | 3 | [] | no_license | import React from 'react';
import Person from './components/Person';
import HeartRate from './components/HeartRate';
import Water from './components/Water';
import Slider from './components/core/Slider';
import Icon from './components/core/Icon';
import Temperature from './components/Temperature';
import '../src/css/bo... |
Java | UTF-8 | 7,979 | 1.820313 | 2 | [] | no_license | package com.qcloud.component.goods.web.controller.admin;
import com.qcloud.component.goods.model.AttributeDefinition;
import com.qcloud.component.goods.model.ClassifySpecifications;
import com.qcloud.component.goods.model.key.TypeEnum;
import com.qcloud.component.goods.service.AttributeDefinitionService;
import ... |
Shell | UTF-8 | 549 | 3.375 | 3 | [
"MIT"
] | permissive | #!/bin/sh -e
start() {
docker run --name="shiny" -p 80:3838 -d \
-v /home/shiny-server/shinyapps/:/srv/shiny-server/ \
-v /home/shiny-server/log/:/var/log/ \
-v /home/shiny-server/templates/:/etc/shiny-server/templates/ \
oncogenetics-shiny:latest
}
stop() {
docker stop shiny
... |
Java | UTF-8 | 1,306 | 2.28125 | 2 | [] | no_license | package modelo;
import java.util.ArrayList;
import modelo.Abono;
import modelo.Actividad;
import modelo.InscripcionCorporativa;
import modelo.PagoMensual;
import modelo.Socio;
public abstract class Inscripcion {
private String fecha;
private Socio socio;
private ArrayList<Actividad> actividades;
private Abono a... |
Java | UTF-8 | 3,270 | 2.921875 | 3 | [] | no_license | package com.camels.simulator;
import org.jgrapht.Graph;
import org.jgrapht.Graphs;
import org.jgrapht.graph.DefaultEdge;
import org.jgrapht.graph.SimpleGraph;
import java.util.ArrayList;
import java.util.Set;
public class Map {
private int aisles = 0;
private int sections = 0;
private int shelves = 0;
... |
Java | UTF-8 | 13,404 | 1.773438 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright (C) 2014 The Android Open Source Project
*
* 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 ... |
Markdown | UTF-8 | 952 | 2.828125 | 3 | [] | permissive | # My Personal Portfolio Website 🚀
My name is Parth Bhagvanbhai Shingala, and I have a passion for designing and developing applications that have a meaningful impact on people's lives. I am a Full-Stack developer with expertise in building and architecting exceptional digital experiences. My approach is characterized... |
Java | UTF-8 | 2,107 | 2.4375 | 2 | [] | no_license | package com.epam.training.ticketservice.repository.impl;
import com.epam.training.ticketservice.dataaccess.dao.ScreeningDao;
import com.epam.training.ticketservice.dataaccess.projection.ScreeningProjection;
import com.epam.training.ticketservice.domain.interfaces.Screening;
import com.epam.training.ticketservice.domai... |
Java | UTF-8 | 1,063 | 2.40625 | 2 | [] | no_license | package com.baobaotao.proxy;
import java.lang.reflect.Proxy;
/**
* Created with IntelliJ IDEA.
* User: vuclip123
* Date: 1/22/14
* Time: 10:26 PM
* To change this template use File | Settings | File Templates.
*/
public class TestForumService {
public static void main(String[] args) {
/*ForumServic... |
PHP | UTF-8 | 11,074 | 2.515625 | 3 | [
"PHP-3.0",
"Apache-2.0"
] | permissive | <?php
namespace app\index\controller;
use app\admin\model\Classz;
use app\admin\model\Examdata;
use app\admin\model\Paper;
use app\admin\model\Question;
use think\Controller;
use think\Request;
class Exam extends Controller
{
/**
* 显示资源列表
*
* @return \think\Response
*/
public function ind... |
C++ | UTF-8 | 9,122 | 2.578125 | 3 | [
"MIT"
] | permissive | #include <eepp/ui/css/stylesheetselector.hpp>
#include <eepp/ui/css/stylesheetelement.hpp>
namespace EE { namespace UI { namespace CSS {
StyleSheetSelector::StyleSheetSelector() :
mName( "*" ),
mSpecificity(0),
mCacheable(true)
{
parseSelector( mName );
}
StyleSheetSelector::StyleSheetSelector( const std::string... |
Java | UTF-8 | 4,347 | 1.992188 | 2 | [] | no_license | package com.ad.tibi.lib;
import android.app.Application;
import android.util.Log;
import com.ad.tibi.lib.imgad.ImageAdEntity;
import com.ad.tibi.lib.util.AdNameType;
import com.bytedance.sdk.openadsdk.TTAdConfig;
import com.bytedance.sdk.openadsdk.TTAdConstant;
import com.bytedance.sdk.openadsdk.TTAdSdk;
import com.q... |
Java | UTF-8 | 128 | 1.6875 | 2 | [] | no_license | package com.miikaah.kitarakauppaclient;
public interface IOnItemSelectedListener {
public void onItemSelected(Object item);
}
|
C++ | UTF-8 | 5,424 | 2.703125 | 3 | [
"MIT"
] | permissive | #include <application/application.hpp>
#include <boost/regex.hpp>
using namespace express;
application::application() {
}
void application::get(const routePath route,const routeHandler rHandler) {
register_route(http_verb::get,route,rHandler);
}
void application::post(const routePath route,const routeHandler ... |
Java | UTF-8 | 6,511 | 2.78125 | 3 | [] | no_license | package org.gyf.dao;
import org.gyf.common.Info;
import org.gyf.common.UserInfo;
import java.sql.*;
import java.util.ArrayList;
/**
* 对UserInfo表的增删查改操作
* 增改参数为对应UserInfo类对象
* 查可以按id查对应UserInfo信息,也可不加参数返回所有User信息
* 增删操作只有管理员有权执行,增删方法考虑与其他数据库一致性
* 查询更新操作不维护与其他数据库一致性
*/
public class UserMysqlDaoImp... |
C# | UTF-8 | 1,038 | 3.140625 | 3 | [] | no_license | using Problem_8._Military_Elite.Interfaces;
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
public class LeutenantGeneral : ISoldier, IPrivate
{
public string Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Corps { ge... |
Ruby | UTF-8 | 511 | 2.9375 | 3 | [] | no_license | module JsonFileReader
# Reads a file with expected format (see note below), replaces line terminators
# with commas and transforms into an array, so we can parse file content as JSON.
#
# Expects a file formatted with one object per line, and \n as a line terminator.
# This restriction means the functionalit... |
Java | UTF-8 | 511 | 3.390625 | 3 | [] | no_license | import java.util.Scanner;
import java.util.Stack;
public class WipeAllCouples {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.next();
Stack<Character> stc = new Stack<>();
for (char i : str.toCharArray()) {
if (stc.empty() ... |
Python | UTF-8 | 968 | 2.65625 | 3 | [] | no_license | from math import floor, sqrt
from collections import defaultdict
def factors(n):
d = defaultdict(int)
for i in range(2,floor(sqrt(n))+1):
while n % i == 0:
n //= i
d[i] += 1
if n == 1:
break
if n != 1:
d[n] += 1
return d
def inv(x, mod):
k ... |
Java | UTF-8 | 2,826 | 2.25 | 2 | [] | no_license | package com.gerrywen.seckill.model;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
public class MiaoshaUser implements Serializable {
@ApiModelProperty(value = "用户id, 手机号码")
private Long id;
@ApiModelProperty(value = "用户昵称")
private String nickname... |
Python | UTF-8 | 132 | 2.75 | 3 | [] | no_license | with open("input_data/problem013.txt", "r") as f:
cifre = list(map(int, f.read().splitlines()))
print(str(sum(cifre))[:10])
|
Java | UTF-8 | 5,250 | 1.914063 | 2 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package edu.sena.entitty.recuperacion;
import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Bas... |
Java | UTF-8 | 1,561 | 3.53125 | 4 | [] | no_license | package Manager;
public class CheckInput {
public static final String CORRECT = "correct";
/**
* This method checks, whether length of the given password is more than 4
* and less than 16. If so, it returns string "correct" if not it returns
* string "password" so we know, what error occured.
*
* @param ... |
JavaScript | UTF-8 | 6,236 | 2.703125 | 3 | [] | no_license |
let wallCanvas = new OffscreenCanvas(canvas.width,canvas.height);
let wallCtx = wallCanvas.getContext('2d');
function render(){
if(tiled){
renderTiled();
}else{
renderMarched();
}
}
function renderTiled(){
//ctx.fillStyle="black";
//ctx.fillRect(0,0,canvas.width,canvas.height);
let ... |
Python | UTF-8 | 66 | 3.390625 | 3 | [] | no_license |
n = int(input())
while (n>0) :
print(n)
n = n - 1
|
Java | UTF-8 | 3,175 | 2.25 | 2 | [] | no_license | package com.bezkoder.springjwt.controllers;
import java.util.List;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bi... |
Java | UTF-8 | 2,038 | 2.484375 | 2 | [] | no_license | package testA;
import com.company.entity.Order;
import com.company.entity.User;
import com.company.mysql.MySQLOrderDao;
import com.company.mysql.MySQLProductDao;
import com.company.mysql.MySQLUserDao;
import org.junit.Ignore;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
/**
* Created b... |
Shell | UTF-8 | 613 | 3.828125 | 4 | [] | no_license | #!/bin/bash
date=$(date +%Y_%m_%d)
if [ -f /root/.ssh/id_rsa ]
then
echo "Creating backups for $date"
mkdir $date
mysql -u$DB_USER -p$DB_PASSWORD -h$DB_HOST -N -e 'show databases' | while read dbname
do
echo "Dumping database $dbname"
mysqldump -u"$DB_USER" -p"$DB_PASSWORD" -h$DB_HOST "$dbname" > "$date/$dbna... |
Python | UTF-8 | 5,038 | 2.5625 | 3 | [] | no_license | # Python 3.5.2 using Keras with the Tensorflow Backend.
# Created on 12.08.2018, by Huy-Hieu PHAM, Cerema & IRIT, France.
# Import libraries and packages.
import os
import math
import numpy as np
import tensorflow as tf
from keras import optimizers
from keras.optimizers import Adam
from keras.layers import... |
Python | UTF-8 | 6,038 | 3.625 | 4 | [
"MIT"
] | permissive | # coding=utf-8
class SearchProblem(object):
'''Abstract base class to represent and manipulate the search space of a
problem.
In this class, the search space is meant to be represented implicitly as
a graph.
Each state corresponds with a problem state (ie, a valid configuration)
... |
JavaScript | UTF-8 | 3,190 | 2.765625 | 3 | [] | no_license | import React, { Component } from "react";
import "./Details.scss";
import Container from "../../components/Container";
import TextBox from "../../components/TextBox";
class Details extends Component {
state = {
deets: [{
id: 1,
img: "./images/react-logo.png",
heading: "... |
Shell | UTF-8 | 4,345 | 3.640625 | 4 | [] | no_license | # https://docs.aws.amazon.com/cli/latest/reference/logs/filter-log-events.html
function aws:logs:filter_events {
local start_time end_time filter
local limit="1000"
local group_name=""
local stream_names=()
local executor="execute_with_confirm"
local pager="| less"
local help="$(
cat <<-HELP
aws:logs... |
PHP | UTF-8 | 1,774 | 2.75 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class JohnnyController extends Controller
{
/**
* JohnnyController constructor.
*/
public function __construct()
{
$this->imageDir = public_path().'/images';
}
public function index(Request $request)
{
... |
C++ | UTF-8 | 1,796 | 3 | 3 | [
"MIT"
] | permissive | #include "BinaryFileWriter.h"
using namespace std;
using namespace SPH;
ofstream BinaryFileWriter::m_file;
bool BinaryFileWriter::openMeshFile(const char *fileName)
{
m_file.open (fileName, ios::out | ios::binary);
if(!m_file.is_open())
{
cout << "Cannot open file.";
return false;
}
return true;
}
void Bi... |
Java | UTF-8 | 1,781 | 1.976563 | 2 | [] | no_license | package com.coxandkings.travel.operations.model.accountsummary;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.math.BigDecimal;
import java.util.List;
public class BookingPaymentAdviseInfo {
private String supplierName;
private BigDecimal netPayableToSupplier;
private String paymentCu... |
Markdown | UTF-8 | 954 | 2.671875 | 3 | [] | no_license | # 对象依赖循环性检查
### 调用方式: POST
### 接口地址:
```
https://api.freelog.com/v2/storages/objects/{objectIdOrName}/cycleDependencyCheck
```
### url传入参数说明:
| 参数 | 必选 | 类型及范围 | 说明 |
| :--- | :--- | :--- | :--- |
| objectIdOrName | 可选 | string | 存储对象ID或者全名,需要URL编码 |
### body传入参数说明:
| 参数 | 必选 | 类型及范围 | 说明 |
| :--- | :--- | :--- ... |
Java | UTF-8 | 645 | 2.71875 | 3 | [] | no_license | package EmploymentMarket01;
public class Company {
public String Name;
public String WebPage;
public CompanyType Sector;
public Company(String name, String webPage, CompanyType sector) {
super();
Name = name;
WebPage = webPage;
Sector = sector;
}
public String getName() {
return N... |
C++ | UTF-8 | 1,301 | 3.875 | 4 | [] | no_license | //program to find if a string has balanced parenthesis
//parenthesis used for this program - ()
#include<iostream>
#include<stack>
#include<string>
using namespace std;
bool isbalanced(string s) //func returning 1/o based on inpur string
{
stack <ch... |
JavaScript | UTF-8 | 1,559 | 3.015625 | 3 | [] | no_license | import {crearCURegistro} from "../../src/usuarios/negocio/crearRegistro.js"
function crearDaoUsuariosTest() {
const usuarios = []
return {
add: (usuario, claveUnica) => {
const existe = usuarios.some(u => {
return u[claveUnica] === usuario[claveUnica]
})
... |
Python | UTF-8 | 290 | 2.640625 | 3 | [] | no_license | import csv
lines = []
with open('dic_v3_2.txt', 'r') as readFile:
for line in readFile:
if line[-1] == '\n':
line = line[:-1]
lines.append([line])
with open('dic2205.csv', 'w') as writeFile:
writer = csv.writer(writeFile)
writer.writerows(lines)
|
Python | UTF-8 | 457 | 3.625 | 4 | [] | no_license | #Global Variable
"""
a=10
def demo():
print(a)
demo()
print(a)
#O/p:10
10
"""
"""
a=10
def demo():
a=20
print(a)
demo()
print(a)
#o/p:20
10
"""
"""
a=10
def demo():
print(a)
a+=10
print(a)
demo()
print(a)
#Output:UnboundLocalError: local variable 'a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.