language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
C# | UTF-8 | 1,431 | 3.015625 | 3 | [
"MIT"
] | permissive | using System;
using System.Linq;
using System.Web;
namespace IPAddressFiltering
{
/// <summary>
/// MVC Roles linked to IPs attribute
/// </summary>
public class IPAddressRoleFilterAttribute : IPAddressFilterAttribute
{
/// <summary>
/// List of roles to get IPs from for th... |
Java | UTF-8 | 474 | 1.960938 | 2 | [] | no_license | package com.example.dell.univstarproject.start.presenter;
import com.example.dell.univstarproject.base.BasePresenter;
import com.example.dell.univstarproject.start.model.bean.ForeBean;
/**
* 作者:天南地北,旺哥最美!
* 微信:xw15227039901
*/
public interface ForeContrcat {
public interface ForeView {
void showbean(... |
Python | UTF-8 | 1,051 | 3.125 | 3 | [] | no_license | #
# Controller untuk kind Anggota
#
# Kind Anggota tediri atas property berikut:
# + nama : untuk nama anggota
# + umut : untuk umur anggota
#
from google.cloud import datastore
# Method untuk menambah anggota baru
def tambah(nama, umur):
# Buat object yang mau disimpan
anggota = { 'nama':nama, 'umur':umur}
... |
C++ | UTF-8 | 928 | 3.484375 | 3 | [] | no_license | #include <atomic>
#include <iostream>
#include <thread>
std::atomic<int> msg1(0);
std::atomic<int> msg2(0);
int x, y;
void setter1() {
x = 1;
atomic_thread_fence(std::memory_order_release);
msg1.store(1, std::memory_order_relaxed);
}
void setter2() {
y = 1;
atomic_thread_fence(std::memory_order_release);
... |
JavaScript | UTF-8 | 423 | 3.296875 | 3 | [] | no_license | console.log('hfj');
// let u=prompt("Enter a number");
let i=0;
while(i<1000)
{
u=prompt("Enter a number greater than 100");
u=Number(u);
if(u>100 || u==0)
{
console.log(u);
alert("you have entered number greater than 100!! or cancelled a loop");
break;
... |
Java | UTF-8 | 344 | 2.546875 | 3 | [] | no_license | package packageOne;
public class ArrayTest {
public static void main(String[] args) {
Array aTest = new Array(1987, 600);
aTest.addNode(1979, 650);
System.out.println(aTest.searchYr(1979).year + " " + aTest.searchYr(1979).water);
System.out.println(aTest.searchW(1979).year + " " + aTest.searchW(1979... |
C++ | UTF-8 | 637 | 2.796875 | 3 | [] | no_license | #include <Servo.h> //используем библиотеку для работы с сервоприводом
Servo servo; //объявляем переменную servo типа Servo
int a;
int servPos=90;
void setup() {
Serial.begin(115200);
servo.attach(10);
}
void loop() {
a = 0;
while (Serial.available() > 0) {
a = Serial.read();
Serial.println(a);
//... |
C++ | UTF-8 | 1,232 | 2.71875 | 3 | [] | no_license | #ifndef TCPSOCKET_H_
#define TCPSOCKET_H_
#include <iostream>
#include <sys/types.h>
#include <netinet/in.h>
#include <inttypes.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <strings.h>
#include <unistd.h>
#include <stdio.h>
#include "Socket.h"
using namespace std... |
Java | UTF-8 | 939 | 2.28125 | 2 | [] | no_license | package com.myproject.technicaltest.annotation;
import com.myproject.technicaltest.annotationImpl.CheckUsernameValidator;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import ... |
Java | UTF-8 | 936 | 2.15625 | 2 | [] | no_license | package com.level.clock.dto;
public class DataDTO extends ObjectDTO {
private int data_num;
private String data_title;
private String data_main_image;
private int hero_num;
private String data_file;
public int getData_num() {
return data_num;
}
public void setData_num(int data_num) {
this.dat... |
Java | UTF-8 | 414 | 3.203125 | 3 | [] | no_license | import java.util.Scanner;
public class Prime {
public static void main(String[] args)
{
Scanner s=new Scanner(System.in);
int n=s.nextInt();
int isprime[]=new int[n+1];
for(int i=2;i<n+1;i++)
isprime[i]=1;
for(int i=2;i*i<=n;i++)
{
for(int j=i;j*i<=n;j++)
{
isprime[j*i]=0;
... |
C++ | UTF-8 | 2,395 | 2.765625 | 3 | [] | no_license | /*
AsyncMelody.ino - Asynchronous melody playing example.
Created by LazyGalaxy - Evangelos Papakonstantis, November 22, 2018.
Released into the public domain.
*/
#include <LazyGalaxySpeaker.h>
#include <LazyGalaxyTimer.h>
// any pin is ok for a speaker/buzzer, digital(with and without PWM) or analog
Speaker... |
Java | UTF-8 | 277 | 2.6875 | 3 | [] | no_license | package thisKeyword;
public class PlayingWithObjects {
public static void main(String[] args) {
Paper p =new Paper();
p.setText("Hello World");
System.out.println(p.getText());
Printer hp=new Printer();
hp.print(p);
System.out.println(p.getText());
}
}
|
C++ | UTF-8 | 4,031 | 2.578125 | 3 | [] | no_license | #include "LineEditPath.h"
#include <QMenu>
#include <QFileDialog>
#include <QFocusEvent>
#include <QValidator>
LineEditPath::LineEditPath(QWidget *parent) :
QLineEdit(parent)
{
this->setContextMenuPolicy(Qt::CustomContextMenu);
connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLO... |
Markdown | UTF-8 | 1,608 | 2.8125 | 3 | [
"MIT"
] | permissive | ---
date: '2019-09-12T17:00:00.000Z'
link: 'https://www.meetup.com/dresdenjs-io-javascript-user-group/events/wwdfrqyzmbqb/'
location: 'Hermann-Mende-Straße 4, Dresden'
title: '48. JavaScript MeetUp: Reactivity is Fun! and Let''s Work out!'
locked: false
---
Diesmal mit den tollen \~reaktionären\~ reaktiven Themen:
* ... |
Java | UTF-8 | 2,267 | 3.234375 | 3 | [
"BSD-2-Clause",
"LGPL-2.0-or-later",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-warranty-disclaimer",
"GPL-1.0-or-later",
"GPL-2.0-only",
"LGPL-2.0-only"
] | permissive | package salvo.jesus.graph.visual.layout;
import java.awt.*;
/**
* An extension of the GraphLayoutManager interface specifically
* for placing vertices in grids.
*
* @author Jesus M. Salvo Jr.
*/
public interface GraphGridLayoutManager extends GraphLayoutManager {
/**
* This method sets the point at wh... |
C++ | UTF-8 | 19,574 | 2.875 | 3 | [] | no_license | #include "lexer.h"
#include <fstream>
#include <vector>
#include <cctype>
namespace lexer {
int ncomment_count = 0;
std::string comment_data;
bool is_digit(char c)
{
return std::isdigit(c);
}
bool is_octit(char c)
{
return std::isdigit(c) && c < '8';
}
bool is_hexit(char c)
{
return std::isxdigit(... |
Markdown | UTF-8 | 1,578 | 3.390625 | 3 | [] | no_license | # Note Taker
This Project called for the creation of a simple, but fully-functional Note Taker application. It should easily allow the User to create and save notes, so that they can be viewed at a later time, and deleted when no longer required. It required practice in creating files that allowed for data persistence... |
C++ | UTF-8 | 1,091 | 2.828125 | 3 | [] | no_license | //category : graph
#include <stdio.h>
#include <vector>
#include <queue>
#include <iostream>
#include <algorithm>
using namespace std;
vector<int> a[10001];
bool check[10001];
void initCheck(){
for (int i = 0; i < 10001; i++)
check[i] = false;
}
void dfs(int x){
if (check[x] == true) return;
print... |
Python | UTF-8 | 3,298 | 2.640625 | 3 | [] | no_license | import asyncio
import re
import sys
APPLICATION = None
SERVER_PORT = 8888
def wsgi_to_bytes(s):
return s.encode('iso-8859-1')
async def _handle(reader, writer):
status_line = (await reader.readuntil(b'\r\n')).decode('ascii')[:-2]
(method, path, http_version) = status_line.split(' ')
headers = {}
... |
Java | UTF-8 | 653 | 2.234375 | 2 | [] | no_license | package org.jreflect.methods.instances;
import org.jreflect.methods.AbstractMethodTestCase;
import org.jreflect.methods.fixture.ClassWithInstanceMethods;
import org.junit.Before;
public class InstanceMethodTest extends
AbstractMethodTestCase<ClassWithInstanceMethods> {
private ClassWithInstanceMethods cla... |
Java | UTF-8 | 3,266 | 2.71875 | 3 | [
"MIT"
] | permissive | package mont.gonzalo.phiuba.model;
import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
/**
* Created by Gonzalo Montiel on 1/25/17.
*/
public class CathedraSchedule implements Serializable, Calen... |
Java | UTF-8 | 1,037 | 2.578125 | 3 | [] | no_license | package application;
import ui.StatisticsView;
public class ConsoleView implements StatisticsView {
@Override
public void showTime(String formattedTime) {
System.out.println(formattedTime);
}
@Override
public void showTotalSentMessages(String total) {
System.out.println(total);
... |
Java | UTF-8 | 3,709 | 2.84375 | 3 | [] | no_license | package com.example.android.mycursoradapter;
import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.provider.BaseColumns;
/**
* Created by Android on 06.11.2015.
*/
public class MySQLiteHelp... |
C++ | UTF-8 | 998 | 3.84375 | 4 | [] | no_license | // chrono를 이용해 ms(milli seconds) 단위로 시간을 측정한다.
#include <iostream>
#include <chrono>
using namespace std;
int main() {
double result;
// 시작시간
// 정밀한 시간을 측정하기 위한 코드 (시작시간)
chrono::system_clock::time_point start = chrono::system_clock::now();
// 시간 측정을 위한 코드
// 임의로 아무런 코드
for(int i=0;i<100;i++)
for(int... |
Python | UTF-8 | 895 | 4.34375 | 4 | [] | no_license | """
Дано положительное целое число. Вам необходимо сконвертировать его в двоичную форму и подсчитать сколько единиц в написании данного числа. Для примера: 5 = 0b101 содержит две единицы, так что ответ 2.
Заметки: Эта задача легко решается с помощью двух функций" -- bin и count.
Вх. данные: Число как положительное цел... |
Ruby | UTF-8 | 606 | 4.65625 | 5 | [] | no_license | #Join elements of an array with .join to make a "string"
puts ["This", "is", "a", "test"].join(' ')
puts ["This", "is", "a", "test"].join('_')
puts ["This", "is", "a", "test"].join('*')
message = ["I", "love", "Ruby"]
puts message.join('_')
# Array of words literal operator
%w[this is also a test]
#=> ["this", "is"... |
C | WINDOWS-1250 | 1,253 | 2.90625 | 3 | [] | no_license | #include<stdio.h>
#include<string.h>
int main(void){
char s[131072],t[131072];
int q,a,b,c,d,i,sl,tl;
int w,x,y,z;
int sa[131072]={0},sb[131072]={0};
int ta[131072]={0},tb[131072]={0};
scanf("%s%s",s,t);
sl = strlen(s);tl = strlen(t);
for(i = 0;i < sl;i++){
if(s[i] == 'A'){sa[i+1] = sa[i]+1;sb[i+... |
Python | UTF-8 | 32,113 | 2.640625 | 3 | [] | no_license | # -*- coding: utf-8 -*-
from numpy import *
import matplotlib as mpl
from matplotlib import cm,colors
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
from scipy.optimize import leastsq
import os,time
# For full simulation which include dispersion, use PhaseMatchingBiphotonFWM.py
# T... |
C# | UTF-8 | 853 | 2.90625 | 3 | [] | no_license | private void CopyFiles()
{
var folder = Path.GetDirectoryName(SelectedItemPaths.First());
var newFolder = Path.Combine(folder, "New Folder");
Directory.CreateDirectory(newFolder);
foreach (var path in SelectedItemPaths)
{
var newPath = Path.Combine(newFolder, ... |
JavaScript | UTF-8 | 849 | 3.109375 | 3 | [] | no_license | var url = "https://randomuser.me/api/";
var btn = document.querySelector("#btn");
btn.addEventListener("click", () => {
fetch(url)
.then(handleErrors)
.then(parseJSON)
.then(updateProfile)
.catch(printError);
});
function printError(err) {
console.log("ERROR: " + err);
}
function handleErrors(res... |
C# | UTF-8 | 2,314 | 2.515625 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class GameManager : MonoBehaviour
{
public static bool isPaused;
public MenuUI menu;
public Text tanksDestroyedTxt;
public float GameTimer;
public Text tim... |
PHP | UTF-8 | 2,273 | 2.65625 | 3 | [] | no_license | <?php
namespace app\components;
use Yii;
use app\models\App;
use yii\base\Component;
/**
* Class AppService
*
* @package app\components
* @author Jerry Hsia<jerry9916@qq.com>
*/
class AppService extends Component
{
const CACHE_APPS = 'cache_apps';
/**
* Save a app
*
* @param App $app
... |
PHP | UTF-8 | 682 | 2.546875 | 3 | [] | no_license | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Preselecting</title>
</head>
<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
Tempat Lah... |
TypeScript | UTF-8 | 5,361 | 2.71875 | 3 | [] | no_license | // Steal from https://github.com/brunosimon/folio-2019
export default class {
callbacks: any;
constructor() {
this.callbacks = {}
this.callbacks.base = {}
}
// event.on()
on(_names, callback) {
// Scope
const _this = this
// Name error
if (typeof _names === 'und... |
Markdown | UTF-8 | 4,639 | 3 | 3 | [] | no_license | # 201 Introduction
## Overview
In this lab we are going to productionise a k8s cluster using the kops deployment tool. kops is tool to create production clusters and is a single binary much as the minikube minikube tool we used to build a local cluster. kops will provision a k8s cluster for us in AWS and set up the P... |
C++ | UTF-8 | 491 | 2.703125 | 3 | [] | no_license | #pragma once
#define DEBUG 1
class ChessBoard
{
public:
ChessBoard(int queen);
ChessBoard() { ; }
~ChessBoard() { ; }
void OutPut();
void PlaceQueen(int row);
//how many solution have been found
const int GetSlnNum()const;
//If (row,col) can place a queen
bool Check(int row, int col);
//If (row,col) is i... |
Go | UTF-8 | 500 | 3.09375 | 3 | [] | no_license | package space
type Planet string
func Age(seconds float64, planet Planet) float64 {
var multiplier float64 = 31557600
switch planet {
case "Earth":
multiplier *= 1
case "Mercury":
multiplier *= 0.2408467
case "Venus":
multiplier *= 0.61519726
case "Mars":
multiplier *= 1.8808158
case "Jupiter":
multi... |
Markdown | WINDOWS-1251 | 3,448 | 2.640625 | 3 | [] | no_license | - (Homo sapiens)
': , , , , , , .
: , ., . ( ), ' , , .
: , , , , . , . .
: , , , ( ).
: 1) , .
2) , .
SOLID
S - , , - . .
O - , . , , .
L - , - , - (... |
Java | UTF-8 | 347 | 2.96875 | 3 | [] | no_license | class Solution {
public String reverseStr(String s, int k) {
StringBuilder res = new StringBuilder();
char[] str = s.toCharArray();
for(int i = 0; i < s.length(); i++) {
if((i / k) % 2 == 0) res.insert(i - i % k, str[i]);
else res.append(str[i]);
}
ret... |
Java | UTF-8 | 1,172 | 2.171875 | 2 | [
"Apache-2.0"
] | permissive | package com.salesmanager.core.business.services.reference.country;
import java.util.List;
import java.util.Map;
import com.salesmanager.core.business.exception.ServiceException;
import com.salesmanager.core.business.services.common.generic.SalesManagerEntityService;
import com.salesmanager.core.model.reference.countr... |
PHP | UTF-8 | 2,817 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Event List Widget: Standard List
*
* The template is used for displaying the [eo_event] shortcode *unless* it is wrapped around a placeholder: e.g. [eo_event] {placeholder} [/eo_event].
*
* You can use this to edit how the output of the eo_event shortcode. See http://docs.wp-event-organiser.com/shortco... |
Swift | UTF-8 | 843 | 2.671875 | 3 | [] | no_license | //
// FeedPostRequest.swift
// PlayerAuthMe
//
// Created by Michael Green on 27/08/2015.
// Copyright (c) 2015 Michael Green. All rights reserved.
//
import Foundation
class FeedPostRequest: PlayerMeRequest {
typealias FeedPostSuccessResponse = () -> ()
private var successClosure: FeedPostSuccessRespon... |
Swift | UTF-8 | 1,122 | 2.859375 | 3 | [] | no_license | //
// Profile.swift
// Wimme
//
// Created by Młody-MBP on 18.11.2017.
// Copyright © 2017 doThisApp. All rights reserved.
//
import Foundation
struct Profile{
private(set) public var username: String?
private(set) public var firstName: String?
private(set) public var lastName: String?
private(set... |
Java | UTF-8 | 3,360 | 2.0625 | 2 | [] | no_license | // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: TXTBase.java
package org.xbill.DNS;
import java.io.IOException;
import java.util.*;
// Referenced classes of package org.xbill.DNS:
// ... |
Markdown | UTF-8 | 15,528 | 2.671875 | 3 | [
"CC-BY-4.0",
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | ---
title: "Creating, Altering, and Removing Indexes"
description: "Creating, Altering, and Removing Indexes"
author: "markingmyname"
ms.author: "maghan"
ms.date: 01/11/2019
ms.service: sql
ms.topic: "reference"
helpviewer_keywords:
- "indexes [SMO]"
monikerRange: "=azuresqldb-current||=azure-sqldw-latest||>=sql-serv... |
C | UTF-8 | 9,390 | 2.765625 | 3 | [] | no_license | #include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "parse_ops.h"
#include "constant_data.h"
#include "util_funcs.h"
#include "parse_directives.h"
#include "errors.h"
#include "parsing.h"
int find_op (char*);
int identify_operand (char* str);
void parse_operand (char* str, int type, state_t*, int com... |
Markdown | UTF-8 | 1,999 | 3.078125 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "Ejemplo sencillo de Fragment"
date: 2019-10-18 14:30:00 +0200
categories: primer_trimestre
order: 1
parent: Primer trimestre Android
---
# Ejemplo sencillo de Fragment
En este ejemplo vamos a cambiar dónde creamos la interfaz de usuario, pasando de la Actividad principal a un Fragmento.
*... |
Ruby | UTF-8 | 1,814 | 3.609375 | 4 | [] | no_license | require_relative '../lib/company/company'
require_relative '../lib/company/team'
require_relative '../lib/employees/developer'
require_relative '../lib/employees/tester'
require_relative '../lib/employees/employee'
require_relative '../lib/employees/manager'
class Menu
private
def write_emp_menu
puts "\n\nEmplo... |
JavaScript | UTF-8 | 1,638 | 2.984375 | 3 | [
"MIT"
] | permissive | import { deburr, isString } from 'lodash'
const regexOperatorsRegex = /[|\\{}()[\]^$+*?.-]/g
const emailRegex = /^[^\s@]+@([^\s@.,]+\.)+[^\s@.,]{2,}$/
export function escapeRegexp (str) {
if (typeof str !== 'string') {
throw new TypeError('Expected a string')
}
return str.replace(regexOperatorsRegex, '\\$&'... |
Ruby | UTF-8 | 1,890 | 2.640625 | 3 | [] | no_license | require 'benchmark'
require 'redis'
require 'yaml'
require 'json'
N = 10000
Benchmark.bm do |r|
@redis = Redis.new
@serialize_me = { :lol => 'test', "ohai" => 'llllll', :array => [12,321,231,23, { :hi => 'hej'}]}
r.report("YAML Save") do
puts 'Yaml'
puts YAML.dump(@serialize_me).length
N.times do ... |
C++ | UTF-8 | 2,324 | 2.859375 | 3 | [] | no_license | /*
* File: rhythm_automata.h
* Author: puppy
*
* Created on August 7, 2012, 5:07 PM
*/
#ifndef RHYTHM_AUTOMATA_H
#define RHYTHM_AUTOMATA_H
#include <iostream>
#include <time.h>
#include <stdlib.h>
#include <math.h>
#include <string>
#include "State.h"
#define MAX_ITERATIONS 600
using namespace std;
class Rhyt... |
Python | UTF-8 | 3,400 | 2.6875 | 3 | [] | no_license | import sympy as sp
import matplotlib.pyplot as plt
import numpy as np
import constants as c
import pandas as pd
from matplotlib import patches
from tqdm import tqdm
import os
def plotSR(m_h1_0=c.m_h1_0, m_h2_0=c.m_h2_0, r=c.r, Xhh_cut=c.Xhh_cut,
m_h1_min=c.m_h1_min, m_h1_max=c.m_h1_max, m_h2_min=c.m_h2_min... |
C# | UTF-8 | 900 | 3.1875 | 3 | [
"Apache-2.0"
] | permissive | using System;
using System.Collections.Generic;
using System.Text;
namespace SandwichSystem.BusinessLayer
{
public class Sandwish
{
public StringTranslated Name { get; set; }
public List<Ingredient> Ingredients { get; set; } = new List<Ingredient>();
public Sandwish(StringTranslated... |
JavaScript | UTF-8 | 360 | 3.671875 | 4 | [] | no_license | function sequence(start, step) {
start = start || 0;
step = step || 1;
return function(){
start+=step;
return start-step;
};
}
var generator = sequence(10, 3);
var generator2 = sequence(7, 1);
console.log(generator()); // 10
console.log(generator()); // 13
console.log(generator2()); // 7
console.log(generator());... |
Python | UTF-8 | 382 | 2.671875 | 3 | [
"MIT"
] | permissive | import pygame, sys, math, random
class Title(pygame.sprite.Sprite):
def __init__(self, image, size):
#pygame.sprite.Sprite.__init__(self, self.containers)
self.size = size
self.image = pygame.image.load(image)
if size:
self.image = pygame.transform.scale(self.im... |
C++ | SHIFT_JIS | 2,231 | 2.828125 | 3 | [] | no_license | #pragma once
#include "Enemy.h"
class EffectManager;
class Stage;
class ProjectileManager;
class CollisionManager;
class Thrower : public Enemy
{
private:
int runH = -1;
int throwH_ = -1;
int frame_ = 0;
int animFrame_ = 0;
Enemy* MakeClone() override;
using Func_t = void (Thrower::*)();
in... |
Java | UTF-8 | 1,208 | 1.789063 | 2 | [
"BSD-2-Clause"
] | permissive | import net.runelite.mapping.ObfuscatedName;
@ObfuscatedName("en")
public class class130 {
@ObfuscatedName("i")
class131 field1910;
@ObfuscatedName("f")
class131 field1911 = new class131();
public class130() {
this.field1911.field1912 = this.field1911;
this.field1911.field1913 = this.field19... |
Java | UTF-8 | 2,770 | 3.1875 | 3 | [] | no_license | import java.util.*;
class SceneCard {
private int sceneCost;
private String cardName;
private boolean active;
private String description;
private String picName;
private ArrayList<PlayerSpot> players;
int sceneNum;
boolean flipped;
//Returns true if card is active
public boolea... |
PHP | UTF-8 | 1,144 | 3.859375 | 4 | [] | no_license | <?php
/*
1- Créer une fonction qui retourne la conversion d'une date FR en date US ou inversement.
Cette fonction prend 2 paramètres : une date et le format de conversion "US" ou "FR"
2- Vous validez que le paramètre de format est bien "US" ou "FR". La fonction retourne un message si ce n'est pas le cas.
*/... |
Java | UTF-8 | 239 | 2.015625 | 2 | [] | no_license | package com.afarok.test;
public class Test {
public static void main(String[] ags) {
System.out.println("This is nothing but a simple test.");
System.out.println("Testing Git Version Control System.");
}
}
|
C++ | UTF-8 | 870 | 2.625 | 3 | [] | no_license | ///\file
/*!
* \details Implementation of Trump game
* \author Shubham Yadav (s.yadav@student.utwente.nl)
* \version 1.0
* \date 23 November 2017
*/
#ifndef MESSAGE_H
#define MESSAGE_H
#include <iostream>
#include <string>
#include "TrumpMisc.h"
#define BUFFERLENGTH 256
class Message
{
private:
ENT... |
Markdown | UTF-8 | 810 | 3.1875 | 3 | [] | no_license | ### 不甘心的原因
#### 后悔
想象自己老去的样子,
想象自己无奈的时候,
想象自己还有那么多的事情没有做,
怎么能甘心啊!
现在的奋斗的汗水和以后后悔的泪水,到底哪一个更痛!
#### 想做的事情
自己想做的事情,那么的多,以后只能在做梦实现了吗?
当梦醒的时候,泪水沾湿枕头,你还会回忆起自己实现那么想法的乐趣吗?
#### 不得不面对的事情
当自己的儿女想要一个玩具的时候,你说的是什么?
看到别人的妻子,别人的父母的时候,你想的是什么?
水米油盐的不够的时候,你想的是什么?
你难道不想在面对不得不面对的事情的时候,多一种选择!
> 人生最痛苦的事情莫过于:我本可以!
|
Markdown | UTF-8 | 4,784 | 2.609375 | 3 | [] | no_license | ---
description: "Recipe of Ultimate Next level dumplings(danwake)"
title: "Recipe of Ultimate Next level dumplings(danwake)"
slug: 703-recipe-of-ultimate-next-level-dumplingsdanwake
date: 2020-12-11T05:07:26.956Z
image: https://img-global.cpcdn.com/recipes/65c4627c12620627/751x532cq70/next-level-dumplingsdanwake-recip... |
Java | UTF-8 | 1,805 | 3.03125 | 3 | [] | no_license | package com.maestro.lib.calculations.js;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Date;
/**
* Represents jscript object "console"
*/
public class JSConsole {
private static final Logger LOGGER = LoggerFactory.getLogger(JSConsole.class);
/**
* console.log
* @param... |
C++ | UHC | 681 | 2.546875 | 3 | [] | no_license | // Interface for the CApplication class.
//
//////////////////////////////////////////////////////////////////////
#ifndef _APPLICATION_H_
#define _APPLICATION_H_
#include <string>
class CApplication
{
private:
CApplication();
public:
std::string m_sCls ;
HINSTANCE m_hInst ;
HWND m_hWnd ;
DWORD m_dWinStyle... |
Java | UTF-8 | 1,463 | 2.796875 | 3 | [] | no_license | package com.team766.logging;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.Date;
public interface LogEntry {
public static LogEntry deserialize(ObjectInputStream objectStream) throws IOException {
StreamTags tag = StreamTags.fromInteger(objectStre... |
JavaScript | UTF-8 | 460 | 2.515625 | 3 | [] | no_license | $(document).ready(function(){
$('#logform').submit(function(e){
e.preventDefault();
var data = $("#logform").serialize()
$.ajax({
method:'POST',
url:`/ajax/user/login`,
data:data,
}).done(function(results){
if(results.length>3){
... |
Java | UTF-8 | 2,441 | 2.265625 | 2 | [] | no_license | package com.example.cachedemo.controller;
import com.example.cachedemo.entity.User;
import com.example.cachedemo.service.UserService;
import com.example.cachedemo.service.cache.UserCacheService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
im... |
Python | UTF-8 | 1,370 | 3.390625 | 3 | [
"MIT"
] | permissive | # py-sorting <http://github.com/gwtw/py-sorting>
# Copyright 2016 Daniel Imms <http://www.growingwiththeweb.com>
# Released under the MIT license <http://github.com/gwtw/py-sorting/blob/master/LICENSE>
import math
def sort(array, radix=10):
if len(array) == 0:
return array
# Determine minimum and maximum val... |
C# | UTF-8 | 1,436 | 2.53125 | 3 | [] | no_license | using UnityEngine;
using System.Collections;
public class Music : MonoBehaviour
{
//public
// button to start music
public KeyCode play;
// button to change music track
public KeyCode changeTrack;
// value for a parameter in FMOD
public float paramValue;
//Private
// number of shells close to player
pr... |
Go | UTF-8 | 434 | 2.578125 | 3 | [] | no_license | package dataframe
func (df *DataFrame) FindHeaderIndex(name string) int {
for i, v := range df.Headers {
if v == name {
return i
}
}
return -1
}
func (df *DataFrame) FindColumnIndex(name string) int {
for i, v := range df.Headers {
if v == name {
return i - 1
}
}
return -1
}
func (df *DataFrame) ... |
Shell | UTF-8 | 2,082 | 4.40625 | 4 | [] | no_license | #!/bin/bash
set -eu
function print_usage_and_die
{
local errmsg
errmsg=${1:-}
cat >&2 << EOF
$1
usage: $0 SERVER NETDEF
Setup uniquely named xenserver network mapped to physical devices
positional arguments:
SERVER XenServer
NETDEF Network definition name:phy:vlan
Example:
Set up datac... |
PHP | UTF-8 | 330 | 2.609375 | 3 | [] | no_license | <?php
class Conexao{
public function conexao(){
try{
$conexao = new PDO('mysql:host=localhost;dbname=app_loja_virtual', 'root', '');
return $conexao;
}catch(PDOException $e){
echo '<p>' . $e->getMessage() . '</p>';
}
... |
C++ | UTF-8 | 5,971 | 3.03125 | 3 | [] | no_license | //
// SOM.h
// TinyBrain
//
// Created by Tim Omernick on 10/7/16.
// Copyright © 2016 Tim Omernick. All rights reserved.
//
#ifndef __SOM_H__
#define __SOM_H__
#include "Neuron.h"
#include <vector>
using namespace std;
// Input data is always a vector of floats.
typedef vector<float> Data;
// Label is a vecto... |
Java | UTF-8 | 1,736 | 2.265625 | 2 | [] | no_license | package com.diegovaldesjr.tennistats.model;
import android.content.ContentValues;
import com.diegovaldesjr.tennistats.data.TennistatsContract;
/**
* Created by diego on 27/11/2017.
*/
public class Saque {
int indice, idSet, zona;
String tipoSaque, tipoGolpe;
public Saque(int indice, int idSet, int zo... |
PHP | UTF-8 | 1,820 | 3.15625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: itily
* Date: 05.06.2023
* Time: 13:30
*/
namespace cryptoscan\entity;
use cryptoscan\exception\InvalidArgumentException;
/**
* Данные авторизации
*
* Class Authorize
* @package cryptoscan\entity
*/
class Authorize
{
/**
* Публичный ключ
*
* @var ... |
Python | UTF-8 | 16,425 | 2.90625 | 3 | [
"BSD-3-Clause"
] | permissive | # -*- coding: utf-8 -*-
#
# License: This module is released under the terms of the LICENSE file
# contained within this applications INSTALL directory
"""
Utility functions for model generation
"""
# -- Coding Conventions
# http://www.python.org/dev/peps/pep-0008/ - Use the Python s... |
Java | UTF-8 | 809 | 3.09375 | 3 | [] | no_license | package duration;
import java.time.Duration;
import java.time.Instant;
public class StringCreationStudies {
public long measureStringCreationTimeRequiredOnHeap(int objectsCount) {
Instant start = Instant.now();
for (int i = 0; i < objectsCount; i++) {
String s = new String("test");
... |
PHP | UTF-8 | 1,113 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Ahc\StrapiClientBundle\Resource;
class ContentProperties
{
private string $uid;
private string $name;
private string $label;
private bool $isDisplayed;
private Schema $schema;
public function __construct(
string $uid,
string $name,... |
Python | UTF-8 | 3,145 | 3.109375 | 3 | [] | no_license | import numpy as np
from .bbo_agent import BBOAgent
from .utils import top_k_inds
from typing import Callable
from multiprocessing import Pool
from functools import partial
from itertools import product
class CEM(BBOAgent):
"""
The cross-entropy method (CEM) for policy search is a black box optimization (BBO)
... |
Java | UTF-8 | 10,896 | 2.140625 | 2 | [] | no_license | package edu.courseproject.client.controller.adminPageController;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import edu.courseproject.client.action.Action;
import edu.courseproject.client.connection.ConnectionServer;
import edu.courseproject.client.entity.Worker;
import edu.courseproj... |
Java | UTF-8 | 640 | 2.34375 | 2 | [] | no_license | package oob.lolprofile.DetailsComponent.Data.Mapper;
import java.util.ArrayList;
import io.realm.RealmResults;
import oob.lolprofile.HomeComponent.Data.Model.ChampionRow;
import oob.lolprofile.HomeComponent.Domain.GetAllChampions.Model.Champion;
public class ChampionCollectionMapper {
public static ArrayList<Cha... |
Markdown | UTF-8 | 3,731 | 2.65625 | 3 | [] | no_license | #### 目标
+ 采集信息
+ 主机信息
+ CPU信息
+ 内存信息
+ 硬盘信息
+ 网卡信息
+ 实现资产变更的自动汇报
+ 代码发布系统
+ 监控
+ 服务器统计
+ 实现自动化采集
#### 方案选择
共有三种方案可供选择:
+ agent
+ 在目标机器上安装agent脚本,定期任务执行后通过requests模块将得到的信息通过API存入数据库,再通过前端页面进行展示
+ 优点:速度快,适合数量多的场景
+ 缺点:需要事先安装agent
+ ssh类
+ 创建若干个中控机,通过ssh协议(paramiko模块实现,或者使用现成的工具如Ansible)等连接目标主机,执... |
PHP | UTF-8 | 1,435 | 2.640625 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
/*
* Copyright (c) KUBO Atsuhiro <kubo@iteman.jp>,
* All rights reserved.
*
* This file is part of Stagehand_FSM.
*
* This program and the accompanying materials are made available under
* the terms of the BSD 2-Clause License which accompanies this
* distribution, and is available at http://opensource.or... |
JavaScript | UTF-8 | 10,468 | 2.765625 | 3 | [] | no_license | const API = 'https://raw.githubusercontent.com/ShutovAndrey/Study/master';
const image = 'https://placehold.it/200x150';
const cartImage = 'https://placehold.it/100x80';
//super for Catalog and Cart
class List {
constructor(url, container) {
this.container = container;
this.url = url;
... |
Markdown | UTF-8 | 1,564 | 3.0625 | 3 | [] | no_license | ### 测试请求参数映射
1. `@PathVariable`方式
1. `@RequestParam`方式
1. `@RequestBody`方式
1. 无注解方式
1. `request.getParameter`方式,纯手工
#### @PathVariable
1. 参数必须是restful格式,作为请求的链接一部分
1. 不显示映射名称时,直接使用注解修饰的形参进行映射
1. 不显示设置修饰的字段的必要性时,默认必传
1. Data类型需要DateTimeFormat
1. 正常映射boolean
#### @RequestParam
1. 既可以使用链接传参,亦可以使用body(form-data)进行传参
1. 不... |
Java | UTF-8 | 3,551 | 2.65625 | 3 | [] | no_license | package com.example.android.musicapp;
import android.graphics.drawable.Drawable;
import android.os.Parcel;
import android.os.Parcelable;
public class Song implements Parcelable {
private String genre;
private String name;
private double length;
private String mainArtist;
private String featArtist;
... |
Python | UTF-8 | 243 | 3.046875 | 3 | [] | no_license |
class A:
d=100
def __init__(self):
print("This is Constructor")
def display(self):
print("This is Display method")
def sum(self,a,b):
print a+b
def sub(self,a,b):
c= a-b
return c |
Java | UTF-8 | 23,659 | 2.015625 | 2 | [] | no_license | package org.literacybridge.acm.tbloader;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;
import org.literacybridge.acm.cloud.Authenticator;
import org.literacybridge.acm.cloud.ProjectsHelper;
import org.literacybridge.acm.cloud.ProjectsHelper.DeploymentInfo;
import org.literacy... |
JavaScript | UTF-8 | 1,050 | 2.75 | 3 | [] | no_license | // 霸都丶傲天 2019年12月24日
var config = {
// 句子的长度可以任意, 你可以写十句话, 二十句话都可以
// 每句话尽量不要超过15个字,不然展示效果可能不太好
texts: [
"送给我", //这里,每句话结尾的最后一个逗号必须是英文的哦!! 很重要哦!!
"心爱的小宝贝", // 同上...
"今天是我们重要的日子",
"这是我们相识的",
"第二个年头了哦",
"去年的今天",
"还记得在Holden干柴烈火呢",
"今年要吃好的哦... |
JavaScript | UTF-8 | 2,256 | 2.578125 | 3 | [] | no_license | /**
* Module dependencies.
*/
var request = require('superagent')
, _ = require('underscore')
, BASE_URL = 'https://coinbase.com/api/v1/account'
/**
* Module exports.
*/
module.exports = Account;
/**
* Account constructor.
*/
function Account (coinbase) {
this._coinbase = coinbase;
}
/**
* Balance function.... |
Markdown | UTF-8 | 557 | 3.03125 | 3 | [] | no_license | # British Square
British Square is a simple strategy board game, written with AppGameKit.
Developed as an introductory project to coding, I wrote this over a long summer. It's not pretty or well commented, but it functions and got me into the world of coding.
As I get ready to graduate with a degree in Computer Scienc... |
Python | UTF-8 | 1,785 | 3.375 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Sat Dec 23 14:12:50 2017
bias-variance
@author: pengxu
"""
import numpy as np
import scipy.optimize as opt
def cost(theta, X, y):
"""
X: R(m*n), m records, n features
y: R(m)
theta : R(n), linear regression parameters
"""
m = X.shape[0]
inner = X @ t... |
Java | UTF-8 | 293 | 2.484375 | 2 | [] | no_license | package annotation;
public class AnnotationDemo {
public static void main(String[] args) {
A obj=new A();
B obj2=new B();
A obj3=new B();
obj.show();
obj2.show();
obj3.show();
obj2.m1(); // here we have used @Deprecated annotation means we cannot use this method m1().
}
}
|
Java | UTF-8 | 1,414 | 2.09375 | 2 | [] | no_license | package com.sindhu.myapplication.ui.home;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;
import com.sindhu.myapplication... |
PHP | UTF-8 | 1,213 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use App\Entities\Product;
use App\Entities\Customer;
class CreateRatingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public functi... |
Python | UTF-8 | 6,139 | 2.75 | 3 | [] | no_license | # Small utility methods.
from collective.recipe.backup import config
import logging
import os
import shutil
import subprocess
import sys
try:
from builtins import input as raw_input
except ImportError:
# Python 2 has raw_input available by default.
pass
logger = logging.getLogger("utils")
# For zc.bui... |
Java | UTF-8 | 1,620 | 2.046875 | 2 | [] | no_license | package com.tf.persistance.util;
import java.io.Serializable;
import java.util.Date;
public class PaymentScheduleDTO implements Serializable {
/**
*
*/
private static final long serialVersionUID = -3416290638302892477L;
/**
*
*/
private Long id;
private String sellerName;
private Date paymen... |
C++ | UTF-8 | 292 | 3.03125 | 3 | [] | no_license | #include <iostream>
#include "Box.hpp"
int main()
{
std::cout << "Hello world" << std::endl;
Box b1(30, 50);
std::cout << "Width = " << b1.getWidth() << std::endl;
std::cout << "Height = " << b1.getHeight() << std::endl;
std::cout << "Area = " << b1.area() << std::endl;
return 0;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.