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 |
|---|---|---|---|---|---|---|---|
JavaScript | UTF-8 | 2,453 | 2.609375 | 3 | [] | no_license | module.exports = class SettingsPage {
constructor({page}) {
this.page = page
this.firewallSwitchCss = 'span[id="infoFirewall"]'
this.IMAPSwitchCss = 'span[id="infoImap"]'
this.SMTPSwitchCss = 'span[id="infoSmtp"]'
this.switchStateOff = 'switchoff2'
this.switchStateOn = 'switchon2'
this.cli... |
PHP | UTF-8 | 758 | 2.8125 | 3 | [] | no_license | <?php
require_once "config.php";
$faker = Faker\Factory::create();
class User extends Illuminate\Database\Eloquent\Model
{
//разрешено редактировать только это, остальное запрещено
protected $fillable = ['login', 'password', 'name', 'age', 'avatar_path', 'description'];
protected $table = 'users';
}
for(... |
Java | UTF-8 | 1,903 | 3.015625 | 3 | [] | no_license | package gd26.asteroids;
import java.awt.*;
import java.util.Random;
/**
* Debris class
*
* Created by gdorwin26 on 3/30/2017.
*/
public class Debris extends GameObject
{
private Vec2D[] particles;
private Vec2D[] particleOriginals;
private double time;
public Debris(Vec2D position, Vec2D velocity... |
Java | UTF-8 | 983 | 2.21875 | 2 | [] | no_license | package com.example.papl_887062;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class ExerciseThen extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstan... |
Java | UTF-8 | 1,448 | 2.984375 | 3 | [] | no_license | import java.io.File;
import java.io.FileNotFoundException;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Stream;
public class Day_3 {
private static List<char[]> map;
public static void main(String[] args) ... |
C | UTF-8 | 406 | 2.6875 | 3 | [
"MIT-Modern-Variant"
] | permissive | #include "syscall.h"
int main()
{
int i , j , k;
int child[10] , status;
char *name = "testConsoleOutput.coff";
for (i = 0; i < 10; i++)
{
//printf("====run child %d====\n" , i);
child[i] = exec(name , 1 , &name);
//printf("====================\n");
}
for (i = 0; i < 10; i++)
{
if (join(child[i] , &st... |
Python | UTF-8 | 3,656 | 2.8125 | 3 | [
"MIT"
] | permissive | #!/usr/bin/python3.7
# -*- coding: utf-8 -*-
import numpy as np
import cv2
########################################################
# Facefinder
########################################################
class EyesFinder:
def __init__(self, imageSize = (640,480), minFaceSize = (200,40)):
self.ima... |
Python | UTF-8 | 487 | 2.640625 | 3 | [] | no_license | from science import *
def column_for_levels(levels):
return pd.DataFrame(levels).cummax()[0]
if __name__ == "__main__":
import pandas as pd
import matplotlib.pyplot as plt
df = pd.concat(
[column_for_levels(lvls)
for lvls in [bitcoin_cash_levels(), bitcoin_core_levels(), li... |
Java | UTF-8 | 793 | 3.59375 | 4 | [] | no_license | package com.quantum.javabasics;
import java.util.Scanner;
public class AnagramFromHackerrank {
public void checkAnagram(String s)
{
int result =0;
if (s.length()%2 == 0)
{
for(int i=0;i<s.length()/2;i++)
{
int count =0;
for(int j=s.length()-1;j>=s.length()/2;j--)
{
if(s.charAt(i)... |
C++ | UTF-8 | 373 | 2.625 | 3 | [] | no_license | #include "include/controller.h"
#include "include/item.h"
#include "include/book.h"
using namespace std;
int main()
{
//Let the controller handle main program loop
Controller controller;
controller.Start();
//demonstrate overloaded operators
//get info
Book thesaurus;
cin >>thesaurus;
... |
Python | UTF-8 | 8,450 | 2.515625 | 3 | [
"MIT"
] | permissive | #!/usr/bin/python3
import argparse
import sys
import re
import codecs
import string
import collections
try:
from unidecode import unidecode
except:
sys.exit("Requires unidecode pip package to be installed. Run:\npip install unidecode\nor\npip3 install unidecode\ndepending on your installation and start the scri... |
Rust | UTF-8 | 6,150 | 2.984375 | 3 | [] | no_license | /*!
The `Page` class deals with operations done on pages, like editing.
*/
#![deny(
missing_docs,
missing_debug_implementations,
missing_copy_implementations,
trivial_casts,
trivial_numeric_casts,
unsafe_code,
unstable_features,
unused_import_braces,
unused_qualifications
)]
extern... |
SQL | UTF-8 | 1,876 | 4.03125 | 4 | [] | no_license | {{ config(materialized='view') }}
-- Determines the percentage of time a property has been occupied since they've
-- been onboarded.
WITH property_master_list AS (SELECT * FROM {{ref('property_master_list')}}),
booking_occupancy AS (SELECT * FROM {{ref('nights_occupied_per_booking')}}),
jira_issues AS (S... |
C++ | UTF-8 | 6,503 | 2.78125 | 3 | [] | no_license | #include <iostream>
#include <string>
#include <cstring>
#include <limits>
#include <fstream>
#include <sstream>
#include <atomic>
#include <time.h>
#include <pthread.h>
#include "ittnotify.h" // for VTune
#include "../include/graph.h"
#define MAX_THREADS 512
#define BUFF_SIZE 100000
#define INF std::numeric_limits... |
Markdown | UTF-8 | 686 | 2.6875 | 3 | [] | no_license | # TiP-updates
Weekly Theory in Practice updates
## Recent Progress
* I went through all of the proofs in section 2 of the prelims document.
* I've mostly set up an environment to work in, consisting of editors, Fedora 24, python, etc.
## Current tasks
### Big picure
* Learning Python
* Learning about Graphs
* Lea... |
Java | UTF-8 | 5,012 | 1.953125 | 2 | [
"Apache-2.0"
] | permissive | /**
* Copyright © 2018 Marcus Thiesen (marcus@thiesen.org)
*
* 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 a... |
Markdown | UTF-8 | 875 | 4.125 | 4 | [
"MIT"
] | permissive | # Currying
Currying is where a function expects a certain amount of arguments and if provided with less,
it returns another function that is awaiting the remaining arguments. Only once it receives all
expected arguments does a result get returned. If provided with the expected amount of arguments
all at once it wor... |
JavaScript | UTF-8 | 509 | 3.734375 | 4 | [] | no_license | //将类数组转换成数组
let array_like = {"0":"ter","1":"lal",length:2}
//类数组对象
console.log(array_like);
//从数组对象解构出slice方法
let {slice} =[];
//类似
//let array = Array.prototype.slice;
let array = slice.call(array_like,0);
console.log(array);
//第二种方法
console.log("类数组转换成数组2",Array.from(array_like));
let set = new Set([1,2,3,1,2,3,... |
C# | UTF-8 | 1,142 | 2.71875 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Project.Model;
using Project.Repository;
using Project.RequestModel;
namespace Project.Service
{
public interface ICustomerService : IBaseService<Customer>
{
List<Customer> Search(... |
PHP | UTF-8 | 6,292 | 3.09375 | 3 | [] | no_license | <?php
# ^ ==> "Commence par"
# $ ==> "fini par (ce qu'il y a juste avant le $)"
# [^] ==> "ne contient pas ce qui est dans les crochets" ex : [^abc] = ne contient ni a, ni b, ni c
# [a-z] ==> n'importe quel caractère entre a et z, en minuscule
# [A-Z] ==> n'importe quel caractère entre a et z, en majuscule
# [0-9] =... |
Python | UTF-8 | 2,691 | 2.625 | 3 | [] | no_license | # -*- coding: UTF-8 -*-
import tensorflow as tf
import numpy as np
from tensorflow.contrib import rnn
import matplotlib.pyplot as plt
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets('data/', one_hot=True)
trainimg = mnist.train.images
trainlabel = mnist.train.labels
testimg... |
Python | UTF-8 | 1,826 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | from flask import Flask, request, jsonify
from flask_cors import CORS
import base64
import numpy as np
import cv2
import angle
from tf_pose.estimator import TfPoseEstimator
from tf_pose.networks import get_graph_path, model_wh
from sklearn.metrics import r2_score
from os.path import join
app = Flask(__name__)
CORS(ap... |
Java | UTF-8 | 1,111 | 2.203125 | 2 | [] | no_license | package com.forgus.rent.entity;
import javax.persistence.*;
import java.time.LocalDate;
/**
* 电表记录
* Created by cwb on 2016/3/8.
*/
@Entity
@Table(name = "elecRecord")
public class ElecRecord {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
@Colu... |
C++ | UTF-8 | 1,931 | 2.75 | 3 | [] | no_license | #include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
#include <sstream>
#include <vector>
#include <sstream>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "Image.h"
#include "Root.h"
#pragma pack(push, 1)
struct file_struct
{
char filename[8];
char ... |
C++ | UTF-8 | 804 | 3.109375 | 3 | [] | no_license | #include "Puntos.h"
Puntos::Puntos(string c, string n) {
fila = n;
columna = c;
}
Puntos::Puntos(ifstream& in) {
fila = SerializadorBinario::deserialize<string>(in);
columna = SerializadorBinario::deserialize<string>(in);
}
string Puntos::toString() const {
return fila + columna ;
}
void... |
Java | UTF-8 | 4,788 | 1.984375 | 2 | [
"Apache-2.0"
] | permissive | package org.optaplanner.constraint.streams.bavet.common;
import java.util.Objects;
import java.util.Set;
import org.optaplanner.constraint.streams.bavet.BavetConstraint;
import org.optaplanner.constraint.streams.bavet.BavetConstraintFactory;
import org.optaplanner.constraint.streams.bavet.uni.BavetAbstractUniConstrai... |
JavaScript | UTF-8 | 3,320 | 2.796875 | 3 | [
"MIT"
] | permissive | import React, { Component } from 'react'
import './../time.css';
import Switch from '@material-ui/core/Switch';
export default class TimeAPI extends Component {
constructor() {
super();
this.state = {
time: [],
date: [],
format: true,
interval_id: nul... |
Java | UTF-8 | 5,254 | 1.882813 | 2 | [
"Unlicense"
] | permissive | package com.muskopf.tacotuesday.bl.proc;
import com.muskopf.tacotuesday.TacoTuesdayPersistenceInitializer;
import com.muskopf.tacotuesday.config.TacoTuesdayApiConfiguration;
import com.muskopf.tacotuesday.domain.Employee;
import com.muskopf.tacotuesday.domain.FullOrder;
import com.muskopf.tacotuesday.domain.Individual... |
Python | UTF-8 | 2,087 | 3.78125 | 4 | [] | no_license | from sys import exit
class home(object):
def __init__(self):
print "Welcome home.."
print "Please come inside.."
raw_input()
def host(self):
l=living()
l.explain()
l.trick()
class living(object):
def __init__(self):
self.colour='pink'
self.door=2
self.window=3
def explain(self):
print "Th... |
Markdown | UTF-8 | 1,352 | 3.5 | 4 | [] | no_license | # Answers, week 12
## Part 1: Calling the procedure
We make a list of instances, each one corresponding to a tone. We add four values: the start point, the mid point, the end point, and the name of the tone in question. The procedure will be called **addTone**.
```
@addTone: 230, 230, 230, "ma1"
@addTone: 190, 210, ... |
Java | UTF-8 | 953 | 2.46875 | 2 | [] | no_license | package com.migie.smith;
import agent.auctionSolution.ontologies.GiveOntology;
import jade.content.onto.BeanOntologyException;
import jade.content.onto.Ontology;
/**
* Extends GiveOntology to allow for the encoding and
* decoding of MBCAccountant.
*
* @see GiveOntology
* @author Grant
*/
@SuppressWarnings("se... |
JavaScript | UTF-8 | 2,065 | 3 | 3 | [] | no_license | if (typeof Object.assign !== "function") {
Object.assign = function Object$assign () {
var it = {},
arg,
key;
while (arg = [].shift.call(arguments)) {
if (arg === null || typeof arg !== "object") {
throw new TypeError("Invalid argument");
... |
C# | UTF-8 | 1,360 | 2.71875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Algorithmsnetcore.Common.Map.Base;
namespace Algorithmsnetcore.Common.Map.DFS
{
class DFSTest
{
private DFS<int> _dfs;
public DFSTest()
{
AdjacencyList<... |
C# | UTF-8 | 3,583 | 2.953125 | 3 | [] | no_license | using System;
using System.IO;
using System.Net;
using Newtonsoft.Json;
using System.Collections.Generic;
namespace Translator
{
class YandexTranslator
{
public string Translate(string s, string lang)
{
if (s.Length > 0)
{
WebRequest request = WebRequest... |
C | UTF-8 | 7,765 | 3.3125 | 3 | [] | no_license | #define _CRT_SECURE_NO_WARNINGS
#include<stdlib.h>
#include<stdio.h>
#include <string.h>
#include "functions1.h"
/******************* Static Function Prototypes *******************/
static boardPosArray** createPosArr();// create pointer to arr of board positions function
// update single moves cell funcion
... |
Java | UTF-8 | 662 | 2.40625 | 2 | [] | no_license | package com.lhx.chapter4.aop.aopaspectj;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;
@Aspect
@Component
public class GreetingAspect {
@Around("execution(* com.lhx.chapter4.aop.Gr... |
Java | UTF-8 | 1,800 | 2.03125 | 2 | [] | no_license | package com.we.sdk.memsap.service.impl;
import com.we.sdk.memsap.base.vo.Page;
import com.we.sdk.memsap.bean.AddressDic;
import com.we.sdk.memsap.dao.AddressDicDao;
import com.we.sdk.memsap.service.AddressDicService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.sprin... |
Java | UTF-8 | 1,606 | 2.453125 | 2 | [
"MIT"
] | permissive | package src.it.unibo.bd.db.controller;
import java.io.IOException;
import java.sql.SQLException;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control... |
JavaScript | UTF-8 | 677 | 3.46875 | 3 | [] | no_license |
function send(){
number_1= document.getElementById("input_number_1").value;
number_2= document.getElementById("input_number_2").value;
actual_answer= parseInt(number_1) * parseInt(number_2);
question_number= "<h4>" + number_1 + " X " + number_2 + "</h4>";
input_box= "<br>Answer : <input typ... |
Java | UTF-8 | 1,066 | 2.078125 | 2 | [] | no_license | package com.starwars.client.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
@Data
@AllArgsConstruct... |
JavaScript | UTF-8 | 760 | 2.859375 | 3 | [] | no_license | `use strict`
let html_daySelect, graph
//#region -------LISTENERS--------
const ListenToSelectDay = function(){
html_daySelect.addEventListener('change', function(){
let val = this.value;
getVisitorsByDay(val);
});
}
//#endregion
//#region -------GET FUNCTIONS-------
const getVisitorsByDay = ... |
Rust | UTF-8 | 3,228 | 3.015625 | 3 | [] | no_license | pub mod term;
pub mod syntax;
use term::*;
use std::string::*;
fn get_result<T>(name : Vec<u8>, result : Result<T, String>) -> T {
match result {
Ok(term) => term,
Err(err) => {
println!("[Error on `{}`]\n{}", String::from_utf8_lossy(&name), err);
std::process::exit(0);
... |
PHP | UTF-8 | 1,276 | 2.65625 | 3 | [] | no_license | <?php
namespace Anax\View;
/**
* Render content within an article.
*/
?>
<ul class="left-list">
<li><a href="<?= url("movie1/index") ?>">Visa alla filmer</a></li>
<li><a href="<?= url("movie1/search-title") ?>">Sök titel</a></li>
<li><a href="<?= url("movie1/search-year") ?>">Sök år</a></li>
<li><a ... |
Markdown | UTF-8 | 7,254 | 2.875 | 3 | [
"MulanPSL-2.0",
"LicenseRef-scancode-mulanpsl-2.0-en",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | ---
---
---
title: 52
---
彻夜无眠。
终于有了勇气,去思考这一辈子该怎么活的问题。
以前,很多工作是自己看不上的,哪怕在教育机构当了两年的老师,那也是一肚子的委屈。现在想起来,我,许晶晶,我凭什么对生活抱有那么高的期待?你有超人的才华吗?有良好的家庭背景吗?有魔鬼的身材和姣美的面容吗?如果都没有,生活凭什么给你更高的评价?生活不是慈善家,它的付出是需要交换的。也许,这些年来,我凭着一张重点大学的文凭,就对生活展开了太多想象。这些想象其实有点虚妄。我的期待,我的野心,超出了我的实力。“你是一个没有实力的人。”当我轻轻嚅动嘴唇,含糊地说出这句话,生怕自己听见,真的接受不了。然后,鼓起勇气,清晰地吐出... |
TypeScript | UTF-8 | 1,353 | 2.96875 | 3 | [] | no_license | import * as WebSocket from "ws";
export class WebSocketsService {
private websocketServer: WebSocket.Server;
/**
* Creates instance of this class.
* @param wss Instance of ws server
*/
constructor(wss: WebSocket.Server){
this.websocketServer = wss;
}
/**
* Notifies clie... |
Java | UTF-8 | 4,883 | 2.5625 | 3 | [] | no_license | package alt.termos.core;
import alt.termos.util.Arguments;
import alt.termos.util.Unsafe;
import alt.termos.util.UnsafeMemoryMappedFile;
/**
*
* @author Albert Shift
*
*/
public class MetaPage {
public static final int MAGIC = 0x2E464D4D;
public static final long MAGIC_OFFSET = 0;
public static final long MA... |
Java | UTF-8 | 1,680 | 2.328125 | 2 | [] | no_license | package com.liewmanchoi.processor;
import com.liewmanchoi.annotation.PigeonService;
import com.liewmanchoi.pigeon.rpc.common.enumeration.ErrorEnum;
import com.liewmanchoi.pigeon.rpc.common.exception.RPCException;
import com.liewmanchoi.pigeon.rpc.config.ProviderBean;
import lombok.extern.slf4j.Slf4j;
import org.spring... |
Java | UTF-8 | 994 | 1.835938 | 2 | [] | no_license | package com.zsc.mnc.shop.service;
import com.zsc.mnc.shop.model.Category;
import com.zsc.mnc.shop.model.Product;
import com.zsc.mnc.shop.model.ProductDetails;
import com.zsc.mnc.shop.model.ProductImage;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;
import jav... |
JavaScript | UTF-8 | 1,099 | 3.03125 | 3 | [] | no_license | const game = (() => {
let currentPlayer;
let otherPlayer;
const startGame = (players) => {
currentPlayer = players.player1;
otherPlayer = players.player2;
};
const getCurrentPlayer = () => currentPlayer;
const getOtherPlayer = () => otherPlayer;
const gameOver = (gameBoard) => {
const winC... |
Python | UTF-8 | 5,809 | 3.65625 | 4 | [] | no_license | # File: Graph.py
# Description:Create a number of functions that will allow us to transverse a graph
# Student Name:Paul Vonder Haar
# Student UT EID:pmv347
# Partner UT EID:
# Course Name: CS 313E
# Unique Number:
# Date Created:
# Date Last Modified:
class Vertex(object):
def __init__(self,label... |
C++ | UTF-8 | 2,709 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | #include <vector>
#include <eventpp/udp/sync_udp_client.hpp>
#include <eventpp/udp/udp_server.hpp>
#include "test.h"
static int g_count = 0;
static bool g_exit = false;
static uint64_t g_timeout_ms = 1000;
static void OnMessage(eventpp::udp::Server * udpsrv, eventpp::EventLoop * loop, const eventpp::udp::MessagePtr ... |
JavaScript | UTF-8 | 3,877 | 2.703125 | 3 | [] | no_license | export function compare(a, b) {
if (a.priority < b.priority) return -1;
if (a.priority > b.priority) return 1;
return 0;
}
var Resource = require("./Resource").Resource;
var State = require("./State").State;
var RESOURSECOLOR = require("./constants").RESOURSECOLOR;
var COLOR = require("./constants")... |
Java | UTF-8 | 420 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | package models.decorator;
public abstract class ComponentDecorator extends Component{
protected Component component;
public void setComponent(Component component) {
this.component = component;
}
@Override
public void operation() {
System.out.println("Operation in " + this.getClas... |
Java | UTF-8 | 156 | 2.515625 | 3 | [] | no_license | package com.ghs.aop;
public class Human implements Sleepable {
@Override
public void sleep() {
System.out.println("正在睡觉!");
}
}
|
C# | UTF-8 | 2,016 | 2.84375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
using System.Data;
namespace ModeD
{
class Program
{
static void Main(string[] args)
{
string ConnexString;
ConnexString = "D... |
Python | UTF-8 | 4,654 | 3.375 | 3 | [] | no_license | # -*- coding: UTF-8 -*-
import turtle
import math
import random
# Tela do Jogo
tela = turtle.Screen()
tela.bgcolor('black')
tela.title('Space Invaders')
tela.bgpic('space_invaders_background.gif')
turtle.register_shape('invader.gif')
turtle.register_shape('player.gif')
# Bordas do Jogo
bordas = turtle.Turtle()
bor... |
PHP | UTF-8 | 632 | 2.625 | 3 | [] | no_license | <?php
namespace App\Traits;
use App\Exceptions\NoSlugParamsException;
trait SluggableTrait
{
public static function boot()
{
parent::boot();
static::created(function ($entity) {
if ( !$entity->sluggable) {
throw new NoSlugParamsException(get_class($entity) . ' us... |
Java | UTF-8 | 3,238 | 2.203125 | 2 | [] | no_license | package com.socialcoding.models;
/**
* Created by cloverhearts on 2016-12-06.
*/
public class CctvLocationDetail {
final transient String PUBLIC_CCTV_TYPE = "PUBLIC";
final transient String PRIVATE_CCTV_TYPE = "PRIVATE";
private long cctvId;
private String purpose;
private String source;
pri... |
Python | UTF-8 | 419 | 4.25 | 4 | [] | no_license | #!/usr/bin/python3
# Description: Demander deux nombres à l’utilisateur et afficher le résultat
# Author: Thomas HATUEL
# Date: 23/10/2018
print("choisi un nombre")
value1 = input()
try:
value1 = int(value1)
except ValueError:
pass
print("choisi un autre nombre")
value2 = input()
try:
value2 = ... |
TypeScript | UTF-8 | 2,051 | 3.171875 | 3 | [
"MIT"
] | permissive | import PropertyChangeSupport from './PropertyChangeSupport';
import Data from './Data';
export class PropertyBinder implements PropertyChangeSupport {
private propertyClass1: string;
private propertyClass2: string;
private data1: Data;
private data2: Data;
// works like a lock
private applyingC... |
Java | UTF-8 | 1,118 | 2.171875 | 2 | [
"Apache-2.0"
] | permissive | package com.android.zd112.ui.view.player.media;
/**
* Created by etongdai on 2018/3/20.
*/
public class VideoPlayerManager {
public static VideoPlayer FIRST_FLOOR_JZVD;
public static VideoPlayer SECOND_FLOOR_JZVD;
public static VideoPlayer getFirstFloor() {
return FIRST_FLOOR_JZVD;
}
p... |
Markdown | UTF-8 | 6,699 | 3.015625 | 3 | [] | no_license | # linkbuilder
[](https://travis-ci.org/osvaldopina/linkbuilder)
[](https://gitter.im/osvaldopina/linkbuilder?utm_source=badge&utm_mediu... |
Java | UTF-8 | 504 | 2.078125 | 2 | [] | no_license | package com.gresstenan.wisnu.repository;
import com.gresstenan.wisnu.models.Tutorial;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import java.util.List;
public interface TutorialRepository extends Mo... |
Python | UTF-8 | 242 | 2.5625 | 3 | [] | no_license | #! /usr/bin/env python3
from enum import Enum
"""
牌的颜色枚举类
"""
class CardColorEnum(Enum):
# 黑桃
SPADE = '黑桃'
# 红桃
HEART = '红桃'
# 梅花
CLUB = '梅花'
# 方片
DIAMOND = '方片' |
Java | UTF-8 | 9,478 | 1.742188 | 2 | [] | no_license | package com.fanwe;
import android.app.Dialog;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import com.fanwe.application.App;
import com.fanwe.application.SysConfig;
import com.f... |
Java | UTF-8 | 2,764 | 2.015625 | 2 | [] | no_license | /**
*
*/
package win.caicaikan.controller;
import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.... |
Java | UTF-8 | 208 | 1.84375 | 2 | [] | no_license | package com.yunqin.bearmall.inter;
/**
* Created by chenchen on 2018/8/12.
*/
public interface OnPartSnatchListener {
void onBuySuccess(int postition,int count);
void onBuyFailer(String msg);
}
|
Java | UTF-8 | 2,089 | 3.234375 | 3 | [
"MIT"
] | permissive | package core;
import generator.PuzzleGenerator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import utils.Utils;
/**
* Main class of the project. Opens a data set and solves all instances
* in the set using a certain heuristic algorithm. Certain metrics that are
* recorded dur... |
C++ | UTF-8 | 1,318 | 2.875 | 3 | [] | no_license | #pragma once
#include "tf_base.h"
namespace tensorflow_c_api
{
class tensor : private not_copyable
{
public:
tensor(data d, const std::int64_t* dims, std::int32_t num_dims, size_t len)
{
m_value = TF_AllocateTensor(static_cast<TF_DataType>(d), dims, num_dims, len);
}
... |
Java | UTF-8 | 1,810 | 3.5625 | 4 | [] | no_license | package com.bridgelabz.employeewagecomputation;
public class EmployeeWage {
//constants
public static final int IS_FULL_TIME = 1;
public static final int IS_PART_TIME = 2;
//instance variables
public int empWagePerHour;
public int maxWokringDays;
public int maxWorkingHrs;
public String companyName;
//con... |
Python | UTF-8 | 1,672 | 2.8125 | 3 | [
"MIT"
] | permissive | from azure.cognitiveservices.vision.face import FaceClient
from msrest.authentication import CognitiveServicesCredentials
from azure.cognitiveservices.vision.face.models import FaceAttributeType
KEY = "1837b9d29e0b4a22843d103a7ca8b3c9"
ENDPOINT = "https://westus2.api.cognitive.microsoft.com/"
class NoFaceFoundExcepti... |
Java | UTF-8 | 2,635 | 2.3125 | 2 | [] | no_license | package com.example.wordbook.domain.word.service.word_userwordbook;
import com.example.wordbook.domain.study.entity.Study;
import com.example.wordbook.domain.word.dto.request.UpdateWordDTO;
import com.example.wordbook.domain.word.dto.response.WordDetailDTO;
import com.example.wordbook.domain.word.entity.Word;
import c... |
Java | UTF-8 | 2,975 | 3.921875 | 4 | [] | no_license | import java.io.*;
import java.util.*;
import java.math.*;
//I created my own HashSet class for the 100% solution
public class MyHashSet<K extends Comparable<K>> implements Set<K>{
//private Node class. Pretty much the same node that we would use in a normal linked list
private class Node{
K key;
Node next... |
Java | UTF-8 | 978 | 2.640625 | 3 | [] | no_license | package com.dmma.dashboard.gwt.core.client.types;
import com.dmma.dashboard.gwt.core.client.i18n.DashboardMessages;
public enum TipDirectionType {
isMtoB( 1, DashboardMessages.MSG.tipDirectionBrokerToBanker()),
isBtoM( 2, DashboardMessages.MSG.tipDirectionBankerToBroker());
private Integer id;
private S... |
PHP | UTF-8 | 1,281 | 2.671875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: jacky
* Date: 2019/11/3
* Time: 下午 02:10
*/
namespace common\sso;
use common\sso\vendor\facebook\FacebookLoginHelper;
use common\sso\vendor\google\GoogleLoginHelper;
use Exception;
use Facebook\Exceptions\FacebookSDKException;
class Sso
{
public function login($vend... |
Java | UTF-8 | 1,447 | 2.859375 | 3 | [] | no_license | public class Seats_Page {
private int num;
private String type;
private String window;
private boolean table;
private String direction;
private boolean access;
private String email = "";
public Seats_Page(int num, String type, String window, String direction,
boolean table, boolean access) {
... |
JavaScript | UTF-8 | 634 | 3.46875 | 3 | [
"MIT"
] | permissive | function printValues(arr) {
let searchedKey = arr.pop();
let isSearchedKeyFound = false;
for (let element of arr) {
let elementTokens = element.split(' ');
let key = elementTokens[0];
if (key === searchedKey) {
let value = elementTokens[1];
console.log... |
C++ | GB18030 | 10,875 | 2.609375 | 3 | [] | no_license | #include<stdio.h>
#include<malloc.h>
#include"start.h"
#include"process.h"
void doyouwork()
{
if(now->next_node == NULL) //ǰڷ
{
if(PHead->next_node != NULL) //вΪt
{
pn = (SERVELISTNODE*)malloc(sizeof(ServeListNode));
pn->user_call = PHead->next_node->user_... |
Markdown | UTF-8 | 6 | 3.734375 | 4 | [] | no_license | UGBKQ872CN-eyJsaWNlbnNlSWQiOiJVR0JLUTg3MkNOIiwibGljZW5zZWVOYW1lIjoi5rC45LmF5r+A5rS7IHd3d8K3YWppaHVvwrdjb20iLCJhc3NpZ25lZU5hbWUiOiIiLCJhc3NpZ25lZUVtYWlsIjoiIiwibGljZW5zZVJlc3RyaWN0aW9uIjoiIiwiY2hlY2tDb25jdXJyZW50VXNlIjpmYWxzZSwicHJvZHVjdHMiOlt7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjItMDUtMjMiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY... |
Java | UTF-8 | 392 | 1.820313 | 2 | [] | no_license | package com.gaments.gaments.service;
import com.gaments.gaments.models.UserProfile;
public interface UserProfileService {
public UserProfile createUserProfile(String username, UserProfile newUserProfile);
public UserProfile getLoggedUserProfile(String username);
public UserProfile getUserProfile();
p... |
Java | UTF-8 | 6,415 | 1.695313 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags and
* the COPYRIGHT.txt file distributed with this work.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may ob... |
SQL | UTF-8 | 5,505 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Creato il: Ago 11, 2021 alle 16:48
-- Versione del server: 10.4.11-MariaDB
-- Versione PHP: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... |
Java | UTF-8 | 5,413 | 2.1875 | 2 | [] | no_license | package com.out.link.server.http.controller;
import java.util.Map;
import javax.annotation.Resource;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.MissingServletRequestParameterException;
import org.sp... |
JavaScript | UTF-8 | 845 | 4.125 | 4 | [] | no_license | class hashMap {
constructor(cap) {
this.capacity = cap;
this.table = [];
}
add(key, val) {
// Add, but handle collisions
// Create an add(key, val) method on hashMap to add a new key and value to the map. This entails hashing key, mod’ing it into the size of your array, and... |
Python | UTF-8 | 1,856 | 2.671875 | 3 | [] | no_license | # -*- coding: utf-8 -*-
# Doc: https://pythonhosted.org/PyPDF2/PdfFileWriter.html
# https://stackoverflow.com/questions/2252726/how-to-create-pdf-files-in-python
# https://pypi.org/project/pdfkit/ html -> pdf
# reportLab
import PyPDF2
#import pdfkit
from reportlab.pdfgen import canvas
import os
class Pdfhandler(ob... |
Java | UTF-8 | 1,625 | 2.40625 | 2 | [] | no_license | package simplytextile.policytracker.companyresponse;
public class PolicyType
{
private Integer id;
private String name;
private String description;
private String parent_id;
private Integer is_renewable;
private Integer renewal_notice_days;
public PolicyType(Integer id, String name, Stri... |
Markdown | UTF-8 | 1,938 | 2.5625 | 3 | [] | no_license | # -000000
#000000 Digital Dark Age - HSD FB D/IRAA Summer 2017
One can feel it behind the eyes like the fog before a migraine sets in. The buzz words humming like fluorescent lights, tumbling from the mouths of talking heads like water from the puckered lips of a stone cherub. Disruptive innovation, exit strategies, t... |
JavaScript | UTF-8 | 16,342 | 2.515625 | 3 | [] | no_license | // Settings for JS
$(document).ready(function(){
var xurl = 'index.php?id=19';
$('label.insured').click(function(){
if($(this).hasClass('active')){
$(this).removeClass('btn-success').addClass('btn-warning');
$('span.insured-lable').text("Insured?");
$('input#insured')... |
PHP | UTF-8 | 1,049 | 3.03125 | 3 | [] | no_license | <?php
class Image extends Database {
private $file;
/*
* upload the file method and get the uploaded file URL
*/
public function uploadFile($file) {
$this->file = $file;
$extension = strtolower(pathinfo($file['name'],PATHINFO_EXTENSION));
$imgURL = "upload/" . time() . ".{$extension}";
$... |
SQL | UTF-8 | 756 | 3.9375 | 4 | [] | no_license | WITH qualified_act as (
SELECT athlete_hub_seq
,CONCAT(firstname," ", lastname) as athlete
, FORMAT_TIMESTAMP("%b %Y", start_date) as event_month
, count(activity_hub_seq) act_count
FROM `strava-int.strava_information_vault.fact_activity`
where moving_time_s > 1500
GROUP BY athlete_hub_seq
,CONCAT(firstname," "... |
Ruby | UTF-8 | 3,477 | 2.734375 | 3 | [
"MIT"
] | permissive | require "pigpio"
require "rmagick"
class SharpMemoryDisplay
attr_reader :width, :height, :buf
CMD_BIT_WRITECMD = 0x80
CMD_BIT_VCOM = 0x40
CMD_BIT_CLEAR = 0x20
DUMMY_DATA = 0x00
BitRverseChar = 256.times.map do |v|
8.times.inject(0) { |ret, i| ret |= (v & 0x01 << i) != 0 ? 0x80 >> i : 0 }
end
def ... |
Python | UTF-8 | 5,261 | 3.0625 | 3 | [
"MIT"
] | permissive | import math
from printing_tools import *
def circle_array(radius, n, p0):
""""Simple circle, or rather regular polygon with n vertices"""""
array = []
for phi in np.linspace(0, 2 * np.pi, n):
p = list(p0)
p[0] += np.sin(phi) * radius
p[1] += (1 + np.cos(phi)) * radius
array... |
Python | UTF-8 | 686 | 3.296875 | 3 | [] | no_license | # Uses python3
import sys
def inversions(nums):
n = len(nums)
if (n == 1):
return 0, nums
x, a = inversions(nums[0 : n // 2])
y, b = inversions(nums[n // 2 : n])
z, c = merge_sort(a, b)
return x + y + z, c
def merge_sort(a, b):
i, j, z = 0, 0, 0
la, lb = len(a), len(b)
c = ... |
C++ | UTF-8 | 4,545 | 3.484375 | 3 | [] | no_license | #define CATCH_CONFIG_FAST_COMPILE
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <set>
struct ListNode {
int val;
ListNode *next{nullptr};
ListNode(int x) : val(x) {}
};
// this solution creates a new list
//class Solution {
//public:
// ListNode* mergeTwoLists(const ListNode* L1, const Lis... |
Markdown | UTF-8 | 1,565 | 2.765625 | 3 | [
"Unlicense"
] | permissive |
# مستوطنون صهاينة يسرقون ثمار 900 شجرة زيتون جنوب نابلس
Published at: **2019-11-05T00:00:00+00:00**
Author: ****
Original: [almanar.com.lb](http://almanar.com.lb/5918926)
أقدم مستوطنون صهاينة الثلاثاء على سرقة ثمار مئات أشجار الزيتون من أراضي قرية “اللبن” الشرقية جنوب نابلس بالضفة الغربية الفلسطينية المحتلة.
وقالت... |
C++ | UTF-8 | 28,632 | 2.75 | 3 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | /**
* @file py_panda.cxx
* @author drose
* @date 2005-07-04
*/
#include "py_panda.h"
#include "config_interrogatedb.h"
#include "executionEnvironment.h"
#ifdef HAVE_PYTHON
#define _STRINGIFY_VERSION(a, b) (#a "." #b)
#define STRINGIFY_VERSION(a, b) _STRINGIFY_VERSION(a, b)
using std::string;
/**
*/
void DTOO... |
C# | UTF-8 | 2,087 | 2.515625 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | //
// GetAdmx.cs
//
namespace PSPEdit.Cmdlet
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Management.Automation;
using System.Text;
using System.Threading.Tasks;
/// <summary>
/// <para type="synopsis">Parses ADMX file</para>... |
Java | UTF-8 | 684 | 2.3125 | 2 | [] | no_license | package com.epam.preprod.pavlov.entity.order;
public class OrderStatus {
private int orderStatusId;
private String orderStatusName;
public OrderStatus(int orderStatusId, String orderStatusName) {
this.orderStatusId = orderStatusId;
this.orderStatusName = orderStatusName;
}
public ... |
Markdown | UTF-8 | 847 | 3.34375 | 3 | [] | no_license | #my-diary
How to run this:
1) Make sure you have python 2.7 installed: `python -v`
2) Run next command: `python my_diary.py <file_name.txt>` Instead of file_name.txt use any file you want.
For example: `python my_diary.py mydiary.txt`
This is the repository to test my skills in Python.
You have some file, in which... |
Markdown | UTF-8 | 16,323 | 2.75 | 3 | [] | no_license | ---
layout: post
title: "06.SpringBoot的错误机制"
date: 2018-06-21
description: "SpringBoot的错误机制"
tag: SpringBoot
---
### 一、SpringBoot错误的默认页面
1. 这里需要分为两种情况:
- 浏览器访问:

- 其他客户端访问:

... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.