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
2,289
2.546875
3
[]
no_license
package game.worldsrv.support; import game.worldsrv.support.Utils; import java.util.Properties; import core.support.SysException; /** * 系统参数 本类都是简单的参数配置,如果需要判断系统环境, 比如是手游还是页游,则使用C.java判断 */ public class C { // 配置文件名称 private static final String CONFIG_NAME = "config.properties"; public static final String GAM...
Python
UTF-8
1,805
2.671875
3
[]
no_license
#!/usr/bin/python3 from locators.locators import Locators class HomePage: def __init__(self, driver): self.driver = driver # ----------------------------------- Elements ----------------------------------- self.user_icon_link_xpath = Locators.user_icon_link_xpath sel...
C
UTF-8
3,347
3.78125
4
[]
no_license
#include <stdio.h> #include <time.h> #include <stdlib.h> #define tamanho_vetor 1000 #define range 10000 void insereOrdenado(int vetor[], int valor, int posicao){ int aux = 0, i = 0; //Insere o primeiro elemento no vetor if(posicao == 0){ vetor[posicao] = valor; }else{ //verifica a...
Java
UTF-8
2,920
2.78125
3
[]
no_license
package com.techelevator.operations; public class Space { private String spaceName; private int spaceId; private boolean isAccessible; private String openDate; private String closeDate; private double dailyRate; private int maxOccupancy; private int menuID; public String getSpaceName() { return ...
Markdown
UTF-8
1,278
3.09375
3
[ "MIT" ]
permissive
## 功能 确认弹窗 ## API #### 属性 属性 | 说明 | 类型 | 默认值 ---|---|---|--- content | 文本内容 | `string` | `确认?` msg | 文本内容 | `string` | `确认?` title | 弹窗标题 | `string` | `提示` showIcon | 是否显示Icon | `boolean` | `false` iconClass | icon的class | `string` | `icon-question` cancelText | 取消按钮文字,如果是空串就不渲染取消按钮| `string` | `取消` okText | 确定按钮的文字...
Java
UTF-8
634
1.546875
2
[]
no_license
package cn.com.jiahang.core.manager.system.service.impl; import cn.com.jiahang.core.manager.system.entity.SysFillRule; import cn.com.jiahang.core.manager.system.mapper.SysFillRuleMapper; import cn.com.jiahang.core.manager.system.service.ISysFillRuleService; import com.baomidou.mybatisplus.extension.service.impl.Servic...
JavaScript
UTF-8
410
2.53125
3
[]
no_license
class SlingShot{ constructor(bodyA,bodyB){ var options = { bodyA: bodyA, bodyB: bodyB, stiffness: 0.02, length: 40 } this.sling= Constraint.create(options) World.add(world,this.sling) } display(){ strokeWeight(4) //line(x1,y1,x2,y2) line(this.sling.bodyA.position.x,this.sling.b...
C#
UTF-8
366
2.5625
3
[]
no_license
using System; using System.IO; namespace Lemon2.Command.Commands { public class PWD : CommandBase { public PWD() : base("pwd", "prints working directory", "pwd") {} public override void onCommand(string[] args) { Console.WriteLine(Directory.GetCurrentDire...
JavaScript
UTF-8
1,956
3.234375
3
[]
no_license
'use strict'; (function () { window.library = {}; window.library.enableElement = function (element) { element.removeAttribute('disabled'); }; window.library.disableElement = function (element) { element.setAttribute('disabled', 'disabled'); }; window.library.selectElement = function (element) { ...
Python
UTF-8
641
2.734375
3
[]
no_license
import sklearn from sklearn.feature_extraction.text import TfidfTransformer, CountVectorizer from sklearn.naive_bayes import MultinomialNB from sklearn.pipeline import Pipeline # USES SKLEARN'S PIPELINE TO MAKE A CONTINOUS SET OF SUCCESSIVELY OCCURING FUNCTIONS, COUNTVECTORIZER() TO TOKENIZE AND BUILD A SET OF...
Java
UTF-8
518
1.914063
2
[]
no_license
package de.xeqo.camcapdemo; import android.hardware.usb.UsbDevice; import android.view.View; import android.view.View.OnClickListener; final class k implements OnClickListener { private /* synthetic */ RemoteCaptureActivity a; k(RemoteCaptureActivity remoteCaptureActivity) { this.a = remoteCaptureAct...
PHP
UTF-8
580
3.140625
3
[]
no_license
<?php namespace App; class Race { protected $distance; protected $start; protected $fleet; public function distance() { return $this->distance; } public function setDistance($distance) { $this->distance = $distance; } public function start() { r...
Java
UTF-8
3,130
3.375
3
[]
no_license
package 大脑.测试; import java.util.ArrayList; import java.util.List; public class 已处理 { public List<Object> 获取句子对象集(String sentence){ List<String> subStrs= new ArrayList<String>(); for(int star=0;star<sentence.length();star++){ for(int end=star+1;end<=sentence.len...
C#
UTF-8
2,467
2.515625
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using Musoq.Schema.DataSources; namespace Musoq.Schema.Time { public static class TimeHelper { public static readonly IDictionary<string, int> TimeNameToIndexMap; public static readonly IDictionary<int, Func<DateTimeOffset, object>> TimeIndexToMe...
C++
UTF-8
670
3.1875
3
[]
no_license
#ifndef EXE_22 #define EXE_22 #include <string> class Person { friend std::istream& read(std::istream&, Person&); friend std::ostream& print(std::ostream&, const Person&); private: std::string _name; std::string _address; public: std::string getName() const { return name; } std::string getAd...
Java
UTF-8
6,250
2.359375
2
[]
no_license
package com.iva.model; import java.text.SimpleDateFormat; import java.util.Date; import javax.persistence.Entity; import javax.persistence.Id; import org.apache.commons.lang3.StringUtils; @Entity(name="ivvtasgu") public class Ventas{ @Id private Integer id; /*REPLICO ELEMENTOS ORIGINALES DEL SISTEMA VIEJO, SI...
Python
UTF-8
1,435
2.546875
3
[]
no_license
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> import turtle >>> wn = turtle.Screen() >>> tutle.Turtle() Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> tutle.Turt...
Markdown
UTF-8
4,682
3.09375
3
[ "MIT", "CC-BY-4.0" ]
permissive
--- title: Use the HoloLens clicker description: This article outlines how to use the HoloLens clicker, including clicker pairing, charging, and recovery. ms.assetid: 7d4a30fd-cf1d-4c9a-8eb1-1968ccecbe59 ms.date: 09/16/2019 manager: jarrettr keywords: hololens ms.prod: hololens ms.sitesec: library author: v-miegge ms....
Python
UTF-8
6,168
3.203125
3
[]
no_license
#bfs求解算法 import numpy as np import math class node: def __init__(self, x=0, y=0, t=0): self.x = x self.y = y self.t = t # t表示走到这个格子用的步数 class father: def __init__(self, x=0, y=0, cz=[]): self.x = x # 当前格子的父节点坐标 self.y = y self.cz = cz # 由什么操作到达的这个格子,D,R,L,U ...
Shell
UTF-8
833
3.96875
4
[]
no_license
#!/usr/bin/env bash set -Eeu git fetch --all git pull # Generate and iterate over an array of submodule names. submodule_list_string="$(git config --file .gitmodules --get-regexp path | awk '{ print $2 }')" IFS=$'\n' read -d '' -ra submodule_list_array <<< "${submodule_list_string}" || true root_folder="${PWD}" for...
Markdown
UTF-8
1,493
3.109375
3
[]
no_license
# BIM-chain ## Blockchain & Tokens TBD - [ ] Property token - [ ] Possession token ## Data layer exercises The following is a short excercise on how to put data onto ipfs and retrieve it again. The idea is to put the reference (ipfs hash) to this data somewhere onto the blockchain and given that reference, retriev...
Python
UTF-8
1,402
3.515625
4
[]
no_license
# -*- coding: utf-8 -*- """ step05_ver1x_ver2.py ver1.x -> ver2.x ''' step08_variable_feed_csv.py -> ver2.0 1. 즉시 실행 2. 세션 대신 함수 3. @tf.function 함수 장식 ''' """ import tensorflow as tf import pandas as pd # csv file read from sklearn.model_selection import train_test_split # data split path = "C:/ITWILL/6_Tensorflo...
Shell
UTF-8
290
3.078125
3
[]
no_license
#!/bin/bash set -e set -x set -o pipefail RPMROOT=${HOME}/rpmbuild WEBROOT=/var/www/html/pub # direcry check [ -d ${WEBROOT} ] || sudo mkdir -p ${WEBROOT} # RPM Package Copy cd ${RPMROOT}/RPMS/ pwd sudo rsync -avx . ${WEBROOT}/ # make yum repositry cd ${WEBROOT} pwd sudo createrepo .
Java
UTF-8
1,741
2.8125
3
[]
no_license
/** * VM Args: -verbose:gc */ public class ByteCodeEngine { public static void main(String[] args) { /** * [GC (System.gc()) 70745K->66272K(249344K), 0.0161803 secs] [Full GC (System.gc()) 66272K->66186K(249344K), 0.0197580 secs] * @param args */ // byte[] plac...
C++
UTF-8
3,492
3.734375
4
[]
no_license
#pragma once #include <iostream> #include <string> #include <vector> #include <cmath> using namespace std; //class Vector; class Matrix { protected: int m_rows; int m_cols; double** m_matrix; public: //! wrap operator [i][j], it has the same speed as (,) or direct access ! // When you have a decent compiler...
Java
UTF-8
25,111
2
2
[]
no_license
/******************************************************************************* * Copyright (c) 2004, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, an...
Java
UTF-8
1,823
1.585938
2
[ "Apache-2.0" ]
permissive
package kotlin.internal; import java.lang.annotation.Annotation; import java.lang.annotation.RetentionPolicy; import kotlin.DeprecationLevel; import kotlin.Metadata; import kotlin.SinceKotlin; import kotlin.annotation.AnnotationRetention; @java.lang.annotation.Retention(RetentionPolicy.SOURCE) @java.lang.annotation.T...
Python
UTF-8
957
4.40625
4
[]
no_license
from time import sleep num1 = int(input('Primeiro valor: ')) num2 = int(input('Segundo valor: ')) opção = 0 while opção != 5: print('''[1] somar [2] multiplicar [3] maior [4] novos numeros [5] sair do programa ''') opcão = int(input('>>>>> Qual é a sua opção? ')) if opção == 1: soma = num1 + num2 ...
C++
UTF-8
1,404
2.90625
3
[]
no_license
// // Created by anouk on 15-03-20. // using namespace std; #include "../includes/crispr.h" #include <algorithm> Crispr::Crispr(std::string name_id, int dr_length, std::vector<int> dr_positions) { id = name_id; detected = 0; partially_detected = 0; length = dr_length; positions = dr_positions; } ...
Python
UTF-8
4,548
2.78125
3
[ "MIT" ]
permissive
# -*- coding:utf-8 -*- """ aiohttp client接口封装 Author: HuangTao Date: 2018/05/03 """ import aiohttp from urllib.parse import urlparse from quant.utils import logger from quant.config import config class AsyncHttpRequests(object): """ HTTP异步请求封装 """ _SESSIONS = {} # 每个域名保持一个公用的session连接(每个session持有自...
Java
UTF-8
1,660
3.234375
3
[]
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 java8; import java.util.Comparator; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; import jav...
Go
UTF-8
1,834
2.765625
3
[]
no_license
package cssectl import ( "encoding/json" "net/http" "time" "github.com/gorilla/mux" applogger "github.com/junkd0g/covid/lib/applogger" csse "github.com/junkd0g/covid/lib/csse" merror "github.com/junkd0g/neji" ) /* Get request to /api/csse/{country} { "country": "US", "data": [ { ...
Python
UTF-8
4,586
3.453125
3
[]
no_license
''' Scores are maintained in SCurrent and generated in SNext. SCurrent is a dictionary where: the key is the digit we are currently in the value is another dictionary of all possible scores with their respective probabilities Todo: 10 digit formatting Test!! ''' import math class Phonepad: def ...
Go
UTF-8
1,624
3.015625
3
[]
no_license
package fileManager import ( "io" "net/http" "os" "github.com/gin-gonic/gin" ) func UploadFileToPeer(c *gin.Context) { file, err := c.FormFile("file") // The file cannot be received. if err != nil { c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{ "message": "No file is received", }) return } ...
Java
UTF-8
230
2.5
2
[]
no_license
public class ReverseString { public static void main(String[] args) { String s1="Reverse"; StringBuilder b=new StringBuilder(); b.append(s1); b.reverse(); System.out.println(b); } }
JavaScript
UTF-8
1,613
3.953125
4
[]
no_license
function solution(input){ // Split the data into [category, item] format // Ex: ['fruit_bannana', 'vegetable_carrot'] => [['fruit', 'bannana'], ['vegetable', 'carrot]] let groceryItems = input.split(',').map(item => item.split('_')); // Store the items in an object by category. let groceryStorage = ...
PHP
UTF-8
1,047
2.59375
3
[ "MIT" ]
permissive
<?php namespace Apie\ApieBundle\Wrappers; use Apie\CmsLayoutGraphite\GraphiteDesignSystemLayout; use Apie\HtmlBuilders\Assets\AssetManager; use Apie\HtmlBuilders\Interfaces\ComponentInterface; use Apie\HtmlBuilders\Interfaces\ComponentRendererInterface; final class CmsRendererFactory { private function __construc...
Shell
UTF-8
189
3.0625
3
[]
no_license
#!/bin/bash x=name y=DOB echo -n "What is your $x? " read $x echo "What is your $y?" read $y m=( date +%Y ) let a=m-y let r=50-a let z=m+r echo "$name will be of 50 years by $z"
Markdown
UTF-8
715
3.1875
3
[]
no_license
在某些情况下,为了提高效率和操作方便,需要允许一个函数或类访问另一个类的私有成员,这需要通过友元实现。 友元可以实现数据共享,但在一定程度上破坏了类的封装性,除非在提高效率上有很大帮助,一般不提倡使用友元,友元较多地用在运算符重载中。为了更好地使用友元,需要在共享和封装之间找到一个结合点。 ## 友元函数 友元函数是在类外定义的一个函数,它不是本类的成员函数,而是一个普通的函数或其他类的成员函数。 ## 友元类 除了可以声明函数为类的友元函数外,还可以将一个类声明为另一个类的友元类。
JavaScript
UTF-8
2,791
2.953125
3
[]
no_license
'use strict'; const express = require('express'); const { Pool } = require('pg'); const axios = require('axios'); const PORT = 8080; const HOST = '0.0.0.0'; const sqlMaxSleep = parseFloat(process.env.SQL_SLEEP_MAX) || 0.0; // seconds const loopCount = parseInt(process.env.LOOP_COUNT) || 0; const poolSize = parseInt(...
Java
UTF-8
28,117
1.539063
2
[]
no_license
/** * This file was converted to Java from the original LLVM source file. The original * source file follows the LLVM Release License, outlined below. * * ============================================================================== * LLVM Release License * ======================================================...
C#
UTF-8
1,808
2.796875
3
[]
no_license
using Async_MVVM.Models; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using WpfAutoCompleteControls.Editors; namespace Async_MVVM { internal sealed class SuggestionProvider : ISuggestionProvide...
Python
UTF-8
716
2.671875
3
[]
no_license
#/usr/bin/env python def bipartilte_matching(): res = 0 import numpy as np N = int(input()) red = sorted([tuple(map(int, input().split())) for _ in range(N)], reverse=True) blue = sorted([tuple(map(int, input().split())) for _ in range(N)], reverse=True) ref = np.zeros((N, N)) for r in range(N): for b in...
Java
UTF-8
2,190
2.5
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 Controller; import View.viewIntroVsExtro; import View.viewSensingVsIntution; import java.awt.event.ActionEvent; import java.aw...
Rust
UTF-8
774
2.765625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
use proc_macro2::TokenStream; use quote::quote; pub enum Operand { Borrowed(TokenStream), Owned(TokenStream), } pub use self::Operand::*; impl Operand { pub fn tokens(&self) -> &TokenStream { match self { Borrowed(n) | Owned(n) => n, } } pub fn ref_tokens(&self) -> To...
JavaScript
UTF-8
622
2.9375
3
[]
no_license
'use strict'; angular.module('CSApp') .filter('timeReadable', function() { return function(input) { var h = parseInt(input/100); var m = input%100; if (h < 10) { h = '0' + h; } if (m < 10) { m = '0' + m; } return h + ':' + m; }; }); angular.modul...
Rust
UTF-8
2,734
2.953125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/ / ! Helper module to compute a CRC32 checksum use std : : io ; use std : : io : : prelude : : * ; use crc32fast : : Hasher ; / / / Reader that validates the CRC32 when it reaches the EOF . pub struct Crc32Reader < R > { inner : R hasher : Hasher check : u32 / / / Signals if inner stores aes encrypted data . / / / AE ...
PHP
UTF-8
8,005
2.515625
3
[]
no_license
<?php require_once __DIR__ . '/../static.php'; /** * May already be defined in TYPO3 */ if (!function_exists('debug')) { /** * @param mixed,...$a */ function debug(...$a) { $params = func_num_args() == 1 ? $a : func_get_args(); if (class_exists(Debug::class)) { $debug = Debug::getInstance(); $debu...
Python
UTF-8
3,048
2.8125
3
[]
no_license
from flask import Flask, render_template, redirect, request, session, flash from vocabchallenge import app, database, mp import random @app.route('/game/<lang>', methods=('post', 'get')) def game(lang): #if the player is currently in a game if session.pop('ingame',False): #word and definition retriev...
C++
UTF-8
6,964
3.03125
3
[]
no_license
#include "Mesh.h" using namespace DirectX; /// <summary> /// Constructor for a procedurally generated mesh. /// </summary> /// <param name="vertices">array of indexed vertices</param> /// <param name="numVertices">number of vertices</param> /// <param name="indices">array of indices</param> /// <param name="numIndice...
C
UTF-8
227
3.875
4
[]
no_license
/* 1> Accept a char input from the user and display it on the console */ #include <stdio.h> void main() { char c; printf("Enter a char: \n"); scanf("%c", &c); printf("The character you entered is: %c\n", c); }
C++
UTF-8
678
2.8125
3
[]
no_license
#include<iostream> #include<algorithm> #include<cmath> #include<vector> using namespace std; int main(){ string a,b,c; cin>>a>>b; int lena=a.length(),lenb=b.length(); for(int i=0;i<=lena/2-1;i++){ swap(a[i],a[lena-1-i]); } for(int i=0;i<=lenb/2-1;i++){ swap(b[i],b[lenb-1-i]); } if(lena<lenb){ a.append(len...
C++
UTF-8
4,572
2.90625
3
[]
no_license
#include <stdlib.h> #include <stdio.h> #include <math.h> #include "header-file.h" #include <windows.h> #include <conio.h> NUMEROS n; void introducao() { printf("Ol\240, Seja muito bem vindo!\nEsse \202 o Lord of Mathematics 6\n"); printf("\n(Qualquer duvida digite: ?)\n"); } void primeiroValor() { printf("\n----...
C++
UTF-8
765
3.15625
3
[ "MIT" ]
permissive
#pragma once #include <archive.h> #include <archive_entry.h> #include "arcpp/entry.hpp" namespace arcpp { /** * @brief To iterate over all entries in the archive. * */ class iterator { public: iterator(::archive* ar); /** * @brief Check if the iterator still has files to read. * * @return true If ther...
Java
UTF-8
1,650
1.789063
2
[]
no_license
package project.FleaMarket.P002.D006.service; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.dao.DataAccessException; import org.springframework.stereotype.Serv...
Python
UTF-8
350
3.078125
3
[ "BSD-2-Clause" ]
permissive
# x= float(8) # y = 8.4 # name = 'cınar' # isonline = True # print(type(x)) # print(type(y)) # print(type(name)) # print(type(isonline)) pi=3.14 r =float(input('dairenin yarıcapını giriniz:')) dairenin_cevresi = 2*pi*r dairenin_alani = pi*r*r print('dairenin_cevresi:', dairenin_cevresi) print('dairenin a...
PHP
UTF-8
2,080
2.96875
3
[]
no_license
<?php namespace WordPressDotOrg\FiveForTheFuture\PledgeForm; use WordPressDotOrg\FiveForTheFuture; use WordPressDotOrg\FiveForTheFuture\Company; use WordPressDotOrg\FiveForTheFuture\CompanyMeta; use WP_Error; defined( 'WPINC' ) || die(); function render_shortcode( $attributes, $content ) { $action = filter_input(...
Java
UTF-8
5,775
1.757813
2
[]
no_license
package com.yondervision.yfmap.result.hulunbuir; /** * */ public class HulunbuirAppApi0100801Result { /** 个人姓名*/ private String accname = ""; /** 出生日期 */ private String birthday = ""; /** 证件号码*/ private String certinum = ""; /** 证件类型*/ private String certitype = ""; /** 学...
Markdown
UTF-8
5,280
2.765625
3
[ "MIT", "CC-BY-4.0" ]
permissive
--- title: Frequently asked questions about Azure Cosmos DB point-in-time restore feature. description: This article lists frequently asked questions about the Azure Cosmos DB point-in-time restore feature that is achieved by using the continuous backup mode. author: kanshiG ms.service: cosmos-db ms.topic: conceptual m...
C++
SHIFT_JIS
964
3.0625
3
[]
no_license
/** * @file can_begin_method.hpp * @brief w肵^std::beginł邩ǂ肷郁^֐ * @author ΎR I * @date 2018/12/13 */ #ifndef SAKI_TYPE_TRAITS_BEGIN_METHOD_HPP #define SAKI_TYPE_TRAITS_BEGIN_METHOD_HPP #include <type_traits> #include <utility> #include <iterator> #include <saki/macro/namespace_macro.hpp> SAKI_NAMESPACE_BEGIN /** * @bri...
Java
UTF-8
1,070
3.671875
4
[]
no_license
package com.satya.list; /** * Created by Satya on 10/31/18. */ public class LinkedList { private Node head; public static class Node { int data; Node next; public Node(int data) { this.data = data; } } public void printList() { Node temp = head...
Shell
UTF-8
417
3.390625
3
[ "MIT" ]
permissive
#!/usr/bin/env sh echo "TRAVIS_OS_NAME=$TRAVIS_OS_NAME" if [ "$TRAVIS_OS_NAME" = "osx" ]; then # Parse 'Mono JIT compiler version 5.0.1.1' to '5.0.1' monoVer=$(mono --version | head -n 1 | cut -d' ' -f 5 | cut -d'.' -f 1-3) prefix="/Library/Frameworks/Mono.framework/Versions/$monoVer"; ...
Java
UTF-8
9,392
2.3125
2
[]
no_license
package com.aromasoft; import android.annotation.TargetApi; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.opengl.GLSurfaceView.Renderer; import android.opengl.GLU; import android.opengl.GLUtils; import android.os.Build; import android.util.Log; import and...
PHP
UTF-8
526
2.625
3
[]
no_license
<?php class TestMigration extends Migration { public $tables = array("users", "photos"); public function up() { $table = $this->create_table('users'); $table->string('name'); $table->integer('my_int'); $table->timestamps(); $table->go(); $table2 = $this->create_table('photos'); ...
Markdown
UTF-8
1,394
3.71875
4
[]
no_license
# HTML Slots [HTML Slot Specification](https://html.spec.whatwg.org/multipage/scripting.html#the-slot-element) [Slot MDN Page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot) A `<slot>` is a named element that can be used as a placeholder for other content to be "slotted" in later. A slot will displ...
JavaScript
UTF-8
473
2.828125
3
[]
no_license
class VillageState { constructor(place, parcels) { this.place = place; this.parcels = parcels; } move(destination) { if (!roadGraph[this.place].includes(destination)) { return this; } else { let parcels = this.parcels.map(p => { if (p.place != this.place) return p; retu...
Markdown
UTF-8
2,700
3.140625
3
[ "MIT" ]
permissive
--- layout: post category: tech tagline: "" tags : [git, devops] comments: true --- {% include JB/setup %} ``参考,部分转载:https://yorkyu.cn/how-to-use-rebase-to-gracefully-fallback-code-08cdafe3d403.html`` # 基本操作概念 1. Git Revert 使用命令 ``git revert commit_id`` 能产生一个 与 ``commit_id`` 完全相反的提交,即在 log 中会看到一条新的提交 ``new_commit_id`...
Python
UTF-8
14,242
3.359375
3
[]
no_license
''' Python dash file: Visualizes the dashboard for the predction model and the optimization model ''' # package imports import pandas as pd import dash import dash_table import dash_html_components as html import dash_core_components as dcc from dash.dependencies import Input, Output from virginia...
C#
UTF-8
370
2.640625
3
[]
no_license
using System; using System.Linq; using System.Windows.Media; namespace SharpestBeak.UI { internal static class LocalHelper { #region Public Methods public static Color WithAlpha(this Color color, byte alpha) { return Color.FromArgb(alpha, color.R, color.G, colo...
Swift
UTF-8
2,353
2.6875
3
[]
no_license
// // IssueDetailHeaderView.swift // IssueTracker // // Created by sihyung you on 2020/11/04. // Copyright © 2020 IssueTracker-15. All rights reserved. // import UIKit enum IssueBadgeColor: String { case open = "OpenIssueBackgroundColor" case closed = "ClosedIssueBackgroundColor" } class IssueDetailHeade...
JavaScript
UTF-8
828
3.265625
3
[]
no_license
var fortunes = [ "Have a nice day", "You look really good today", "It's your birthday!", "Never play leapfrog with a unicorn" ]; var net = require('net'); var server = net.createServer(function(connection){ connection.write("Enter the number of fortunes you want: "); connection.on('data', function(data){ ...
C++
UTF-8
2,405
2.859375
3
[ "Apache-2.0" ]
permissive
#ifndef __TYPE_CHECK_H__ #define __TYPE_CHECK_H__ #include <stdexcept> #include <string> #include <cstdint> // Set of macros to assist with performing the type checks such the arguments // required to generate the exception message are not evaluated unless the // condition is met #define TYPE_CHECK_ARRAY(...
C#
UTF-8
2,394
2.546875
3
[]
no_license
using System; using System.Collections.Generic; using System.Configuration; using System.Linq; namespace Common { public class Unit { public enum HostilityEnum : sbyte { /// <summary> /// Unspecified Hostility status /// </summary> UNSPECIFIED = ...
JavaScript
UTF-8
624
2.59375
3
[]
no_license
export const state = () => ({ _snackbar: false, _text: `Hello, I'm a snackbar`, }); export const mutations = { CHANGE_SNACBAR(state, bool) { state._snackbar = bool; }, CHANGE_TEXT(state, text) { state._text = text; }, }; export const actions = { openSnacbar({ commit, dispatch }, { time, text }) ...
Python
UTF-8
6,930
4.1875
4
[]
no_license
''' Write a program to evaluate poker hands and determine the winner Read about poker hands here. https://en.wikipedia.org/wiki/List_of_poker_hands ''' def is_four_of_a_kind(hand): ''' This code is to check if the given hand is four of a kind or not. Converted the hand into a list of inde...
PHP
UTF-8
1,753
3.046875
3
[]
no_license
<?php namespace GatewayWorker\Lib; /** * Event objects are passed as parameters to event listeners when an event occurs. * * @see EventDispatcher * @author 不再迟疑 */ class Event { private static $sEventPool = array (); /** * * @var EventDispatcher $_target */ public $target; /** * ...
C++
UTF-8
8,971
3.296875
3
[]
no_license
//**************************************************************************************************** // // File: StudentList.cpp // // Student: Michael Remphry // // Assignment: Program #9 // // Course Name: Data Structures II // // Course Number: COSC 3100 ...
Java
UTF-8
838
2.28125
2
[]
no_license
package com.integration.structure.facade.client; import com.integration.structure.facade.AbstractEncryptFacade; import com.integration.structure.facade.impl.EncryptFacade; import com.integration.structure.facade.impl.NewEncryptFacade; /** * Created by ZhangGang on 2019/6/4. */ public class Client { public stati...
Python
UTF-8
5,350
3.125
3
[]
no_license
import tkinter as tk import steamapi class Application(tk.Frame): def __init__(self, master): super().__init__(master) self.create_widgets(master) def create_widgets(self, master): tk.Label(master, text=" ").grid(row=0, column=0) tk.Label(master, text="Steam API Key:").grid(...
Java
UTF-8
331
1.78125
2
[]
no_license
package zdanie3; public class OpisZadania { /* Stworz dwie grupy zadan: Producent: ktorego zadaniem bedzie np: co sekunde sprawdzanie np monitorowania ofert pracy na portalu np: justJoin.It albo dowolnym innnym, Consumer: bedzie pobieral oferty (nazwa, stanowisko, stawka, podstawowe wymagania) z producenta. ...
PHP
UTF-8
1,930
2.59375
3
[]
no_license
<?php session_start(); ?> <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>Đổi Mật Khẩu</title> </head> <form method="post"> <table align="center"> <tr> <td>HỆ THỐNG ATM</td> </tr> <tr> <td>Mật Khẩu Cũ</td> <td><input typ...
C++
UTF-8
1,176
3.25
3
[]
no_license
// // Created by nathan on 2021-01-23. // #include "io.h" int8_t * readRawData(string fileName, char delimiter, int * sizeRet) { int size = 0; ifstream infile; infile.open (fileName); if (infile.is_open()) { string datum; while (getline(infile, datum, delimiter)) size+...
Shell
UTF-8
746
3.078125
3
[ "MIT" ]
permissive
#!/bin/bash package_name="glew" package_version="2.1.0" package_description="Adds GLEW -- The OpenGL Extension Wrangler Library -- 2.1.0 to your environment." set -o errexit \ -o nounset \ -o pipefail source includes/source_includes.sh module purge module load gcc-libs module load compilers/gnu module load ...
Swift
UTF-8
921
3
3
[]
no_license
// // Data+Codable.swift // ContactList // // Created by abuzeid on 01.10.20. // Copyright © 2020 abuzeid. All rights reserved. // import Foundation public extension Data { func parse<T: Decodable>() -> T? { do { let decoder = JSONDecoder() decoder.dateDecodingStrategy = .forma...
Java
UTF-8
1,455
2.0625
2
[]
no_license
package tpm.qlts.services; import java.util.List; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import tpm.qlts.entitys.NhanVienRefThietBi; import tpm.qlts.entitys.NhanVienRefThietBiPK; import tpm.qlts.repositorys.NhanVienRefT...
C#
UTF-8
1,016
2.515625
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Text.RegularExpressions; using Microsoft.VisualStudio.TestTools.UnitTesting; using BandTracker.Models; namespace BandTracker.Models.Tests { [TestClass] public class BandTests : IDisposable { public BandTests() { DBConfiguration.Connection...
PHP
UTF-8
1,430
2.59375
3
[]
no_license
<?php namespace App\Controller; use App\Entity\Album; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\Routing\Annotation\Route; /** * @Route("/albums", methods={"GET"}) */ class AlbumController extends AbstractController { ...
Java
UTF-8
674
1.921875
2
[]
no_license
package net.canang.populi.core.model; import com.vividsolutions.jts.geom.Polygon; /** * @author rafizan.baharum * @since 6/29/13 */ public interface District { Long getId(); void setId(Long id); /** * @return */ String getCode(); void setCode(String code); /** * @return ...
Java
UTF-8
4,193
2.65625
3
[]
no_license
package com.hussein.java_project.models; import java.util.Date; 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 javax.persistence.JoinCo...
Java
UTF-8
304
2.65625
3
[]
no_license
package com.valerie.retactor; /** * Created by valerie on 15/7/28 */ public class Cal2 extends Cal { /** Pull Members Down*/ public int add(int a,int b){ return super.add(a, b); } /** Pull Members Up*/ public int sub(int a,int b){ return super.sub(a, b); } }
Java
UTF-8
1,222
2.53125
3
[]
no_license
package com.example.firstactivity; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; public class CounterActivity extends AppCompatActivity implements View.OnClickListener { Button i,d,r; TextVie...
Java
UTF-8
18,817
2.015625
2
[]
no_license
package th.go.motorcycles.web.enjoy.servlet; import java.io.IOException; import java.util.ArrayList; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.json.simple...
Go
UTF-8
373
2.671875
3
[]
no_license
/* * for index, card := range cards { * index: index of this element in the array * card : current item iterating over * range *** : take the slice and loop over it *} */ package main func main() { cards := newDeck() cards.shuffle() //cards.saveToFile("myCards") //hand, remainingCards := deal(cards, 5) //...
C++
UTF-8
634
3.125
3
[]
no_license
#include "ExceptionLine.h" ExceptionLine::ExceptionLine (const int &num,const string &error, const string& correction) { this->num = num; this->error = error; this->correction=correction; } string ExceptionLine::what () { return "Ошибка: " + error; } int ExceptionLine::code () { ret...
Java
UTF-8
6,560
3.140625
3
[]
no_license
package eight_puzzle; import java.util.ArrayList; import java.util.List; import edu.princeton.cs.algs4.StdRandom; public class Board { private int[][] blocks; private int hamming; private int manhattan; private final int n; private int blankPosition; public Board(int[][] blocksParam) { ...
Go
UTF-8
1,895
3
3
[]
no_license
package main import ( "encoding/json" "fmt" "time" "github.com/nautilus/events" "github.com/AlecAivazis/maestro/common" ) // MaestroLogging is the service responsible for collecting and aggregating logs. type MaestroLogging struct { events.EventBroker } var logCache = make(map[string][]common.LogEntry) func...
Java
UTF-8
1,188
2.09375
2
[]
no_license
package com.example.dm2.ejercicios17; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate...
C#
UTF-8
4,307
2.5625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Mvc; using ToDo.WebApp.Models; //using todoModels = ToDo.WebApp.Models; using ToDo.WebApp.Models.Enums; //using System.Threading.Tasks; namespace ToDo.WebApp.Controllers { public class TasksController : Controller { ...
PHP
UTF-8
666
2.765625
3
[]
no_license
<?php header("Access-Control-Allow-Origin:*"); header("Content-Type: text/plain"); $myServer = "62.149.153.28"; $myUser = "MSSql187380"; $myPass = "u4uc43436l"; $myDB = "MSSql187380"; $serverName = $myServer; //serverName\instanceName // Since UID and PWD are not specified in the $connectionInfo array, // The c...
Markdown
UTF-8
455
2.578125
3
[]
no_license
# Welcome to my portfolio! You get to see all the guts behind my website. ## Summary This website took about 2 years to make. I struggled with learning React almost entirely on my own. Through my internship and various projects for my classes at Georgia Tech, I'm proud to present the culmination of my learnings as ...