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
6,196
1.695313
2
[]
no_license
package org.qcri.micromappers.config; import javax.inject.Inject; import javax.sql.DataSource; import org.qcri.micromappers.config.social.CustomConnectController; import org.qcri.micromappers.service.FacebookConnectInterceptor; import org.qcri.micromappers.service.TwitterConnectInterceptor; import org.springframework...
TypeScript
UTF-8
1,056
3.125
3
[]
no_license
import { Point } from './point'; import { taxiDiff } from './taxi-diff'; import { Grid } from './grid'; export function findLargestArea(points: Point[]) { const grid = new Grid(points); const numRows = grid.numRows; const numCols = grid.numCols; for (let row = 0; row < numRows; row++) { for (let col = 0; ...
C
UTF-8
3,517
2.5625
3
[]
no_license
#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> #include <sstream> #include <iomanip> #include <vector> #include <deque> #include <list> #include <set> #include <map> #include <stack> #include <queue> #include <bitset> #include <string> #include <numeric> #include <function...
C
UTF-8
605
3.734375
4
[]
no_license
/* * #include <sys/types.h> * #include <unistd.h> * uid_t getuid(void); * gid_t getgid(void); * char *getlogin(void); * * getuid 返回程序关联的UID,通常是启动程序的用户的UID, uid_t 是一个小整数。 * * getgid 返回程序关联的GID 。 * * getlogin 返回用户的名字。 */ #include <sys/types.h> #include <unistd.h> #include <stdio.h> int main() { uid_t uid;...
C++
UTF-8
669
2.75
3
[]
no_license
#include<iostream> #include<string> using namespace std; int main(){ int n,a,b,index1=0,index2=0; cin>>n; int d[100],e[100],out[200],carry=0; for(int i=0;i<n;i++){ cin>>a>>b; index1 = 0; while(a!=0){ d[index1] = a%10; a = a/10; index1++; } index2 = 0; while(b!=0){ e[index2] = b%10; b =...
C++
UTF-8
1,044
3.5
4
[]
no_license
// Question Link: https://leetcode.com/problems/evaluate-reverse-polish-notation/submissions/ class Solution { public: int evalRPN(vector<string>& tokens) { unordered_set<string> operands = {"+", "-", "*", "/"}; stack<int> s; for (string token : tokens) { // We have a nu...
Python
UTF-8
309
2.96875
3
[]
no_license
# This is my second program in the python.. # I am trying to learn python in the easy way: and I am beginer on the GitHUb .. # Please help and guided me to improve myself and so i will conribute on the Open Source project:: # This program works for if-else condition x=int(input("Enter the value of X:"))
Java
UTF-8
5,184
1.820313
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2000-2014 JetBrains s.r.o. * * 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 agre...
Markdown
UTF-8
14,812
3.109375
3
[]
no_license
# 循序渐进理解CNI机制与Flannel工作原理 CNI,它的全称是 Container Network Interface,即容器网络的 API 接口。kubernetes 网络的发展方向是希望通过插件的方式来集成不同的网络方案, CNI 就是这一努力的结果。CNI 只专注解决容器网络连接和容器销毁时的资源释放,提供一套框架,所以 CNI 可以支持大量不同的网络模式,并且容易实现。 ## 从网络模型到 CNI 在理解 CNI 机制以及 Flannel 等具体实现方案之前,首先要理解问题的背景,这里从 kubernetes 网络模型开始回顾。 从底层网络来看,kubernetes 的网络通信可以分为三层去看待: - ...
Java
UTF-8
4,766
1.828125
2
[]
no_license
package com.svmuu.ui.activity.settings; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageInfo; import android.os.Bundle; import android.support.v7.app.AlertDialog; import android.view.View; import android.widget.TextView; ...
Python
UTF-8
935
3.734375
4
[]
no_license
# Python program to demonstrate # KNN classification algorithm # on IRIS dataset from sklearn.datasets import load_iris from sklearn.neighbors import KNeighborsClassifier import numpy as np from sklearn.model_selection import train_test_split # Loads the IRIS dataset iris_dataset=load_iris() X_train, X_tes...
JavaScript
UTF-8
323
3.78125
4
[]
no_license
'use strict'; // rewrite for loop using map let arr = ["Есть", "жизнь", "на", "Марсе"]; // var arrLength = []; // for (var i = 0; i < arr.length; i++) { // arrLength[i] = arr[i].length; // } arrLength = arr.map(function(value, index, array) { return value.length; }); alert( arrLength ); // 4,5,2,5
C++
UTF-8
402
2.875
3
[]
no_license
#include <iostream> #include <math.h> using namespace std; int main(){ int k = 10; bool star = false; for(int i = 0; i < k; i++){ for(int j = 0; j < k; j++){ if(star){ cout << "*"; } else { cout << "_"; } ...
JavaScript
UTF-8
1,937
2.8125
3
[]
no_license
import React from "react"; import { useHistory } from "react-router-dom"; import styles from './home.module.css'; import titleImage from "../../images/X0_Red.png"; import example from "../../images/Example.png"; export function Home() { const history = useHistory(); const goToLogin = () => { history.push("/lo...
C
UTF-8
4,230
2.75
3
[]
no_license
#include <dirent.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/dir.h> #include <sys/types.h> #include <sys/wait.h> extern int ppid; extern int back_size ; extern int back_order[4000]; extern char back_process[400000+1][300]; extern void redirection...
Java
UTF-8
304
1.71875
2
[ "Apache-2.0" ]
permissive
package com.bgh.myopeninvoice.api.domain.dto; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; import java.io.Serializable; @JsonInclude(JsonInclude.Include.NON_NULL) @Data public class RoleDTO implements Serializable { private Integer roleId; private String roleName; }
C
UTF-8
6,909
3.09375
3
[]
no_license
/* * hash_table.c * * Created on: 2012-5-8 * Author: hujin */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <assert.h> #include "clib/hash_table.h" static inline ulong hash_func(string key, uint key_len) { ulong hash = 31; int i; for(i=0;key[i] != 0; i ++) ...
Java
UTF-8
907
3.46875
3
[]
no_license
package com.mrma.t5; import java.util.concurrent.TimeUnit; /** * 一个同步方法可以使用另一个同步方法,一个线程已经拥有了某个对象的锁,再次申请的时候仍然会得到该对象的锁 * 也就是说synchronized获得的锁是可重入的 * @program: thread * @description: * @author: zt648 * @create: 2019-07-15 12:33 **/ public class T { synchronized void m1(){ System.out.println("m1 start"...
PHP
UTF-8
2,904
2.578125
3
[]
no_license
<?php if(!isset($_SESSION)) { session_start(); } $SERVER_PATH = "http://127.0.0.1/bgfhomes/"; $currency = "Euro"; $currency_symbol = "&#8364;"; ##Function for generating the dynamic options ####### function get_new_optionlist($table,$id_col,$value_col,$selected=0, $cond = 1) { global $con; $SQL="SELECT * FROM $t...
JavaScript
UTF-8
2,398
2.84375
3
[]
no_license
import { Platform } from "react-native"; const fonts = ["Comfortaa", "Roboto_Condensed", "Staatliches", "Circe"]; const defaultFont = fonts[0]; function getFontIndex(fontName) { return fonts.findIndex(font => fontName == font); } const fontStyles = (function(fonts) { if (Platform.OS === "web") { return fonts...
C++
UTF-8
614
3.0625
3
[]
no_license
#include <disk_driver.h> DiskDriver::DiskDriver(char *fileName) { this->fileName = fileName; } DiskDriver::~DiskDriver() { this->close(); } bool DiskDriver::open() { this->hd = fopen(this->fileName, "r+"); return hd != NULL; } void DiskDriver::close() { fclose(this->hd); } bool DiskDriver::write...
TypeScript
UTF-8
4,235
2.953125
3
[]
no_license
import IDocumentLike from '../NodeLike/ParentNodeLike/DocumentLike/IDocumentLike'; import IRecurser from '../Recurser/IRecurser'; import ITask from './ITask'; import ITaskFunctionMap from './ITaskFunctionMap'; import Recurser from '../Recurser/Recurser'; import TIndexableObject from '../Typ...
Java
UTF-8
286
1.664063
2
[ "Apache-2.0" ]
permissive
package org.folio.dao.export; import io.vertx.core.Future; import org.folio.rest.jaxrs.model.ExportHistory; import org.folio.rest.persist.DBClient; public interface ExportHistoryRepository { Future<ExportHistory> createExportHistory(ExportHistory exportHistory, DBClient client); }
Java
UTF-8
389
2.6875
3
[]
no_license
package pe.egcc.app.prueba; /** * * @author Eric Gustavo Coronel Castillo * @blog gcoronelc.blogspot.com */ public class Prueba01 { public static void main(String[] args) { String[] ciudades = { "Lima","Londres","Paris", "New York","Roma","Berlín" }; for (int i = 0; i < ciudade...
Python
UTF-8
1,835
3.453125
3
[]
no_license
#!/usr/bin/env python3 import re sub = { 'a': 'b', 'b': 'c', 'c': 'd', 'd': 'e', 'e': 'f', 'f': 'g', 'g': 'h', 'h': 'i', 'i': 'j', 'j': 'k', 'k': 'l', 'l': 'm', 'm': 'n', 'n': 'o', 'o': 'p', 'p': 'q', 'q': 'r', 'r': 's', 's': 't', 't': 'u', 'u': 'v', 'v': 'w', 'w': 'x', 'x': 'y', 'y': ...
JavaScript
UTF-8
1,510
3.546875
4
[]
no_license
// var element = document.getElementById("app") // console.log(element); // // // element.innerHTML = "Howdy"; (function(exports) { function NoteController(notesList = new NotesList()) { this.notesList = notesList this.notesList.createAndStoreNote("Favourite drink: Ribena") this.notesListView = new Notes...
C#
UTF-8
3,255
2.78125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using Timataka.Core.Models.Entities; using Timataka.Core.Models.ViewModels.CategoryViewModels; namespace Timataka.Core.Data.Repositories { public class CategoryRepository : ICatego...
Python
UTF-8
3,323
2.84375
3
[]
no_license
import os import hashlib import sys MAX_BLOCK_SIZE = 1024 * 1024 def load_snapshot_folder(PROJECT_FOLDER): snapshot_folder = '{0}/.snapshot'.format(PROJECT_FOLDER) if not os.path.exists(snapshot_folder): print('Snapshot does not exists') return -1 return snapshot_folder def init(PROJECT_FOLDER): sna...
Java
UTF-8
503
2.546875
3
[]
no_license
package com.steam.common; /** * @author : JOSE 2019/3/11 10:01 PM */ public class SteamException extends RuntimeException { /** 返回code */ private int code; /** 返回信息 */ private String message; public SteamException(int code, String message) { super(message); this.code = code; ...
Java
UTF-8
1,828
2.421875
2
[]
no_license
package za.co.devj.projectsv2.adapters; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.squareup.picasso.Picasso; imp...
PHP
UTF-8
291
2.875
3
[]
no_license
<?php /** Log class * * Is under development. Is intended to write log to a file... :) * */ class Log extends CI_Model { function __construct() { parent::__construct(); } public function message($level, $message) { $level = strtoupper($level); echo "$level: $message"; } }
Java
UTF-8
568
3.28125
3
[]
no_license
package java8; import java.util.ArrayList; import java.util.List; public class MethodReference { public static void main(String[] args) { objectinstanceMethodreference(); } private static void objectinstanceMethodreference() { List<String> namelist = new ArrayList<String>(); namelist.add("Aravind"); name...
Java
UTF-8
1,816
2.109375
2
[]
no_license
package com.spring.ot.dao; import java.sql.SQLException; import java.util.List; import org.apache.ibatis.session.RowBounds; import org.apache.ibatis.session.SqlSession; import com.spring.command.SearchCriteria; import com.spring.dto.AdminVO; import com.spring.ot.dto.OtVO; public class OtDAOImpl implements OtDAO{ ...
Markdown
UTF-8
558
3.34375
3
[]
no_license
## Snake A browser version of Snake. Game logic is written in Javascript, while HTML canvas draws the images. A live version can be found [here](https://philnachumsnake.firebaseapp.com/) Use the arrow keys to move, and P to pause/unpause. ### Rules The aim of the game is to eat as much food as possible. Eating one ...
Java
UTF-8
3,383
2.515625
3
[]
no_license
package com.jinqiu.zombieattack.view.attached; import android.graphics.PointF; import com.jinqiu.zombieattack.model.GameModel; /** The transformation between view, model and screen */ public class ModelViewScreenTrans { /** The view frame width */ private static final int VIEW_FRAME_WIDTH = 854; /** The view fram...
Python
UTF-8
1,362
3.171875
3
[]
no_license
import pygame pygame.init() screen = pygame.display.set_mode((800, 600)) done = False color1 = (0, 128, 255) color2 = (255, 0, 0) is_color1 = True x = 30 y = 30 # playerImage = pygame.image.load("pygame_idle.png") # def player(x, y): # screen.blit(playerImage, (x, y)) while not done: ...
JavaScript
UTF-8
3,006
2.515625
3
[]
no_license
import { sendUpdate, delay, either, getInput } from './loop'; import {call} from 'redux-saga/effects'; import {countdown} from './utils'; import {CODE_NAMES, RESET_GAME_INPUT, YOUR_CODENAME_PHASE, PARTNER_CODENAME_PHASE, INPUT_PASSWORDS_PHASE, ROUND_END_PHASE, GAME_END_PHASE, LOBBY_PHASE, GUESS_PASSWORD_INPUT, ADD_PLA...
Python
UTF-8
555
4.71875
5
[]
no_license
#Parametros y argumentos #Funcion Sumar def sumar(a, b, c): return a + b + c resultado = sumar(4,5,6) print("La suma es: ", resultado) #Funcion Restar def restar (a, b): return a - b resultado = restar(b= 100, a=10) print("La resta es: ", resultado) #Guardar una funcion en una variable valor = restar pri...
Java
UTF-8
2,641
2.46875
2
[]
no_license
/** * Copyright 2014 ZXing authors * * 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...
C++
UTF-8
4,555
2.5625
3
[]
no_license
#ifndef __LUP__ #define __LUP__ #include <vector> #include <cmath> #include <fstream> #include <iostream> #include "matrix.hpp" #include "vector.hpp" using namespace std; int m_detSign = 1; void m_frontSub(Matrix &mat, vector <double> &vec, vector <double> &vecP, vector <double> &vecZ) { int n...
Java
UTF-8
11,365
2.1875
2
[]
no_license
/* * An XML document type. * Localname: Text * Namespace: http://api.callfire.com/data * Java type: com.callfire.api.data.TextDocument * * Automatically generated - do not modify. */ package com.callfire.api.data; /** * A document containing one Text(@http://api.callfire.com/data) element. * * This is a com...
PHP
UTF-8
922
2.6875
3
[]
no_license
<?php namespace App\Entity; use App\Repository\StatusCodesRepository; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass=StatusCodesRepository::class) * @ORM\Table(name="status_codes") */ class StatusCodes { /** * @var string * * @ORM\Column(name="scode", type="string", length=5...
PHP
UTF-8
637
3.3125
3
[ "MIT" ]
permissive
<?php namespace thorin; /** * Extract the url's from the passed string. Return the result in array format * * @param {String} $string The string to extract the url's from * @return {Array} The array of url's extracted * * @example php * $string = 'Hello https://google.com, this is the univers...
Java
UTF-8
3,063
1.78125
2
[]
no_license
package com.xiaojing.shop.mode; import com.wuzhanglong.library.mode.BaseVO; import java.util.List; /** * Created by ${Wuzhanglong} on 2017/6/2. */ public class GameVO extends BaseVO { private String game_banner; private GameVO datas; private List<GameVO> list; private String game_id; private S...
TypeScript
UTF-8
1,187
2.515625
3
[]
no_license
import {UserActions} from '../redux/actions/UserActions'; import {Api} from './Api'; import {AsyncStorageService} from './AsyncStorage'; import {User} from '../models/user'; export class AuthRepositry { static login(data: { email: string; password: string; returnSecureToken: boolean; }) { return as...
JavaScript
UTF-8
7,156
2.515625
3
[]
no_license
var wz, wizard = { settings: { start: $('.btn.open-wizard'), heroLayouts: $('.layout.hero.style-cards'), question: $('.layout.wizard .question'), answers: $('.answer'), result: $('.results .layout'), nextQuestionID: '', backQuestionID: '', buttonControls: $('.layout.wizard .controls .btn'), ...
Markdown
UTF-8
4,953
2.578125
3
[ "MIT" ]
permissive
# 浏览器 等待资源加载时间和大部分情况下的浏览器单线程执行是影响Web性能的两大主要原因 #### 浏览器渲染流程 #### 浏览器垃圾回收 标记清除法 - 假定存在一个根对象垃圾回收期将定期从根对象开始查找,凡事从根部出发能到的都会保留,扫描不到的将被回收 - 一组基本的无法删除的根元素 - 全局变量 - 本地函数的局部变量和参数 - 当前嵌套调用链上的其他函数的变量和参数 - 如果引用或者引用链可以从根访问任何其他值,则认为该值是可访问的 - 如果不可访问就是垃圾,会被回收 - https://segmentfault.com/a/1190000018605776 - https://segmen...
Python
UTF-8
399
2.71875
3
[]
no_license
def algorithms(module): """ Retrieves algorithm functions from a module. Raises AssertionError if no functions are provided. :param module: :return: """ blacklist = ['deque', 'defaultdict', 'namedtuple', 'OrderedDict'] l = [getattr(module, attr) for attr in filter(lambda x: x not in blackli...
Go
UTF-8
833
2.765625
3
[]
no_license
func abs(a int) int { if a >= 0 { return a } return -a } func minimumEffortPath(heights [][]int) int { m, n := len(heights), len(heights[0]) var l, r, mi int = 0, 2e6, 0 var v [][]bool var cal func(int, int) bool cal = func(i, j int) bool { if i == m-1 && j == n-1 { return true } v[i][j] = true h ...
Markdown
UTF-8
612
2.78125
3
[]
no_license
# specialcharacter python script to generate special character images This program helps in generating training images for special characters. These images can be used to train the system using ML algorithms To run the program 1. Ensure you have python installed 2. Import PIL and other required modules 3. Download the...
Java
UTF-8
11,839
1.734375
2
[]
no_license
/** * @FileName: MsgBaseServiceImpl.java * @Package com.ziroom.minsu.services.message.service * * @author yd * @created 2016年4月18日 下午2:28:18 * * Copyright 2011-2015 asura */ package com.ziroom.minsu.services.message.service; import com.asura.framework.base.paging.PagingResult; import com.asura.framework.base...
Markdown
UTF-8
5,645
2.9375
3
[ "MIT" ]
permissive
--- layout: post title: A Clean Architecture web API - part two subtitle: An easy to follow structure comments: true published: true --- ## Introduction As mentioned in part one, each service is designed with Clean Architecture principles. Clean Architecture is a smart way of structuring an application, and thrives o...
Markdown
UTF-8
1,262
3.40625
3
[]
no_license
## RESTful API with NodeJS and MongoDB *** Basic NodeJS and MongoDB RESTful API. This project allows to create, get, update and delete users (with email and password attributes). If you want to test the code you need to follow this steps: * Clone this repository. * Install and setup MongoDB and NodeJS. * Open a termin...
Markdown
UTF-8
5,517
2.953125
3
[ "MIT" ]
permissive
json-silo ========= Installation ------------ npm install json-silo Hello json-silo! ---------------- npm start Browse to [localhost:3000/json-silo/](http://localhost:3000/json-silo/) for the story creation page. REST API -------- ### GET /stories/{id} Retrieve the story with the given _id_. #### E...
Java
UTF-8
432
1.921875
2
[]
no_license
package de.springframework.monitoring.backend.repository; import de.springframework.monitoring.backend.entity.Speciality; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.stereotype.Repository; import java.util.Optional; @Repository public interface SpecialityReposito...
Java
GB18030
47,112
1.695313
2
[]
no_license
package nc.bs.scm.pub; import java.rmi.RemoteException; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.HashMap; import java.util.Hashtable; import java.util.List; ...
Java
UTF-8
2,321
2.15625
2
[]
no_license
/* * 工具自动生成:VIEW条件实体类 * 生成时间 : 2016/05/16 18:54:36 */ package com.icomp.entity.base; import com.icomp.common.entity.BaseEntity; import java.io.Serializable; /** * VIEW条件实体类 * @author 工具自动生成 * 创建时间:2016/05/16 18:54:36 * 创建者 :工具自动生成 * */ public class VapplyuserWhere extends BaseEntity implements Serial...
Java
UTF-8
3,735
2.046875
2
[ "BSD-3-Clause" ]
permissive
/* * Copyright (C) 2019 Intel Corporation * SPDX-License-Identifier: BSD-3-Clause */ package com.intel.mtwilson.audit.data; import com.intel.mtwilson.audit.converter.AuditDataConverter; import java.io.Serializable; import java.util.Date; import javax.persistence.*; import javax.xml.bind.annotation.XmlRootElement; ...
Java
UTF-8
714
2.34375
2
[]
no_license
package com.example.spring_test.service; import com.example.spring_test.domain.Board; import com.example.spring_test.repository.BoardRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service //해당 클래스는 서비스로 동작 public class...
JavaScript
UTF-8
13,575
3
3
[]
no_license
/* */ var cont = 0; var cont2 = 0; var Pp;//variable para almacenar la potencia del primario var Ps; //variable para almacenar la potencia del secundario var S; // almacena la sección transversal del núcleo var AWG =[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,...
Python
UTF-8
592
2.796875
3
[]
no_license
import urllib.request, urllib.parse, urllib.error from bs4 import BeautifulSoup import ssl # javascript:void(0) ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE url = input("Enter:-") html = urllib.request.urlopen(url, context = ctx).read() soup = BeautifulSoup(html,"htm...
C
UTF-8
2,520
3.21875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <unistd.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #define MAX_READ 120 int main( int argc, char** argv) { FILE* fd; char* oneLine = NULL; int line = 0; int counter = 0; char buff[MAX_READ]; ...
Markdown
UTF-8
12,106
2.671875
3
[]
no_license
title=新手引导:利用AWS伸缩到千万级用户 date=2017-08-25 type=post tags=archetecture status=published ~~~~~~ <div id="table-of-contents"> <h2>Table of Contents</h2> <div id="text-table-of-contents"> <ul> <li><a href="#org85a7ed2">1. 新手引导:利用AWS伸缩到千万级用户</a> <ul> <li><a href="#org62393be">1.1. 基础</a></li> <li><a href="#orgcac6e52">1.2. ...
Ruby
UTF-8
384
2.78125
3
[]
no_license
class PC attr_accessor :pantalla def initialize(pantalla) self.pantalla = pantalla end def ppp pantalla.ppp end def consumo_de_pantalla self.pantalla.consumo end def consumo_pc super end def consumo_total self.consumo_de_pantalla + self.consumo_pc end def es_apta_vide...
JavaScript
UTF-8
1,076
2.515625
3
[ "Apache-2.0", "MIT" ]
permissive
//Para inicializar las funciones de mensajería (notificaciones) document.addEventListener('deviceready', function () { //Al recibir la notificación (con aplicación abierta) window.plugins.OneSignal .startInit("6a1e3ec9-5164-4876-8c93-7adcbabfdc70") .handleNotificationReceived(function(jsonData) { //aler...
PHP
UTF-8
854
2.5625
3
[ "MIT" ]
permissive
<?php namespace SensioLabs\Behat\PageObjectExtension\Context; use SensioLabs\Behat\PageObjectExtension\PageObject\Element; use SensioLabs\Behat\PageObjectExtension\PageObject\InlineElement; use SensioLabs\Behat\PageObjectExtension\PageObject\Page; interface PageFactoryInterface { /** * @param string $name ...
Ruby
UTF-8
436
4.09375
4
[]
no_license
def print_welcome puts "welcome to converter" end def convert_to_celsius(degrees_fahrenheit) ((degrees_fahrenheit-32)* 5.0/9.0).round(2) end def print_converted(temperature) converted=convert_to_celsius(temperature) puts "#{temperature} is equal to #{converted} degrees celcius" end def convert(first,second,t...
PHP
UTF-8
3,394
3.140625
3
[]
no_license
<?php require_once "BaseService.php"; /** * Plot related service */ class ChangeProcessService extends BaseService { /** * Constructor */ public function __construct() { $this->tablename = "change_process"; $this->connect(); } public function __destruct() { $this->close(); } /** * Return...
Java
UTF-8
4,172
2.234375
2
[]
no_license
package fr.wildcodeschool.blablawild.search; import android.app.DatePickerDialog; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.DatePicker; import an...
JavaScript
UTF-8
5,014
3.1875
3
[ "MIT" ]
permissive
'use strict' // record start time var dateStartTime; function display() { alert('in display function'); // later record end time var endTime = new Date(); // time difference in ms var timeDiff = endTime - dateStartTime; // strip the miliseconds timeDiff /= 1000; // get seconds v...
Java
UTF-8
1,022
2.203125
2
[]
no_license
package com.events.hanle.events.BroadCast; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.PowerManager; import android.widget.Toast; import com.events.hanle.events.gcm.GcmIntentService; /** * Created by Hanle on 5/30/2017. */ public class...
PHP
UTF-8
7,007
2.625
3
[]
no_license
<?php $cid=$_GET['cid']; include "conn.php"; ini_set( "display_errors", 0); if(isset($_POST['addpro'])) { echo "addpro"; $pro_name = $_POST['pro_name']; $quantity = $_POST['quantity']; $doo = $_POST['doo']; echo $quantity; echo $pro_name; echo $cid; $pr = "SELECT * FROM produ...
Markdown
UTF-8
8,586
2.625
3
[]
no_license
--- layout: post title: Cómo hice el blog description: Cómo hacer un blog con Jekyll, paso a paso permalink: 2015/01/como-hice-el-blog/ tags: - blog comments: true --- ![Jekyll y GitHub](/public/pictures/jekyll-github.png) En Internet hay un montón de alternativas para crear un blog propio. Cuando me propuse crear un...
JavaScript
UTF-8
615
2.75
3
[ "MIT" ]
permissive
class Level { #height #width #mines #size remainder constructor(height, width, mines) { this.#height = height this.#width = width this.#mines = mines this.#size = height * width this.remainder = this.#size - this.#mines } get height() { return this.#height } get width() { ...
C++
UTF-8
3,382
3.734375
4
[]
no_license
#include <iostream> #include<string> using namespace std; template<typename T> class Node { public: string key; T value; Node<T>*next; Node(string key, T val) { this->key = key; value = val; next = NULL; } ~Node() { if(next!=NULL){ delete next...
C#
UTF-8
4,095
2.65625
3
[ "Apache-2.0" ]
permissive
using System; using System.IO; using Whitelog.Core.Binary.Serializer.MemoryBuffer; namespace Whitelog.Core.Binary.Deserilizer.Reader { public class ExpendableListReader : IListReader { class ExpendableBuffer : IRawData { public int Length { get; set; } public byte[] Buff...
Markdown
UTF-8
5,830
2.515625
3
[ "MIT" ]
permissive
--- template: PracticePage title: Broken Rib Lawyer status: Published date: 2020-09-04 featuredImage: /images/ribs-injury-lawyer.jpg excerpt: We have 24 ribs, twelve on each side. Both men and women have the same amount of ribs. The ribs are attached to a spine bone in the back. categories: - category: Serious Pers...
C
UTF-8
2,151
2.734375
3
[ "BSD-4-Clause-UC", "LicenseRef-scancode-warranty-disclaimer", "BSD-3-Clause", "Martin-Birgmeier", "dtoa", "MIT", "HPND", "SunPro", "CMU-Mach", "ISC", "Apache-2.0", "BSD-2-Clause", "BSD-4-Clause", "BSD-4.3TAHOE", "LicenseRef-scancode-ibm-dhcp" ]
permissive
/* $OpenBSD: strerror_r.c,v 1.6 2005/08/08 08:05:37 espie Exp $ */ /* Public Domain <marc@snafu.org> */ #include <errno.h> #include <limits.h> #include <signal.h> #include <stdio.h> #include <string.h> #include "private/ErrnoRestorer.h" typedef struct Pair Pair; struct Pair { int code; const char* msg; }; stati...
Java
UTF-8
142
1.976563
2
[]
no_license
package vcci.android.consumer.interfaces; public interface CategorySelectionListener { void onCategorySelected(int id, String title); }
Java
UTF-8
5,893
2.25
2
[]
no_license
package controlador; import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; ...
PHP
UTF-8
3,687
2.921875
3
[]
no_license
<?php /* * Following code will create a new product row * All product details are read from HTTP Post Request */ // array for JSON response $response = array(); // check for required fields if (isset($_POST['UserID']) && isset($_POST['NickName']) && isset($_POST['Country']) && isset($_POST['State']) && isset...
Python
UTF-8
420
3.3125
3
[]
no_license
from threading import Thread, Lock lock1 = Lock() lock2 = Lock() l = [] def value1(): for i in range(65, 91): lock1.acquire() print(chr(i)) lock2.release() def value2(): for i in range(1, 53, 2): lock2.acquire() print(i) print(i+1) lock1.release() t...
Java
UTF-8
209
1.851563
2
[]
no_license
package com.example.demo.spi; /** * Created by evan.qi on 2017/7/12. * * */ public class FileSearch implements Search{ @Override public void search() { System.out.println("this is file search"); } }
Swift
UTF-8
1,270
2.65625
3
[]
no_license
// // GetLoginInfo.swift // myStepiPhone // // Created by 保立馨 on 2016/11/06. // Copyright © 2016年 Kaoru Hotate. All rights reserved. // import Alamofire import RxAlamofire import RxSwift import SwiftyJSON class GetLoginInfo { let loginVM = LoginViewModel() enum APIError: ErrorType { case CannotParse } ...
JavaScript
UTF-8
1,730
2.53125
3
[]
no_license
import React, { Component } from 'react' export default class reviewInput extends Component { constructor(props) { super() this.state = { review: { title: '', content: '', }, action: "" } } handleChange = event => { const { name, value } = event.t...
C++
UTF-8
1,849
3.671875
4
[]
no_license
// { Driver Code Starts #include <iostream> using namespace std; // } Driver Code Ends class Solution { public: // Function to find equilibrium point in the array. // a: input array // n: size of array int equilibriumPoint(long long a[], int n) { if(n == 1) { return 1; ...
Python
UTF-8
10,660
2.875
3
[]
no_license
#!/usr/bin/python3 import sys import math import string import glob import numpy as np import scipy as sp from scipy import optimize from scipy.linalg import expm, logm import os.path from os import walk from collections import defaultdict import scipy.integrate as integrate from pandas import * import pandas as pd imp...
Shell
UTF-8
3,303
3.0625
3
[ "BSD-3-Clause" ]
permissive
# ------------------ # wxWidgets 2.9 # ------------------ # $Id: wxmac28.sh 1902 2007-02-04 22:27:47Z ippei $ # Copyright (c) 2007-2008, Ippei Ukai # 2009-12-04.0 Remove unneeded arguments to make and make install; made make single threaded # prepare source ../scripts/functions.sh check_SetEnv # ----------------...
SQL
UTF-8
17,204
3.265625
3
[]
no_license
# Host: localhost (Version: 5.6.12) # Date: 2014-11-07 01:08:15 # Generator: MySQL-Front 5.3 (Build 4.136) /*!40101 SET NAMES utf8 */; # # Structure for table "banco" # CREATE TABLE `banco` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `NRO_CUENTA` varchar(20) NOT NULL, `TIPO_CUENTA` enum('AHORRO','CORR...
Python
UTF-8
1,082
2.71875
3
[]
no_license
#!/usr/bin/env python import sys import numpy as np def shiftPickles(picklesDat, shift): gr = picklesDat[:,8].astype(float) + shift[0] ri = picklesDat[:,9].astype(float) + shift[1] iz = picklesDat[:,10].astype(float) + shift[2] newPickles = picklesDat.copy() newPickles[:,8] = gr newPickles[:,...
Java
UTF-8
214
1.765625
2
[]
no_license
package com.locker.service.exception; public class NamesException extends Exception { private static final long serialVersionUID = -1287766609237779542L; public NamesException(String msg) { super(msg); } }
Python
UTF-8
7,003
2.734375
3
[]
no_license
# Rebuild the UCI network with low accuracy from __future__ import print_function # Import MNIST data from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) import tensorflow as tf import numpy as np # Training Parameters #learning_rate = 0.1 batch_s...
Python
UTF-8
1,204
2.8125
3
[]
no_license
# -*- coding: utf-8 -*- from pyvirtualdisplay import Display from selenium import webdriver import time output = open('top_twitch_sully_7dollowup.tsv', 'w+') #textResults = [] with Display(): driver = webdriver.Firefox() driver.get('https://sullygnome.com/channels/watched') time.sleep(15) for i in r...
Swift
UTF-8
2,050
3.65625
4
[]
no_license
//: Playground - noun: a place where people can play import UIKit var str = "Hello, Ordered Set" public struct OrderedSet<T: Hashable> { private var internalSet = [T]() private var indexOfKey: [T: Int] = [:] public init() {} public var count: Int { return internalSet.count } ...
Python
UTF-8
4,533
2.65625
3
[ "Apache-2.0" ]
permissive
"""Internal utility functions.""" from matplotlib.colors import BoundaryNorm, Normalize from matplotlib.pyplot import gca import numpy as np import matplotlib.cm as cm import matplotlib.collections as collections from .settings import color_missing, im_settings, point_settings from . import mapping def get_extend(...
Python
UTF-8
5,972
2.546875
3
[ "MIT" ]
permissive
'''Random value-generating utilities. Intended mainly for generating random values for testing purposes (i.e. finding edge cases). ''' import sys from random import randint, random, choice from six import PY2, PY3 if PY3: xrange = range #--------------------------------------------------------------------------...
C#
UTF-8
272
3.03125
3
[]
no_license
int CalculatePrice(int id) { int price = Items.Where(item => item.Id_Parent == id).Sum(child => CalculatePrice(child.Id)); return price + Items.First(item => item.Id == id).Price; } int total = CalculatePrice(3); // 3 is just an example id
Markdown
UTF-8
14,270
2.546875
3
[]
no_license
# [原创内容] 详细解释为什么Matlab被禁对大学论文发表没有任何实质性影响 > tid: `22134888` 用户ID: `1869831` 发布时间: `2020-06-11 14:42:00` > 联动这两个帖子,我要解释一下为什么Matlab被禁对大学没有实质性影响。因为那俩帖子里外行一本正经的胡说八道危言耸听的实在是太多了。<br/><b>不要自己吓自己,放心大胆该怎么用Matlab就还怎么用</b>。当然,Mathwork这个禁售政策sb没得洗。<br/><br/>[url]https://nga.178.com/read.php?tid=22128769[/url]<br/>[url]https://ng...
Java
UTF-8
420
2.46875
2
[]
no_license
package fr.doodz.openmv.api.api.types; /** * Created by doods on 31/07/14. */ public enum Sortdir { ASC("ASC"), DESC("DESC"); private final String text; /** * @param text */ private Sortdir(final String text) { this.text = text; } /* (non-Javadoc) * @see java.lan...
Java
UTF-8
4,839
3.78125
4
[]
no_license
package dawson111.labexercises; import javax.swing.*; /** Determines the value and suit of 9 cards, each corresponding to * the numbers, from 0 to 51, randomly generated by the program. * Rank from 1 to 13. * Suit from hearts, represented by 0, diamonds, clubs * and to spades, being 3. * Will display the st...