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,445
3.640625
4
[]
no_license
/* * test_Blob.cpp * Test the Blob class template. * Compilation: g++ -o test_Blob test_Blob.cpp -std=c++11 * Created: 2015-09-26 */ #include "Blob.hpp" #include <iostream> #include <string> #include <vector> #include <list> #include <iterator> using std::cout; using std::endl; using std::vector; using std::list...
Python
UTF-8
611
2.84375
3
[]
no_license
# -*- coding:utf8 -*- # @TIME :2019/5/20 20:39 # @Author : 洪松 # @File : 插入数据.py import pymysql # 创建连接 conn = pymysql.connect(host='localhost', port=3306, user='root', passwd='123456', db='ssl') # 创建游标 cursor = conn.cursor() # 执行SQL cursor.execute('insert into test1(name, age) values("洪松", "24")') # r = cu...
C#
UTF-8
252
2.53125
3
[]
no_license
// See https://aka.ms/new-console-template for more information using Engine; Console.WriteLine("Hello, World!"); ulong mask = 1; for (int i = 0; i < Board.Size; i++) { Console.WriteLine(mask);// BitConverter.ToUInt64(mask)); mask <<= 1; }
JavaScript
UTF-8
632
3.796875
4
[]
no_license
function validParens(str) { // hash table to check if valid let hash = { ')': '(', '}': '{', ']': '[' }; // use a stack let stack = []; for (let paren of str) { // open paren will push to stack // console.log(paren); if (paren === '(' || paren === '{' || paren === '[') { stack....
JavaScript
UTF-8
170
3.21875
3
[]
no_license
function reverseString(str) { var arr = []; arr= str.split(""); var newArr = arr.reverse(); var ans = newArr.join(""); return ans; } reverseString("hello");
Python
UTF-8
2,217
3.078125
3
[]
no_license
from itertools import starmap from adventofcode2020.utils import ( DataName, fetch_input_data_if_not_exists, print_call, read, submit, ) @print_call def solve_part1(file_name): cards = read(file_name).split("\n\n") player1_cards = list(map(int, cards[0].splitlines()[1:])) player2_card...
Java
UTF-8
429
2.75
3
[ "Apache-2.0" ]
permissive
package com.codebits.softwareninja.interpretation.operations; import com.codebits.softwareninja.interpretation.Value; public class EqualOperation extends ConditionOperation { public EqualOperation(String originalText, Value leftValue, Value rightValue) { super(originalText, leftValue, rightValue); } @Override ...
JavaScript
UTF-8
3,160
2.5625
3
[]
no_license
import React from 'react'; import axios from 'axios'; export default class Form extends React.Component { constructor(props) { super(props); this.state = { stockNumber: '', personalPassportId: '', name: '' }; this.inputChange = this.inputChange.bi...
Java
UTF-8
1,389
2.46875
2
[]
no_license
// // Source code recreated from a .class file by IntelliJ IDEA // (powered by Fernflower decompiler) // package com.doubao.finance.util.ajax; public class JsonResponseBuilder { public JsonResponseBuilder() { } public static <T> JsonResponse buildJsonResponse(ResponseCode code, T data) { if (code...
PHP
UTF-8
4,054
2.84375
3
[]
no_license
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); // author:huynhvanduoc // date:30/05.2012 // Viết xóa xml với php /* <?xml version="1.0" encoding="utf-8" ?> <cautruc> <thuonghieu id="26" name="Tên thương hiệu"> <sanpham id="79" name="Tên sản phẩm"> <tieude> Tiêu đề 1 <tie...
C++
UTF-8
3,376
2.640625
3
[]
no_license
// gencoinlistKEK.cpp // g++ -Wall gencoinlistKEK.cpp -o gencoinlistKEK #include <iostream> #include <sstream> #include <fstream> #include <string> class CheckOpt { public: CheckOpt (); void usage (std::ostream& os, const char* pname); bool setup (int argc, char* argv []); public: bool m_infile_g...
C
UTF-8
466
3.171875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> int sum_up_to(int num) { int i; int sum = 0; for (i = 1; i <= num; i++) sum += i; return sum; } // test for rel 32bit probe int func1(int a, int b) { return (a + b) * a; } int func1a(int a, int b) { return (a + b) * a; } int func1b(int a, int b) { return (a + b) * a; ...
C++
UTF-8
982
2.609375
3
[]
no_license
#include "HttpClient.h" HttpClient::HttpClient() { } void HttpClient::HttpSendPerformanceData() { string url = "http://192.168.1.200:8000/postNodeStatus.php"; Poco::URI uri(url); string path = uri.getPath(); HTTPClientSession session(uri.getHost(), uri.getPort()); session.setKeepAlive(true); HTTPRequest ...
C
UTF-8
6,253
2.65625
3
[ "MIT" ]
permissive
/* Author: ChrisB Description: Utilities functions for interfacing with controller. Date: Summer 2020 */ #include <unistd.h> #include <fcntl.h> #include <stdio.h> //source code headers #include "pro_con_utils.h" #include "pro_con_errors.h" int getButtonInfo(struct js_event* event_info,button_input_t* button_data)...
C#
UTF-8
1,407
2.71875
3
[ "MIT" ]
permissive
using System.Text.RegularExpressions; using NhaNhaNha.Extensions; using NUnit.Framework; namespace NhaNhaNha.Test { [TestFixture] public class DadoUmGeradorDeDocumento { [Test] public void AoGerarCpfResultadoDeveConter11Digitos() { var cpf = NhaNhaNha.CPF.Cpf; ...
Java
UTF-8
2,045
2.4375
2
[]
no_license
package com.zhaoyan.webserver.userinfomanage; import java.util.ArrayList; import com.zhaoyan.webserver.common.JDBCUtils; import com.zhaoyan.webserver.db.DBData.UserInfoTable; public class ModifyUserInfoDao implements ModifyUserInfoService { private JDBCUtils mJdbcUtils; public ModifyUserInfoDao() { mJdbcUtils =...
Java
UTF-8
9,727
1.8125
2
[]
no_license
package ru.gosuslugi.dom.schema.integration.house_management; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; impor...
Java
UTF-8
7,314
2.59375
3
[]
no_license
package edu.ncsu.csc.itrust.model.old.dao.mysql; import edu.ncsu.csc.itrust.DBUtil; import edu.ncsu.csc.itrust.exception.DBException; import edu.ncsu.csc.itrust.model.old.beans.ObstetricsInitBean; import edu.ncsu.csc.itrust.model.old.beans.ObstetricsOfficeVisitBean; import edu.ncsu.csc.itrust.model.old.beans.loa...
Java
UTF-8
4,250
2.28125
2
[]
no_license
package com.example.admin.iposapp.database; /** * Created by admin on 21/06/2016. */ public interface InterfaceClientSchema { String tableName = "PERSONA"; String columnId = "clave"; String columnName = "nombre"; String columnNames = "nombres"; String columnLastName = "apellidos"; String colu...
C
UTF-8
1,075
2.8125
3
[]
no_license
/* ** check.c for my_survey in /home/decomb_s/Backup/ACC2 ** ** Made by Sylvain Decombe ** Login <decomb_s@epitech.net> ** ** Started on Wed Mar 26 14:53:27 2014 Sylvain Decombe ** Last update Sun Mar 30 00:20:30 2014 Sylvain Decombe */ #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <sys/types...
Markdown
UTF-8
11,274
3.234375
3
[]
no_license
在第三模块中,我们主要讲解了基于常见组件的微服务场景的相关内容,因为市面上已经存在比较流行的开源组件,因此你只需要搞清楚组件的原理即可。从这一讲开始,我们将正式进入第四模块——微服务场景进阶内容的讲解。 在介绍业务场景之前,我们先来谈谈对微服务的一些理解。 单体式架构 VS 微服务架构 为了让你快速理解单体式架构与微服务架构之间的区别,我们先来看一个新零售系统的例子。 比如门店(门店分为自营店和加盟店)想研发一款新零售系统进行商品售卖,它需要包含订单、营销、门店、商品、加盟商、会员等功能模块。 在搭建新零售系统架构时,如果我们使用单体式架构进行设计,它的架构图如下所示: 新零售系统:单体式架构图 从图中我们发现,单体...
Java
UTF-8
2,863
2.640625
3
[]
no_license
package com.it_uatech.jdbcOperations; import com.it_uatech.dao.AuthorDao; import com.it_uatech.domain.Author; import org.springframework.dao.EmptyResultDataAccessException; import org.springframework.jdbc.core.RowMapper; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; import org.springframe...
C#
UTF-8
985
3.59375
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Threading; namespace _26._4_线程操作之线程休眠 { class Program { public static void method() { string state; for (int i = 1; i <= 5000; i++) ...
Java
UTF-8
248
2.375
2
[]
no_license
/** * 类的描述 * * @Author lirf * @Date 2018/4/15 17:57 */ public class StringTest { public static void main(String[] args) { String s1 = "1" + "2"; String s2 = "abcd"; System.out.println(s1 == s2); } }
PHP
UTF-8
465
2.875
3
[]
no_license
<?php /** * 跳转结果 * @author julian.song */ class ResultRedirect implements Result{ public function createResult(array $resultMap){ $response=ResponseContext::getResponse(); $arguments=array(); foreach($resultMap['arguments'] as $key=>$val){ array_push($arguments,$key."=".$response->get($val)); ...
Java
UTF-8
1,492
2.421875
2
[]
no_license
package com.ufrpe.ava.negocio; import java.util.ArrayList; import com.ufrpe.ava.excecoes.ObjetoJaExistenteExcepitions; import com.ufrpe.ava.excecoes.ObjetoNaoExistenteExcepitions; import com.ufrpe.ava.negocio.entidades.Usuario; import com.ufrpe.ava.negocio.controladores.ControladorUsuario; public class AvaF...
Java
UTF-8
11,286
1.882813
2
[]
no_license
package com.example.foxtrotfrontend; import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.NavUtils; import android.annotation.SuppressLint; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Bitmap; import android.os.Bundle; import android.provider.Me...
Markdown
UTF-8
21,675
2.59375
3
[]
no_license
# TS流解析【PCR】自己的总结 - zp704393004的专栏 - CSDN博客 2018年08月30日 18:19:49[原来未知](https://me.csdn.net/zp704393004)阅读数:2227 http://www.cnblogs.com/ztteng/articles/3166025.html http://blog.csdn.net/liuhongxiangm/article/details/8981032 http://blog.sina.com.cn/s/blog_6b94d5680101ton7.html http://blog.csdn.net/jl2011/...
C++
UTF-8
1,306
2.96875
3
[]
no_license
#include"B_node.h" #pragma once enum Error_code{success,not_present}; template<class Record, int order> class B_tree{ public: Error_code search_tree(Record &target); Error_code insert(const Record&new_entry); Error_code remove(const Record&target); private: Error_code recursive_search_tree(B_node<Record,order...
C++
UTF-8
830
2.90625
3
[]
no_license
#ifndef _fast_daq_error_hh_ #define _fast_daq_error_hh_ #include <exception> #include <string> #include <sstream> namespace fast_daq { class error : public std::exception { public: error(); error( const error& p_copy ); error& operator=( const error& p_copy ); ...
Python
UTF-8
1,170
3.046875
3
[]
no_license
class Solution: # def canJump(self, nums): # """ # :type nums: List[int] # :rtype: bool # """ # def dfs(idx, nums, vis): # vis[idx] = True # flag = False # if idx == len(nums) - 1: # return True # if idx + nums[idx] < len(nums) an...
Markdown
UTF-8
6,592
2.671875
3
[ "MIT" ]
permissive
--- layout: post title: 명령행 프로그램 이야기 date: 2013-05-28 00:23:54 categories: [CommandLine Interface, CLI] tags: [CommandLine Interface, CLI] comments: true --- 내가 처음 접한 프로그래밍 언어는 Basic이 아닌, C였다. 그리고 Turbo-C 2.0이 첫 컴파일러였다. 내가 처음 샀던 C언어 서적이 터보 C 2.0을 알려주는 주황색 서적이었는데, 뭔가 시리즈 였던 기억이 난다. 그 책이 너무 설명이 어려워, 다음에 샀던 책이 바로, [Tu...
Markdown
UTF-8
1,488
3.34375
3
[]
no_license
res.end()方法返回的相应内容只能是二进制数据(Buffer)或者字符串 数字、对象、数组、布尔值统统不行 JSON有两个方法: - parse('[]')返回[] - stringify([])返回'[]',会中文乱码 ``` res.end(JSON.stringify(products)) ``` ## 代码无分号问题 ```javascript // 当你采用无分号的代码风格的时候,只要注意以下情况就不会有问题了: // 当一行代码是以: // ( // [ // ` // 开头的时候,则在前面补上一个分号以避免一些语法错误。不要不在上一行行末。 // 所以你会发...
Java
UTF-8
3,074
3.296875
3
[ "Apache-2.0" ]
permissive
package org.myrobotlab.control.widget; // ButtonsPanel.java // Andrew Davison, October 2006, ad@fivedots.coe.psu.ac.th /* A collection of Joystick.NUM_BUTTONS textfields representing the buttons on the game pad, divided into two rows When a button is pressed, the textfield's background colour change...
Markdown
UTF-8
2,707
4.1875
4
[]
no_license
### 搜索 #### 二分查找 前提:1.有序序列 2.顺序表O(1) 二分查找(折半查找),优点是比较次数少,查找速度快,平均性能好,缺点是待查表必须是有序表,且插入删除困难,适用于不经常变动而查找频繁的有序表。 1. 假设表中元素是按升序排列,将表中间位置记录的关键字与查找关键字比较; 2. 如果两者相等,则查找成功; 3. 否则利用中间位置记录将表分成前、后两个子表; 4. 如果中间位置记录的关键字大于查找关键字,则进一步查找前一子表,否则进一步查找后一子表。 5. 重复以上过程,直到找到满足条件的记录,使查找成功,或直到子表不存在为止,此时查找不成功。 ##### 递归实现 ```Python ...
Java
UTF-8
3,644
2.34375
2
[]
no_license
package parts; import parts.annotations.Printable; import parts.annotations.Sortable; import parts.entity.annotations.*; import parts.entity.annotations.Object; import java.io.Serializable; import java.util.Date; //@Entity(name = PartHtml.PARTS, nameInDB = PartDb.PARTS) //@Entity(name = "PARTS") @Object("Part") @Tab...
Java
UTF-8
892
1.742188
2
[]
no_license
package com.cenpro.siscu.service; import java.util.List; import com.cenpro.siscu.model.admision.Afiliacion; import com.cenpro.siscu.model.criterio.CriterioBusquedaEstamento; public interface IAfiliacionService extends IMantenibleService<Afiliacion> { public List<Afiliacion> buscarTodos(); pub...
JavaScript
UTF-8
5,249
2.59375
3
[]
no_license
const $ = document.querySelector.bind(document); const $$ = document.querySelectorAll.bind(document); window.addEventListener("resize", () => { displayHiddenNavBarMobile(); }); window.addEventListener("scroll", () => { handlingNavBarBackgroundAnimation(); $$(".heading-container").forEach((element) => { headin...
PHP
UTF-8
1,337
3.03125
3
[ "MIT" ]
permissive
<?php namespace App\Controllers; /** * Controller가 View를 호출하는 구조 */ class Home extends BaseController { /** * http://localhost * 사이트의 대문 페이지로 인식된다. */ public function index() { // views 폴더의 welcome_message.php 파일을 호출하여 화면 표시를 요청한다. return view('welcome_message'); } //---------------...
JavaScript
UTF-8
3,384
4.09375
4
[]
no_license
'use strict'; // function iceCream(){ // console.log('Jerry'); // } // iceCream(); //Counting Sheep // function sheepCount(number){ // if(number === 0){ // return; // } // console.log(` ${number} - Another sheep jump over the fence`); // sheepCount(number-1); // } // sheepCount(3); //Ar...
Java
UTF-8
3,965
2.375
2
[]
no_license
package com.adobe.aem.commons.assetshare.util; import org.apache.sling.api.SlingHttpServletRequest; import org.apache.sling.api.resource.AbstractResourceVisitor; import org.apache.sling.api.resource.Resource; import org.apache.sling.api.resource.ValueMap; import org.apache.sling.jcr.resource.api.JcrResourceConstants; ...
C
UTF-8
268
3.421875
3
[]
no_license
#include<stdio.h> int main() { int num,x,temp,i=0,decimal=0; printf("enter binary number"); scanf("%d",&num); while(num!=0) { temp=num%10; x=temp*pow(2,i); decimal+=x; num=num/10; i++; } printf("\n the decimal number is =%d\n",decimal); return 0; }
Java
UTF-8
3,796
2.625
3
[]
no_license
package com.rest.server; import java.math.BigDecimal; import java.math.BigInteger; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import java.util.Locale; import c...
Swift
UTF-8
1,777
3.171875
3
[]
no_license
// // HomeViewModel.swift // expired-date-ios // // Created by fit-sys on 2020/10/13. // import SwiftUI import CoreData class HomeViewModel : ObservableObject{ @Published var content = "" @Published var date = Date() @Published var isNewData = false @Published var updateItem : Food!...
Python
UTF-8
2,682
3.546875
4
[ "Apache-2.0" ]
permissive
import ast from typing import Dict, List, Optional def read_object_name(node: ast.AST, name: Optional[List[str]] = None) -> str: """Parse the object's (class or function) name from the right-hand size of an assignement nameession. The parsing is done recursively to recover the full import path of the ...
C
UTF-8
2,268
3.078125
3
[ "MIT" ]
permissive
/** * @file * @author David Barina <ibarina@fit.vutbr.cz> * @brief Simple application showing various system informations. */ #include "libdwt.h" #include <stdio.h> // fopen, fscanf, fgets, fclose #include <string.h> // strcmp, strchr, strstr #include <ctype.h> // isspace int main() { dwt_util_print_info(); dw...
PHP
UTF-8
3,738
2.609375
3
[ "MIT" ]
permissive
<?php require dirname(__FILE__)."/../utils/config.inc.php"; class ConfigurationCommandsController extends \BaseController { /** * Display a listing of the resource. * GET /configurationcommands * * @return Response */ public function index() { $commands = $this->getList(); return Response::json($co...
JavaScript
UTF-8
5,165
2.703125
3
[]
no_license
import React, { Component } from "react"; import logo from "./logo.svg"; import "./App.css"; import axios from "axios"; import Selector from "./components/Selector"; import Passage from "./components/Passage"; import Favorites from "./components/Favorites"; import FavoriteButton from "./components/FavoriteButton"; cla...
C++
UTF-8
6,363
2.734375
3
[]
no_license
/** * ------------------------------------------------------------------------------------------------ * Stream: Monitor.h * Author: Monteiro * * Created on November 26, 2015, 12:37 PM * ------------------------------------------------------------------------------------------------ */ #ifndef MONITOR_H #define...
Java
UTF-8
377
1.984375
2
[]
no_license
package org.germanbeyger.lab5.server_commands; import org.germanbeyger.lab5.datatypes.SendableCommand; import org.germanbeyger.lab5.datatypes.TargetCollection; public final class History { private History() {} public static String execute(SendableCommand command, TargetCollection targetCollection) { ...
Java
UTF-8
26,636
2.359375
2
[ "WTFPL" ]
permissive
package de.uni_stuttgart.riot.thing; import java.util.Collection; import java.util.Collections; import java.util.EnumSet; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonIgnore; import de.uni_stuttgart.riot.commons.rest.data.Storable; import de.uni_stuttgart.riot.notificat...
C++
UTF-8
1,740
2.625
3
[]
no_license
#ifndef _J1_GROUP_MOVEMENT_ #define _J1_GROUP_MOVEMENT_ #include "j1Module.h" #include "p2Point.h" #include "j1EntitiesManager.h" #define FORMATION_WIDTH_LIMIT 5 #define FORMATION_HEIGHT_LIMIT 5 enum FormationType { NO_FORMATION, SQUARE_CLOSE_FORMATION, SQUARE_SEPARATE_FORMATION }; struct Formation { void SetFor...
Python
UTF-8
1,012
3.328125
3
[]
no_license
class Document: def __init__(self, string=[]): if string: self.string = list(string) else: self.string = [] def append(self, string): self.string.append(string) def print(self): printing = self.string[0] self.string = self.string[1:] ...
Java
UTF-8
150
1.976563
2
[]
no_license
package iti.jets.tripplanner.interfaces; import iti.jets.tripplanner.pojos.Trip; public interface ObjectCarrier { void sendTripId(Trip trip); }
Java
UTF-8
1,288
2.90625
3
[]
no_license
package main.java.model; import java.sql.Date; import java.text.SimpleDateFormat; public class CityRateData { private Date date; private String name = null; private int PV = 0; private int UV = 0; private double rate = 0; public void setCityRateData(Date date, String name, int PV, int UV, dou...
Java
UTF-8
2,338
2.375
2
[]
no_license
package text; import com.itcast.domain.Account3; import com.itcast.service.ServiceAccount; import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import java.util.List; /** * 测试 */ public class TextAccount { /** ...
C#
UTF-8
8,490
2.515625
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; /// <summary> /// Attached to the prefabFileMenu. Used as both a Load Game and Save Game menu. /// Buttons are adjusted based on the scenario. /// Creates "slots" representing current save game files, which are extern...
Java
UTF-8
1,833
2.6875
3
[]
no_license
/** * Project Name:Infrared * File Name:SocketAddress.java * Package Name:com.syzx.infrared.service * Date:2017年12月31日下午1:29:32 * Copyright (c) 2017, syzx.com All Rights Reserved. * */ package com.syzx.infrared.service.web; import java.net.InetSocketAddress; import com.syzx.infrared.service.interfa...
C
UTF-8
15,326
2.859375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #include <unistd.h> #include "gfx.h" #define BLUE 10 #define RED -10 #define XSIZE 1000 #define YSIZE 800 #define UP 'A'; #define DOWN 'B'; #define LEFT 'D'; #define RIGHT 'C'; int locations[YSIZE][XSIZE]; double bullets1[10...
TypeScript
UTF-8
226
2.53125
3
[]
no_license
export interface Product { id : number; name : string; description : string; image : string; rating : number; } export interface Order { id : number; date : string; products : Array<string>; }
C++
UTF-8
652
3.203125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; stack < int > s1,s2; void enqueue(int item) { s1.push(item); } int dequeue() { if(s1.empty() && s2.empty()) { cout<<"Q is empty\n"; return 0; } else { if(s2.empty()) { while(!s1.empty()) { ...
Markdown
UTF-8
3,002
2.75
3
[]
no_license
# 调漆工具修改报告 * 数据库字段限制问题 **问题描述**:在之前的版本中,由于数据库字段限制问题,若主剂料号长度超过20字符,则无法存入数据库,数据无法保存且无错误提示。 **解决方案**:经反馈,数据库SQL文件建表字段同意由20长度更新为256。 **结果**:问题已解决。 * 关于启动界面加载的问题改进 **问题描述**:在前期版本中,程序以FrmMain(主窗口)作为程序入口,并以模态形式弹出登录窗体。该方式存在的问题在于,由于先加载主窗口隐藏后,再加载登录窗口,会导致页面一闪而过,降低体验。 **解决方案**:程序以登录窗口为入口,登录成功后再进行主窗口加载。 **结果**:问题已解决。 * 关于界...
Python
UTF-8
732
2.84375
3
[]
no_license
import argparse from logcreator.logcreator import Logcreator """ Handles arguments provided in comand line """ __author__ = 'Andreas Kaufmann, Jona Braun, Sarah Morillo' __email__ = "ankaufmann@student.ethz.ch, jonbraun@student.ethz.ch, sleonardo@student.ethz.ch" def get_args(): """ Returns list of args ...
Markdown
UTF-8
565
2.71875
3
[]
no_license
# OrdenaPilha Crie uma rotina usando o conceito de pilhas e/ou filas que permita analisar uma expressão matemática fornecida pelo usuário via Scanner, e identificar as operações a serem realizadas, e realizar os cálculos na ordem correta. A rotina deve identificar se o número de parênteses está correto, e identificar...
Python
UTF-8
985
2.609375
3
[]
no_license
import re import json import pandas as pd import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from sklearn.cluster import KMeans f = pd.read_csv('desk1.csv', header=0, index_col=0) print(f) f = f.fillna(0) print(f) f = f.T print(f) f = f.values print(f) np.random.seed(5) X = f ...
C#
UTF-8
1,009
3.25
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DetectorDeFalhas { class Program { static void Main(string[] args) { string X; bool achou = false; int maior = Int32.MinValue; ...
Java
UTF-8
1,247
2.234375
2
[]
no_license
package com.dzqc.enterprise.database; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase.CursorFactory; import android.database.sqlite.SQLiteOpenHelper; public class AppDBHelper extends SQLiteOpenHelper { public AppDBHelper(Context context, S...
Java
UTF-8
934
2.234375
2
[]
no_license
package com.learningwithrakesh.EventManagement.entity; import java.io.Serializable; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.MappedSuperclass; /** * */ @SuppressWarnings("javadoc") @MappedSuperclass public class BaseDoma...
JavaScript
UTF-8
2,770
4.53125
5
[]
no_license
//Hey this is the code for Linkedlist: //Hit the terminal and run node FileName without .js eg: FileName: index.js run in the terminal node index. class Node{ //A node has a data and a reference to that of the next node. constructor(data, next = null){ this.data = data; this.next = next; } ...
Java
UTF-8
295
1.796875
2
[]
no_license
package nc.vo.so.salequotation.entity; import nc.vo.pubapp.pattern.model.meta.entity.bill.AbstractBillMeta; public class SalequotationMeta extends AbstractBillMeta { public SalequotationMeta() { this.setParent(SalequotationHVO.class); this.addChildren(SalequotationBVO.class); } }
TypeScript
UTF-8
3,465
2.546875
3
[ "MIT" ]
permissive
import { BackgroundColor, Parent, Scenes, Size, WebGL } from '@phaserjs/phaser/config'; import { Game } from '@phaserjs/phaser/Game'; import { Scene } from '@phaserjs/phaser/scenes/Scene'; import { StaticWorld } from '@phaserjs/phaser/world'; import { AddChild } from '@phaserjs/phaser/display/'; import { Sprite, SetTin...
Python
UTF-8
2,996
3.578125
4
[]
no_license
#!/usr/bin/env python # coding: utf-8 # Libraries import matplotlib.pyplot as plt import numpy as np import pandas as pd ########## Read the Dataset with pandas library data=pd.read_csv("Datasets/Electricity_Norm/electricity-normalized.csv") # Shuffle data # ######### In order to get some random...
PHP
UTF-8
1,402
2.640625
3
[]
no_license
<?php include('private/database.php'); if(isset($_POST['email']) && !empty($_POST['email'])){ $message = $_POST; // verifier les champs $errors = []; if(filter_var($message['email'], FILTER_VALIDATE_EMAIL)){ //L'email est bonne }else{ $errors['email'] = "Veuillez-verifie...
Markdown
UTF-8
36,408
2.59375
3
[ "MulanPSL-2.0", "LicenseRef-scancode-mulanpsl-2.0-en", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- --- --- title: 卷三百七十七·再生三 --- 赵泰 袁廓 曹宗之 孙回璞 李强友 韦广济 郄惠连 赵泰 晋赵泰字文和,清河贝丘人也。祖父京兆太守。泰郡察孝廉,公府辟不就。精思圣典,有誉乡里。当晚乃仕,终中散大夫。泰年三十五时,尝卒心痛,须臾而死。下尸于地,心暖不冷,屈申随意。既死十日,忽然喉中有声如雨,俄而苏活。说初死之时,梦有一人,来近心下。复有二人,乘黄马,从者二人,夹持泰腋,(“腋”原作“胀”,据明抄本改。)径将东行。不知可几里,至一大城,崔峷高峻,城邑青黑色,遂将泰向城门八。经两重门,有瓦室,可数千间。男女大小,亦数千人。行列而吏着皂衣,有五六人,条疏姓字。云:“当以科呈府君。”泰名在三十,须臾,...
JavaScript
UTF-8
2,669
3.453125
3
[]
no_license
//Tiny Disco Javascript File setTimeout(play, 20) function play() { cash = 100; $(".coin-button").on("click", function(){ var coin = $(this).attr("data-coin"); coinPick(coin);}) $(".coin-button").on("click", function(){ var coin = $(this).attr("data-coin"); coinPick(coin);}) $("....
C++
UTF-8
408
2.671875
3
[ "MIT" ]
permissive
#pragma once #include "Collider.h" class BoxCollider : public Collider { private: Vector3 mDimensions; // Length - x, Height - Y, Breadth - Z public: BoxCollider(const Vector &origin, const Vector3 &size); ~BoxCollider(); bool collide(const Vector& position, float radius) override; void fillCollisionS...
C++
UTF-8
10,808
2.78125
3
[ "MIT" ]
permissive
// // Created by cpasjuste on 17/10/18. // #include <algorithm> #include "cross2d/skeleton/config_group.h" using namespace c2d::config; Group::Group(const std::string &name, int id) { this->name = name; this->id = id; } std::string Group::getName() const { return name; } int Group::getId() const { ...
SQL
UTF-8
469
2.578125
3
[ "MIT" ]
permissive
set serveroutput on; DECLARE data_mea_de_nastere varchar2(30) := '05-09-1997'; BEGIN DBMS_OUTPUT.PUT_LINE('Numarul de zile este: '||abs(extract(day from sysdate)-extract(day from to_date(data_mea_de_nastere,'DD-MM-YYYY')))||', iar numarul de luni este: '||round(months_between(sysdate,to_date(data_mea_de_nastere,...
Shell
UTF-8
873
3.46875
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
#!/usr/bin/env bash # Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. # Uses vespa-security-env to call curl with paths to credentials. # This script should be installed in libexec only. It is not public api. set -e . $(vespa-security-env) CURL_PARAMETER...
C
UTF-8
341
3.9375
4
[]
no_license
#include <stdio.h> int main(int argc, char const *argv[]) { // 1-7 打印 EOF printf("EOF = %d", EOF); // 1-9 替换多个空格为单个空格 int c, last; while ((c = getchar()) != EOF) { if (!(c == ' ' && last == ' ')) { putchar(c); } last = c; } return 0; }
Go
UTF-8
1,538
2.671875
3
[ "MIT" ]
permissive
package danmu import ( "errors" "flag" "fmt" log "github.com/alecthomas/log4go" "github.com/larspensjo/config" "os" "runtime" ) var ( Conf *Config appPath = os.Getenv("GOPATH") + "/src/github.com/kong36088/danmu/" configFile = flag.String("config", appPath+"config/config.ini", "General configuration...
Python
UTF-8
692
2.609375
3
[ "MIT" ]
permissive
import torch import pytorch_lightning as pl from pathlib import Path from shutil import copyfile class ModelCheckpoint(pl.callbacks.ModelCheckpoint): """""" def _do_check_save( self, filepath: str, current: torch.Tensor, epoch: int, trainer, pl_module, ): ...
Java
UTF-8
260
1.601563
2
[ "MIT" ]
permissive
package com.forest.crm.service; import java.util.List; import java.util.Map; /** * Created by CodeGenerator on 2018/04/30. */ public interface CrmService { List<Map<String, Object>> callCrmDatas(Map<String, Object> paramsMap); // 调用存储过程 }
Java
UTF-8
4,310
1.890625
2
[]
no_license
package com.lwj.image.loader; import android.content.Context; import android.support.v4.app.Fragment; import android.widget.ImageView; import com.lwj.image.download.ILoadImageUrlConverter; import com.lwj.image.download.ILoadImageUrlConverter.ImageType; import com.lwj.image.helper.IImageDownLoaderHelper; import com.lw...
Shell
UTF-8
749
4.125
4
[ "Apache-2.0" ]
permissive
#! /usr/bin/env bash # This takes boundary update PDFs converted to text and # builds a JSON list of boundary objects for each zone. # It will take more effort to parse the language... # Usage: listify input_file output_file FILE=$1 OUTFILE=$2 if [ -z $OUTFILE ] then OUTFILE=$1.json fi echo [ > $OUTFIL...
PHP
UTF-8
6,037
2.78125
3
[]
no_license
<?php class ORDER { private $conn; public function __construct() { $database = new OrderTable(); $db = $database->dbConnection(); $this->conn = $db; } public function neworder($ID, $uproduct, $uquantity, $uretouch, $ualum, $uinstructions) { try { $s...
JavaScript
UTF-8
1,158
2.859375
3
[ "CC0-1.0" ]
permissive
const API_URL = 'http://localhost:3000' //Trending posts const trendingPosts = document.querySelector('.trending-1') //Date const postDate = document.querySelector('#post-date') let postDay = new Date().getDay() let postMounth = new Date().getMonth() const postYear = new Date().getFullYear() if(postDay < 10){ pos...
Python
UTF-8
2,127
2.6875
3
[ "MIT" ]
permissive
""" Routes for main page of image labelling app """ import os import logging from flask import render_template, redirect, request, current_app, url_for from flask_login import current_user from image_labeller import db from image_labeller.main import bp from image_labeller.main.forms import LabelForm from image_label...
PHP
UTF-8
298
2.734375
3
[]
no_license
<?php namespace App\Repositories; use App\Models\Property; class PropertyRepository { /** * Cria um bem. * * @param array $attributes * @return mixed */ public function createProperty(array $attributes) { return Property::create($attributes); } }
TypeScript
UTF-8
2,830
2.546875
3
[]
no_license
module Pan3d.me { export class FrameUIRender extends UIRenderComponent { public constructor() { super(); } public setImg(url: string, wNum: number, hNum: number, fun: Function, num: number = 1): void { TextureManager.getInstance().getTexture(Scene_data.fileRoot + url...
JavaScript
UTF-8
1,583
2.65625
3
[ "MIT" ]
permissive
//addNote.js Page({ /** * 页面的初始数据 */ data: { content: '' }, /** * 生命周期函数--监听页面加载 */ onLoad: function (e) { var id = e.id; if (id) { getData(id, this); } else { this.setData({ id: Date.now() }) } }, /** * input change事件 */ change(e) { va...
C++
UTF-8
9,289
2.828125
3
[]
no_license
#include "w_game.hpp" #include "w_utils.hpp" #include "w_timer.hpp" #include <iostream> #include <vector> #include <ctime> // Based on: // http://weblog.jamisbuck.org/2011/1/10/maze-generation-prim-s-algorithm // Keep the cell size power-of-two const int cell_size = 16; // No instance version void ...
TypeScript
UTF-8
526
2.75
3
[ "MIT" ]
permissive
// just dummy typescript file import { Component, ElementRef, OnInit } from '@angular/core'; const num = 1; let me: {}; export interface LintResult { failureCount: number; format: string; output: string; } @Component({ selector: 'sg-codelyzer', template: ` <h1>Hello {{ name }}!</h1> ` }) class Codely...
Markdown
UTF-8
3,562
3.28125
3
[]
no_license
2015.1.19-19 ============= 晚上的时候,部门组织聚餐。一堆人聚在一起吃饭喝酒,今天就聊一聊在饭店吃饭的话题。 上大学之前,一般都是跟着父母去饭店吃饭,不用喝酒。自己常常一句话不说。然后就是吃饭。饭桌上大人们聊天,自己也是听的津津有味的,并不觉得无趣。可能是吃饭时比较乖,所以父母经常带着我去饭店吃饭,虽然很多时候是大人们的聚餐。小的时候随父母在外面吃饭,什么都不用管,坐在位置上安静的吃饭就好了。再大一点的时候,自己就被要求服务大家了,给大人们倒茶、敬酒等,总之各种不情愿做的事情都要去做,慢慢的不愿随父母去饭店吃饭了。不过有时也没办法,家里没有人做饭,所以那个时候只能如此。 上大学后,离开父母,生活变得自...
Java
UTF-8
3,550
2.59375
3
[ "BSD-3-Clause" ]
permissive
/** * This code is free software; you can redistribute it and/or modify it under * the terms of the new BSD License. * * Copyright (c) 2008-2009, Sebastian Staudt */ package steamcondenser.steam.sockets; import java.io.IOException; import java.net.InetAddress; import java.util.ArrayList; import java.util.concurr...
C++
UTF-8
156
2.640625
3
[ "Apache-2.0" ]
permissive
#include<iostream> #include<list> using namespace std; int main() { list<int> l {4,5,9,17,12}; for(auto i:l) cout<<i<<endl; return 0; }
JavaScript
UTF-8
4,078
2.59375
3
[ "MIT" ]
permissive
// Given a certain column and target value, get records // product/api/get/?c={target_column}&q={target_value}&order={orderby} exports.findByColumn = function (req,res) { var connection = require('../model/dbconnection'); var column = req.query.c; var val = req.query.q; // If order not speficied, then use order da...
PHP
UTF-8
3,018
3.140625
3
[ "MIT" ]
permissive
<?php namespace Emarref\Namer; use Emarref\Namer\Strategy\StrategyInterface; use Emarref\Namer\Detector\DetectorInterface; class Namer { const STRATEGY_DEFAULT_LIMIT = 100; /** * @var StrategyInterface */ private $strategy; /** * @var DetectorInterface */ private $detector; ...
Python
UTF-8
8,810
3
3
[]
no_license
import chess from chess_helper import board_rotation, get_rank_file, adj_mask, adj_pawns def material_heuristic(board): # https://python-chess.readthedocs.io/en/latest/core.html # chess.PAWN: chess.PieceType= 1 # chess.KNIGHT: chess.PieceType= 2 # chess.BISHOP: chess.PieceType= 3 # chess.ROOK: ch...
Java
GB18030
503
2.796875
3
[]
no_license
package hello; public class task2 { public static void main(String[] args) { int[] nums=new int[]{61,23,4,74,13,148,20}; int max=nums[0]; int min=nums[0]; double sum=0; double avg=0; for(int i=0;i<nums.length;i++){ if(nums[i]>max){ max=nums[i]; } if(nums[i]<min){ min=nums[i]; } sum=sum+nums[i]; }...