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
C
UTF-8
454
2.625
3
[]
no_license
***************************************************************************** * X - MULTIPLE PATH ****************************************************************************/ void dependence10( int flag, int *a ) { int *p; int b[10]; int i; // Two paths if( flag) p = a; else p = b; // p may p...
Markdown
UTF-8
414
2.890625
3
[]
no_license
# daily-coding-problem-python | Problem | Problem Statement | Solution | | ---------- | ------------------------------------------------------------ | --------------------------- | | Problem #1 | [Given a list of numbers and a number `k`, return whether ...
C++
UHC
1,707
4.0625
4
[]
no_license
/********************************************************** [ friend ] **********************************************************/ /* - Private ִ Ϲ Լ. - , ĸȭ Ģ ǹǷ ǵ ʴ´. - ǿ ַ ȴ. - friend function - friend member function - friend class class Point { private: int x; int y; public: Point( int _x...
C++
UTF-8
508
2.796875
3
[]
no_license
// Source: https://leetcode.com/problems/sum-of-all-subset-xor-totals/ // Author: Miao Zhang // Date: 2021-06-15 class Solution { public: int subsetXORSum(vector<int>& nums) { int res = 0; int n = nums.size(); for (int i = 0; i < (1 << n); i++) { int tmp = 0; for (...
Python
UTF-8
4,995
3.03125
3
[]
no_license
import numpy as np nFace = 6 # no. of faces in a cube nDot = 3 # no. of dots in an edge ele_size = (nDot**2 * nFace) * nFace maxTurn = 26 # theoretical max. of turns to solve class Observation_space: def __init__(self, isVerbose=False): self.states = np.arange(1, nFace+1, dtype=int).repeat(nDot**2).reshap...
Java
UTF-8
2,610
3.65625
4
[]
no_license
package hou.structrue.map; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; /** * @author houweitao 2015年8月10日 下午2:15:30 * http://blog.csdn.net/gamer_gyt/article/details/47147855 */ public class BFS { private Object[] vet; // 定义vet数组用来存放顶点信息 private...
Java
UTF-8
3,068
1.921875
2
[]
no_license
package com.hz.business.systemMng.controller; import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; import org.springframework.beans.f...
Java
UTF-8
533
3.09375
3
[]
no_license
package FourLesson; import java.util.Scanner; /** * Created by Dimaster on 20.06.2017.* */ public class StringsUtils { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("Введите сколько отработано лет "); String inputLine = sc.nextLine(); ...
Java
UTF-8
1,108
2.203125
2
[]
no_license
package com.library.serviceImplementation; import java.util.List; import javax.transaction.Transactional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.library.model.Role; import com.library.repository.RoleRepository; import com.library.serv...
Markdown
UTF-8
1,011
2.6875
3
[]
no_license
# Frontend Mentor - Social proof section solution This is a solution to the [Social proof section challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/social-proof-section-6e0qTv_bA). ## Table of contents - [Overview](#overview) - [The challenge](#the-challenge) - [Screenshot](#screenshot) - ...
Java
UTF-8
19,639
2.5625
3
[]
no_license
import java.awt.*; import java.util.ArrayList; public class Wave { private String status = "Basic"; private boolean tenacious; private boolean boss = false; private int waveNumber; private int strengthInNumbers = 0; private int difficulty; private final int EASY = 0; private final int NORMAL...
C#
UTF-8
10,013
2.6875
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Globalization; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web; namespace GSAV.Web.Util { public static class ConvertidorUtil { public stat...
Python
UTF-8
608
3.9375
4
[]
no_license
""" Removing all numbers from file names in the current working directory by utilizing Regular Expressions. This version utilizes Regular Expressions and re.sub(). The prior version checked for ASCII characters. """ import os, re def rename_file(): #List current working directory and its files cwd = os.getcwd(...
Java
UTF-8
2,220
3.375
3
[]
no_license
/* * Who Wants to be a Zillionaire? - Sound Mixer * Class that handles the sounds heard within the game * * @author James Duerden * @version 2016-04-07 */ import java.io.File; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; public class SoundMixer { public void playSo...
Swift
UTF-8
3,187
2.703125
3
[]
no_license
// // PostUploadViewController.swift // Garage Sell // // Created by Yuhong Xu on 5/24/20. // Copyright © 2020 Yuhong Xu. All rights reserved. // import UIKit import Firebase class PostUploadViewController: UIViewController, UITextFieldDelegate { @IBOutlet weak var photoUploadView: UIView! @IBO...
Go
UTF-8
1,099
4.03125
4
[]
no_license
package main import ( "fmt" "strconv" "strings" ) // IsDevideByThree return true if number can devide by three func IsDevideByThree(number int) bool { return number%3 == 0 } // IsDevideByFive return true if number can devide by five func IsDevideByFive(number int) bool { return number%5 == 0 } // IsContainThre...
Java
UTF-8
1,377
2.109375
2
[ "LicenseRef-scancode-dco-1.1", "Apache-2.0" ]
permissive
/* * Hibernate Validator, declare and validate application constraints * * License: Apache License, Version 2.0 * See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>. */ package org.hibernate.validator.ap.internal.checks; import java.util.Collections; import java.util.Se...
JavaScript
UTF-8
155
3.234375
3
[]
no_license
Array.prototype.inArray = function (value) { var i; for (i=0; i < this.length; i++) { if (this[i] === value) { return true; } } return false; };
Java
UTF-8
5,233
2.75
3
[]
no_license
package tr.com.javaileOtomasyon.dal; import tr.com.javaileOtomasyon.core.ObjectHelper; import tr.com.javaileOtomasyon.interfaces.DALInterfaces; import tr.com.javaileOtomasyon.types.KatagoriContract; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import ...
Python
UTF-8
2,223
3.40625
3
[]
no_license
# Define position rules RULE = { 'application': 'openoffice', 'coordinates': { 'top-left': {'lat': 60.187372, 'lon': 24.820325}, 'bottom-right': {'lat': 60.186569, 'lon': 24.822551} } } def order_by_location(vm_instances, location): # Get rules coordinates = RULE['coordinates'] ...
Python
UTF-8
797
3.40625
3
[]
no_license
# coding=utf-8 ''' 进程池 在Unix/Linux下,可以使用fork()调用实现多进程。 要实现跨平台的多进程,可以使用multiprocessing模块。 进程间通信是通过Queue、Pipes等实现的。 ''' from multiprocessing import Pool import os, time def run_process(name): print('run task [%s] ,pid=%s' % (name, os.getpid())) start = time.time(); time.sleep(.8) ...
Markdown
UTF-8
639
2.8125
3
[]
no_license
--- title: "Question B-9: What is a whitebox?" category: method tags: method template whitebox building-block permalink: /questions/B-9/ --- A whitebox contains multiple building blocks (blackboxes) with their relationships. It is a more detailed view of a blackbox of a higher abstraction level. You find an example ...
Java
UTF-8
1,338
2.84375
3
[]
no_license
import nodes.Expression; import java.util.HashMap; import java.util.Map; /** * Created by jonas on 12/9/16. */ public class Scope { public String selector = null; public String propertyName = null; private Map<String, Expression> vars = new HashMap<>(); public Scope() {} public Scope(Scope sco...
Python
UTF-8
765
3.578125
4
[]
no_license
#Simple GUIs - busFare from tkinter import * counter = 5 def fare(): global counter if int(disp.get()) <= 18: Label(window, text = "Your fare is $3.00").grid(row = counter, column = 0) counter += 1 elif int(disp.get()) <= 65: Label(window, text = "Your fare is $5.00").grid(row = c...
Python
UTF-8
725
2.78125
3
[]
no_license
import time import pytz from datetime import datetime from ..base import SourceThread class Timer(SourceThread): def __init__(self, tzname, accuracy='second'): super().__init__() self.accuracy = accuracy self.tz = pytz.timezone(tzname) def get_now(self): now = datetime.now(s...
Python
UTF-8
1,221
2.625
3
[]
no_license
from django.shortcuts import render from django.http.response import HttpResponse from django.contrib.auth import login, logout, authenticate from django.contrib.auth.models import User def glogin(request): """ Logs a user in. Requires the Google id token to be POSTED here and called "id_token". """ ...
Python
UTF-8
1,231
2.734375
3
[ "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
from singleton import Singleton import simulatedSIPTransportConnection class SimulatedNetwork(Singleton): def __init__(self): self.boundTransports = [] def bound_transport_with_address_and_port(self, bind_address_string, bind_port_integer): with self._lock: return next((t for t in...
Markdown
UTF-8
2,691
2.71875
3
[ "BSD-2-Clause" ]
permissive
## Purpose This [Docker](http://www.docker.com/) image is the base image for building applications for the Berkeley Identity Management Suite. This image is not not typically run directly. Instead, other Docker images that build specific BIDMS applications use this image as the base image. The author does not curre...
Java
UTF-8
495
1.796875
2
[]
no_license
package com.ht706.componentLibrary.systemManagement.actionForm; import com.ht706.componentLibrary.systemManagement.bean.hbm.Authorization; /** * * @Document: * @author: zd * @Time: 2010-08-31 * */ public class AuthorizationToActorForm { private int [] selectedAuthorization; public void setSelectedAuthorizat...
Python
UTF-8
2,882
3.03125
3
[]
no_license
import pandas as pd import nltk import numpy as np import random import string # to process standard python strings from nltk.stem.wordnet import WordNetLemmatizer from difflib import SequenceMatcher from nltk.tokenize import RegexpTokenizer import copy import random f=open('chatbot.txt','r') raw=f.read() raw=raw.lo...
Java
UTF-8
2,227
2.59375
3
[]
no_license
package MinMax; public class GlassDataMinMax { private double RI_min = 1.51115; private double RI_max = 1.53393; private double[] RI = {RI_min, RI_max}; //[1.51115, 1.513428, 1.515706, 1.5179839, 1.5202619, 1.5225399, 1.5248178, 1.5270958, 1.5293738, 1.5316517, 1.5339297] private double Na_min...
Java
UTF-8
540
2.4375
2
[ "Apache-2.0" ]
permissive
package com.piggysnow.exception; /** * 磁盘已被使用异常 * * @author <a href="mailto:qhuang@chinaschool.net">黄桥</a><br> * @since 2007-11-14 */ public class DiskIsUsedException extends RuntimeException { private static final long serialVersionUID = 1818712359023312032L; public DiskIsUsedException() { } public DiskIs...
Python
UTF-8
10,187
2.703125
3
[]
no_license
import arcade import math from character_action import * FACE_RIGHT = 1 FACE_LEFT = 2 FACE_UP = 3 FACE_DOWN = 4 KEY_UP = arcade.key.UP KEY_DOWN = arcade.key.DOWN KEY_LEFT = arcade.key.LEFT KEY_RIGHT = arcade.key.RIGHT KEY_LP = arcade.key.A KEY_LK = arcade.key.S KEY_HP = arcade.key.D KEY_HK = arcade.key.F class Char...
Markdown
UTF-8
2,592
2.90625
3
[ "MIT" ]
permissive
## What is User Experience? Abbreviated UX, it is how someone feels about a system, generally denoted by some form of human-computer interaction (HCI). A system could be any kind of website, application, desktop software, etc. A UX Designer studies and evaluates the overall EXPERIENCE of using a piece of technology t...
Markdown
UTF-8
589
2.53125
3
[]
no_license
# Article L731-9 Les relations financières entre l'établissement et les organismes de sécurité sociale, d'une part, et entre l'établissement et l'Etat, d'autre part, font l'objet de conventions destinées notamment à garantir la neutralité en trésorerie des flux financiers pour les organismes de sécurité sociale. **Li...
JavaScript
UTF-8
4,319
2.65625
3
[]
no_license
var http = require('http') var fs = require('fs') var url = require('url') var port = process.argv[2] if (!port) { console.log('请指定端口号好不啦?\nnode server.js 8888 这样不会吗?') process.exit(1) } var server = http.createServer(function (request, response) { var parsedUrl = url.parse(request.url, true) var path...
Java
UTF-8
1,922
2.234375
2
[]
no_license
package com.mimacom.testproject.service; import java.time.LocalDateTime; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; import java.util.stream.StreamSupport; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import co...
Markdown
UTF-8
12,601
2.515625
3
[]
no_license
# gitlab-nginx-auth OAuth2 authenticator service for Gitlab This service can be used as NginX authenticator service, used against GitLab as an authentication and authorization provider. The service can additionally provide trusted authentication information to the resource server. Its use requires [ngx_http_js_modul...
Java
UTF-8
371
2.390625
2
[]
no_license
public class Subjects { //subject name private String subject; // total marks for each subject private int marks; public String getSubject() { return subject; } public void setSubject(String subject) { this.subject = subject; } public int getMarks() { return marks; } public void setMar...
C++
UTF-8
1,083
2.5625
3
[]
no_license
#include <iostream> using namespace std; int T; int result; int num[283][283] = { 0, }; int main() { cin >> T; int b = 1; int row = 0; int col = 0; int cnt = 2; for (int i = 1; i <= 282; i++) { b += row; col = cnt; for (int j = 1; j <= 282; j++) { if (j == 1) num[i][j...
Java
UTF-8
328
2.203125
2
[]
no_license
package com.teaboot.context.common; public class ValuePair { Object value; Object pair; public Object getValue() { return value; } public void setValue(Object value) { this.value = value; } public Object getPair() { return pair; } public void setPair(Object pair) { this.pair = pair; ...
TypeScript
UTF-8
352
2.515625
3
[ "Apache-2.0" ]
permissive
const token = require('token'); token.defaults.secret = 'MAHJONG'; token.defaults.timeStep = 24 * 60 * 60; // 24h in seconds export default class AuthUtil { static genToken(data: string): string { return token.generate(data); } static isValid(data: string, auth: string): boolean { return t...
C
UTF-8
438
2.953125
3
[]
no_license
#include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <setjmp.h> jmp_buf jb; int x = 0; void fun2() { printf("enter fun2.\n"); longjmp(jb, 23); printf("exit fun2.\n");; } void fun1() { printf("enter fun1.\n"); x = 345; fun2(); printf("exit fun1.\n"); } int main() { int ret; volatile int y = 0; ...
Java
UTF-8
2,331
2.8125
3
[]
no_license
package by.javatr.yudenok.bean; public class Magazine { private Author author; private String title; private int pagesAmount; private String publishingHouseName; public Magazine(Author author, String title, int pagesAmount, String publishingHouseName) { this.author = author; this.t...
PHP
UTF-8
603
2.828125
3
[]
no_license
<?php namespace ReplayParser\Models\Actions; use ReplayParser\Models\Action; use ReplayParser\Reader; class ChangePaused extends Action { private $paused; protected $type = 'changePaused'; public static function parse(Reader $reader) { return (new self)->setPaused($reader->readUint8()); ...
Java
UTF-8
1,412
2.203125
2
[ "Apache-2.0" ]
permissive
/* * Copyright DataStax, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wri...
Java
UTF-8
1,826
3.390625
3
[]
no_license
package group144.tetin; import org.junit.Test; import static org.junit.Assert.*; public class PriorityQueueTest { @Test public void enqueue() throws EmptyPriorityQueueException { PriorityQueue<Integer> queue = new PriorityQueue<>(); queue.enqueue(1, 3); queue.enqueue(2, 2); qu...
C#
ISO-8859-1
2,550
2.671875
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; /* Nombre completo: Olivares Torres Victor Isaac Asignatura: Programacion Orientada a Objetos Nombre y nmero de ejercicio: Ejercicio 1 Descripcin de los que hace el script: Este Script se encarga de recopilar los valores necesarios y realiz...
C#
UTF-8
804
2.53125
3
[ "MIT" ]
permissive
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. #nullable disable using System; using System.Globalization; using System.Text; namespace Microsoft.AspNetCore.Razor.Language; internal static class Checksum { public static st...
Java
UTF-8
1,466
3.734375
4
[]
no_license
package com.example.alex.ghostapp4; /** * Created by Alex van der Meer * Student number: 10400958 * on 12-10-2015. * * This class holds the information on a player, and it has an ID for use in the Database * where these objects are stored * it contains functions to change the score after a match and overwrites ...
Markdown
UTF-8
1,342
3.375
3
[ "MIT" ]
permissive
--- layout: post title: Fluid iframe without use of javascript. posts: "/posts/2013-03-12-fluid-iframe-and-images-without-javascript-plugins/" description: Simple technique to make fluid iframes without use of javascript or plugins. --- Simple technique to make fluid iframes without use of javascript or plugins. Using...
Java
UTF-8
525
1.960938
2
[]
no_license
package com.example.hackathon21.controlador; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import reactor.core.publisher.Mono; @Re...
Markdown
UTF-8
2,152
3.234375
3
[]
no_license
--- title: Hidden Markov Model toc: true date: 2017-11-14 16:08:21 categories: nlp tags: HMM --- Hidden Markov Model (HMM) model is the most rapid and effective method to solve most Natural Language Processing problems. It successfully solves the problems of speech recognition, Machine Translation. <!-- more --> HMM...
Shell
UTF-8
490
2.71875
3
[ "MIT" ]
permissive
#!/usr/bin/env bash set -e mkdir -p /etc/yum.repos.d cat > /etc/yum.repos.d/elasticsearch.repo <<- EOF_REPO [elasticsearch-${ELASTICSEARCH_MAJOR}] name=Elasticsearch repository for ${ELASTICSEARCH_MAJOR}.x packages baseurl=http://packages.elastic.co/elasticsearch/${ELASTICSEARCH_MAJOR}/centos gpgcheck=1 gpgkey=http:/...
TypeScript
UTF-8
1,889
2.609375
3
[]
no_license
import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; import { retry, catchError, map } from 'rxjs/operators'; import { Customer } from '../model/customer'; //import { map } from 'rxjs/operator/map'; ...
C
UTF-8
1,890
3.78125
4
[ "MIT" ]
permissive
#include <math.h> #include "../../includes/_calc.h" // this function calculate power of // base b and exponent e. double power(double b, int e) { double result = b; for (size_t i = 1; i < e; ++i) { result *= b; } return result; } // this function calculate 4th root // of a number...
Java
UTF-8
358
1.875
2
[]
no_license
package com.example.demo.controller; import com.example.demo.dto.ServerTimeDTO; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class ServerTimeController { @GetMapping("/time") public ServerTimeDTO time() { ...
PHP
UTF-8
578
2.84375
3
[]
no_license
<?php namespace WP4Laravel\Yoast\Redirects; use Closure; use Illuminate\Http\Request; /** * Middleware that intercepts every request and checks if a redirect in Yoast * Premium is applicable. If so, stops further processing and returns the * redirect. */ class Middleware { private $service; public funct...
Shell
UTF-8
342
3.875
4
[]
no_license
#!/bin/bash # useful little function to create a countdown timer in bash scripts countdown() { secs=$1 shift msg=$@ while [ $secs -gt 0 ] do printf "\r\033[KWaiting %.d seconds $msg" $((secs--)) sleep 1 done echo } # then use it like this countdown 5 "to send email; ctrl-c to abort." # send ema...
Ruby
UTF-8
122
2.84375
3
[]
no_license
class Foobar def initialize(baz) @baz = baz end def bar(sym, obj) sym.to_s + @baz + obj[:sat].to_s end end
C++
UTF-8
278
2.640625
3
[]
no_license
#include "creature.h" #include <string> using std::string; #ifndef DRAGON_H #define DRAGON_H class Dragon : public Creature { public: Dragon(int health, int level, int damage, int defense, string type = "Dragon"); void castSpell(); void heal(Creature& other){} }; #endif
JavaScript
UTF-8
300
2.703125
3
[]
no_license
const http = require('http'); const server = http.createServer((req,res)=>{ res.writeHead(200,"Server created"); //this is how you include a message with a response res.end("ok"); //this is the message that'll appear on the scree }); server.listen(3000,()=>{ console.log(" we blessed") });
Java
UTF-8
2,529
2.578125
3
[]
no_license
package org.trip.store.dao; import org.apache.log4j.Logger; import org.junit.*; import org.trip.store.dao.ifaces.UserDAO; import org.trip.store.dao.impls.UsersDAOImpl; import org.trip.store.models.User; import org.trip.store.utils.ConnectionFactory; import java.sql.Connection; import java.sql.SQLException; import ja...
Python
UTF-8
1,208
3.5
4
[]
no_license
from tools import * class Solution(object): @print_ def spiralOrder(self, matrix): """ :type matrix: List[List[int]] :rtype: List[int] """ if not matrix: return [] ret = [] c1, r1, c2, r2 = 0, 0, len(matrix[0]) - 1, len(matrix) - 1 wh...
PHP
UTF-8
4,527
3.265625
3
[]
no_license
<?php namespace api\models; class Lecture{ private $db = null; private $tableName = "lecturer"; // Properties public $lecturerID; public $givenName; public $lastName; public $emailAddress; public $password; public function __construct($db) { $this->db = $db; } ...
Rust
UTF-8
6,952
3.328125
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "MIT" ]
permissive
use std::str::FromStr; use nom::{ IResult, bytes::complete::{tag, take_while1, take_until}, combinator::map_res, number::complete::double, character::complete::multispace0, multi::fold_many1, }; #[derive(Debug, PartialEq, Clone)] pub struct ControlPoint { pub image_id: u64, pub x_coord...
JavaScript
UTF-8
1,022
2.59375
3
[]
no_license
import React, { Component } from 'react'; import UsernameForm from './components/UsernameForm'; import ChatScreen from './components/ChatScreen'; import axios from 'axios'; class App extends Component { constructor() { super(); this.state = { currentScreen: 'WhatIsYourUsernameScreen', currentUser...
Python
UTF-8
6,570
2.765625
3
[ "Apache-2.0" ]
permissive
import sys import requests import time import datetime import tarfile import os import shutil from urllib.parse import urlparse from xml.etree import ElementTree savePath = "C:/Temp/" tmpdir = savePath+"cdb-"+str(time.time())+"/" def createTmpDir(tmpdir): os.mkdir(tmpdir) def removeTmpDir(tmpdir): shutil.rmt...
Markdown
UTF-8
4,175
3.09375
3
[]
no_license
# Hackathon-Submission MVP submission for Polygon track for Next Top Blockchain Startup # Setup Clone the git repository ``` git clone https://github.com/JoK3rtjk/Hackathon-Submission.git ``` Download dependencies in the root and app folders ``` npm i --save-dev ``` Launch ganache and set it to port 7545 https:/...
JavaScript
UTF-8
1,589
2.625
3
[]
no_license
import {authHeader} from "@/helpers/authHeader"; export const customerService = { createCustomer, customerUpdate, fetchCustomers, getCustomer, deleteCustomer }; function createCustomer(user) { const requestOptions = { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON....
Markdown
UTF-8
2,585
2.671875
3
[]
no_license
# eatgo ## 프로젝트 개요 eatgo 프로젝트는 간단한 레스토랑 예약 사이트의 백엔드 공부용으로 시작한 프로젝트입니다. Java(JDK13)와 SpringBoot, H2-DataBase, Gradle 등을 활용하여 제작하였으며, 레스토랑의 정보의 CRUD 기능과 유저, 어드민 계정의 CRUD기능과 로그인을 통한 간단한 리뷰 작성 기능을 구현하였습니다. 프론트엔드 단이 없고 백엔드 프로세스만 개발하여 터미널을 통해 http 명령어를 이용해 제대로 데이터들이 입력 되었는지 확인하였습니다. ## 프로젝트 기본 로직 ![Eatgo Basic Logic](https...
Markdown
UTF-8
10,202
3.046875
3
[ "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-dco-1.1", "GPL-1.0-or-later", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-free-unknown", "BSD-4-Clause", "CC-BY-SA-4.0", "EPL-1.0", "MIT", "JSON", "ISC", "GPL-3.0-only", "LicenseRef-scancode-public-domain", "BSD-2-Clause", ...
permissive
[#]: collector: (lujun9972) [#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (The Great Open Source Divide: ICE, Hippocratic License and the Controversy) [#]: via: (https://itsfoss.com/hippocratic-license/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) The ...
Markdown
UTF-8
1,006
2.921875
3
[]
no_license
# 系统状态树 系统状态的一部分是公开的(例如,通过[请求:读状态](https://sdk.dfinity.org/docs/interface-spec/index.html#http-read-state)或[认证数据](https://sdk.dfinity.org/docs/interface-spec/index.html#system-api-certified-data))的验证方法(见[认证](https://sdk.dfinity.org/docs/interface-spec/index.html#certification)中机械证明)。本节会抽象地描述系统状态的内容。 从概念上讲,系统状态是一棵带有标签...
Markdown
UTF-8
6,195
2.5625
3
[]
no_license
## Chapter 11 The day on which Sergey Ivanovitch came to Pokrovskoe was one of Levin’s most painful days. It was the very busiest working time, when all the peasantry show an extraordinary intensity of self-sacrifice in labor, such as is never shown in any other conditions of life, and would be highly esteemed if the...
PHP
UTF-8
1,841
2.75
3
[ "MIT" ]
permissive
<?php /** * Secure Password plugin for Craft CMS 3.x. * * Enforce stronger passwords on your users. * * @link http://fractorr.com * * @copyright Copyright (c) 2020 FractOrr */ namespace fractorr\securepasswords\services; use Craft; use craft\base\Component; use fractorr\securepasswords\models\Settings; u...
JavaScript
UTF-8
1,001
4.375
4
[]
no_license
/* TWO TYPES: 1. Primitive Data Type memory allocation is in stack STRING, NUMBER, BOOLEAN, NULL, UNDEFINED, SYMBOL 2. Reference Data type memory allocation is in Heap (dymanic) ARRAYS, OBJECT LITERALS, FUNCTIONS, DATES */ //STRING let name = 'Mubashir'; console.log('My name is ' + name); console.log('Data ...
SQL
UTF-8
558
3.375
3
[]
no_license
SELECT CONCAT(Name,CONCAT('(',LEFT(Occupation,1),')')) FROM OCCUPATIONS ORDER BY Name; SELECT CONCAT('There are a total of ',COUNT(Occupation),' ',LOWER(Occupation),'s.') FROM Occupations GROUP BY Occupation ORDER BY COUNT(Occupation),Occupation; -- CONCAT() - Is used to concatenate strings into a single string. And ...
Markdown
UTF-8
5,416
2.578125
3
[]
no_license
# Two on a Guillotine Full Movie WATCH HERE | DVD9 DVD5 DVDRip DVDScr DVB ![Two on a Guillotine Full Movie WATCH HERE | DVD9 DVD5 DVDRip DVDScr DVB](http://ia.media-imdb.com/images/M/MV5BMTgyODY2OTQ3OV5BMl5BanBnXkFtZTcwNjM3NjYxNA@@._V1) Download Movie at: [__DOWNLOAD NOW!__](http://shortwww.com/track/movie_gh/downloa...
Python
UTF-8
2,474
3.328125
3
[]
no_license
import pandas as pd import praw class Subreddit: def __init__(self, subreddit, praw_instance): self.subreddit = subreddit self.praw_instance = praw_instance def get_from_subreddit(self, limit=100, order='top', time_filter='all'): """ Basic call to grab a list of posts from a s...
Shell
UTF-8
1,255
3.78125
4
[]
no_license
#!/usr/bin/env bash CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" parse_ssh_port() { # If there is a port get it local port=$(echo $1 | grep -Eo '\-p ([0-9]+)' | sed 's/-p //') if [ -z $port ]; then local port=22 fi echo $port } get_remote_info() { local command=$1 ...
JavaScript
UTF-8
2,296
3.53125
4
[]
no_license
// 编写displayAbbreviations函数 function displayAbbreviations() { // 1 获取abbr元素(节点集合) var abbreviations = document.getElementsByTagName('abbr'); // 2 确保元素存在(不至于报错) if (abbreviations.length < 1) { return false; } // 3 获取保存每个abbr元素提供的信息(数组是理想的存储媒介) var defs = []; // 4 遍历数组 f...
C#
UTF-8
948
2.953125
3
[]
no_license
using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace Final { class CircleEnemy : Enemy { int radius; Vector2 Center { get { return new Vector2(pos.X + radius, pos.Y + radius); } } public CircleEnemy(Vector2 pos, Boat boat, Camera camera, Texture2D texture, bool giveP...
Python
UTF-8
1,079
2.890625
3
[]
no_license
from Crypto.Cipher import DES from Crypto import Random from PIL import Image def get_iv(): return Random.new().read(DES.block_size) def encrypt_image(path, path_out, cipher): with open(path, "rb") as f: image = f.read() header, image = image[:64], image[64:] image, ign = image[:(len(image) // 8)...
Shell
UTF-8
271
2.53125
3
[]
no_license
# # Goes through each of the sub directories and runs # svn up # to update the projects. This script should be run # manually to let you handle any merge/conflit issues # that might crop up. # # Nick Loadholtes, 2/14/2011 for x in $(ls); do echo $x; cd $x; svn up; cd ..; done;
PHP
UTF-8
8,212
2.71875
3
[ "MIT" ]
permissive
<?php declare(strict_types = 1); namespace UserAgentParserComparison\Html; use PDO; use function extension_loaded; use function htmlspecialchars; use function number_format; use function round; use function zend_version; use const PHP_OS; use const PHP_VERSION; final class OverviewGeneral extends AbstractHtml { ...
Markdown
UTF-8
1,204
2.84375
3
[]
no_license
## Front-End Web Developer Nanodegree PROJECT 5, Neighborhood Map This is a web application that uses Google Maps API and Yelp API to find interesting places in the neighborhood of Schaumburg, IL and display those places on a map. Live version of the application can be found here: http://lindazhaoatt.github.io/. Enjo...
Python
UTF-8
483
2.671875
3
[]
no_license
n=int(input()) for i in range(n): n1=input().split() binary=bin(int(n1[0])).lstrip('0b') diff=16-len(binary) if(diff): for j in range(diff): binary='0'+binary if(n1[2]=='L'): split=binary[:int(n1[1])] balance=binary[int(n1[1]):] print(int...
Ruby
UTF-8
599
3.234375
3
[]
no_license
require './chess' def help puts "" puts "ruby main.rb <piece> <current position>" puts "example: ruby main.rb knight b2" exit end piece = ARGV.shift || help position = ARGV.shift || help begin board = Board.init_with_pieces([[piece, position]]) moves = board.available_moves(position).collect { |coord| ...
Java
UTF-8
540
2.1875
2
[]
no_license
package com.lagecompany.infinity.dev.tools.views; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.files.FileHandle; import com.github.czyzby.lml.parser.impl.AbstractLmlView; import com.lagecompany.infinity.dev.tools.DevGame; public class MainView extends AbstractLmlView { public static final String ID = "main-v...
Java
UTF-8
886
1.828125
2
[]
no_license
package com.fish.dotago.client.match.model; import com.alibaba.fastjson.annotation.JSONField; import lombok.Data; import java.util.List; /** * @author Wayne * @date 2017年12月27日 * */ @Data public class MatchHistoryMatch { /** * */ @JSONField(name = "match_id") private String matchId; /*...
JavaScript
UTF-8
470
2.984375
3
[]
no_license
function printHighscore() { let highscore = JSON.parse(window.localStorage.getItem("highscores")) || []; highscore.sort(function (a, b) { return b.score - a.score; }); highscore.forEach(function (score) { let liScore = document.createElement("li"); liScore.textContent = score.initials + " - " + sc...
Shell
UTF-8
997
2.859375
3
[]
no_license
#!/usr/bin/env bash curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && c...
Java
UTF-8
2,470
1.875
2
[]
no_license
package com.iswAcademy.Voucherz.controller; import com.iswAcademy.Voucherz.domain.RoleName; import com.iswAcademy.Voucherz.domain.User; import com.iswAcademy.Voucherz.service.IUserService; import com.iswAcademy.Voucherz.util.TimeFormat; import org.assertj.core.util.Arrays; import org.junit.Test; import org.junit.runne...
C++
UTF-8
1,404
2.546875
3
[ "MIT" ]
permissive
#include <sstream> #include "tcp_socket_impl.h" namespace linear { TCPSocketImpl::TCPSocketImpl(const std::string& host, int port, const shared_ptr<EventLoopImpl>& loop, const weak_ptr<HandlerDelegate>& delegate) : SocketImpl(host, port, loop, delegate, Soc...
Python
UTF-8
144
3.828125
4
[]
no_license
''' x = 1 while x <= 3: print(x) x = x + 1 ''' x = 1 valor = int(input("Valor: ")) while x <= valor: print(x) x = x + 1
Java
UTF-8
3,448
2.4375
2
[]
no_license
package GUI; import java.awt.EventQueue; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.util.TimerTask; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; import javax.swing.ImageIcon; import...
Python
UTF-8
3,165
2.640625
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
from decimal import Decimal from enum import Enum import pytest from configclasses.conversions import EnumConversionRegistry, csv_list, csv_pairs, to_bool @pytest.mark.parametrize("input, expected", [ (False, False), ("0", False), ("False", False), ("FALSE",...
Java
UTF-8
8,738
1.53125
2
[]
no_license
package com.landray.kmss.zsrd.apply.reception.forms; import java.util.List; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionMapping; import com.landray.kmss.common.convertor.FormConvertor_FormListToModelList; import com.landray.kmss.common.convertor.FormConvertor_IDToModel; impor...
Python
UTF-8
904
3.90625
4
[]
no_license
#!/usr/bin/env python3 # # Created by: Austin de Mora # Created on: May 2021 # This program finds the bonus net amount of yearly salaries import math def main(): # This function calculates the bonus net amount of yearly salaries # Input service_years = input("Enter years of service: ") yearly_salary...
Python
UTF-8
623
3.71875
4
[]
no_license
def decode_variations(digits): return helper(digits, len(digits)) def helper(digits, n): count = [0] * (n + 1) count[0] = 1 count[1] = 1 for i in range(2, n + 1): if digits[i - 1] > '0': count[i] = count[i - 1] # If second last digit is smaller than 2 # and last digit is smaller tha...