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 | 321 | 3.03125 | 3 | [] | no_license | class Autor{
private String nomeCitacao;
private String nomeInicial;
public Autor(String nomeCitacao, String nomeInicial){
this.nomeCitacao = nomeCitacao;
this.nomeInicial = nomeInicial;
}
public String getNomeCitacao(){
return nomeCitacao;
}
public String getNomeInicial(){
return nomeInicial;
}
}... |
C# | UTF-8 | 1,537 | 2.546875 | 3 | [] | no_license | using Microsoft.EntityFrameworkCore;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Szpitalnex.Core.Models;
using Szpitalnex.Database.Entities;
using Szpitalnex.Database.Repositories.Base;
using Szpitalnex.Database.Repositories.Base.Interfaces;
namespace Szpitalnex.Database.Repos... |
Python | UTF-8 | 188 | 2.640625 | 3 | [] | no_license | N, K = (int(x) for x in input().split())
A = list(int(x) for x in input().split())
cur = sum(A[:K])
total = cur
for i in range(N-K):
cur += - A[i] + A[i+K]
total += cur
print(total) |
Java | UTF-8 | 1,714 | 3.609375 | 4 | [] | no_license | package tree.binary;
import queue.ArrayQueue;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* 普通的二叉树
* @author Vinfer
* @date 2020-09-05 15:54
**/
public class BinaryTree<T> extends AbstractBinTree<T>{
private final List<T> elements;
@SafeVarargs
public ... |
C | UTF-8 | 730 | 2.71875 | 3 | [] | no_license | /**
BEGIN_EXPECTED
A
S0: int i;
S1: x[i] = b[i];
S2: int j;
S3: x[j] /= l[j][j];
S4: x[i] -= l[i][j] * x[j];
B
S0: {[]}
S1: {[i]: 0 <= i < n}
S2: {[]}
S3: {[j]: 0 <= j < n}
S4: {[i,j]: 0 <= j < n and j+1 <= i < n}
C
S0: {[]->[0,0,0,0,0]}
S1: {[i]->[1,i,0,0,0]}
S2: {[]... |
TypeScript | UTF-8 | 420 | 3.34375 | 3 | [
"MIT"
] | permissive | export default function isEven(value: any): boolean {
if (Number.isNaN(parseFloat(value)) || !Number.isFinite(Number(value))) {
return false
}
return value % 2 === 0
}
/**
* This function evaluates whether all parameters are evens
*/
export function isEvens(...parameters: any[]): boolean {
for (const pa... |
Java | UTF-8 | 2,900 | 2.171875 | 2 | [] | no_license | package com.example.project_valhe;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.wi... |
Java | UTF-8 | 178 | 2.0625 | 2 | [] | no_license | package com.sepm.exception;
public class ManagerNotFundException extends RuntimeException{
public ManagerNotFundException (String message) {
super(message);
}
}
|
Python | UTF-8 | 7,383 | 3.15625 | 3 | [] | no_license | from node import Node
import math
def ID3(examples, default, attributesChosen = []):
'''
Takes in an array of examples, and returns a tree (an instance of Node)
trained on the examples. Each example is a dictionary of attribute:value pairs,
and the target class variable is a special attribute with the... |
Python | UTF-8 | 912 | 4.1875 | 4 | [] | no_license | numbers = []
for c in range(0, 5):
numbers.append(int(input("Digite um número: ")))
if c == 0:
print("Primeiro elemento da lista.")
else:
if numbers[c] < numbers[0]:
numbers.insert(0, numbers[c])
numbers.pop()
print(f"Adicionado na posição 0 da lista")
... |
Python | UTF-8 | 553 | 3.203125 | 3 | [] | no_license | # a e s t h e t i c
def aesth(userInput):
return ' '.join(userInput)
#"hey you guys have fun, i'm not drinking tonight" "iM nOt DrInKiNg ToNiGhT"
def mock(userInput):
rawList = list(userInput)
mockList = []
count = 1
for item in rawList:
if count % 2 == 0:
item = (s... |
Markdown | UTF-8 | 6,217 | 2.875 | 3 | [
"Apache-2.0"
] | permissive | ---
typora-root-url: ../
layout: post
title: iptables 学习笔记
subtitle:
author: gsfish
date: 2019-01-09 22:00 +0800
header-img: img/post-bg-07.jpg
tags:
- Linux
---
以往面对 iptables 的场景比较少,对其的了解仅存在于命令使用的层面。现在重新开始学习 iptables,终于弄懂了以前很模糊的一些概念,总结了以下的笔记。
# 0x00 关于 iptables
iptables 是一个配... |
JavaScript | UTF-8 | 1,145 | 3.25 | 3 | [] | no_license | // Send data from an iframe to its parent window
// Called from the iframe
const message = JSON.stringify({
message: "Hello from iframe",
date: Date.now(),
});
window.parent.postMessage(message, "*");
//Send data from a page to its child iframe
// Called from the page
frameEle.contentWindow.postMessage(message, "*... |
C++ | UTF-8 | 594 | 2.640625 | 3 | [] | no_license | #ifndef MAMDANIDEFUZZ_H
#define MAMDANIDEFUZZ_H
#include "BinaryExpression.h"
#include "Expression.h"
#include <vector>
using namespace core;
namespace fuzzy
{
template <class T>
class MamdaniDefuzz: public BinaryExpression<T> {
public:
MamdaniDefuzz(T _min, T _max, T _step);
virtual ~MamdaniDefuzz();
T ev... |
Java | UTF-8 | 3,601 | 2.09375 | 2 | [] | no_license | package com.nb.nbpx.pojo.system;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
... |
Java | UTF-8 | 1,554 | 4.375 | 4 | [
"Apache-2.0"
] | permissive | package array;
/**
* 数组的概念:是一种容器,可以同时存放多个数据值。
* <p>
* 数组的特点:
* 1. 数组是一种引用数据类型
* 2. 数组当中的多个数据,类型必须统一
* 3. 数组的长度在程序运行期间不可改变
* <p>
* 数组的初始化:在内存当中创建一个数组,并且向其中赋予一些默认值。
* <p>
* 两种常见的初始化方式:
* 1. 动态初始化(指定长度)
* 2. 静态初始化(指定内容)
* <p>
* 动态初始化数组的格式:
* 数据类型[] 数组名称 = new 数据类型[数组长度];
* <p>
* 解析含义:
* 左侧数据类型:也就是数组当中保存... |
Java | UTF-8 | 5,070 | 2.671875 | 3 | [] | no_license | package com.metaShare.common.utils;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
/**
* @Author
* @ClassName ExcelStyleUtilFor2003
* @Description TODO
* @Date 2019/7/26... |
Markdown | UTF-8 | 4,440 | 2.96875 | 3 | [
"MIT"
] | permissive | Cacheable
=========
[](https://travis-ci.org/yateric/cacheable)
[](LICENSE)
[{
this.hours = new List<string>();
}
pu... |
C | UTF-8 | 2,038 | 3.0625 | 3 | [] | no_license | /* power.c
*
* Robot power management functions, including:
* 5V main regulator enable/disable
* full power off
* battery monitoring
*
* Author: Austin Hendrix
*/
#include <avr/io.h>
#include "power.h"
#include "adc.h"
/* enable 5V regulator */
void pwr_on() {
// arduino mega pin 37; PC0
DDRC |= 1;
... |
Markdown | UTF-8 | 3,008 | 2.703125 | 3 | [] | no_license | # Wikigen
This repository contains the code and data for the paper ["An Edit-centric Approach for Wikipedia Article Quality Assessment"](https://arxiv.org/abs/1909.08880). If you use or code or data please consider citing our work.
## Setup
1. Clone this repo: ... |
JavaScript | UTF-8 | 1,122 | 2.90625 | 3 | [] | no_license | // This file should have the extension .jsx so that plunker compiles all the JSX
// The index.html file will include this file as script.js (not .jsx) however
var Card=React.createClass({
getInitialState: function(){
return { id: 1 };
},
componentDidMount:function(){
this.setState({id:4})
},
r... |
Java | UTF-8 | 940 | 2.234375 | 2 | [] | no_license | /**
*
*/
package org.matsim.contrib.smartcity.agent.parking;
import org.matsim.api.core.v01.Id;
import org.matsim.api.core.v01.network.Link;
import org.matsim.contrib.parking.parkingsearch.search.ParkingSearchLogic;
import org.matsim.vehicles.Vehicle;
/**
* Simple class for ParkingSearchLogic.
* This class alway... |
C++ | UTF-8 | 6,673 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | #ifndef SMART_PTR_INTRUSIVE_PTR_H
#define SMART_PTR_INTRUSIVE_PTR_H
//
// ref_ptr.h
//
// Copyright (c) 2001, 2002 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/li... |
Java | UTF-8 | 12,295 | 2.78125 | 3 | [] | no_license | import java.util.*;
import java.io.*;
class my_player {
static class GODetails {
int c;
int[][] prev = new int[5][5];
int[][] curr = new int[5][5];
int[] out = new int[2];
double h = 0;
int d = 3;
boolean alternateHeuristic = false;
}
static boolean isValidMove(int[][] curr, int[][] prev, int c, int ... |
Java | UTF-8 | 305 | 1.984375 | 2 | [] | no_license | package kodlamaio.hrms.dataAccess.abstracts;
import org.springframework.data.jpa.repository.JpaRepository;
import kodlamaio.hrms.entities.concretes.JobSeekerImage;
public interface JobSeekerImageDao extends JpaRepository<JobSeekerImage, Integer>{
JobSeekerImage getByJobSeeker_Id(int jobSeekerId);
}
|
Ruby | UTF-8 | 795 | 2.546875 | 3 | [] | no_license | # = Task belongs to Project
class Task < ActiveRecord::Base
belongs_to :project
validates_presence_of :name, :due_on
# Validates that due date for task cannot be in the past
validates_each :due_on, :on => :create do |record, attribute, value|
record.errors.add(attribute, 'date cannot be in the past')... |
Ruby | UTF-8 | 992 | 3.5625 | 4 | [] | no_license | class Phrase
def initialize (input_string)
@input_string = input_string
end
def word_count()
word_count = {}
lower_case = @input_string.downcase
apostrophies_removed = lower_case.gsub(/[']/, '')
punctuation_removed = apostrophies_removed.gsub(/\p{^Alnum}/, '... |
Swift | UTF-8 | 483 | 2.890625 | 3 | [] | no_license | //
// ServiceError.swift
// AbiHome
//
// Created by Alexandru Luca on 05/01/2021.
//
import Foundation
enum ServiceError: Error {
case requestFailed
var message: String {
switch self {
case .requestFailed: return "Something went wrong. Please try again."
}
}
}
extension Serv... |
C# | UTF-8 | 10,154 | 2.515625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace Matching_Planar_Maps
{
class FrechetDistance
{
pri... |
Python | UTF-8 | 259 | 2.609375 | 3 | [] | no_license | # sys module
#['google','galaxy','note','5']
import sys , webbrowser
sys.argv
print (sys.argv)
if len(sys.argv)> 1:
toSearch = '+'.join(sys.argv[1:])
address = "https://www.google.co.in/search?q={}".format(toSearch)
webbrowser.open(address)
|
Markdown | UTF-8 | 8,514 | 2.859375 | 3 | [] | no_license | ---
title: 第二百五十八章 Welcome Deep Place
weight: 258
---
空中划过的长剑将在整个空间之中留下了绚丽的轨迹,魔力幻化而成的长枪如若雨点一般在地面中内落下。鲜血到处飞溅着,宣告着一场毫无反抗之力的屠杀。然而,即使明知道自己所做的一切只是飞蛾扑火,但是那些手持着武器的教徒们,依旧是纷纷朝前扑去,宛若面前的金发少女,就是将他们送往天国的使者一般。
“就算是在崇尚科学的 21 世纪,也还是有着那么多相信有着天国的狂教徒存在。”如若天使一般飘浮在空中的千羽优佳,在看到这些狂教徒的时候也不禁感觉到了几分悲哀。本以为二战时的“神风特攻队”都已经成为过去了,然而,这种牺牲精神,却仍旧是存在于... |
Markdown | UTF-8 | 1,326 | 2.8125 | 3 | [] | no_license | ---
title: "jQuery.get and IE7"
date: "2009-12-15"
tags: ["jquery", "ie7"]
slug: "jquery_get_ie7"
---
I've been recently playing around with jQuery and some AJAXy stuff using jquery.get to request a piece of HTML. Like any sane web developer I use Firefox and Firebug and everything worked as expected. But then I deci... |
Java | UTF-8 | 3,563 | 1.984375 | 2 | [] | no_license | package com.target.demomultischemas.configuration;
import com.zaxxer.hikari.HikariDataSource;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.sp... |
Python | UTF-8 | 1,220 | 3.59375 | 4 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Fri May 5 14:12:38 2017
@author: admin
"""
import numpy as np
import matplotlib.pylab as plt
def numerical_diff(f, x):
h = 1e-4
return (f(x+h) - f(x-h)) / (2*h)
def function_1(x):
return 0.01 * x **2 + 0.1*x
def function_2(x):
return x[0]**2 + x[1]**2... |
Markdown | UTF-8 | 242 | 2.5625 | 3 | [] | no_license | # mlmusic
The first 4 bars of starwars in machine readable form:
```
val rl1 = [duun, daan, dananuh]
val rl2 = [naaaaaa, naaa, dananuh]
val rl3 = [naaaaaa, naaa, danana]
val rl4 = [duuuuuuuuuuuu]
```
The abstraction is strong with this one |
PHP | UTF-8 | 3,770 | 2.609375 | 3 | [] | no_license | <?php
//include_once 'db_conx.php';
include 'database.php';
try {
$db = new PDO($DB_DSN, $DB_USER, $DB_PASSWORD);
/* set the PDO error mode to exception*/
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "CREATE DATABASE IF NOT EXISTS camagru";
/* use exec... |
C++ | UTF-8 | 1,289 | 2.78125 | 3 | [] | no_license | #include <LiquidCrystal.h>
LiquidCrystal lcd(5,6,8,9,10,11);
int redled = 2;
int greenled = 3;
int buzzer = 4;
int sensor = A0;
int sensorThresh = 400;//threshold value for drunk
int speed = 7;
void setup()
{
pinMode(redled, OUTPUT);
pinMode(greenled,OUTPUT);
pinMode(buzzer,OUTPUT);
pinMode(sensor,INPUT);
pinMode(s... |
Markdown | UTF-8 | 6,404 | 3.09375 | 3 | [] | no_license | ---
layout: default
title: Dyes and Dyeberries
summary:
permalink: /items/dyes_dyeberries
parent: Items
tags:
- item
- official-article
contributors:
- elementalknight
---
Originally posted on the official website on [August 15th, 2019](https://reclaimthewild.net/index.php/2019/08/15/dyes-and-dyeberries/)
... |
JavaScript | UTF-8 | 5,580 | 2.546875 | 3 | [] | no_license | const { fromEvent } = rxjs;
const { map, auditTime } = rxjs.operators;
const backGroundColor = ''
const seekerColor = "red";
const hiderColor = "blue";
const gameScreen = document.getElementById('gameScreen');
let main = document.querySelector('main');
let canvas;
let ctx;
var first = 0;
var id = -1;
var playe... |
Java | UTF-8 | 3,566 | 2.140625 | 2 | [] | no_license | package com.migu.tsg.microservice.atomicservice.rbac.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.migu.tsg.microservice.atomicservice.rbac.dao.po.RoleUsers;
/**
* 项目名称: rbac-service <br>
* 包: com.migu.tsg.microservice.atomicservice... |
C++ | UTF-8 | 1,731 | 3.765625 | 4 | [
"MIT"
] | permissive | //============================================================================
// Name : Greatest.cpp
// Author : Hasnain Ali
// Version : 1.0.0
// Copyright : Freshman Class of 2020
// Description : This program will find the Greatest Common Factor of two numbers inputted by the user.
//=======... |
PHP | UTF-8 | 389 | 2.734375 | 3 | [] | no_license | <?php
sleep(3);
require_once('common.php');
//引数(クエリー)を受け取る
$qid=isset($_GET['qid'])? $_GET['qid']:-1;
$answer=$_GET['answer'];
//validation
if($qid ==-1|| !is_numeric($qid)||!((0<=$qid)&&($qid<count($question)))){
echo "エラー : $qid invalid";
exit(1);
}
//正解か不正解か
if($question[$qid][1]==$answer){
echo "正解";
}
else{... |
Markdown | UTF-8 | 2,324 | 2.71875 | 3 | [] | no_license | #### 查看数据库大小的一些sql
首先 `information_schema.tables` 会记录数据库的表大小和表的大小等很多信息。
可以使用 `show create table tables \G` 查看具体的数据字段;
其中主要关注的字段有一下几个
```
TABLE_SCHEMA : 数据库名
TABLE_NAME:表名
ENGINE:所使用的存储引擎
TABLES_ROWS:记录数
DATA_LENGTH:数据大小
INDEX_LENGTH:索引大小
```
如果你已经选择了 `information_schema` 库,可以直接使用一下 sql 查询你想要的信息
```sql
select concat(ro... |
C++ | UTF-8 | 5,914 | 2.703125 | 3 | [] | no_license | //在知乎提问
#include <iostream>
#include <ctime>
#include <cmath>
#include <vector>
#include <fstream>
#include <string>
using namespace std;
class AI {
private:
//data
string confingname;
vector<vector<double>>templ;
vector<vector<double>>files;//files [ 文件编号 ] [ 序列 ]
//weights [ 层数 ] [ 下一层序列 ] [ 对应本层序列 ]
//文件层数由... |
C | UTF-8 | 477 | 3.640625 | 4 | [] | no_license | #include "holberton.h"
/**
* _strlen - print the size of a string
* @s: char parameter
* Return: 0
*/
int _strlen(char *s)
{
int i;
for (i = 0; s[i] != '\0'; i++)
{
}
return (i);
}
/**
* _strcat - concaenate two strings
* @dest: parameter dest
* @src: parameter source
* Return: dest
*/
char *_strcat(cha... |
JavaScript | UTF-8 | 1,083 | 2.53125 | 3 | [] | no_license | const nodemailer = require('nodemailer');
module.exports = {
sendResponse: function (responseObject, status, responseMessage, response) {
responseObject.send({
responseCode: status,
responseMessage: responseMessage,
result: response
})
},
sendMail: funct... |
C# | UTF-8 | 1,351 | 2.703125 | 3 | [] | no_license | using System;
using System.Diagnostics;
using System.Security.Principal;
using System.Windows.Forms;
namespace QuickShare.Installer
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
if (IsAdministra... |
TypeScript | UTF-8 | 3,907 | 2.96875 | 3 | [] | no_license | /**
* 摇杆
*/
class RockerBar extends egret.DisplayObjectContainer{
// 设置小球
private _ball:egret.Bitmap;
// 设置圆环半径
private _circleRadius:number=100;
// 设置小球半径
private _ballRadius:number;
// 设置中心点坐标
private _centerX:number = 0;
private _centerY:number = 0;
// 设置触摸ID
private _tou... |
SQL | UTF-8 | 327 | 2.625 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Index STG_PER_NAME_N4
--------------------------------------------------------
CREATE INDEX "HCM_ADMIN"."STG_PER_NAME_N4" ON "HCM_ADMIN"."STG_PER_NAME" (UPPER("FIRST_NAME"))
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
TABLESPACE "US... |
C# | UTF-8 | 1,413 | 2.96875 | 3 | [
"MIT"
] | permissive | namespace HomeAutio.Mqtt.Core.Entities
{
/// <summary>
/// Binary switch control.
/// </summary>
public class BinarySwitchControl : StatefulControl
{
/// <summary>
/// Initializes a new instance of the <see cref="BinarySwitchControl"/> class.
/// </summary>
public Bi... |
Java | UTF-8 | 155 | 1.835938 | 2 | [] | no_license | package com.iTeam.util;
import java.util.UUID;
public class CodecUtil {
public static String createUUID(){
return UUID.randomUUID().toString();
}
} |
Java | UTF-8 | 2,560 | 1.78125 | 2 | [] | no_license | package com.bookstuf.datastore;
import com.bookstuf.PublicReadOnly;
import com.googlecode.objectify.annotation.Cache;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
@Cache @Entity
public class ProfessionalPrivateInformation {
@PublicReadOnly
@Id String gitk... |
Python | UTF-8 | 1,752 | 3.328125 | 3 | [] | no_license | import fileinput
import sys
# http://codeforces.com/problemset/problem/754/B
class InputData:
def __init__(self, matrix):
self.matrix = matrix
class Result:
def __init__(self, result):
self.result = result
def __str__(self):
return str(self.result)
def get_str_to_check(str_ar... |
JavaScript | UTF-8 | 6,842 | 2.734375 | 3 | [
"MIT"
] | permissive | // Constants
const BG_COLOR = 'white';
const FILL_COLOR = '#F5F5F5';
const SCROLL_STEP = 15;
class BackgroundPaintWorklet {
static get inputProperties() {
return [
'--paint-scroll-position',
'--paint-window-height'
];
}
paint(ctx, geom, properties) {
const u = geom.wi... |
TypeScript | UTF-8 | 394 | 2.640625 | 3 | [
"MIT"
] | permissive | import { STORE_INFO } from "store/actions";
import { OwnUserInfo } from "types/reducers";
const ownUserInfo = (
state: OwnUserInfo.IState = { avatar_url: "", nickname: "", desc: "" },
action: OwnUserInfo.IAction
) => {
switch (action.type) {
case STORE_INFO:
return Object.assign({}, state, action.info... |
Java | UTF-8 | 390 | 1.835938 | 2 | [
"MIT"
] | permissive | package de.aspera.dataexport.util.dataset.editor;
public class DatasetRowEditorException extends Exception {
/**
*
*/
private static final long serialVersionUID = -5002865864204548103L;
public DatasetRowEditorException(String message) {
super(message);
}
public DatasetRowEditorException(Strin... |
Markdown | UTF-8 | 10,711 | 3.09375 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: 面对霸凌
subtitle:
date: 2020-7-2
author: 土猪
header-img: img/post_bully.jpg
catalog: true
tags:
- 生活
- 感悟
---
霸凌,就是英文“bully”翻译过来的词,中文意思就是“欺负”。这个事情从小孩到大人都会经历。不同人有不同的处理态度和处理方法,结果也不同。在澳洲的学校里,老师对孩子的教育是:不要打回去,要告诉老师,如果你以暴制暴,就跟欺负你的人一样了。 这个教育把我气得够呛!我实在不敢苟同。要知道,我娃娃刚来澳洲的时候,可... |
Markdown | UTF-8 | 902 | 2.59375 | 3 | [] | no_license | # RETO 1.P08: Domina el formato
Copia más abajo tus programas, cada uno en su parte del reto.
# PROGRAMAS
## Actividad 1: 4 Píxeles Rojos
```
3E FF 32 00 C0 18 FE
```
PC: 4000
## Actividad 2: (C) 24 Píxeles en grupos de 4 del mismo color
```
21 0F FF 22 00 C0 21 FF F0 22 02 C0 21 0F F0 22 04 C0 18 FE
```
PC: 4000
#... |
Python | UTF-8 | 3,333 | 3.96875 | 4 | [] | no_license | """
Matt Strand
Hangman
Started: 3/19/2019
Last Edited 3/19/2019
Ideas:
keep score
Create GUI
"""
import os
import random
def playGame(chars):
currentState = []
guessedLetters = []
turns = 11
play = True
setup = 0
while setup < len(chars):
if chars[setup... |
Swift | UTF-8 | 4,968 | 2.515625 | 3 | [] | no_license | //
// HomeView.swift
// CalTrack
//
// Created by Dev on 08/12/2019.
// Copyright © 2019 jdc0rp. All rights reserved.
//
import SwiftUI
import HealthKit
import Firebase
import FirebaseFirestoreSwift
//**************** Home View ****************\\
struct HomeView: View {
//**************** Variables **************... |
Python | UTF-8 | 393 | 2.65625 | 3 | [] | no_license |
def getCashflows(issue_dt, mat_dat, principal, rate, freq, type='loan'):
if type == 'loan':
cashflows = []
def getPV(n, amt, i='', pmt=''):
resp = ''
if n=='' and (i== '' or amt == '' or pmt ==''):
print('Error: n and another variable are blank')
print('Can only solve for one unknown variable')
... |
JavaScript | UTF-8 | 1,667 | 2.515625 | 3 | [] | no_license | var PORT=process.env.PORT || 3000;
var express=require('express');
var app=express();
var http=require('http').Server(app);
var io=require('socket.io')(http);
var moment=require('moment');
app.use(express.static(__dirname+"/public"));
var clientrequest={};
var times=moment().valueOf();
function sendingUsers(socket)
{
... |
C++ | UTF-8 | 459 | 3.015625 | 3 | [] | no_license | #include <iostream>
#include <algorithm>
using namespace std;
int n,m;
int isOdd(int num){
num = abs(num%2);
return num;
}
bool cmp(int a, int b){
if(a%m != b%m)return a%m < b%m;
if(isOdd(a) != isOdd(b)) return isOdd(a);
if(isOdd(a))return a > b;
return a < b;
}
int main (){
int a[10001];
while(cin >> n >> m... |
Java | UTF-8 | 3,337 | 2.203125 | 2 | [] | no_license | package com.emrubik.springcloud.dao;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
import com.baomidou.mybatisplus.generator.config.GlobalConfig;
import com.baomidou.mybatisplus.generator.config.PackageConfig;
import com.baomidou.mybatisplus... |
Java | UTF-8 | 749 | 4.0625 | 4 | [] | no_license | /*
* Name: Jose Terrones Jr.
* Purpose: A simple recursion calculation to find the power or a preset
* base.
*/
package recursion;
public class main {
public static void main(String[] args) {
// TODO Auto-generated method stub
int base = 2;
int power = 11;
int answer = 0;
int count = 1;
answer = calc... |
C++ | UTF-8 | 5,975 | 2.796875 | 3 | [
"MIT"
] | permissive | /**
* @file Gpio.cpp
* @version 1.0.1
* @author Kostyantyn Komarov (utuM)
* @data 19.03.2019 (creation)
* @data 23.03.2019 (release)
* @brief GPIO driver class implementation.
* Current driver can initializes every input and output pins are
* required. Every pin is represen... |
C# | UTF-8 | 1,301 | 2.8125 | 3 | [
"MIT"
] | permissive | using System;
using System.Reflection;
namespace Bogus.Extensions
{
internal static class ExtensionsForType
{
#if STANDARD
public static bool IsSubclassOf(this Type type, Type other)
{
return type.GetTypeInfo().IsSubclassOf(other);
}
#endif
public static bool IsGen... |
Java | UTF-8 | 155 | 1.960938 | 2 | [] | no_license | package com.example;
public class test01 {
public static void main(String[] args) {
int a = 1;
System.out.println(a);
}
}
|
PHP | UTF-8 | 2,263 | 3.53125 | 4 | [] | no_license | <?php
header('Content-Type: text/html; charset=utf-8');
//Объект книга
class Book
{
public $page;
public $text;
public $image;
public $type='adultsbook';
public function __construct($page, $image ,$text)
{
$this->page = $page;
$this->image = $image;
$this->text = $text;
if($text == null) $this->type = ... |
Python | UTF-8 | 1,439 | 3.203125 | 3 | [
"CC-BY-4.0"
] | permissive | import sfml as sf
class Overlay(sf.Drawable):
def __init__(self, actor, dark=False):
self.actor = actor
if dark:
self.texture = sf.Texture.from_file("overlay-dark.png")
else:
self.texture = sf.Texture.from_file("overlay.png")
self.sprite = sf.Sprite(self.te... |
Ruby | UTF-8 | 1,122 | 3.921875 | 4 | [] | no_license | class Node
attr_accessor :left, :right, :val
def initialize(val)
@val = val
end
end
# 1. If left equals nil then print
# 2. Else, go to right most of left element
# 3. Point its right to equal current node
# 4. Again go to right most of left and break the link and print current
# 5. Assign right of current to c... |
Python | UTF-8 | 1,307 | 4.34375 | 4 | [
"MIT"
] | permissive | # You have to create a function that takes a positive integer number and returns the next bigger number formed by the same digits:
# 12 ==> 21
# 513 ==> 531
# 2017 ==> 2071
# If no bigger number can be composed using those digits, return -1:
# 9 ==> -1
# 111 ==> -1
# 531 ==> -1
def nextBigger(n):
s = str(n)
... |
Java | UTF-8 | 1,320 | 3.34375 | 3 | [] | no_license | package com.bupt.leetcode1_20;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class L15 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int[] num = { -1, 0, 1, 2, -1, -4,5};... |
Java | UTF-8 | 336 | 2.4375 | 2 | [] | no_license | @Override
public <R extends Service> void stopService(ServiceBinding<R> binding) {
final Service service = binding.getService();
if ( Stoppable.class.isInstance( service ) ) {
try {
( (Stoppable) service ).stop();
}
catch ( Exception e ) {
log.unableToStopService( service.getClass(), e.toString()... |
Java | UTF-8 | 1,155 | 2.03125 | 2 | [] | no_license | package com.umeng.commm.ui.fragments;
import android.content.Intent;
import com.umeng.comm.core.beans.Topic;
import com.umeng.comm.core.constants.Constants;
import com.umeng.comm.core.utils.ResFinder;
import com.umeng.comm.ui.imagepicker.adapters.SearchTopicAdapter;
import com.umeng.comm.ui.imagepicker.fragments.Sear... |
C# | UTF-8 | 1,406 | 2.78125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
namespace BillingLibrary
{
public class ClientList : List<Client>
{
public static ClientList GetClientList()
{
ClientList CList = new ClientList();
try
... |
C | UTF-8 | 423 | 3.125 | 3 | [] | no_license | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
void swap(FILE *fp1,FILE *fp2){
char c;
while((c=fgetc(fp1))!=EOF){
if (c>='a'&&c<='z') c=c-32;
else if(c>='A'&&c<='Z') c+=32;
else c=c;
fputc(c,fp2);
putchar(c);
}
}
int main(){
FILE *fp1,*fp2;
fp1=fopen("C:\\l... |
C++ | UTF-8 | 10,463 | 2.59375 | 3 | [] | no_license | #include "Service.h"
#include "sort.h"
#include <vector>
#include <iostream>
#include <list>
#include <QDebug>
#include <QList>
#include <QQuickView>
#include <FactorySettings.h>
#include <FileRepository.h>
#include <RepoFactory.h>
#include "Undo.h"
Service::Service(){
this->carRepo = new MemoryRepository<Car*>();
... |
Python | UTF-8 | 1,354 | 3.21875 | 3 | [] | no_license | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 15 22:27:26 2019
@author: 王爱玲
"""
import random
import uuid
import pymongo
import matplotlib.pyplot as plt
import numpy as np
import string
#链接本地数据库服务
client = pymongo.MongoClient('127.0.0.1', 27017)
#创建数据库名为text
db=client.test
db=client['test']
#集... |
TypeScript | UTF-8 | 1,313 | 3.078125 | 3 | [] | no_license | import { Config } from '../../types';
import { style, styler, GetValue } from '@styleaux/core';
import { BorderRightWidthProperty } from '@styleaux/csstype';
const BORDERRIGHTWIDTH = 'borderRightWidth';
export interface BorderRightWidthProps<T = BorderRightWidthProperty> {
/**
* The **`border-right-width`** CSS ... |
Python | UTF-8 | 669 | 3.703125 | 4 | [] | no_license | """
20. Valid Parentheses
https://leetcode.com/problems/valid-parentheses/
"""
class Solution:
def isValid(self, s):
"""
:type s: str
:rtype: bool
"""
s = s.replace(' ', '') # Remove whitespace
parentheses_pairs = ['()', '[]', '{}']
is_valid = True
... |
Python | UTF-8 | 1,155 | 3.4375 | 3 | [
"MIT"
] | permissive | class Solution(object):
def search(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: int
搜索旋转排序数组,但是数组中可以有重复
"""
if not nums:return False
return self.binarySearch(nums,target,0,len(nums)-1)
def binarySearch(self,nums... |
Python | UTF-8 | 117 | 3.09375 | 3 | [] | no_license | lists =[0, 1, 2, 3, 4, 5, 3, 26, 1]
max = 0
for number in lists:
if number > max:
max = number
print(max) |
Java | UTF-8 | 3,675 | 2.765625 | 3 | [] | no_license | package GUI.tables;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.util.GregorianCalendar;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax... |
Java | UTF-8 | 3,941 | 2.375 | 2 | [] | no_license | /*
* Copyright 2006 the original author or 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 requir... |
Python | UTF-8 | 4,247 | 2.53125 | 3 | [] | no_license | #references for writing this included
#beautiful soup homepage
#http://h3manth.com/new/blog/2013/web-crawler-with-python-twisted/
import os
from Utilities import *
from bs4 import BeautifulSoup
from twisted.web.client import getPage
from twisted.internet import reactor
from twisted.python import log
import sqlite3
im... |
Markdown | UTF-8 | 5,302 | 3.203125 | 3 | [] | no_license | 一〇
一切公署的审议会都是一模一样,那个前次官主持的农业关系的审议会,也差不多是主持人依自己的意向操纵着各个委员。就是说,遵照省署的希望,由审议会做出结论。社会上传说,所谓的审议会是替官僚披上民主式公平的外衣,暗地里方便官僚逃避责任的机关。
跟这样的审议会主持人有连系,并且拥有业界杂志的这个武器的西秀太郎,在另一方面也扮演高级官僚和业者的管道。说管道还是蛮好听的,其实是霸占利权的黄牛,是业者利益的揩油者。
此时此地,西秀太郎突然出现冈村局长这儿来,熟悉他的局署里的事务官们不免暗地里吃了一惊。
“啊,你好。”西在粗线条的脸上挤出一副笑容,跟坐在局长门口的年轻女秘书打个招呼。
“请进来。... |
Markdown | UTF-8 | 291 | 2.640625 | 3 | [] | no_license | # Fun-Bus-Landing-page-using-LESS
Fun Bus is a travel agency looking for some help on their website. They want a new navigation, new header, and new buttons on the home page. They also want a mobile version of their site styled. Use your preprocessing knowledge to accomplish their tasks.
|
Markdown | UTF-8 | 1,958 | 3.1875 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: Editing Posts
published: true
---
<div class="message">
Howdy! This is a post that will contain links to all my current editing posts.
</div>
<a href="https://allaboutpatrick.wordpress.com/editing/">Editing Tutorials</a>
> Example Post: To fully see all posts at the moment, please visit all... |
Java | UTF-8 | 2,123 | 3.390625 | 3 | [] | no_license | package Interface;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class main {
public static void main(String[] args) {
Player rohit=new Player("rohit",12,100);
SaveObject(rohit);
ISavable monster=new Monster("ben-ten",15,100);
System.out.prin... |
Markdown | UTF-8 | 703 | 4 | 4 | [] | no_license | ## 701. Insert into a Binary Search Tree
### 题目分析
在一颗BST中,插入一个node。
### 解析
按着BST的特性来插入就可以。大的插在右边,小的插在左边。
### 代码
```
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def insertIntoBST... |
Markdown | UTF-8 | 28,060 | 2.9375 | 3 | [] | no_license | # Приспособленец \(Flyweight\)
Туман рассеивается, открывая нашему взгляду величественный старый лес. Бесчисленные кедры образуют над вами зеленый свод. Ажурная листва пронизывается отдельными лучиками света, окрашивая туман в желтые цвета. Меж гигантских стволов виден бесконечный лес вокруг.
О таких сценах внутри иг... |
Java | UTF-8 | 400 | 2.34375 | 2 | [] | no_license | package br.com.pattern.conn;
import java.io.Serializable;
public abstract class Persistent implements Serializable {
private static final long serialVersionUID = -6849460710173876921L;
private int id;
public Persistent(int id) {
this.id = id;
}
public int getId() {
return id;
}
public void setId(int i... |
Java | UTF-8 | 3,251 | 2.046875 | 2 | [] | no_license | package com.example.amos.youshi;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Handler;
import android.os.Message;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.... |
PHP | UTF-8 | 1,174 | 2.546875 | 3 | [
"Unlicense"
] | permissive | <?php
namespace GoogleDriveStorage;
use Google_Client as ProprietaryGoogleClient;
use Google_Service_Drive;
use Cache;
class GoogleClient extends ProprietaryGoogleClient
{
const TOKEN_KEY = "storage_google_drive_refresh_token";
private $config;
public function __construct()
{
$this->config ... |
C++ | UTF-8 | 216 | 3.234375 | 3 | [] | no_license | #include <iostream>
int Add(int n1, int n2)
{
int sum, carry;
do
{
sum = n1 ^ n2;
carry = (n1 & n2) << 1;
n1 = sum;
n2 = carry;
}
while(n2 != 0);
return n1;
} |
Python | UTF-8 | 1,077 | 2.625 | 3 | [
"MIT"
] | permissive | import requests
import datetime
import pandas as pd
import dateutil
import os
def get_Bhav_file(HOLIDAY_FILE_PATH,BASE_DIR):
hol_df = pd.read_csv(HOLIDAY_FILE_PATH)
holiday_list = [dateutil.parser.parse(dat).date() for dat in hol_df['Holiday'].values]
"Weekday Return day of the week, where Monday == 0 ...... |
Markdown | UTF-8 | 2,471 | 2.734375 | 3 | [
"MIT"
] | permissive | ---
title: "ArgDocs: F1GP Preferences File (F1PREFS.DAT)"
---
# F1GP Preferences File (F1PREFS.DAT)
Game preferences are stored in the F1PREFS.DAT file.
Not to be confused with F1PREFS.286, F1PREFS.386 and F1PREFS.486 which (probably)
contain presets based on the speed of the computer, applied during setup.
<table ... |
Markdown | UTF-8 | 7,277 | 2.5625 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: How to Pick Items for Warehouse Shipment | Microsoft Docs
description: When the location is set up to require warehouse pick processing as well as warehouse shipment processing, you use the warehouse pick documents to create and process pick information prior to posting the warehouse shipment.
au... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.