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
1,823
2.53125
3
[ "MIT" ]
permissive
using System; using System.Text; using System.Collections.Generic; using System.IO; using System.Net; using System.Reflection; using System.Threading.Tasks; using BirdMessenger; using BirdMessenger.Collections; using BirdMessenger.Infrastructure; namespace demo3 { class Program { static async Task Mai...
Markdown
UTF-8
1,328
2.875
3
[ "MIT" ]
permissive
# material-colors Java Material Design Colors (color/string) [![](https://jitpack.io/v/fcannizzaro/material-colors.svg)](https://jitpack.io/#fcannizzaro/material-colors) ## Dependence ### Gradle ```gradle repositories { maven { url "https://jitpack.io" } } dependencies { compile 'com.github.fcannizzaro:mate...
JavaScript
UTF-8
209
3.078125
3
[]
no_license
avrg1 = (4+10+22+(-30)+55)/5; avrg2 = (68+7+(-22)+9+100)/5; avrg = (avrg1+avrg2)/2; console.log("First average is " + avrg1) console.log("Second average is " + avrg2) console.log("Both averages are " + avrg)
Java
UTF-8
132
2.0625
2
[]
no_license
class Ar { public static void main(String arg[]) { int a[]={1,2, 3,9}; for(Integer i:a) { System.out.println(i); } } }
Python
UTF-8
3,091
3.296875
3
[]
no_license
""" Open and close time calculations for ACP-sanctioned brevets following rules described at https://rusa.org/octime_alg.html and https://rusa.org/pages/rulesForRiders """ import arrow # Note for CIS 322 Fall 2016: # You MUST provide the following two functions # with these signatures, so that I can write # automa...
C++
UTF-8
1,840
3
3
[]
no_license
#ifndef SERVER_HPP #define SERVER_HPP #include <boost/asio.hpp> #include <memory> #include <fstream> #include <atomic> #include "http.hpp" #include "cache.hpp" #include "mutex.hpp" /** A caching web server. */ class Server { /** The io_service object used by all * boost::asio objects. */ boost::asio::io_servi...
C
UTF-8
19,800
2.796875
3
[ "BSD-2-Clause" ]
permissive
// // countedset.c // GNETextSearch // // Created by Anthony Drendel on 11/14/15. // Copyright © 2015 Gone East LLC. All rights reserved. // #include "countedset.h" #include "GNETextSearchPrivate.h" #include <string.h> // ------------------------------------------------------------------------------------------ ...
Markdown
WINDOWS-1252
9,901
2.578125
3
[]
no_license
--- title: "Reproducible Research: Peer Assessment 1" author: "skewdlogix" date: "April 22, 2017" output: html_document keep_md: true --- ```r knitr::opts_chunk$set(echo = TRUE) ``` ### Overview The GitHub repository was forked from https://github.com/rdpeng/RepData_PeerAssessment1 to my GitHub account and then clo...
Python
UTF-8
13,853
2.859375
3
[]
no_license
from PIL import Image, ImageFont, ImageDraw from PIL.ImageColor import getcolor, getrgb from PIL.ImageOps import grayscale, invert from PIL.ImageChops import multiply from math import pi from io import BytesIO import json import base64 import requests import string import random from sys import argv class ImagePro...
Python
UTF-8
3,502
3.140625
3
[]
no_license
#!/usr/bin/env python import os import sys import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy.stats import norm def print2(*args): for arg in args: print(arg, sep="\n\n", end="\n\n") np.random.seed(112) s0= 40 # Today's stock price K= 40 # Strike/Exercis...
Python
UTF-8
3,755
3.375
3
[]
no_license
import requests # ключ для доступа к сервису openweather.org TOKEN = "2de2066e26914e2c3d870fd02592dba3" def get_current_weather(city): """ Функция, возвращающая текущую погоду в городе. """ try: # запрос к сайту, используя необходимые параметры # q - название города # units -...
Java
UTF-8
179
1.546875
2
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
package com.cap.dao; import com.cap.entity.RoleUser; /** * @author C.H * @date 2021/6/16 16:17 */ public interface RoleUserMapper { int insert(RoleUser record); }
PHP
UTF-8
904
2.6875
3
[ "Apache-2.0" ]
permissive
<?php # # cool, url rewrite function ;-) # function rewrite($url, $param) { global $XCOW_B; $rewrite = array(); $matches = array(); $rewrite['match'] = 0; foreach ($XCOW_B['rewrite'] as $rewrite_key => $rewrite_value) { if (preg_match ("/^".my_quote_forward($rewrite_key)."$/", $url, $matches)) { $rewrite...
C
UTF-8
1,114
2.84375
3
[ "BSD-2-Clause" ]
permissive
/******************************************************************************* * * kit/system/util/key.c * - inspects key events until Ctrl+D is pressed * * vim:ts=2:sw=2:et:tw=80:ft=c * * Copyright (C) 2013, Devyn Cairns * Redistribution of this file is permitted under the terms of the simplified * BSD lice...
Python
UTF-8
1,839
2.5625
3
[]
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- import cPickle import load_data import argparse # WORD2INDEX_FILE_PATH = "/home/ubuntu/data/word2vec/small/word2index.pkl" # input # JAWIKI_WAKATI_FILE_PATH = "/home/ubuntu/data/word2vec/original/jawiki-wakati.txt" # input # INDEX_SEQUENCE_FILE_PATH = "/home/ubuntu/dat...
C
UTF-8
1,827
2.921875
3
[]
no_license
#include "tabelaf.h" #include <stdio.h> #include <string.h> void inicializaTabela(TabelaFrequencia *Tabela){ int i; char caracter; caracter = 'z'; for(i=0; i<MAX/2 ; i++){ Tabela->Simbolos[i].caracter = caracter; Tabela->Simbolos[i].ocorrencia = 0; caracter--; } caracter = 'Z'; for(i=i; i<MAX-...
Python
UTF-8
2,483
2.703125
3
[ "Apache-2.0" ]
permissive
import redis from random import choice import time import aiohttp import asyncio import sys import requests try: from aiohttp import ClientError except: from aiohttp import ClientProxyConnectionError as ProxyConnectionError class IpLib: host='192.168.5.31' port=6381 db=0 key='ip_t' default...
C#
UTF-8
10,506
2.609375
3
[ "MIT" ]
permissive
using SummerBoot.Core; using SummerBoot.Repository.Generator.Dto; using System.Collections.Generic; using System.Linq; using System.Text; using SummerBoot.Repository.Core; namespace SummerBoot.Repository.Generator.Dialect.SqlServer { public class SqlServerDatabaseInfo :AbstractDatabaseInfo, IDatabaseInfo { ...
Ruby
UTF-8
660
2.53125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
module Kikubari class Deploy class Logger def head(message) p "*" * 80 p "* #{message}" p "*" * 80 p "" end def run(message, folder = nil ) print( message, "Executing: " ) p " in folder: #{folder} " unless folder.nil? end def error...
Java
UTF-8
13,021
2.359375
2
[ "Apache-2.0" ]
permissive
/** See the file "LICENSE" for the full license governing this code. */ package au.org.ands.vocabs.registry.workflow.provider.backup; import java.io.IOException; import java.io.InputStream; import java.lang.invoke.MethodHandles; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; im...
Java
UTF-8
942
2.90625
3
[]
no_license
package model; import org.json.JSONException; import org.json.JSONObject; public class CurrentWeatherReport{ public final String cityName; public final Coordinates coordinates; public final int currentTemperature; public CurrentWeatherReport(String cityName, Coordinates coordinates, int currentTemperature) { ...
Go
UTF-8
395
3.25
3
[]
no_license
package main import "fmt" // Pi this is Pi! 🐈 const Pi = 3.14 const ( // Big is huge Big = 1 << 100 // Small is small Small = Big >> 99 ) func needInt(x int) int { return 10*x + 1 } func needFloat(x float64) float64 { return x * 0.1 } func main() { const World = "🐈" fmt.Println(World) fmt.Println(needInt...
C
UTF-8
506
2.875
3
[]
no_license
#include <unistd.h> #include <sys/time.h> #include "timer.h" static double timerEndTime; static int timerActive; static double get_time(void) { struct timeval time; gettimeofday(&time, NULL); return (double)time.tv_sec + (double)time.tv_usec * .000001; } void timer_start(double duration) { ...
Python
UTF-8
1,075
3.140625
3
[]
no_license
""" Exploring the spaCy NER items """ import spacy article = ''' Asian shares skidded on Tuesday after a rout in tech stocks put Wall Street to the sword, while a sharp drop in oil prices and political risks in Europe pushed the dollar to 16-month highs as investors dumped riskier assets. MSCI’s broadest index ...
Java
UTF-8
3,767
2.265625
2
[]
no_license
package cn.meiqu.lainmonitor.adapter; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import java.util.ArrayList; import cn.meiqu.baseproject.baseRecycle.BaseHolder; import cn.meiqu.baseproject.bas...
SQL
UTF-8
2,730
3.546875
4
[]
no_license
USE BD_PLPII; /*Archivo sql de Alvaro*/ DROP PROCEDURE IF EXISTS usp_ProyectosDirigidos; DROP PROCEDURE IF EXISTS usp_ProyectosDireccion; DROP PROCEDURE IF EXISTS usp_ProyectosParticipas; DROP PROCEDURE IF EXISTS usp_ProyectosParticipados; /*PROYECTOS DIRIGIDOS*/ /*P_COD_TRABAJADOR CHAR(5)*/ delimiter $$ CREATE PROCE...
Markdown
UTF-8
1,920
3.125
3
[]
no_license
@@ -1,19 +0,0 @@ ### Github 的用途 #### 最强大的功能 - Github 最强大的功能是:协作、同步,同时包括:追溯、审核、管理 > 写代码是一件很重的任务,尤其是很多人完成一个很大的项目的时候,就十分的复杂,一群人一起来写某个项目,大家完成的时间,完成的进度都是不相同的,你写一点我写一点,甚至可能你今天写的出现了错误,影响到了我昨天写的代码,最后怎么才能将大家的代码轻松的汇总起来,又怎么在汇总所有人的代码之后发现错误等等一系列问题。这样我们就用到了GitHub这个软件。 > > GitHub 的很强大的功能就是,你在服务器上创建一个库,一个主仓库,这里用来储存你的所有代码。如果不付费的话是所有人...
Markdown
UTF-8
491
3.328125
3
[ "MIT" ]
permissive
[<<< Previous question <<<](0571.md) Question ID#0572.md [>>> Next question >>>](0573.md) --- How do you declare the return type of a function? - [ ] A) ```php function sum($a, $b) :int {return $a + $b;} ``` - [ ] B) ```php function sum($a, $b) {return (int)$a + $b;} ``` - [ ] C) ```php function sum($a, $b) => ...
JavaScript
UTF-8
348
2.96875
3
[ "MIT" ]
permissive
/* Returns a copy of the object where the keys have become the values and the values the keys. For this to work, all of your object's values should be unique and string serializable. */ var invert = $.invert = (thisObject, object) => { object = object || {}; eachObject(thisObject, (item, key) => { object[item] = k...
Markdown
UTF-8
8,247
2.703125
3
[]
no_license
## Amondar Security Request. По любым вопросам образаться на e-mail - yurenery@gmail.com. <br/> Пакет предназначен для изменения и расширения работы стандартныйх Laravel реквестов в защищенных секциях сайта.<br/> !!! ВАЖНО!!! Для работы с Laravel начиная с версии 5.6 использовать теги - "**^2.0**" ## Для установки ``...
C++
UTF-8
791
2.78125
3
[]
no_license
#include <iostream> #include <fstream> #include <random> #include <string> #include <algorithm> #include <cstdlib> using namespace std; int main(int argc, char* argv[]){ if(argc < 2){ cout << "use ./genmap mapping.txt" << endl; return 0; } string outputFilename(argv[1]); ofstream ofs(outputFilename); vec...
C++
UTF-8
1,541
3.6875
4
[]
no_license
#include <iostream> #include <string> using namespace std; //GLOBAL VARIABLES string Menu[10] = {"Salad", "Grilled Cheese", "Tomato Soup", "Yogurt Parfait", "Bourbon", "French Fries", "Fried Chicken", "Chocolate Milkshake", "Oatmeal", "Scrambled Eggs"}; double Price[10] = {3.00, 5.00, 3.00, 4.50, 1.75, 2.00, 8.75, 2.5...
Markdown
UTF-8
4,727
2.8125
3
[]
no_license
# 辟谣 [从双黄连抑制病毒这件事的发布和辟谣上看,我们应当如何向公众有效地传播科学研究结果?](https://www.zhihu.com/question/368933647/answer/993018613) > Author: #NellNell Last update: *21/08/2021* Links: [[中医抗疫]] [[香油防疫]] [[科技抗疫]] Tags: #新冠Covid-19 谢邀。 这是一个清醒度很高的提问。特别是在这一片讨伐双黄连顺带着妖魔中医的刷屏大潮下,感谢提问。 这是一个逆行的回答。我觉得目前所有关于双黄连的回答,除了抖机灵就是**毫无针对性的反驳**。什么叫毫无针对性?就是你...
Java
UTF-8
12,495
1.953125
2
[]
no_license
package com.tour.ui; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.json.JSONObject; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.net.ConnectivityManager; import android.os...
TypeScript
UTF-8
2,115
2.625
3
[ "MIT" ]
permissive
import { Action } from '@ngrx/store'; import { ICard, IList } from '@boards/core/interfaces'; export enum ArchiveActionTypes { GET_ARCHIVED_CARDS = '[ARCHIVE] Get Archived Cards', GET_ARCHIVED_CARDS_SUCCESS = '[ARCHIVE] Get Archived Cards Success', RESTORE_CARD = '[ARCHIVE] Restore Card', RESTORE_CARD_SUCCESS...
Markdown
UTF-8
3,242
2.953125
3
[]
no_license
# > 2018000模板 第四部分 27 你为什么不从黑影里走出来?你究竟长得什么样?你是不是在害怕什么? 你害怕些什么呢? 在黑影里的人后面是玻璃门。克里斯要我把门打开,他现在大多了,但是仍然面带恳求。他想知道,“我现在该怎么办?我接下来要做什么呢?”他等待我的指示。 是该行动的时候了。 我仔细研究躲在黑影里的人。他不像过去那样给我不祥的感觉,我问他,“你是谁?” 他没有回答。 “那扇门为什么不可以打开?” 他仍然没有回答。对方保持沉默,这也表示他很怯懦,他害怕的竟然是我。 “还有比躲在暗处更糟的情况是吗?这就是你不说话的原因是吗?” 他似...
Markdown
UTF-8
10,394
3.1875
3
[ "MIT" ]
permissive
# 编程思想 定义过滤的方式解耦 本文将会很少涉及 dotnet 的知识,主要讲用定义过滤的方式解除过程业务的耦合。在一些业务上,可以从业务层面或逻辑层面明显分为几层,每一层之前的数据相互依赖或处理顺序相互依赖,但逻辑都独立。此时如果将业务处理放在过程处理里面,将会让过程处理耦合具体业务。而定义过滤的方式为让过程逻辑只是搭建框架为主,具体业务通过注入过滤的形式加入到处理 <!--more--> <!-- CreateTime:2020/3/8 8:29:53 --> 假设我有某个业务需要处理,这个业务分为两个大步骤,分别是 F1 步骤和 F2 步骤。而 F1 里面自然有 F1 步骤的业务,同理 F2 也一样。而我的业务上对...
Java
UTF-8
263
2.40625
2
[]
no_license
package ar.fiuba.tdd.tp.exceptions; public abstract class ConnectionException extends Exception { private String msg; public ConnectionException(String msg) { this.msg = msg; } public String getMsg() { return this.msg; } }
Markdown
UTF-8
1,297
2.59375
3
[]
no_license
--- book: author: Frank Herbert cover_image: dune-messiah.jpg cover_image_url: https://i.gr-assets.com/images/S/compressed.photo.goodreads.com/books/1533872326l/106._SY160_.jpg goodreads: '106' isbn10: 0441172695 isbn13: '9780441172696' pages: '331' publication_year: '1987' series: Dune Chronicles s...
JavaScript
UTF-8
503
2.546875
3
[]
no_license
var {isRealStr} = require('./validation'); var expect = require('expect'); describe('isRealStr', () => { it('should reject non-string values', () => { var res = isRealStr(1111) expect(res).toBe(false) }) it('should reject string with only spacess', () => { var res = isRealStr(' '...
Java
UTF-8
426
2.328125
2
[]
no_license
package com.epam.ag.model; /** * @author by Govorov Andrey. */ public class VehicleException extends RuntimeException { public VehicleException() { super(); } public VehicleException(String message) { super(message); } public VehicleException(String message, Throwable cause) { ...
Markdown
UTF-8
1,621
2.828125
3
[]
no_license
# AndroidGame-BasicApp Osnovna aplikacija za izradu igre u Android Studiu **1. Kreiranje početnog ekrana (UI)** <br/> *Izgled* određen u activity_main.xml koji sadrži jedan TexView i Button i koristi background.png. Orijentacija ekrana landscape.<br/> *Funkcijonalnost* određena u MainActivity.java gdje je ulaz u igru...
Python
UTF-8
836
3.28125
3
[ "MIT" ]
permissive
__all__=['IsEmail','ListedEmail'] __author__='Clavin(Martin)Adyezik - Adyezik@gmail.com' __doc__=""" EmailChecker: Simple Module with two function . Check if an E-mail is valid or check for list of E-mails """ __name__='EmailChecker' def IsEmail(x): """x must be a string Return True if x is a Valid E-mail""" ...
Java
UTF-8
1,078
3.9375
4
[ "Apache-2.0" ]
permissive
package main; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.IntBinaryOperator; public class Main { /** * 主入口 * * @param args 参数列表 */ public static void main(String[] args) { // 创建AtomicInteger对象 AtomicInteger value = new AtomicInteger(2); ...
C#
UTF-8
1,278
2.765625
3
[]
no_license
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; namespace MVCASPWeb.IO { class IOPath { public static string getAbsPathOfResource(string resource) { string outPutDirectory ...
JavaScript
UTF-8
1,809
2.546875
3
[]
no_license
const { gql} = require('apollo-server-express'); const typeDefs = gql` type Course { id: ID! title: String! description: String! teacher: Teacher rating: Int comments: [Comment] } type Teacher { id: ID! name: String! nationality: ...
PHP
UTF-8
3,599
2.84375
3
[ "MIT" ]
permissive
<?php /** * YAWIK * * @filesource * @license MIT * @copyright 2013 - 2016 Cross Solution <http://cross-solution.de> */ /** */ namespace Core\Form; use Zend\Form\Element; /** * A wizard style form container. * * Holds instances of form containers which each represent a "tab" of an wizard. * * @author M...
Java
UTF-8
2,391
1.96875
2
[]
no_license
package pnc.mesadmin.entity.common; import java.util.Date; //请检单信息表 public class QCheckMaInfo { private Integer Ruid; private String Guid; private String QCheckMaCode; private String QCheckMaType; private String Status; private String FinalResult; //出库确认结果 00#合格 01#不合格 private String Stock...
C#
UTF-8
440
2.546875
3
[ "MIT" ]
permissive
namespace Shop.Data.BusinessModels { public class Address { public Address(string city, string street, string streetNumber = null) { this.City = city; this.Street = street; this.StreetNumber = streetNumber; } public string City { get...
C#
UTF-8
15,080
2.921875
3
[ "MIT" ]
permissive
using NHulk.DynamicCache; using System.Collections.Generic; using System.Data; namespace NHulk { public static class DbConnectionByInstanceExtension { #region NormalQuery_ByInstance /// <summary> /// 通过多个实例查询满足条件的数据 /// </summary> /// <typeparam name="T">需要返回数据的类型</type...
C
UTF-8
11,376
2.609375
3
[ "MIT", "BSD-3-Clause" ]
permissive
#include <stdio.h> #include <stdlib.h> #include <ctype.h> #include "roi.h" #define DEBUG 0 #if 1 // エンディアンの変換 unsigned short htons (unsigned short n) { unsigned short h; unsigned char* c = (unsigned char*)&n; ((unsigned char*)&h)[0] = c[1]; ((unsigned char*)&h)[1] = c[0]; return h; } // エンディアンの...
Python
UTF-8
239
3.859375
4
[]
no_license
animals = ['dog', 'cat', 'cow'] print(animals) print(type(animals)) print(animals[0]) print(animals[1:2]) animals.append('pig') print(animals) animals.insert(1, 'bird') print(animals) print(len(animals)) del animals[0] print(animals)
Java
UTF-8
549
2.1875
2
[]
no_license
package by.trepam.karotki.news.service.impl; import java.util.ArrayList; import by.trepam.karotki.news.controller.CommandName; import by.trepam.karotki.news.service.HelpService; import by.trepam.karotki.news.service.exception.ServiceException; public class HelpServiceImpl implements HelpService { public ArrayList...
JavaScript
UTF-8
1,060
4.46875
4
[]
no_license
/* Ejecutar una tarea asíncrona usando promesas. var promise = new Promise(callback); parametros para callback: resolve: función a ser ejecutada cuando la promesa se resuelva reject: función a ser ejecutada cuando la promesa ses resuelva */ var tareaAsincrona = function(condicion) { var promesa = new Promise( fu...
C
UTF-8
542
3.53125
4
[]
no_license
#include <stdio.h> #define TRUE 1 #define FALSE 0 typedef int Bool; Bool logical_and(Bool a, Bool b); Bool logical_or(Bool a, Bool b); Bool logical_not(Bool a); void print_bool(Bool b); int main(){ Bool a = TRUE; Bool b = FALSE; print_bool(logical_and(a, b)); print_bool(logical_or(a, b)); return 0; } Bool ...
Swift
UTF-8
3,504
2.78125
3
[ "MIT" ]
permissive
// // TagsVisibilityManager.swift // SoundFontsFramework // // Created by Brad Howes on 20/01/2022. // Copyright © 2022 Brad Howes. All rights reserved. // import UIKit /** Controls visibility of the tags table view. */ struct TagsVisibilityManager { private let tagsBottomConstraint: NSLayoutConstraint pri...
Markdown
UTF-8
875
3.296875
3
[]
no_license
# To-doist.github.io # Project Link: https://amk1999.github.io/To-doist.github.io/ ## Table of Contents 1. [General Info](#general-info) 2. [Technologies](#technologies) 3. [Use](#Use) ### General Info: *** This Website page is the general task manager named as the to-do list this web pade contains following component...
Java
UTF-8
832
2.28125
2
[]
no_license
package com.example.administrator.appctct.Entity; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class Student { @SerializedName("id") @Expose private String id; @SerializedName("fullname") @Expose private String fullname; @SerializedNa...
Shell
UTF-8
508
3.140625
3
[]
no_license
#!/bin/bash #To run this you have to have root privileges #This aims to use the tool Petbox to automate honey pot setups. #Log in to your Linux machine as an admin user. Open a terminal window and download pentbox with the command: #Fetch the tool #save and run in root folder eval "cd /home/andrew/Downloads" eval ...
Markdown
UTF-8
6,785
3.375
3
[]
no_license
六五 他很腼腆,没再说什么,就这样沉默着。渐渐地,她开始感到不安。 “我的生活并不美满。”她说。 “嗯,”他应付着,他并不想听这种话。 “我觉得不会有人真正爱我的。”她说。 他并不回答。 “你是否也这样想,”她缓缓地说,“你是否以为我只需要肉体的爱?不,不是,我需要你精神上陪伴我。” “我知道你这样,我知道你并不只要求肉体上的东西。可我要你把你的精神——那金色的光芒给予我,那就是你,你并不懂,把它给我吧。” 沉默了一会她回答道: “我怎么能这样呢?你并不爱我呀!你只要达到你的目的。你并不想为我做什么,却只要我为你做。这太不公平了!” 他尽了最大...
PHP
UTF-8
1,070
2.546875
3
[ "MIT" ]
permissive
<?php namespace Bling\Opencart; class Manufacturer extends \Bling\Opencart\Base { public function get_all() { $sql = "SELECT manufacturer_id, `name` FROM `" . DB_PREFIX . "manufacturer` "; $result = $this->db->query($sql); return $result->rows; } public function insert($manufacturer) { $sql = "INSERT ...
C#
UTF-8
323
3.0625
3
[]
no_license
abstract class AbstractClass<T> { bool update() { Connection.Update<T>(this as T); } } class Entity : AbstractClass<Entity> { } class Connection { public static void Update<T>(T obj) { someMethod<T>() } ...
Python
UTF-8
1,587
4.6875
5
[]
no_license
#Tip: use Thonny for cool debugging ##Basic log print("🚨 Learning Python 🚨") ##Using new line /n #print("print('what to print')\nTest\nTest\nTest") ##Calling input #print("Hello " + input("What is your name?")) ##Ex: Write a program that prints the number of characters in a user's name. You might need to Google fo...
Go
UTF-8
1,511
3.0625
3
[]
no_license
package downloader import( "net/http" "io/ioutil" "fmt" ) const ( retryNum = 2 retryWait = 1 ) type Downloader struct { ID string } type Result struct { Data []byte ContentType string } func New() (downloader *Downloader, err error) { downloaderID := autoID() downloader = &Do...
Markdown
UTF-8
4,594
2.65625
3
[]
no_license
--- title: Combobox Component --- <link rel="stylesheet" href="/css/tailwind-components.css"> <script setup> import { ref } from "vue" import { Icon } from "@iconify/vue" import ApiReference from "../../src/components/ApiReference.vue" import metadata from "../../src/gallery/metadata.json" import { useMetadata } from...
C++
UTF-8
2,712
2.609375
3
[]
no_license
#include <iostream> #include <visualization.h> #include <Eigen/Dense> #include <dV_spring_particle_particle_dq.h> #include <d2V_spring_particle_particle_dq2.h> #include <forward_euler.h> #include <backward_euler.h> #include <symplectic_euler.h> #include <runge_kutta.h> //igl #include <igl/readOBJ.h> //simulation p...
Markdown
UTF-8
2,456
3.5625
4
[]
no_license
--- layout: post title: "紧张" date: 2015-07-20 22:22:44 +0800 comments: true categories: 感触 --- 每个人都会犯错,很多时候我们讨厌自己犯错,但是更多是讨厌自己犯错后的处理方式,因为很多时候我们选择了逃避。<!--more--> 虽然我一直很讨厌自己,但是现在我开始接受自己了。即使我以前犯过很多错误,现在也会犯很多错, >To raise self-esteem and that is to cope as opposed as avoid. 在中考考语文的时候,我紧张得手都在抖。每一次参加篮球比赛,我都紧张得双手双脚僵硬。每一次的考试,...
Java
UTF-8
525
1.828125
2
[]
no_license
// Generated by dagger.internal.codegen.ComponentProcessor (https://google.github.io/dagger). package com.kotlin.goods.data.repository; import dagger.internal.Factory; public final class CategoryRepository_Factory implements Factory<CategoryRepository> { private static final CategoryRepository_Factory INSTANCE = ne...
TypeScript
UTF-8
716
2.96875
3
[]
no_license
import * as React from 'react'; export interface Dimensions { width: number; height: number; } export type ViewPortType = 'mobile' | 'desktop'; export interface ViewPort { dimensions: Dimensions; type: ViewPortType; } export const windowDimensions = (window: Window): Dimensions => ({ width: window.innerWi...
C++
UTF-8
3,784
3.140625
3
[]
no_license
#ifndef __OPENGL_EXPERIMENTS_TRANSFORMATIONS__ #define __OPENGL_EXPERIMENTS_TRANSFORMATIONS__ #include <cmath> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> /* In this file, we hand construct the transformation matrices. * Since the aim of this project is to learn the fundamentals of * 3D graphics,...
Java
UTF-8
7,085
3.65625
4
[ "MIT" ]
permissive
package tictactoe; import java.util.Scanner; public class Main { public static Scanner scanner = new Scanner(System.in); public static String[][] gameBoard = { {" ", " ", " "}, {" ", " ", " "}, {" ", " ", " "} }; public static State currentState = State.X_TURN; ...
Markdown
UTF-8
1,480
3.328125
3
[]
no_license
object Main extends Application { val t = new Array(3, 5) } ```scala java.lang.VerifyError: (class: , method: <init> signature: ()V) Bad t ield/putstatic at RequestResult$$.<init>(<console>:3) at RequestResult$$.<clinit>(<console>) at RequestResult$$result(<console>) at sun.reflect.N...
PHP
UTF-8
838
2.71875
3
[]
no_license
<?php namespace Indielab\AutoScout24; use Curl\Curl; class Client { public $cuid; public $member; const API_URL = 'https://www.autoscout24.ch/api/hci/v3/json/'; public function __construct($cuid, $member) { $this->cuid = $cuid; $this->member = $member; } ...
SQL
UTF-8
569
2.84375
3
[]
no_license
DROP PROCEDURE IF EXISTS PPOSITIONMOT; DELIMITER | CREATE PROCEDURE PPOSITIONMOT (IN VPOSITION INT, IN VTITRE BOOLEAN, IN VID_MOT INT, VID_ENTITE INT, IN VID_POS_TAG INT, IN VID_ARTICLE INT,IN VID_SYNONYME INT,IN VID_WIKI INT) BEGIN INSERT INTO POSITION_MOT (ID_POSITION, POSITION,TITRE,ID_MOT,ID_ENTITE,ID_PO...
Java
UTF-8
4,324
2.390625
2
[ "Apache-2.0" ]
permissive
package com.tyz.bluetoothstudy; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothSocket; import android.os.Handler; import android.os.Message; import android.util.Log; import java.io.BufferedReader; import java.io.IOException; import java.io.InputS...
SQL
UTF-8
1,254
3.609375
4
[]
no_license
CREATE PROC Stage.usp_LocationUpdate AS INSERT INTO [Core].[Location] ([Code] ,[Name] ,LocalName ,[BusinessKey] ,[LocationType_ID] ,[ParentLocation_ID] ) select Src.Location, Src.Location, Src.Location ,Src.Location ...
Java
UTF-8
2,832
2.46875
2
[]
no_license
package com.moviesmustsee.dtos; import com.moviesmustsee.documents.Movie; import com.moviesmustsee.documents.MovieLinks; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.time.LocalDate; @NotNull @NotEmpty public class MovieOutputDto extends MovieMinimumOutputDto ...
Shell
UTF-8
143
3.3125
3
[]
no_license
echo " enter num1" read a echo " enter num2" read b if [ $a -gt $b ] then echo "$a is greater than $b" else echo " $b is larger than $a " fi
Markdown
UTF-8
4,370
3.28125
3
[ "MIT" ]
permissive
--- layout: post title: "Swift. 정리하기 26" subtitle: "Swift Language Reference-Types" date: 2018-04-15 09:00:00 author: "MinJun" header-img: "img/tags/Swift-bg.jpg" comments: true tags: [Swift] --- ## Reference [Types](https://developer.apple.com/library/content/documentation/Swift/Conceptual/Sw...
C#
UTF-8
1,563
3.375
3
[ "MIT" ]
permissive
using System.Linq; namespace ProjectEuler { public class S315 : ISolution { private static readonly int[,] Overlap = new int[10, 10] { { 6,2,4,4,3,4,5,4,6,5}, { 2,2,1,2,2,1,1,2,2,2}, { 4,1,5,4,2,3,4,2,5,4}, { 4,2,4,5,3,4,4,3,5,5}, { 3...
Python
UTF-8
330
3.796875
4
[ "MIT" ]
permissive
print('{:=^100}'.format(' DESAFIO 23-A ')) n = str(input('\nDigite um númeoro de 0 a 9999: ')) n = '{:0>4}'.format(n[:4]) unidade = n[3] dezena = n[2] centena = n[1] milhar = n[0] print('\nUnidade: {}\nDezena: {}\nCentena: {}\nMilhar: {}\n'.format(unidade, dezena, centena, milhar)) print('{:=^100}'.format(' FIM DESAFIO...
C++
UTF-8
1,143
2.96875
3
[]
no_license
#include<stdio.h> int main() { int i, a=0; float w, h, m1=0, m2=0, m3=0, m4=0, m5=0, mh=0, p=0; for(int k=0; k<55; k++) { if(k==0 || k==11 || k==22 || k==33 || k==44) printf("\n\n\t\tTime %d\n", k/11+1); printf("\nDigite, nesta ordem, a idade, o peso e a altura do jogador: "); scanf("%d %f %f", &i,...
PHP
UTF-8
3,124
2.671875
3
[ "MIT", "GPL-2.0-only", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php namespace Drupal\core_search_facets; use Drupal\Core\Database\Query\Condition; use Drupal\search\SearchQuery; /** * Extension of the SearchQuery class. */ class FacetsQuery extends SearchQuery { /** * Stores joined tables. * * @var array */ protected $joinedTables = []; /** * Adds the ...
Java
UTF-8
1,340
2.25
2
[]
no_license
package com.fyf.student.controller; import com.fyf.student.entity.User; import com.fyf.student.model.ResultModel; import com.fyf.student.service.ILocationService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.an...
Shell
UTF-8
1,759
4.03125
4
[ "MIT" ]
permissive
#!/usr/bin/bash #################################################################### ### This script assembles RNAseq reads into contigs and scaffolds # # To run this script you must have SPAdes installed. # #################################################################### ### This chunk checks for...
C#
UTF-8
590
3.046875
3
[]
no_license
using System; using System.Collections.Generic; using System.Text; namespace ClassMetotDemo { class CustomerManager { public void Add(Customer customer) { Console.WriteLine(customer.Name+ " " + customer.LastName + " " + "Adlı Müşteri Eklendi"); } public void Guncelle(string MusteriAdi, string Must...
Java
UTF-8
1,320
2.609375
3
[ "Apache-2.0" ]
permissive
package denominator; import java.io.Closeable; import java.io.IOException; import javax.inject.Inject; /** * represents the connection between a {@link DNSApi} interface and the {@link Provider} that * implements it. */ public class DNSApiManager implements Closeable { private final Provider provider; privat...
Java
UTF-8
278
2.265625
2
[]
no_license
package Messages; import java.io.Serializable; public class Knock implements Serializable { public int responsePort; public byte[] bytes; public Knock(int responsePort, byte[] bytes){ this.responsePort = responsePort; this.bytes = bytes; } }
C++
UHC
328
2.71875
3
[]
no_license
/* پ ƿ Լ */ #ifndef GOMOKU_UTIL_H #define GOMOKU_UTIL_H #include <vector> #include <sstream> using namespace std; class Util { public: // input ڸ ū Լ. vector<string> getTokens(string input, char delimiter); }; #endif // !GOMOKU_UTIL_H
Java
UTF-8
678
2.203125
2
[]
no_license
package com.meca.trade.to; import java.io.File; import java.io.IOException; import java.util.Iterator; import org.apache.commons.io.FileUtils; public class GraphDataGenerator extends FileReportGenerator { @Override public void writeLog(String log) { writer.print(Constants.GRAPH_DATA_JSON_START_STRING); writer...
Swift
UTF-8
7,037
2.515625
3
[ "Apache-2.0" ]
permissive
import UIKit import DifferenceKit final class RandomViewController: UIViewController { private typealias Section = ArraySection<RandomModel, RandomModel> @IBOutlet private weak var collectionView: UICollectionView! private var data = [Section]() private var dataInput: [Section] { get { return...
C#
UTF-8
1,103
2.84375
3
[]
no_license
using System.Collections; using System.Collections.Generic; using System.IO; using UnityEngine; using LitJson; public class LocalFile { public void SaveLocalFile(string path, string fileName, object obj) { string fpath = System.IO.Path.Combine(path, fileName); //將myPlayer轉換成json格式的字串 string...
JavaScript
UTF-8
398
2.96875
3
[]
no_license
$(document).ready(function(){ //focus and blur $("input").focus(function(){ $(this).css('background','pink'); }); $("input").blur(function(){ $(this).css('background',''); }); $("input").keydown(function(){ $('#output').text('You are typing...'); }); $("input...
Ruby
UTF-8
845
3.828125
4
[]
no_license
require 'pry' $side_dishes = {"Carrots": 1.75, "Mystery Yogurt": 1.00, "Beef Jerky": 0.50} class SideDish attr_accessor :name, :price def initialize(name, price) @name = name @price = price $side_dishes[@name.to_sym] = price end # def add # puts "What menu item would you like to add?" # n...
Java
UTF-8
3,067
2.4375
2
[]
no_license
package Levels.Three; import Levels.BasicLevel; import java.awt.Point; public class Level_33 extends BasicLevel{ public Level_33() { BackGroundColor = "Black"; Time = "300" ; type = "GreenAndTrees" ; // if OrangeAndMushroom then red tr...
Java
UTF-8
1,411
2.421875
2
[]
no_license
package com.dyn.springbootdemo.entity; import org.hibernate.annotations.GenericGenerator; import javax.persistence.*; import java.util.Objects; @Entity @Table(name = "t_user", schema = "test", catalog = "") public class TUserDO { private int pkUid; private String fName; private String fPassword; @Id...
C++
UTF-8
668
2.609375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; class Solution { public: int minSteps(string s, string t) { int alp1[210], alp2[210]; memset(alp1, 0, sizeof(alp1)); memset(alp2, 0, sizeof(alp2)); for (auto ch : s) alp1[ch]++; for (auto ch : t) alp2[ch]++; int sum =...
Python
UTF-8
1,548
2.734375
3
[ "BSD-3-Clause" ]
permissive
#!/usr/bin/env python3 import requests import ujson as json import re import time PUSHSHIFT_REDDIT_URL = "http://api.pushshift.io/reddit" def fetchObjects(**kwargs): # Default params values params = {"sort_type": "created_utc", "sort": "asc", "size": 10} for key, value in kwargs.items(): params[...
C#
UTF-8
3,343
2.703125
3
[]
no_license
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Collections.Generic; using Calculator.Infrastructure; using System.Linq; namespace UnitTestProject { [TestClass] public class ShuntingYardPostfixNotationTest { [TestMethod] public void TestMethod1() { va...
Ruby
UTF-8
510
2.84375
3
[ "MIT" ]
permissive
#!/usr/bin/env ruby require_relative '../lib/account_challenge' require 'csv' if ARGV.length < 2 puts "Invalid number of arguments! Please review and try again." else accounts_file = File.open(ARGV[0]) transaction_file = File.open(ARGV[1]) @account_engine = AccountChallenge.new @account_engine.read...