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 | 732 | 3.71875 | 4 | [] | no_license | // variables om afstand in km op te tellen
var counterup = document.getElementById('counterup');
var numbers = 0;
counterup.innerHTML = numbers;
function countUp (){
numbers = numbers + 1
counterup.innerHTML = numbers;
};
setInterval(countUp,50); // per 50 miliseconden
var timeleft = 280000000; //afstand wa... |
C++ | UTF-8 | 512 | 2.6875 | 3 | [] | no_license | #include <iostream>
using namespace std;
#define MAX 101
int paper[MAX][MAX];
int main() {
int num, x, y, sum=0;
cin >> num;
for (int i=0; i<num; i++) {
cin >> x >> y;
for (int j=x; j<x+10; j++) {
for (int k=y; k<y+10; k++) {
paper[j][k] = 1;
}
... |
Java | UTF-8 | 2,932 | 2.484375 | 2 | [] | no_license | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.fpuna.model;
import edu.fpuna.Constants.FormatoFecha;
import java.sql.Time;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.*;
/**
*
* @author ghuttemann
*/
@Entity
@Table(name=... |
Markdown | UTF-8 | 2,758 | 3.125 | 3 | [] | no_license | *后台开发人员作业*
=========
#### **编辑时间:**
- **2017年3月28日10:52:02**
#### **作业名称:**
- **模仿qsort() 实现一个通用排序函数:msort()。**
#### **作业截止期限:**
- **本周六下午 17:00 前**
#### **提醒:**
- **模仿qsort() 实现一个通用排序函数:msort()。**
**如果采用其他语言,比如python,则不必采用以下文件结构,但是应该‘照猫画虎’,领会以下的各种要求,合适的采用其他语言分别实现其功能:模块分离、运行、测试**
#... |
C++ | UTF-8 | 2,325 | 3.578125 | 4 | [] | no_license | #pragma once
#include "bit_container.hpp"
#include <micro/utils/arrays.hpp>
#include <type_traits>
namespace micro {
/* @brief Array for storing binary values memory-efficiently. Values are stored in 32-bit containers to reduce memory need.
* @tparam N Number of values stored in the array. Should be a multiple of... |
C | UTF-8 | 7,641 | 2.90625 | 3 | [] | no_license | /*****************************************************************************
* 文 件 名 : test_case_select.c
* 负 责 人 : yankai
* 创建日期 : 2015年12月21日
* 功能描述 : 测试用例
* 其 它 :
*****************************************************************************/
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#i... |
C# | UTF-8 | 1,766 | 3.484375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
class Solution
{
static void Main(String[] args)
{
var input = Console.ReadLine().Split(' ');
var kangaroos = new List<Kangaroo>
{
new Kangaroo { XPosition = int.Parse(input[0]), Velocity = int.Parse(input[1]... |
C | UTF-8 | 3,158 | 2.515625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*!
* header.c - header for mako
* Copyright (c) 2021, Christopher Jeffrey (MIT License).
* https://github.com/chjj/mako
*/
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <mako/crypto/hash.h>
#include <mako/header.h>
#include <mako/util.h>
#include "impl.h"
#include "internal.h"
/*
* Header... |
Java | UTF-8 | 1,925 | 2.421875 | 2 | [] | no_license | package dev.service;
import dev.dao.IPlatDao;
import dev.entite.Plat;
import dev.exception.PlatException;
import java.util.List;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
@... |
Shell | UTF-8 | 1,011 | 3.359375 | 3 | [
"Unlicense"
] | permissive |
# This sets the environment for accessing the cloud
# Make sure that IP Addresses are setup properly
# Use PUBLIC IP Here
export ORDERER_ADDRESS=18.144.68.240:7050
export ACME_EP=54.183.208.65:7051
export BUDGET_EP=54.183.156.254:7051
export CA_IP=54.193.94.161
export CA_URL=http://$CA_IP:7054
export FABRIC_LOGG... |
C++ | ISO-8859-1 | 529 | 3.75 | 4 | [] | no_license | #include<stdio.h>
//uma funo que recebe dois valores (x,y) e retorne a diferena entre eles.
int diferenca(int x, int y){
int resul;
if(x>y){
resul = x - y;
return resul;
}else{
resul = x + y;
return resul;
}
}
int main(void){
int x,y,retorno;
printf("Digite o... |
Python | UTF-8 | 6,458 | 2.859375 | 3 | [] | no_license | from unittest.mock import inplace
import numpy as np
import requests
from bs4 import BeautifulSoup
from bs4 import Comment
import pandas as pd
# Función para obtener la tabla de los datos de cada llamda que hacemos mediante BeautifulSoup
def get_dataframe_data_from_soup(soup):
comments = soup.find_all(string=lam... |
C++ | UTF-8 | 1,065 | 3.453125 | 3 | [] | no_license | //This file contains main function. It is used to test a data structure, binary search tree.
#include "BSTree.h"
#include <iostream>
using namespace std;
void main()
{
BSTree<int> bt;
int a[8]={25,18,30,11,16,65,33,6};
for(int i=0;i!=8;++i)
{
bt.insert(a[i]);
}
cout<<"bt is an int binary search tree, whose... |
Java | UTF-8 | 8,844 | 2.203125 | 2 | [] | no_license | package com.milind.chatapp.activity;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.content.Context;
import android.os.Bundle;
import android.text.TextU... |
C++ | UTF-8 | 689 | 2.625 | 3 | [] | no_license | #ifndef _HELPERH_
#define _HELPERH_
/* cellList class test */
#include <iostream>
#include <sstream>
#include <string>
#include "cellList.hpp"
void listPrint(const cellList& ls){
cellList::node* p = ls.current->prev;
cellList::node* n = ls.current->next;
cell currCell = ls.current->valCell;
std... |
Markdown | UTF-8 | 670 | 3.046875 | 3 | [] | no_license | <img align="right" alt="GIF" src="https://user-images.githubusercontent.com/87219816/125399045-7a04d200-e3c9-11eb-9f4f-ddf21d42c619.png" width="205" height="205" />
It was my <b>first</b> ever game in Python. It encouraged me a lot to learn more about progamming. It increased my interest in programming when it ran suc... |
SQL | UTF-8 | 848 | 2.53125 | 3 | [] | no_license | \echo ------------------ENTRY_CENTRY_SELECT----------------
select now();
\timing
delete from ENTRY_CENTRY_SELECT_GPTMP;
insert into ENTRY_CENTRY_SELECT_GPTMP (CMD_TYPE,ENTRY_ID) select CMD_TYPE,ENTRY_ID from ENTRY_CENTRY_SELECT_INC_EXT;
delete from ENTRY_CENTRY_SELECT_GPTMP_TODAY using ENTRY_CENTRY_SELECT_GPTMP where ... |
Java | UTF-8 | 370 | 2.0625 | 2 | [] | no_license | public class Deck {
// not sure if i need this (DECK) but i can put shared methods for both games here like shuffle and remove cards after they have been used to deal
// for the remove card after using it in a deal (so you cant have 2 ace of spades) maybe implement a interface with a filter to check for dupli... |
Shell | UTF-8 | 912 | 2.765625 | 3 | [] | no_license | #!/bin/bash
# Install script for woeusb
winimage='
_ __ __ _______ ____
| | / /___ ___ / / / / ___// __ )
| | /| / / __ \/ _ \/ / / /\__ \/ __ |
| |/ |/ / /_/ / __/ /_/ /___/ / /_/ /
|__/|__/\____/\___/\____//____/_____/ Script!
by catx0rr
Windows Bootable Creator in Linux
github: https:... |
C++ | UTF-8 | 3,902 | 3.40625 | 3 | [] | no_license | #include <iostream>
#include <utility>
#include <chrono>
#include "Matrix.hpp"
#include "Rand.hpp"
using namespace std;
using Clock = std::chrono::high_resolution_clock;
using TimePoint = std::chrono::time_point<Clock>;
std::mt19937 Rand::sBase( time(nullptr) );
std::uniform_real_distribution<float> Rand::sFloatGen;
... |
C# | UTF-8 | 3,210 | 2.921875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _013_练习
{
class Program
{
static void Main(string[] args)
{
string diRenName = "";
int diRenLevel;
float diRenHp;
float ... |
Java | UTF-8 | 371 | 2.375 | 2 | [] | no_license | package com.class10;
public class Homework {
public static void main(String[] args) {
// TODO Auto-generated method stub
int[] numbers=new int[9];
numbers[0]=45;
numbers[1]=78;
numbers[2]=12;
numbers[3]=67;
numbers[4]=55;
numbers[5]=89;
numbers[6]=23;
numbers[7]=77;
numbers[8]=88;
S... |
Markdown | UTF-8 | 415 | 2.640625 | 3 | [] | no_license | ## static
用static关键字来声明静态方法或静态变量
在静态方法中,不能直接访问非静态成员(包括方法和变量)。因为,非静态的变量是依赖于对象存在的,对象必须实例化之后,它的变量才会在内存中存在
## 常见报错
```
Cannot make a static reference to the non-static field list
```
出错原因是在静态方法中直接访问非静态成员
|
Java | UTF-8 | 2,308 | 1.710938 | 2 | [
"Apache-2.0"
] | permissive | package io.quarkus.smallrye.health.runtime;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.eclipse.microprofile.health.HealthCheckResponse;
import org.eclipse.microprofile.health.spi.HealthCheckResponseProvider;
import io.quarkus.arc.Arc;
import io.quarkus.runtime.Shutdow... |
PHP | UTF-8 | 2,345 | 2.625 | 3 | [] | no_license | <?php
namespace JeanForteroche\Blog\Model;
require_once("model/Manager.php");
class MembersManager extends Manager
{
public function searchUserByMail($mail)
{
$db = $this->dbConnect();
$reqmail = $db->prepare("SELECT * FROM member_space WHERE mail = :mail");
$reqmail->execute(array(
... |
Markdown | UTF-8 | 1,351 | 2.859375 | 3 | [] | no_license | ---
date: 2021-01-14
imdb_id: tt0056291
title: Knife in the Water (1962)
grade: B
slug: knife-in-the-water-1962
---
A married couple picks up a college-age hitchhiker and invites him aboard their sailboat for an overnight outing in Poland's Lake District. Nothing happens, yet _everything_ happens.
<!-- end -->
I kep... |
Java | UTF-8 | 4,850 | 2.09375 | 2 | [] | no_license | package com.example.stanley.hi_fivolunteeringprototype;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
imp... |
C | UTF-8 | 997 | 2.859375 | 3 | [
"Unlicense"
] | permissive | /*
Nome: Arremesso de Bolas
ID: 1532
Resposta: Accepted
Linguagem: C (gcc 4.8.5, -O2 -lm) [+0s]
Tempo: 0.000s
Tamanho: 829 Bytes
Submissao: 18/06/15 18:10:30
*/
#include <stdio.h>
#include <math.h>
int main()
{
int N, V;
unsigned i, j;
while( scanf( "%d%d", &N, &V ) && N != 0 ){... |
Swift | UTF-8 | 710 | 3.25 | 3 | [] | no_license | //
// Card.swift
// DeckOfOneCard
//
// Created by Taylor Phillips on 2/20/17.
// Copyright © 2017 Taylor Phillips. All rights reserved.
//
import Foundation
class Card {
private let suitKey = "suit"
private let valueKey = "value"
private let imageKey = "image"
let suit: String
let v... |
Java | UTF-8 | 1,812 | 2.359375 | 2 | [] | no_license | package com.example.surfacepro3.week3;
import android.app.ActionBar;
import android.app.Activity;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import a... |
JavaScript | UTF-8 | 2,102 | 2.515625 | 3 | [] | no_license | import {
getUserTempId, getToken,setToken,removeToken
} from '../../utils/userAbout.js';
import { reqUserInfo, reqUserLogin, reqUserLogout, reqUserRegister } from '../../api';
// 管理用户信息相关的数据
const state = {
// getUserTempId() 获取临时标示id
userTempId:getUserTempId(), // 必须是这个名字
token:getToken(), // 先在localStrog... |
Shell | UTF-8 | 163 | 2.796875 | 3 | [] | no_license | #!/bin/bash
if [ -n "$1" ]; then
sleeptime=$1
else
sleeptime=1
fi
echo Firing for $sleeptime
gpio mode 8 out
gpio write 8 1
sleep $sleeptime
gpio write 8 0
|
Java | UTF-8 | 1,689 | 3.1875 | 3 | [] | no_license | package com.coursera.randomstory;
import com.coursera.edu.duke.FileResource;
import com.coursera.gladlib.GladLib;
import com.coursera.gladlib.GladLibMap;
import java.util.HashMap;
import java.util.Map;
public class TestClass {
public static final String FILE_PATH = "src/main/resources/likeit.txt";
public st... |
Java | UTF-8 | 2,946 | 2.203125 | 2 | [] | no_license | package com.example.themeal.activity;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import butterknife.BindView;
import butterknife.ButterKnife;
import android.os.Bundle;
import android.os.Ha... |
Markdown | UTF-8 | 14,730 | 2.625 | 3 | [] | no_license | ---
layout: post
comments: false
title: "Hány cigány él Magyarországon?"
excerpt: "A népszámlálások adataiból az derül ki, hogy Magyarországon 2001 és 2011 között 53%-kal, 205 720 főről 315 583 főre nőtt a cigányok száma. Mennyi a magyarországi cigányok valós száma?"
date: 2017-08-07 17:27
categories: tudomany
---
A ... |
Python | UTF-8 | 4,927 | 3.296875 | 3 | [] | no_license | from random import shuffle
from random import randrange
from copy import deepcopy
def create_grid_checkered(width, height):
grid = list()
for r in range(height):
row = list()
for c in range(width):
if r == 0 or c == 0 or r == height - 1 or c == width - 1:
row.append(1)
elif c % 2 and r % 2:
row.app... |
C# | UTF-8 | 2,508 | 2.71875 | 3 | [] | no_license | using System;
using System.Text;
namespace DarwinStebs
{
class MainClass
{
public static void Main (string[] args)
{
Console.Title = "DarwinStebs";
StringBuilder asmSourceCode = new StringBuilder ();
asmSourceCode.AppendLine ("MOV AL,0F");
asmSourceCode.AppendLine ("MOV BL,50 ;just a comment");
... |
Java | UTF-8 | 184 | 1.6875 | 2 | [] | no_license | package com.pager.movieland.service;
import com.pager.movieland.entity.Review;
import java.util.List;
public interface ReviewService {
List<Review> getByMovieId(int movieId);
}
|
C++ | UTF-8 | 981 | 3.234375 | 3 | [] | no_license | // Session22.cpp : Defines the entry point for the console application.
// Accessing members of a structure
#include "stdafx.h"
#include <stdio.h>
#include <conio.h>
#include <iostream>
using namespace std;
struct BCA
{
char name[20];
long int roll;
char blood;
int age;
} b;
void getData();
void putData();
void... |
Markdown | UTF-8 | 20,732 | 3.625 | 4 | [] | no_license | [TOC]
# 第11章_关联容器
> 关联容器中的元素是按==关键字==来保存和访问的
> 关联容器与顺序容器的不同之处反映了关键字的作用
- 关联容器支持==高效的==关键字查找和访问
- 两个主要的关联容器
- `map`:元素是一些==关键字--值(key-value)== 对
- 关键字:起索引所用
- 值:表示与索引相关联的数据
- `set`:每个元素只包含==一个关键字==
- 支持高效的关键字查询操作(检查一个关键字是否在 set 中)
- 标准库提供的关联容器(共 8 个)区别体现在三个维度上:
- `set` or `map`:
- 关键字是否重复:
- ... |
Python | UTF-8 | 2,342 | 2.609375 | 3 | [] | no_license | from bs4 import BeautifulSoup
import re
import requests
headers = {"User-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/537.36"}
def crawl_prothom_alo(start_date_str, end_date_str):
from datetime import datetime, timedelta
base_url = "https://www.proth... |
Java | UTF-8 | 1,249 | 2.953125 | 3 | [] | no_license | package oop.ex6.main;
import java.io.IOException;
public class roiTests {
public static void main(String[] args) throws IOException {
// Parser parseMethods = new Parser();
// String name="hello";
String row = "void foo(int a){";
Parser pars = new Parser();
//// String[] key... |
Java | UTF-8 | 7,416 | 2.078125 | 2 | [
"Apache-2.0"
] | permissive | /**
* Copyright 2015 ArcBees Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... |
Rust | UTF-8 | 554 | 2.859375 | 3 | [
"MIT"
] | permissive | use serde::ser::Serializer;
use serde::de::{Deserialize, Deserializer};
pub fn serialize<S>(option: &bool, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer
{
if *option {
serializer.serialize_some(&1u8)
} else {
serializer.serialize_none()
}
}
pub fn deserialize<'de, D>(de... |
Python | UTF-8 | 1,839 | 2.609375 | 3 | [
"MIT"
] | permissive | import os
import numpy
import toughio
hybrid_mesh = toughio.Mesh(
points=numpy.array(
[
[0.0, 0.0, 0.0],
[1.0, 0.0, 0.0],
[1.0, 1.0, 0.0],
[0.0, 1.0, 0.0],
[0.0, 0.0, 1.0],
[1.0, 0.0, 1.0],
[1.0, 1.0, 1.0],
[0... |
C++ | UTF-8 | 782 | 3.171875 | 3 | [] | no_license | #include <iostream>
#include <regex>
#include <string>
#include <vector>
auto main() -> int {
std::regex regex(".*");
std::regex regex0("[0-9]+", std::regex_constants::extended);
std::string str = "This is a pen.";
std::cout << std::regex_search(str.begin(), str.end(), regex) << std::endl;
std::cout << std::regex... |
Java | UTF-8 | 1,274 | 2.015625 | 2 | [
"Apache-2.0",
"LicenseRef-scancode-other-copyleft",
"AGPL-3.0-only",
"GPL-1.0-or-later",
"AGPL-3.0-or-later"
] | permissive | package org.aksw.simba.quetsal.core.algebra;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import org.aksw.simba.quetsal.core.algebra.TopKSourceStatementPattern.Entry;
import org.eclipse.rdf4j.query.algebra.TupleExpr;
import com.fluidops.fedx.algebra.FedXExprVisito... |
Go | UTF-8 | 7,156 | 3.046875 | 3 | [
"MIT"
] | permissive | //
// Copyright (c) 2020 Markku Rossi
//
// All rights reserved.
//
package main
import (
"fmt"
)
var (
_ Expr = BoolValue(false)
_ Expr = Int8Value(0)
_ Expr = Int16Value(0)
_ Expr = Int32Value(0)
_ Expr = Int64Value(0)
_ Expr = Float64Value(0)
_ Expr = &binary{}
_ Expr = &unary{}
)
// Expr implements an ... |
C++ | WINDOWS-1251 | 3,915 | 3.765625 | 4 | [] | no_license | // CHAPTER_8 EXERCISE_1
// engplus.cpp
// + Distances
#include <iostream>
using namespace std;
///////////////////////////////////////////////////////////
class Distance //
{
private:
int feet;
float inches;
public:
//
Distance() : feet(0), inches(0.0)
{ }
//
Distance(int ft, fl... |
JavaScript | UTF-8 | 3,613 | 2.953125 | 3 | [
"MIT"
] | permissive | // Imports Discord API
const Discord = require('discord.js');
const client = new Discord.Client();
// Terms to identify, though not sure if this is case-sensitive. Will have to try out later
const term = "study";
const anotherTerm = "STUDY";
const yetAnotherTerm = "Study";
const anotherAnotherTerm = "studying... |
Markdown | UTF-8 | 4,940 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | ---
layout: post
title: "Like sunday like rain"
subtitle: ""
date: 2016-07-30 12:00:00
author: "xinwuzu"
header-img: "img/post-bg-likesunrain.jpg"
header-mask: 0.3
catalog: true
tags:
- 影评
---
用了两个晚上看完朋友提到的这部《like sunday like rain》,加上这篇小文几乎是整整一周的业余时间,完全不是我的节奏(也是最近加班太多%>_<%)。一部很棒的人文片,诗意的中文... |
Java | UTF-8 | 400 | 2.171875 | 2 | [] | no_license | package com.winnertel.em.standard.snmp.gui;
import com.winnertel.em.framework.model.snmp.SnmpMibBean;
public abstract class SnmpTableFilter {
/**
* Determine whether a row(mib bean) is visible in table.
*
* @param aMibBean the bean to filter
* @return true if the mib bean is filtered out, fals... |
Java | UTF-8 | 2,272 | 2.546875 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.banco.controlador.hilos;
import com.banco.controlador.Controlador;
import com.banco.controlador.Controlador;
import com.ba... |
Java | UTF-8 | 329 | 1.546875 | 2 | [] | no_license | package org.launchcode.skillstrack;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SkillsTrackApplication {
public static void main(String[] args) {
SpringApplication.run(SkillsTrackApplication.class, args... |
Python | UTF-8 | 24,625 | 3 | 3 | [
"MIT"
] | permissive | from bot_interface import *
import math
class SeijiBot(BotBase):
def __init__(self):
self.initialized = False
def initialize(self, gamestate):
gamestate.log("Initializing...")
#Getting UID
self.uid = gamestate.bot.uid
gamestate.log("This ship has uid " + str(self.ui... |
Java | UTF-8 | 546 | 3.40625 | 3 | [] | no_license | import java.util.Scanner;
class Min3 {
static int min3(int a, int b, int c) {
int min = a;
if (b < min) min = b;
if (c < min) min = c;
return min;
}
public static void main(String[] args) {
System.out.println("min3(1,2,3) = " + min3(1,2,3));
System.out.pri... |
Python | UTF-8 | 76 | 3.3125 | 3 | [] | no_license | n = 0
while n < 5:
print('Multiplos de 3 = ', n * 3)
n = n + 1
|
Java | UTF-8 | 1,416 | 2.328125 | 2 | [] | no_license | package com.umeng.message.entity;
import org.json.JSONObject;
public class ULocation {
private String a;
private String b;
private String c;
private String d;
private String e;
private String f;
private String g;
private String h;
public ULocation(JSONObject jSONObject) {
... |
Markdown | UTF-8 | 841 | 2.578125 | 3 | [
"MIT"
] | permissive | ## Salt基本使用
### 常用命令
- `salt "*" test.ping`: 测试节点是否能通
- `salt "192.168.1.123" cmd.run "uname -a"`: 远程执行`uname -a`命令
### 通过salt操作windows dnscmd
#### 删除域名解析:
```
salt "192.168.1.1" cmd.run "dnscmd /Recorddelete codelieche.com hello A /f"
```
返回结果:
> Deleted A record(s) at codelieche.com
Command completed successful... |
Java | UTF-8 | 777 | 1.867188 | 2 | [] | no_license | package org.hj.timefilter.controller;
import org.hj.timefilter.anno.RequestLimit;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
i... |
PHP | UTF-8 | 2,180 | 3.390625 | 3 | [] | no_license | <?php
/**
* Uma classe abstrata é uma classe que nunca serão usadas de fato. Ou seja,
* apenas as classes que herdam uma classe abstrata que dará origem a algum objeto.
*/
/**
* A classe foguete será uma classe abstrata. Ela definirá algumas características
* de um foguete e apenas as classes que vão herdar ela... |
Java | UTF-8 | 1,503 | 3.03125 | 3 | [] | no_license | package hr.fer.zemris.fuzzy.domain;
import org.apache.commons.lang3.ArrayUtils;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.StringJoiner;
public class DomainElement {
private int[] values;
public DomainElement(int[] values) {
this.values = values;
... |
Markdown | UTF-8 | 1,058 | 2.875 | 3 | [] | no_license | # Ruby on Rails Tutorial #
### Learn Web Development with Rails ###
### Michael Hartl ###
###### 目录
###### 第一章节 从零到部署
* 1.1 [简介]()
* 1.1.1 [各种读者的评论]()
* 1.1.2 [纵观Rails]()
* 1.1.3 [本书的约定]()
* 1.2 [建立和运行]()
* 1.2.1 [开发环境]()
* [IDEs(集成开发环境)]()
* Text editors and command lines
* Browsers
* A note about too... |
JavaScript | UTF-8 | 2,172 | 3.328125 | 3 | [] | no_license | // const Ship = require('./ship');
// const Bullet = require('./bullet');
const Util = require('./util');
class MovingObject {
constructor(options){
this.pos = options.pos;
this.vel = options.vel;
this.radius = options.radius;
this.color = options.color;
this.game = options.game;
// this.isW... |
Java | UTF-8 | 1,277 | 2.40625 | 2 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package EJB;
import java.util.ArrayList;
import javax.ejb.EJB;
import javax.ejb.Singleton;
import utilities.LogEntry;
/**
*
* @auth... |
Python | UTF-8 | 425 | 3.8125 | 4 | [] | no_license | #!/usr/bin/env python3.6
"""
Website url http://www.pythonchallenge.com/
Puzzle 00 url: http://www.pythonchallenge.com/pc/def/0.html
Calulate 2 to the power of 38
"""
def calc_2pow38():
return pow(2, 38)
if __name__ == "__main__":
num = calc_2pow38()
print("Challenge: evaluate 2 to the power of 38.\nAnswer: {... |
Ruby | UTF-8 | 177 | 3.03125 | 3 | [
"MIT"
] | permissive | # Cycle through all 24-bit colors and print their values.
require 'redgreenblue'
RGB.style = 'default'
RGB.each_24bit_color do |color|
print "\r" + color.inspect
end
puts
|
C# | UTF-8 | 800 | 3.390625 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _12.Fibbonacci
{
class Program
{
static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
int firstNumber = 1;
int s... |
Markdown | UTF-8 | 1,634 | 3.484375 | 3 | [] | no_license | # 帮助命令
## 帮助命令:man 命令
manual
在显示的文档中,使用上下键来上翻和下翻,使用空格进行翻页。
建议运行一下
man man
来具体看一下。这样是为了你能理解man有多个帮助级别,从1到9,如果单纯运行
man 命令
的话,默认显示最小的帮助等级,所以应该提前运行一下
man -f 命令
#上面的命令就等于运行
whatis 命令
来查看这个命令到底有多少个帮助等级。
如果忘记了要查找的命令的全称的话,有两种方式,第一种是使用<font color="red">Tab键,在输入命令的开头后,可以双击Tab键来使用提醒,下面就会显示全部以该部分开头的命... |
JavaScript | UTF-8 | 4,544 | 2.71875 | 3 | [] | no_license | function init_color_blocks()
{
var list=document.querySelectorAll(".colors");
for(var i=0; i<list.length; i++)
{
list[i].addEventListener("click", color_click);
}
}
function change_on_hover()
{
this.classList.add("cc");
}
function restore_back_after_hover()
{
this.classList.remove("cc");
}
... |
Java | UTF-8 | 503 | 2.109375 | 2 | [
"Apache-2.0"
] | permissive | package id.ac.tazkia.smilemahasiswa.entity;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
@Entity
@Data
public class MahasiswaCicilan {
@Id
@GeneratedValue(generator = "uuid")
@GenericGenerator(name = "uuid", strategy = "uuid2")
private String id;... |
C++ | UTF-8 | 1,729 | 2.625 | 3 | [] | no_license | #pragma once
#include "VulkanAPI/Common.h"
#include "VulkanAPI/Image.h"
#include "VulkanAPI/Queue.h"
namespace OmegaEngine
{
enum class TextureFormat;
class MappedTexture;
} // namespace OmegaEngine
namespace VulkanAPI
{
// forward declerations
class MemoryAllocator;
class Image;
class ImageView;
class Texture
{... |
Markdown | UTF-8 | 927 | 3.671875 | 4 | [] | no_license | # Comandos de repetição: continue e break
Com as palavras-chave `continue` e `break` podemos pular ou parar a execução de qualquer um dos comandos de repetição mencionados anteriormente, veja o exemplo a seguir:
```php
for ($i = 0; $i < 10; $i++) {
if ($i == 4 || $i == 6) {
continue;
}
if ($i == ... |
C++ | UTF-8 | 1,827 | 3.171875 | 3 | [] | no_license | // ex.1.23
// en: Modify your program from Exercise 1.22 to plot the number of
// edges needed to connect N items, for 100 <= N <= 1000.
// ru: Измените программу из упражнения 1.22, чтобы она выводила в
// виде графика количество ребер, требующихся для соединения N
// элементов, 100 <= N <= 1000.
#include <algorith... |
C++ | UTF-8 | 1,089 | 3.125 | 3 | [] | no_license | // template<class _Ty> inline
// _Ty _Pow_int(_Ty _X, int _Y)
// {unsigned int _N;
// if (_Y >= 0)
// _N = (unsigned int)_Y;
// else
// _N = (unsigned int)(-_Y);
// for (_Ty _Z = _Ty(1); ; _X *= _X)
// {if ((_N & 1) != 0)
// _Z *= _X;
// if ((_N >>= 1) == 0)
// return (_Y < 0 ? _Ty(1) / _Z : _Z); }}
#in... |
JavaScript | UTF-8 | 8,870 | 2.796875 | 3 | [] | no_license | (function (window) {
'use strict';
var Modulator = function(params) {
if (!params)
params = new Object();
// this odd construct is for safari compatibility
if (!("audioContext" in window))
window.audioContext = new (window.AudioContext || window.webkitAudioConte... |
Python | UTF-8 | 384 | 2.890625 | 3 | [] | no_license | import tkinter as tk
from tkinter import ttk
from PIL import Image, ImageTk
root = tk.Tk()
root.geometry("800x500")
root.title("ImageViewer")
frame = tk.Frame(root)
imgfile = 'cover1.png'
im = ImageTk.PhotoImage(file=imgfile)
canvas = tk.Canvas(root, width=800, height=500)
canvas.pack()
canvasImage = can... |
Java | UTF-8 | 4,176 | 2.015625 | 2 | [] | no_license | package ru.efive.dms.uifaces.beans.dialogs;
import org.apache.commons.lang.StringUtils;
import org.primefaces.context.RequestContext;
import ru.efive.dms.uifaces.beans.IndexManagementBean;
import ru.entity.model.document.IncomingDocument;
import ru.entity.model.document.RequestDocument;
import ru.hitsl.sql.dao.Incomin... |
Python | UTF-8 | 1,700 | 3.40625 | 3 | [] | no_license | import torch
import string
class Vocab(object):
def __init__(self, end_token='>', start_token='<', pad_token='#'):
self.pad_token = pad_token
self.char2idx = {c: i+3 for i, c in enumerate(string.ascii_letters)}
self.char2idx[pad_token] = 0
self.char2idx[start_token] = 1
self... |
C++ | UTF-8 | 554 | 3.375 | 3 | [] | no_license | #ifndef SINGLETON_H
#define SINGLETON_H
/**
* Guarantees that only a single instance of an object will exist
* throughout the lifetime of the program.
*/
template <class Derived>
class Singleton
{
public:
Singleton(const Singleton&) = delete;
Singleton& operator=(const Singleton&) = delete;
static Derived& inst... |
PHP | UTF-8 | 4,417 | 2.78125 | 3 | [] | no_license | <?php
$con = mysqli_connect("localhost","root","","db_reproductor");
$DatoMP3["nombre"] = "";
$DatoMP3["ruta"] = "";
$DatoMP3["descripcion"] = "";
if(isset($_REQUEST["que_debo_hacer"])){
switch($_REQUEST["que_debo_hacer"]){
case "agregar_mp3":
... |
Java | UTF-8 | 1,594 | 3.234375 | 3 | [] | no_license | package com.oschrenk.humangeo.cs;
/**
* A spherical coordinate
*
* @see SphericalCoordinateSystem
*
* @author Oliver Schrenk <oliver.schrenk@gmail.com>
*/
public class SphericalCoordinate extends PolarCoordinate {
private final double phi;
/**
* @param r
* the radius
* @param theta
* ... |
Markdown | UTF-8 | 1,449 | 3.03125 | 3 | [
"Unlicense"
] | permissive | # Rubrica con connessione al database
Realizzare una applicazione con un'interfaccia che consenta di inserire i dati di una rubrica telefonica:
- ID
- nome
- cognome
- indirizzo
- telefono
- ecc...
per poi visualizzarli e cancellarli.
---
Relativamente alla cancellazione di un record e relativi messaggi utente sull... |
Ruby | UTF-8 | 1,517 | 3.375 | 3 | [] | no_license | class SpiralGrid
DIRECTIONS = {
right: { step: ->(x, y){ [x + 1, y ] }, check: :max_x, next_direction: :up },
up: { step: ->(x, y){ [x , y + 1] }, check: :max_y, next_direction: :left },
left: { step: ->(x, y){ [x - 1, y ] }, check: :min_x, next_direction: :down },
down: { step: ->... |
Python | UTF-8 | 3,876 | 2.75 | 3 | [
"MIT"
] | permissive | """
http://machinelearningmastery.com/understanding-stateful-lstm-recurrent-neural-networks-python-keras/
http://machinelearningmastery.com/text-generation-lstm-recurrent-neural-networks-python-keras/
http://machinelearningmastery.com/tactics-to-combat-imbalanced-classes-in-your-machine-learning-dataset/
"""
from ker... |
C | UTF-8 | 266 | 3.671875 | 4 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
int main() {
float v1, v2;
printf("type me two values: ");
scanf("%f %f", &v1, &v2);
if (v1 > v2) {
printf("the bigger value is: %f", v1);
} else {
printf("the bigger value is: %f", v2);
}
return 0;
}
|
Python | UTF-8 | 347 | 3.375 | 3 | [] | no_license | def spam(divideBy):
try:
return 42/divideBy
except ZeroDivisionError:
print('error')
print(spam(2))
print(spam(12))
print(spam(0))
print(spam(1))
def spam2(divideBy):
return 42/divideBy
try:
print(spam2(2))
print(spam2(12))
print(spam2(0))
print(spam2(1))
except ZeroDivisi... |
Markdown | UTF-8 | 11,470 | 2.6875 | 3 | [
"MIT"
] | permissive | ---
title: Linux Centos 命令之 cp,rm,mv
date: 2018-04-21 13:50:00
categories:
- Linux
tags:
- Centos
---
## cp - copy 拷贝目录,文件
<!--more-->
### Usage:
```bash
Usage: cp [OPTION]... [-T] SOURCE DEST
or: cp [OPTION]... SOURCE... DIRECTORY
or: cp [OPTION]... -t DIRECTORY SOURCE...
Copy SOURCE to DEST, or multiple SOU... |
Markdown | UTF-8 | 22,917 | 3.65625 | 4 | [] | no_license | ### DESIGNING A THREAD-SAFE CLASS
While it is possible to write a thread-safe program that stores all its state in public static fields, it is a lot harder
to verify its thread safety or to modify it so that it remains thread-safe than one that uses encapsulation appropriately.
Encapsulation makes it possible to determ... |
C# | UTF-8 | 1,911 | 2.609375 | 3 | [] | no_license | using Microsoft.AspNetCore.Mvc;
using SeminarManager.API.Misc;
using SeminarManager.Model;
using System;
namespace SeminarManager.API.Controllers
{
public class PersonController : Controller
{
private IRepository repository;
public PersonController(IRepository repository)
... |
C++ | UTF-8 | 1,400 | 3.546875 | 4 | [] | no_license | /*
* File: main.cpp
* Author: Tony Reyes
* July, 2 2014
* Purpose: Gaddis 7thEd Chap4 Prob8 Change For A Dollar
*/
//System Libraries
#include <iostream>
#include <iomanip>
using namespace std;
//User Libraries
//Global Constants
//Function Prototypes
//Execution Starts Here!
int main(int argc, char** ... |
Python | UTF-8 | 863 | 2.84375 | 3 | [] | no_license | from moviemon.entity.Map import *
from moviemon.entity.Player import *
import pickle
class Game():
def __init__(self):
self.mapX = 10
self.mapY = 20
self.fileGame = "game.save"
self.map = Map(self.mapX, self.mapY)
playerStart = self.map.getPlayerStart()
print("New ... |
Java | ISO-8859-1 | 2,355 | 3.078125 | 3 | [] | no_license | package collectionsDetektiv;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;
public class Testdriver
{
public static Set<String> verdaechtige;
public static Set<String> hatAlibi;
public static Set<String> liebtGold;
public static Se... |
C | UTF-8 | 1,305 | 3.234375 | 3 | [] | no_license | #include <stdio.h>
#include "func.h"
int main(void)
{
double x = 5;
double result;
const int n = 6;
int a[] = {1,2,3,4,5,6};
int ab[n];
int ac[]={4,3,6,2,1,5};
int ad[n];
do
{
system("cls");
printf("1 - Task1\n2 - Task2\n3 - Task3\n4 - Task4\n5 - Task5... |
Go | UTF-8 | 671 | 3 | 3 | [
"MIT"
] | permissive | package leetcode538
import (
. "github.com/cxjwin/go-algocasts/datastructure"
)
func dfs(root *TreeNode, sum int) int {
if root == nil {
return sum
}
cur := dfs(root.Right, sum)
root.Val += cur
return dfs(root.Left, root.Val)
}
func convertBST(root *TreeNode) *TreeNode {
dfs(root, 0)
return root
}
func c... |
C | UTF-8 | 760 | 2.671875 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
//#include "SString.h"
#include "HString.h"
int main(){
/*SString S;
SString T;
SString A;
SString B;*/
HString S,T,B,A;
int next[INITIAL_SIZE];
char* s = "abbaba";
char* t = "a";
char* a = "AA";
//SStrAssign(S, s);
//SStrAssign(T, t);
//SStrAssign(A, a);
/*SStrLengt... |
C | IBM852 | 2,689 | 3.5625 | 4 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define DEZ 10 //tamanho da matriz do caa palavras
char matriz[DEZ][DEZ]; //matriz do caa palavras
//preenche a matriz com zeros, evitando lixos de memoria
void inicializa_matriz() {
for(int i = 0; i < 10; i++){
memset(matriz[i], 0, DEZ);
}
}
char gera_l... |
JavaScript | UTF-8 | 1,152 | 3.5625 | 4 | [] | no_license | var words;
function preload() {
Go = loadStrings("words.txt")
}
function setup(){
console.log(Go);
background(250);
var ind= floor(random(Go.length));
text(Go[ind],10,10,80,80)
createCanvas(windowWidth, windowHeight);
noStroke();
// set up text size on floor
textSize(64);
// fill style for "l... |
Java | UTF-8 | 3,555 | 2.03125 | 2 | [] | no_license | package com.wetrack.ikongtiao.repo.impl.fixer;
import com.wetrack.base.dao.api.CommonDao;
import com.wetrack.base.page.BaseCondition;
import com.wetrack.ikongtiao.domain.Fixer;
import com.wetrack.ikongtiao.domain.Sequence;
import com.wetrack.ikongtiao.param.FixerQueryForm;
import com.wetrack.ikongtiao.repo.api.fixer.F... |
Java | UTF-8 | 747 | 1.976563 | 2 | [] | no_license | package com.oracle.udai.product.domain.mapper;
import com.oracle.udai.api.vo.SkuVO;
import com.oracle.udai.product.domain.dto.Sku;
import java.util.List;
public interface SkuMapper {
int deleteByPrimaryKey(Integer id);
int insert(Sku record);
int insertSelective(Sku record);
SkuVO selectByPrimaryK... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.