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 | 804 | 2.796875 | 3 | [] | no_license | /*
* Copyright (c) 2014 Javaranger.com. All Rights Reserved.
*/
package com.feizi.stream;
import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
/**
* @Desc
* @Author feizi
* @Date 2016/12/30 16:39
* @Package_name com.feizi.stream
*/
public class DosDemo {
public stati... |
C# | UTF-8 | 4,700 | 3 | 3 | [
"MIT"
] | permissive | using DriveDirectorySize.Domain.ValueObjects;
using DriveDirectorySize.UI.Controllers;
using DriveDirectorySize.UI.Infrastructure;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
namespace DriveDirectorySize.UI.CommandHandlers
{
public class DriveReaderC... |
Markdown | UTF-8 | 51 | 3.0625 | 3 | [] | no_license | # Bootstrap4-project3-Buliding-startup-landing-page |
Java | UTF-8 | 4,559 | 2.046875 | 2 | [] | no_license | /*
* Copyright (C) 2010 René Kijewski (rene.<surname>@fu-berlin.de)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) a... |
Markdown | UTF-8 | 6,229 | 2.71875 | 3 | [] | no_license | ---
title: "Editing"
component: "Spreadsheet"
description: "This section explains you about the editing feature in the Essential JS 2 spreadsheet."
---
# Editing
You can edit the contents of a cell directly in the cell or by typing in the formula bar. By default, the editing feature is enabled in the spreadsheet. Use... |
C# | UTF-8 | 4,974 | 2.546875 | 3 | [] | no_license | using System;
using UnityEngine;
namespace RemoteTech {
public class RoverFragment : IFragment {
private FlightComputer mFlightComputer;
private OnClick mOnClickQueue;
private bool distDefault = true;
private float
mSteering = 0,
prevTurn = 0,
... |
JavaScript | UTF-8 | 547 | 2.515625 | 3 | [] | no_license | import { baseUrl } from './core/enum';
import { getArticleLists, getData } from './components/getData';
import generate from './components/generate';
let articles = []; // 文章列表
getArticleLists(baseUrl).then(lists => {
lists.forEach(article => {
articles.push(article.name);
});
getData(lists);// 爬取... |
Python | UTF-8 | 80 | 3.65625 | 4 | [] | no_license | # Creating a tuple using ()
t = (2,3,1,4,1)
print(t.count(1))
print(t.index(1)) |
C++ | UTF-8 | 3,212 | 3.125 | 3 | [] | no_license | #include "header.h"
/* Creating a static 2Darray_Tree from filename */
struct Encoded** TreeCreation(int height, int fan_out, char* filename){
struct Encoded **level;
level = new struct Encoded*[ height ];
for( int i=0; i<height; i++)
level[i] = new struct Encoded[ power(fan_out,i) ];
FILE * fp;
char* buffer ... |
C# | UTF-8 | 756 | 3.078125 | 3 | [] | no_license | using Engine.Model;
using System;
using System.Linq;
namespace Engine.Service
{
public static class CodeMaker
{
private static int Max = Enum.GetValues(typeof(CodeColors)).Cast<int>().Max();
public static Code Create()
{
var random = new Random(Guid.NewGuid().GetHashCode())... |
C++ | GB18030 | 663 | 3.84375 | 4 | [] | no_license | // Try.cpp : Defines the entry point for the console application.
//
#include <iostream>
/*
ʹָʾʦĽṹijԱ
*/
using namespace std;
int main(int argc, char* argv[])
{
struct Teacher {
char name[64]; //
int age; //
int seniority; //
};
struct Teacher a_teacher;
// ָ룬ָʦ
struct Teacher *pTeacher = &a_t... |
Java | UTF-8 | 3,302 | 2.28125 | 2 | [] | no_license | package com.limapps.base.views;
import android.content.Context;
import android.content.res.Resources;
import android.view.Gravity;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import com.limapps.base.adapters.GenericAdapterRecyclerView;
import com.limapps.baseui.animations.GeneralAnimationsKt;... |
C++ | UTF-8 | 12,073 | 2.78125 | 3 | [] | no_license | #include "Shared.h"
#include "ApplicationMenus.h"
//-----------------------------
//ACCOUNT MODULE
//-----------------------------
void RegisterNewBankAccount()
{
Accounts accounts;
cin.ignore();
accounts.set_Name(AskAndGetInput<string>("Enter Your Name"));
accounts.set_FatherName(AskAndGetInput<string>("Enter Y... |
Markdown | UTF-8 | 3,369 | 2.796875 | 3 | [] | no_license | # splunk_internal_metrics
This is a Splunk app that transforms various Splunk generated metrics values into a metrics store. This is achieved by cloning events in the pipeline and transforming them in the process. This allows us to ingest the same event multiple times and each time it has been modified to be a little ... |
Swift | UTF-8 | 236 | 2.75 | 3 | [] | no_license | // +-------------+
// | video 2 |
// +-------------+
import UIKit
var teams = ["heros","mostrers","seekers","red","blue"]
for team in teams{
println(team)
}
for (var i = 0; i < 3; ++i){
println(teams[i])
}
|
Java | UTF-8 | 1,588 | 2.3125 | 2 | [] | no_license | package ru.geekbrains.nedovesov.main.site.at.pages;
import io.qameta.allure.Step;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.s... |
JavaScript | UTF-8 | 4,278 | 2.53125 | 3 | [] | no_license | import React, { Component } from 'react'
import Homework from '../Homework.jsx'
class HW6 extends Component {
render () {
return (
<Homework index='6'>
<ol className='base'>
<li>
<p>Let $R$ be a finite integral domain, and let $r \neq 0 \in R$. Since $R$ is finite, there exist... |
Markdown | UTF-8 | 2,477 | 2.953125 | 3 | [] | no_license | # entity-generator
Generator for C# .NET Entity Framework classes from SQL Server Database and (optionally) PowerDesigner PDM file.
It generates classes mapping the table and column names to the class and property names in the PascalCase version. For exemple a table `MY_TABLE` will generate a class `MyClass` with th... |
Java | UTF-8 | 343 | 2.515625 | 3 | [] | no_license |
/**
* Causes the client to exit
*
* @author merlin
*
*/
public class ExitCommand implements ClientCommand
{
/**
* Close down our connection to the local server and kill us cleanly
*
* @see ClientCommand#execute()
*/
@Override
public void execute()
{
DFSClient.getClientToServerImpl().shutdown();
... |
TypeScript | UTF-8 | 553 | 2.75 | 3 | [] | no_license | import { useEffect } from "react";
function useOutsideClick(ref: any, action: () => void) {
ref === undefined &&
console.error("ref is not reachable | useOutsideClick hook");
useEffect(() => {
function handleClickOutside(event: { target: object }) {
if (ref.current && !ref.current.contains(event.tar... |
Python | UTF-8 | 283 | 2.59375 | 3 | [
"MIT"
] | permissive | import time
import asyncio
from toasync import async_
@async_
def func(i):
print('Start {}'.format(i))
time.sleep(i)
print('Done {}'.format(i))
c = asyncio.gather(
func()(1),
func()(2),
func()(3)
)
loop = asyncio.get_event_loop()
loop.run_until_complete(c)
|
Markdown | UTF-8 | 6,027 | 3.375 | 3 | [] | no_license | # Testing
Some general guidelines for how we test:
- We use RSpec, not minitest. Run the specs using the `rspec` command. But you
already knew that.
- Generally, follow the guidelines at [betterspecs.org](http://betterspecs.org/).
The only one I disagree with is that "A spec description should never be
longer ... |
Rust | UTF-8 | 4,757 | 3.421875 | 3 | [] | no_license | use super::{Task, TaskId};
use alloc::task::Wake;
use alloc::{collections::BTreeMap, sync::Arc};
use core::task::Waker;
use core::task::{Context, Poll};
use crossbeam_queue::ArrayQueue;
use crate::serial_println;
/// # Executor
///
/// A much more optimized, and generally better executor than SimpleExecutor.
///
//... |
Java | UTF-8 | 1,989 | 2.296875 | 2 | [] | no_license | /*************************************************************************
* *
* EJBCA: The OpenSource Certificate Authority *
* *
* This software is... |
Go | UTF-8 | 374 | 2.625 | 3 | [] | no_license | package app
import (
"fmt"
)
func NewApp(config Config) (App, error) {
var app App
switch config.Router {
case ROUTER_GOCRAFT:
app = NewAppGoCraft()
case ROUTER_DEFAULT_TESTER:
app = NewDefaultAppTester()
default:
return nil, fmt.Errorf("Router not implemented: %s", config.Router)
}
app.InitMiddlewares... |
JavaScript | UTF-8 | 1,631 | 2.53125 | 3 | [
"MIT"
] | permissive | import * as ACTION_TYPES from "actions/Settings/SettingsActions";
const initialState = {
settings: {},
conditionalSettings: {
BULL: {},
BEAR: {},
NORMAL: {},
SUPER_BULL: {},
SUPER_BEAR: {}
}
};
const settings = (state = initialState, action) => {
switch (action.type) {
case ACTION_TYPE... |
Java | UTF-8 | 2,310 | 3.046875 | 3 | [] | no_license | package com.atguigu.lambda.constru;
import org.junit.Test;
import org.omg.CORBA.INTERNAL;
import java.util.function.Function;
import java.util.function.Supplier;
public class Test2 {
@Test
public void test01() {
/*Supplier<Employee> e = new Supplier<Employee>() {
@Override
... |
JavaScript | UTF-8 | 539 | 3.21875 | 3 | [] | no_license | const { deepStrictEqual } = require('assert');
let counter1 = 0;
let counter2 = counter1;
counter1++;
// counter2 = 0 | counter1 = 1;
const item = { counter: 0 };
const item2 = item;
item2.counter++;
// item.counter = { counter: 1 } && item2 = { counter: 1 };
// O tipo primitivo gera uma cópia em memória
deepSt... |
Java | UTF-8 | 1,333 | 2.421875 | 2 | [] | no_license | package br.com.generate;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
/**
* Created by josevieira on 11/24/16.
*/
public class ScaffoldInfoGenerate implements IGenerate {
@Override
public void generate(String... params) ... |
Python | UTF-8 | 3,395 | 2.625 | 3 | [] | no_license | # -*- coding: utf-8 -*-
from concurrent import futures
from lxml import html
from bs4 import BeautifulSoup
import urllib3
from tqdm import tqdm
import collections
import xls_reader
import re
# фУНКЦИЯ ЧТЕНИЯ ИЗ ФАЙЛОВ
def read_file(filename):
with open(filename) as input_file:
text = input_file.read()
... |
Java | UTF-8 | 8,854 | 2.328125 | 2 | [] | no_license | package model;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
import org.junit.Before;
import org.... |
Python | UTF-8 | 528 | 2.84375 | 3 | [] | no_license | nss={"global":["None"],"None":[]}
for i in(range(int(input()))):
command,space,var=input().split()
if command=="create":
nss[var].append(space)
nss[space]=[var]
elif command=="add":
nss[space].append(var)
elif command=="get":
def get(obj,ns,v):
if ns ... |
Markdown | UTF-8 | 687 | 2.6875 | 3 | [] | no_license | ---
tags:
- signal
- script
- state
---
# Destroy
## Detailed description
Called after a Vue instance has been destroyed. When this hook is called, all directives of the Vue instance have been unbound, all event listeners have been removed, and all child Vue instances have also been destroyed.
**This hook is n... |
Markdown | UTF-8 | 3,534 | 3.484375 | 3 | [] | no_license | # Raising a child to be happy
There’s a [thread in Hacker News](https://news.ycombinator.com/item?id=36159936) about global fertility rates, and unsurprisingly a few comments along the line of this one:

It _does_ little biza... |
Java | UTF-8 | 522 | 3.46875 | 3 | [] | no_license | package src.classLearn.language;
/*
* (这是定义全局变量的语法
*/
public class GlobalVar {
// 定义了全局变量
private int b;
private int [] a = new int [3];
private static int c;
public static void main(String[] args) {
// TODO Auto-generated method stub
GlobalVar loop = new GlobalVar();
for (int i : loop.a... |
C++ | UTF-8 | 3,635 | 2.65625 | 3 | [] | no_license | #ifndef _ROS_docomo_perception_ImageRecognitionCandidate_h
#define _ROS_docomo_perception_ImageRecognitionCandidate_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace docomo_perception
{
class ImageRecognitionCandidate : public ros::Msg
{
public:
float score;
... |
Markdown | UTF-8 | 2,645 | 3.015625 | 3 | [
"Apache-2.0"
] | permissive | `Kevent` is the fundamental data structure for transporting kernel events.
Each kernel event structure contains a series of canonical fields that describe the nature of the event such as its name, the process identifier that generated the event and such. The following is the list of all canonical fields.
- **Sequence... |
Java | UTF-8 | 1,908 | 1.992188 | 2 | [] | no_license | package com.kt.mail;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
/**
* Created by Vega Zhou on 2016/7/1.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class GenericMailBean {
private String template;
private String type;
private String variables;
private String sender;
... |
C++ | UTF-8 | 843 | 2.53125 | 3 | [] | no_license | #include <igl/read_triangle_mesh.h>
#include <igl/viewer/Viewer.h>
int main(int argc, char * argv[])
{
Eigen::MatrixXd VA,VB;
Eigen::MatrixXi FA,FB;
igl::read_triangle_mesh(argv[1],VA,FA);
igl::read_triangle_mesh(argv[2],VB,FB);
// Concatenate (VA,FA) and (VB,FB) into (V,F)
Eigen::MatrixXd V(V... |
Java | MacCentralEurope | 11,379 | 3 | 3 | [] | no_license | /**
* Student ID: 2002103907
* Project: Cmpe 321 Project #2 - Simple Storage Manager For DBMS
* @author Emin enay
*/
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.util.ArrayLi... |
Markdown | UTF-8 | 1,059 | 3.03125 | 3 | [] | permissive |
# QrCode
Customize and place a QR code on the creative at the required position.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**position** | [**PositionEnum**](#PositionEnum) | Sets how a QR code is being positioned in the document. |
**top** | **Str... |
TypeScript | UTF-8 | 944 | 2.796875 | 3 | [] | no_license |
export class loginCredentials{
_loginId : string;
_password : string;
_latitude : string;
_longitude : string;
constructor(loginId : string, password : string, latitude : string,longitude : string){
this.loginId = loginId;
this.password = password;
this.latitude = latit... |
Markdown | UTF-8 | 12,550 | 2.59375 | 3 | [] | no_license | ### Spring boot
Spring Boot:旨在简化创建产品级的 Spring 应用和服务,简化了配置文件,使用嵌入式web服务器
Spring Boot有四大神器,分别是auto-configuration、starters、cli、actuator,本文主要讲actuator。actuator是spring boot提供的对应用系统的自省和监控的集成功能,可以对应用系统进行配置查看、相关功能统计等。
启动项目另外两种方式:
Spring Boot,看名字就知道是Spring的引导,就是用于启动Spring的,使得Spring的学习和使用变得快速无痛。不仅适合替换原有的工程结构,更适合微服务开发。Spring ... |
JavaScript | UTF-8 | 269 | 3.078125 | 3 | [] | no_license | // innerHtML
const headline = document.querySelector(".headline");
// console.log(headline.innerHTML);
// headline.innerHTML = "<h1>Inner html changed </h1>";
// headline.innerHTML += "<button class= \"btn\"> Learn More </button>"
// console.log(headline.innerHTML);
|
Markdown | UTF-8 | 5,523 | 3.078125 | 3 | [
"MIT"
] | permissive | #  CoordiScroll
[](https://www.npmjs.com/package/coordiscroll)
[](https://github.com/jeffchiou/coordiscroll/blob/master/LICENSE)
[![Git... |
Markdown | UTF-8 | 1,519 | 2.71875 | 3 | [] | no_license | ---
title: " ABAP 截取中文字符串 "
date: 2018-06-16
draft: false
author: Small Fire
isCJKLanguage: true
categories:
- ABAP
tags:
- abaputils
---
### 截取包含中文字符串 ###
`strlen()`:只能计算包含英文字符串的长度,不能计算中文字符串的长度。
- strlen('你好啊') :输出长度为 3
`cl_abap_list_utilities=>dynamic_output_length`:计算的是字节数,可以获取精确长度。
- 传入 field = '你好啊',输... |
Java | UTF-8 | 2,883 | 1.8125 | 2 | [] | no_license | package com.gpcsoft.epp.eval.domain;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceTy... |
C# | UTF-8 | 3,524 | 2.609375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Facepunch.Steamworks
{
public partial class Client : IDisposable
{
Friends _friends;
public Friends Friends
{
get
{
if ( _friends == null )
... |
Python | UTF-8 | 3,496 | 3.09375 | 3 | [] | no_license | import csv
import numpy as np
from simplex import *
class TestSimplex(object):
def __init__(self, A, b, c, x_star, z_star=None):
self.A = self._read_csv(A) if type(A) == str else A
self.b = self._read_csv(b) if type(b) == str else b
self.c = self._read_csv(c) if type(c) == str else c
... |
PHP | UTF-8 | 2,410 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
require 'configuration.php';
require 'medoo.min.php';
require 'Toro.php';
class App {
private static $db;
private static function getDb() {
global $configuration;
if (is_null(self::$db)) {
self::$db = new medoo($configuration['db']);
}
return self::$db;
}
public static function esc... |
Markdown | UTF-8 | 3,049 | 2.984375 | 3 | [
"MIT"
] | permissive | # Atom debugger package
Debug javascript code from right within the editor: set breakpoints, step through code,
inspect variables values.
We all love (and couldn't live without) the Chrome inspector, but sometimes you just don't want
to open up your whole source tree in another browser.

{
if [ "$force" = "1" ]; then
return 0
fi
while true; do
read -p "▶️ $1 [y/n]: " yn
case $yn in
[Yy]* ) return 0;;
[Nn]* ) return 1;;
* ) echo "Please answer yes or no.";;
esac
done
}
processing ()
{
echo "\n📃 LIST: $1\n"
printf '%*s\n\n' "${COLUMNS:-$(tput cols)}" '' ... |
Java | UTF-8 | 458 | 2.703125 | 3 | [] | no_license | import java.io.File;
import java.io.InputStream;
import java.io.FileInputStream;
public class InputStreamDemo{
public static void main(String[] args) throws Exception{
File f = new File("test.txt");
InputStream ips = null;
ips = new FileInputStream(f);
//byte[] b = new byte[1024];
byte[] b = new byte[(int)f.... |
Python | UTF-8 | 582 | 3.671875 | 4 | [] | no_license | def count_upper_case(message):
count = 0
for c in message:
if c.isupper():
count += 1
return count
def count_upper_case2(message):
return sum([1 for c in message if c.isupper()])
assert count_upper_case("") == 0, "Empty string"
assert count_upper_case("A") == 1, ... |
Markdown | UTF-8 | 7,231 | 3.765625 | 4 | [
"MIT"
] | permissive | ---
layout: post
title: "Monotone Stack"
date: 2019-8-23
author: Tong
catalog: true
tags:
- Algorithm
---
### Summary
1. 单调递增还是单调递减?
2. 什么时候出栈?代表了什么含义?
3. 是否需要在input最后加上一个元素来强制所有元素出栈?
### 寻找右侧比自己大的元素
给一个数组,返回一个大小相同的数组。返回的数组的第`i`个位置的值应当是,对于原数组中的第`i`个元素,至少往右走多少步,才能遇到一个比自己大的元素(如果之后没有比自己大的元素,或... |
Java | UTF-8 | 1,465 | 2.875 | 3 | [
"MIT"
] | permissive | package sub.optimal.logger;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Date;
import java.util.logging.Formatter;
import java.util.logging.LogRecord;
/**
* answer to: http://stackoverflow.com/questions/26098817/how-to-log-to-a-file-in-java
*
* @author SubOptimal
*/
public class Custo... |
Java | UTF-8 | 45,212 | 2.015625 | 2 | [] | no_license | package Formulario;
import Clases.*;
import javax.swing.JOptionPane;
public class Inicio extends javax.swing.JFrame {
int tipo;
public Inicio() {
initComponents();
setLocationRelativeTo(null);
setResizable(false);
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate... |
Java | UTF-8 | 1,753 | 3.421875 | 3 | [] | no_license | package com.company.geonyeongkim.week5;
import java.util.*;
public class Boj11403_경로찾기 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
List<List<Integer>> list = new ArrayList<>();
// 초기화
for(int i = 0; i < n; i++) {
... |
Python | UTF-8 | 6,357 | 3.171875 | 3 | [] | no_license | from pathlib import Path
import shutil
firstInput = input()
step1Lst = ['D', 'R']
searchCharLst = ['A', 'N ', 'E ', 'T ', '< ', '> ']
step3Lst = ['F', 'D', 'T']
allFiles = []
interestingFiles = []
path1 = firstInput[2:]
firstLines = []
finalFirstLines = []
#Functions start here
def is_binary(file_name: str) -> bool:... |
Java | UTF-8 | 1,200 | 2.4375 | 2 | [] | no_license | package de.opendata.hdv.service;
import java.math.BigDecimal;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import de.opendata.hdv.domain.BalanceAccount;
import de.opendata.hdv.domain.Commune;
import de.opendata.hdv.domain.ErgebnisPosition;
import de.openda... |
Java | UTF-8 | 6,247 | 1.890625 | 2 | [] | no_license | package yinzhi.micro_client.fragment;
import java.util.ArrayList;
import yinzhi.micro_client.R;
import yinzhi.micro_client.activity.video.MyApplication;
import yinzhi.micro_client.adapter.NavDrawerListAdapter;
import yinzhi.micro_client.bean.NavDrawerItem;
import yinzhi.micro_client.network.constants.INetwork... |
Java | UTF-8 | 125 | 2.53125 | 3 | [] | no_license | package SimpleFactory;
public class Circle extends Shape {
public void draw() {
System.out.println("畫一個圓");
}
}
|
Java | UTF-8 | 1,243 | 1.859375 | 2 | [] | no_license | package com.thoughtmechanix.organization;
import com.thoughtmechanix.organization.utils.UserContextFilter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.spri... |
Swift | UTF-8 | 1,240 | 2.703125 | 3 | [] | no_license | //
// ViewController.swift
// On_The_Map
//
// Created by Aaron Phillips on 6/15/16.
// Copyright © 2016 Aaron Phillips. All rights reserved.
//
import UIKit
class LoginViewController: UIViewController {
var studentManager: StudentManager?
var client: Client?
@IBOutlet weak var emailTextField: U... |
C++ | UTF-8 | 530 | 3.078125 | 3 | [] | no_license |
#include "Collision.h"
//luckily, there's no obnoxious rotating making this difficult.
bool CheckCollisionWithRect(tdcRect one, tdcRect two) {
//one is entirely to the left of two
if (one.x + one.w < two.x) return false;
//one is entirely to the right of two
if (one.x > two.x + two.w) return false;
//one is e... |
PHP | UTF-8 | 3,572 | 3 | 3 | [] | no_license | <?php
namespace \app\Classes;
/**
*
*/
class Instituicao{
private $id_instituicao;
private $nome;
private $nome_fantasia;
private $nome_empresarial;
private $cnpj;
private $inscricao_estadual;
private $id_endereco;
private $id_telefone;
public function __construct($id_instituicao = 0,$nome= "" ,$nome_fanta... |
Markdown | UTF-8 | 4,988 | 2.609375 | 3 | [
"MIT",
"CC-BY-3.0"
] | permissive | ---
title: Nodejs가 작동하는 방법
date: '2019-11-15T13:10:37.121Z'
template: 'post'
draft: false
slug: '/nodejs/how-nodejs-works'
category: 'nodejs'
tags:
- 'nodejs'
description: 'nodejs runtime 은 몇 가지 dependency 가 있는데 그 중 가장 중요한 것이 v8 engine과 libuv이다. v8 engine이 없다면 nodejs는 javascript를 이해할 수 없다. v8 engine이 javascript 코드를 컴... |
Java | UTF-8 | 217 | 2.90625 | 3 | [] | no_license | public class Bil{
protected String skilt;
public Bil(String skilt){
this.skilt = skilt;
}
public void skrivUtInfo(){
System.out.println(getClass().getName()+": Skiltnummer: "+ skilt);
}
} |
Python | UTF-8 | 323 | 3.453125 | 3 | [] | no_license | a1=int(0)
b1=int(0)
a2=int(0)
b2=int(0)
while a1<=0:
a1 = int(input())
while b1<=0:
b1 = int(input())
while a2<=0:
a2 = int(input())
while b2<=0:
b2 = int(input())
if abs(a1-a2) == 5 and abs(b1-b2) == 2 or abs(a2-a1) == 2 and abs(b2-b1) == 5:
print("YESSSS!")
else:
print("No No")
... |
Java | UTF-8 | 4,170 | 1.929688 | 2 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | package org.apereo.cas.authentication;
import org.apereo.cas.authentication.credential.UsernamePasswordCredential;
import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.util.spring.ApplicationContextProvider;
import lombok.val;
import org.apache.commons.lang3.StringUtils;
import org.ju... |
Python | UTF-8 | 571 | 2.5625 | 3 | [
"MIT"
] | permissive | import unittest
from math import sqrt
from rfb_mc.component.eamp.eamp_edge_scheduler_base import EampEdgeSchedulerBase
class TestEampEdgeSchedulerBase(unittest.TestCase):
def test_get_g_and_lg(self):
for a in (1, 10, 100, 1000, 10000000):
g, lg = EampEdgeSchedulerBase.get_g_and_lg(a)
... |
JavaScript | GB18030 | 11,981 | 2.921875 | 3 | [] | no_license | //
;;;var iterate = function (obj){ s=""+obj+"ԣ\n"; for(i in obj) s+=i+":"+obj[i]+"\n"; return s;};
var $id=function (n)
{
return (typeof n == "string") ? document.getElementById(n) : n;
};
var SFUtil =
{
/**
* ںϲ{'name':'value',..}Ķ
* Ϊjs鲻֧ԶöĹ
*/
objMerge:function()
{
var result = {};
for(var i=0; i<argu... |
Java | UTF-8 | 3,574 | 2.25 | 2 | [] | no_license | package com.adm;
import backtype.storm.Config;
import backtype.storm.spout.SpoutOutputCollector;
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.IRichSpout;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.tuple.Fields;
import backtype.storm.tuple.Values;
import bac... |
JavaScript | UTF-8 | 1,105 | 2.640625 | 3 | [] | no_license | const Logger = requireModule('Logger').initialize(__filename);
const AudioCenter = requireModule('brain/parts/audio_center');
const SpeechCenter = requireModule('brain/parts/speech_center');
const ReasoningCenter = requireModule('brain/parts/reasoning_center');
class Brain {
constructor() {
Logger.info('Setting ... |
PHP | UTF-8 | 446 | 3.125 | 3 | [] | no_license | <?php
//$text = trim("It is not Linux, it is GNU/Linux. Linux is merely the kernel, while GNU adds the functionality. Therefore we owe it to them by calling the OS GNU/Linux! Sincerely, a Windows client");
//$bannedWords = explode(", ", trim(""));
$text = trim(fgets(STDIN));
$bannedWords = explode(", ", trim(fgets(STD... |
Python | UTF-8 | 1,247 | 3.640625 | 4 | [] | no_license | import pandas as pd
from pandas import DataFrame, Series
import numpy as np
# todo 1. 재색인 reindex.
obj_1 = Series([4.5, -6.2, 1.3, -2.8], index=['d', 'a', 'b', 'e'])
print(obj_1)
# d 4.5
# a -6.2
# b 1.3
# e -2.8
obj_2 = obj_1.reindex(['a', 'b', 'c', 'd', 'e'])
print('reindex obj_1 \n', obj_2)
# todo TypeErr... |
Java | UTF-8 | 1,771 | 2.859375 | 3 | [] | no_license | package eg.edu.guc.yugioh.gui;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridLayout;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
public class PlayersToolsPanel extends JPanel{
JLabel name;
... |
Ruby | UTF-8 | 1,754 | 2.5625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | # frozen_string_literal: true
# override aruba to filter out some stuff
module NormaliseArubaOutput
def all_stdout
all_commands.map(&:output).join("\n")
end
def sanitize_text(text)
normalise_output(super)
end
# Rubocop doesn't handle the regex values below appropriately,
# so disabling here.
# ... |
Rust | UTF-8 | 15,755 | 3 | 3 | [
"MIT"
] | permissive | use crate::builder::Options;
use crate::error::Error;
use crate::expressions::{
COMPARATOR, COMPARATOR_LOOSE, COMP_REPLACE_CARETS, COMP_REPLACE_CARETS_LOOSE,
COMP_REPLACE_STARS, COMP_REPLACE_TILDES, COMP_REPLACE_TILDES_LOOSE, COMP_REPLACE_XRANGES,
COMP_REPLACE_XRANGES_LOOSE,
};
use crate::operator::Operator... |
Python | UTF-8 | 950 | 3.953125 | 4 | [] | no_license | #!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element
twice.
<p>
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0... |
Markdown | UTF-8 | 1,141 | 3.03125 | 3 | [] | no_license |
This repository was cloned from **[https://github.com/larryevolveu/reference](https://github.com/larryevolveu/reference)**.
# Competency 910B – git - Multi-User
### Lecture - git - Your code to the Repository
**Instructions**
For this exercise, we will move the code you have written so far into a GitHub reposit... |
TypeScript | UTF-8 | 158 | 2.75 | 3 | [] | no_license | type Function<T> = T extends (...args: any[]) => any ? T : never;
export default <T extends {}>(prop: T): prop is Function<T> => typeof prop === 'function';
|
Java | UTF-8 | 1,802 | 2.09375 | 2 | [] | no_license | package modelo.grlGeneral.entidad;
public class CEComponenteAccion
{
private int IdComponenteAccion;
private int IdComponente;
private int IdAccion;
private boolean isEnabled;
private String Descripcion;
private String Nombre;
private String Componente;
public int getIdComponenteA... |
Java | IBM852 | 2,253 | 2.203125 | 2 | [] | no_license |
package it.cineca.u_gov.co.ws;
import java.math.BigDecimal;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Classe Java per totScrAutSchBudDTO complex type.
*
* <p>Il seguente frammento di schema spe... |
Python | UTF-8 | 7,847 | 3.84375 | 4 | [] | no_license | import random
from random import randint
class Player:
# Инициализация характеристик игрока
def __init__(self):
self.hit_points = 100
self.max_hit_points = 100
self.damage = 1
self.heal_hit_points = 1
# Выбор действия для игрока :
def damage_an... |
Java | UTF-8 | 983 | 2.171875 | 2 | [] | no_license | /*
* Created on May 29, 2009
*/
package com.tsa.puridiom.labels.tasks;
import java.util.*;
import org.hibernate.Hibernate;
import org.hibernate.type.Type;
import com.tsagate.foundation.database.DBSession;
import com.tsagate.foundation.processengine.Task;
import com.tsagate.foundation.utility.Utility;
public class ... |
C | GB18030 | 458 | 4.4375 | 4 | [] | no_license | //Ŀ:õݹ麯÷ʽ5ַ෴˳ӡ
#include<stdio.h>
void print(int i);
void main(void)
{
int i=5;
printf("5ַ: ");
print(i);
printf("\n");
}
void print(int i)
{
char next;
if(i<=1)
{
next = getchar();
printf("෴ķ: ");
putchar(next);
}
else
{
next = getchar(); //õݹջ任˳
print(i-1);
putchar(next);
}
}
|
Java | UTF-8 | 4,663 | 2.375 | 2 | [] | no_license | package com.example.apptattoo.model;
import android.util.Log;
import com.example.apptattoo.helper.ConfiguracaoFirebase;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.Exclude;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
public class Usuari... |
PHP | UTF-8 | 4,560 | 2.78125 | 3 | [] | no_license | <?php
// include function files for this application
require_once('includes/all_includes.php');
do_html_header('Member Profile:');
try{
// start session which may be needed later
session_start();
// register session variable
$username = $_SESSION['valid_user'];
if(empty($username))
{
echo "You... |
JavaScript | UTF-8 | 2,815 | 2.734375 | 3 | [] | no_license | let painting;
var bg;
function preload() {
let url =
'https://www.metmuseum.org/api/collection/collectionlisting?%20%201800-1900&q=Vincent%20van%20gogh&perPage=20&offset=0&pageSize=0&sortBy=Relevance&sortOrder=asc&searchField=ArtistCulture&showOnly=openAccess';
painting = loadJSON(url);
bg = loadImage("... |
Java | UTF-8 | 489 | 2.625 | 3 | [] | no_license | package pt.tecnico.mydrive.exception;
public class OutDatedUserException extends MyDriveException {
private static final long serialVersionUID = 1L;
private String _name;
public OutDatedUserException(String name){
_name=name;
}
public String getName() {
return _n... |
C# | UTF-8 | 1,438 | 2.640625 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// The loading animation of the load symbol
/// </summary>
public class LoadingAnimation : MonoBehaviour {
// Indivdual bars of the loading symbol
private Image[] bars;
// Bar flicker rate
... |
Java | UTF-8 | 1,632 | 2.140625 | 2 | [] | no_license | package com.jk.storm_stat.jkss.areaStat_dev.spout;
import backtype.storm.spout.SpoutOutputCollector;
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.topology.base.BaseRichSpout;
import backtype.storm.tuple.Fields;
import backtype.storm.tuple.Values... |
Markdown | UTF-8 | 3,738 | 2.96875 | 3 | [] | no_license | # Interoperable Adhocracy
Before we attempted to describe the ideal features that single governance should have.
What if any governance system could interact with any other governance? How this ecosystem should look like. What would it enable.
### Why adhocracy?
_Governance_ is a broad concept very loosely used. The... |
Markdown | UTF-8 | 1,212 | 2.65625 | 3 | [] | no_license | ## About TrainCRUD
TrainCRUD is a web application built by Joshua Stocks (u1757754) for Assignment 1 of the module Advanced Web Programming (CHT2520).
## Set up
To set up and run TrainCRUD do as follows:
- Clone this repo using the following command: `git clone git@github.com:advanced-web/crud-application-J-Stocks.git... |
Java | UTF-8 | 2,913 | 2.203125 | 2 | [] | no_license | package com.teammetallurgy.atum.integration.theoneprobe;
import com.teammetallurgy.atum.blocks.base.BlockAtumDoor;
import com.teammetallurgy.atum.blocks.vegetation.BlockDate;
import com.teammetallurgy.atum.utils.Constants;
import mcjty.theoneprobe.api.*;
import net.minecraft.block.state.IBlockState;
import net.minecra... |
Java | UTF-8 | 3,783 | 1.882813 | 2 | [] | no_license | /* */ package org.apache.axis.wsdl.symbolTable;
/* */
/* */ import javax.xml.namespace.QName;
/* */
/* */ public class Parameter
/* */ {
/* */ public static final byte IN = 1;
/* */ public static final byte OUT = 2;
/* */ public static final byte INOUT = 3;
/* */ privat... |
Python | UTF-8 | 563 | 3.15625 | 3 | [] | no_license | #https://www.hackerrank.com/challenges/encryption
import math
from itertools import zip_longest
text = "feedthedog"
low = math.floor(math.sqrt(len(text)))
high = math.ceil(math.sqrt(len(text)))
newText = []
for ind, char in enumerate(text):
if ind ==0:
newText.append(list(text[0:high]))
if ind%high=... |
C# | UTF-8 | 1,203 | 3.46875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
namespace Сollection
{
class Program
{
static void Main(string[] args)
{
Books b1 = new Books(1, "Дюна", "Фантастика");
Books b2 = new Books(2, "Мы", "Фантастика");
... |
Java | UTF-8 | 422 | 2.859375 | 3 | [] | no_license | package SetA;
import java.util.Scanner;
public class A750_NewYearAndHurry {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int k = scanner.nextInt();
int rem = 240 - k;
int i = 0;
while (i <= n && rem >=... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.