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 | 2,591 | 2.34375 | 2 | [] | no_license | package zhaohad.glpath.multiscreen.obj;
import android.content.Context;
import android.opengl.GLES30;
import zhaohad.glpath.multiscreen.R;
import zhaohad.glpath.multiscreen.gl.ShaderProgram;
import zhaohad.glpath.multiscreen.gl.VertexBuffer;
import zhaohad.glpath.multiscreen.util.ShaderUtils;
public class Table {
... |
PHP | UTF-8 | 2,234 | 2.796875 | 3 | [] | no_license | <?php
namespace netForum\xWeb\Xml\Generated;
class GetQuery
{
/**
* @var string $szObjectName
*/
protected $szObjectName = null;
/**
* @var string $szColumnList
*/
protected $szColumnList = null;
/**
* @var string $szWhereClause
*/
protected $szWhereClause = nu... |
Python | UTF-8 | 1,899 | 3.1875 | 3 | [] | no_license | import time
import tkinter as tk
sudoku = [[],[],[],[],[],[],[],[],[]]
backtracks=0
window=tk.Tk()
t=""
def isValid(row,col,n):
for i in range(0,9):
if sudoku[row][i]==n:
return False
for i in range(0,9):
if sudoku[i][col]==n:
return False
sub_row=(row//3)*3
sub... |
Java | UTF-8 | 2,606 | 3.59375 | 4 | [] | no_license | package butte.emily.casinoproject;
import java.util.ArrayList;
/**
* Created by emilybutte on 10/12/16.
*/
public class Hand {
ArrayList<Card> currentHand = new ArrayList<>();
public void clear() {
currentHand.clear();
}
public void addCard(Card card) {
if(card == null) {
... |
C++ | GB18030 | 795 | 3.046875 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
int num[100005];
int ex[100005];
int main(int argc, char *argv[]) {
int index = 0;
int a, b;
bool flag = false;//Ƿг
while(scanf("%d %d", &a, &b) != EOF)
{
index++;
num[index] = a * b;//ϵ
if(b != 0)
{
ex[index] = b - 1;//ָ-1
}
else
{
ex[index]... |
TypeScript | UTF-8 | 1,969 | 2.84375 | 3 | [] | no_license | import moment from 'moment';
import { IssueType } from 'types/Issue';
export function TimeFromNow(date: Date): string {
return moment(date).fromNow();
}
export function IssueColor(type: IssueType): string {
switch (type) {
case IssueType.ISSUE:
return '#28a745';
case IssueType.PR:
return '#6f4... |
C | UTF-8 | 757 | 3.46875 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#define TAILLE 10
int rechercheDico(int *tab, int debut, int fin, int valeur){
int milieu = (debut + fin) / 2;
printf("milieu = %d \n", milieu);
if(debut == milieu){
if(tab[debut] == valeur)
return milieu;
else
return -1;
}
if(valeur <= tab[mi... |
Markdown | UTF-8 | 799 | 2.921875 | 3 | [] | no_license | # LetsTryInfix
this branch describe about how to use infix function in kotlin
# what is infix?
infix merupakan salah satu spesial method yang disediakan pada bahasa pemrograman kotlin
cara pembuatan method infix cukup mudah hanya buat seperti berikut :
infix fun TipeObject.namaMethod(parameternyaApa){<br/>
//do... |
Shell | UTF-8 | 989 | 2.90625 | 3 | [] | no_license | #!/bin/sh
FSLDIR=/opt/ni_tools/fsl
. /opt/ni_tools/fsl/etc/fslconf/fsl.sh
PATH=$FSLDIR/bin:$PATH
export FSLDIR PATH
#location of subject data
DATA_ROOT=/Volumes/Phillips/P5/subj
FEAT_TEMPLATE_PATH=/Volumes/Phillips/P5/scripts/design/template_L1_WM_delay_PPI_R1.fsf
#your seed ROI
reg="RBA40"
ID="11358_20150129"
#113... |
Java | UTF-8 | 2,621 | 1.945313 | 2 | [] | no_license | package com.iesvirgendelcarmen.dam.peliculasapp;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.EditTex... |
Python | UTF-8 | 1,450 | 3.828125 | 4 | [] | no_license |
#String
nama_depan = 'Arie'
nama_belakang = 'Rafli'
nama = nama_depan + " " + nama_belakang
umur = 21
hobi = 'Lari'
print('Biodata:\n', nama, "\n", umur, "\n", hobi)
#Integer
panjang = 10
lebar = 20
luas = panjang + lebar
print(luas)
#Booleran
nama = 'shift'
usia = 22
suda_menikah = False
print('n... |
Python | UTF-8 | 175 | 3.28125 | 3 | [] | no_license | n = int(input())
al = list(map(int, input().split()))
cnt = 0
for i in range(n):
tmp = al[i]
if al[tmp-1] == i+1:
cnt += 1
else:
pass
print(cnt//2) |
Markdown | UTF-8 | 858 | 3.15625 | 3 | [] | no_license | # Rework - Jason Fried
## Ignore the real world
**_That would never work in the real world.” You hear it all the time when you tell people about a fresh idea._**
"The real world isn’t a place, it’s an excuse. It’s a justification for not trying. It has nothing to do with you."
## Learn from mistakes is overrated
*... |
C++ | UTF-8 | 270 | 2.734375 | 3 | [] | no_license | #include <iostream>
class Point {
private:
int x;
int y;
public:
Point(int pos_x, int pos_y);
};
class Geometry {
private:
Point* point_array[100];
public:
Geometry(Point **point_list);
Geometry();
void AddPoint(const Point &point);
void PrintDistance();
} |
JavaScript | UTF-8 | 886 | 2.984375 | 3 | [
"MIT"
] | permissive | function print(mat) {
let { a, b, c, d } = mat
console.log(`
a: ${a.toFixed(2)}
b: ${b.toFixed(2)}
c: ${c.toFixed(2)}
d: ${d.toFixed(2)}
`)
}
function moveit() {
let { cx: x0, cy: y0 } = or.rbox(svg)
let { cx: x1, cy: y1 } = b1.rbox(svg)
let { cx: x2, cy: y2 } = b2.rbox(svg)
let m = ne... |
Java | UTF-8 | 881 | 2.078125 | 2 | [
"Apache-2.0"
] | permissive | package com.eoi.marayarn;
import com.eoi.marayarn.http.HandlerFactory;
public interface ApplicationMasterPlugin {
/**
* name of plugin
*/
String name();
/**
* return HandlerFactory for http handler
* @return
*/
HandlerFactory handlerFactory();
/**
* return an executo... |
Java | UTF-8 | 2,647 | 2.1875 | 2 | [] | no_license | package com.example.springboot_quartz.testcase;
import com.example.springboot_quartz.base.CaseBase;
import com.example.springboot_quartz.model.po.MailPo;
import com.example.springboot_quartz.resp.Result;
import com.example.springboot_quartz.service.MailService;
import com.fasterxml.jackson.databind.ObjectMapper;
impor... |
Java | UTF-8 | 2,225 | 2.6875 | 3 | [] | no_license | package org.daisy.pipeline.job.impl.fuzzy;
import org.daisy.common.fuzzy.InferenceEngine;
import org.daisy.common.priority.PrioritizableRunnable;
import org.daisy.common.priority.PriorityCalculator;
import com.google.common.base.Supplier;
import com.google.common.primitives.Doubles;
/**
* Computes its final prior... |
Java | UTF-8 | 2,381 | 2.53125 | 3 | [] | no_license | package iiAplication;
import mario.order.OrderParser;
import mario.xml.XMLParser;
/***
*
*/
public class Tests extends Thread {
private static final String LINES = "\n ---------------------------";
private static final String SUCCESS="() test successful!";
public Tests() {
xmlTest();
/... |
Java | UTF-8 | 1,090 | 2.65625 | 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 Servlets.AdminServlets;
import AdminModule.Admin;
import java.io.IOException;
import javax.servlet.ServletException;
... |
C | UTF-8 | 3,679 | 3.3125 | 3 | [
"BSD-2-Clause"
] | permissive | /* _test_memory2.c: test the correctness of upc_global_alloc function.
Date created : September 19, 2002
Date modified : November 4, 2002
Function tested: upc_global_alloc
Description:
- Test the correctness of upc_global_alloc(). There are 2 parts in this test case.
- 1st part:
... |
Java | UTF-8 | 2,559 | 2.15625 | 2 | [] | no_license | package com.quadriyanney.aacc;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import org.json.JSONArray;
import org.json.JSO... |
Java | UTF-8 | 1,959 | 2.25 | 2 | [
"Apache-2.0"
] | permissive | package org.sagebionetworks.repo.model.dbo.dao.table;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.util.Date;
import org.junit.jupiter.api.Test;
import org.sagebionetworks.repo.model.dbo.persistence.table.DBOTableRowC... |
C | SHIFT_JIS | 492 | 3.09375 | 3 | [] | no_license | #include <stdio.h>
void func1();
void func2();
// GLOBAL
int data = 128;
int main ()
{
func1();
func2();
func2();
return 0;
}
void func1() {
// [JϐîݗLj
// sɏ
auto int a = 1;
printf("global %d local %d\n", data, a);
}
void func2() {
// [JϐîݗLj
// slێ
static int b = 1;
printf("globa... |
Java | UTF-8 | 1,621 | 2.671875 | 3 | [] | no_license | package com.database;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class Program
{
private static Connection conn;
private static Str... |
Go | UTF-8 | 148 | 3.296875 | 3 | [] | no_license | package main
import "fmt"
func setSum(a, b int, c *int) {
*c = a + b
}
func main() {
var otvet int
setSum(3, 4, &otvet)
fmt.Println(otvet)
}
|
C++ | UTF-8 | 2,183 | 3 | 3 | [] | no_license | #pragma once
#include "CEntity.h"
#include <fstream>
#include <string>
#include <list>
#include <memory>
#include <ctime>
/**
* @class CGameSaver
* @brief CGameSaver saves entities to specified file and appends save index file
* CGameSaver is ready to save tower (available) and enemies. Currently saving of enemies... |
Python | UTF-8 | 154 | 3.265625 | 3 | [] | no_license | tuple = [("Jon", 15), ("Ned", 45), ("Arya", 9), ("Catelyn", 44), ("Bran", 10)]
for i in range(len(tuple)):
if tuple[i][1] > 18:
print(tuple[i][0])
|
Python | UTF-8 | 1,571 | 2.65625 | 3 | [] | no_license | import pandas as pd
import numpy as np
import sklearn.preprocessing
from sklearn.preprocessing import MinMaxScaler
from sklearn.feature_selection import mutual_info_classif
dataset = pd.read_csv('maline_fvt2.csv')
#print(dataset.head)
X = dataset.iloc[:, 1:105].values
y = dataset.iloc[:,0].values
#p... |
Markdown | UTF-8 | 2,117 | 2.90625 | 3 | [] | no_license | # Check list for QA process
- [ ] Introduction To Project
- [x] (*nshaver*) Does the document have an introduction?
- [x] (*nshaver*) Is it formed corectly and properly described?
- [x] (*nshaver*) Does it provide context?
[ ] Spelling and Grammar? nshaver: need a comma after study in the intro
- [ ] Code Se... |
Markdown | UTF-8 | 925 | 3.296875 | 3 | [] | no_license | # SampleFunctionApp
Created for Aspire Training to introduce freshers to Azure functions (HTTP and Timer trigger).
The solution contains two projects -
i. Timer trigger function app: Logs the time this function is called based on the interval set.
ii. Http trigger function app: Sample app to add two whole numbers whic... |
C++ | UTF-8 | 386 | 3 | 3 | [] | no_license | #include <stdio.h>
int main ()
{
int marks ;
printf("enter the marks:");
scanf("%d",&marks);
if(marks>=85)
{
printf("Grade A");
}
else if (marks>=70)
{
printf ("Grade B");
}
else if( marks>=55)
{
printf("Grade C");
}
else if (marks>=40)
{
printf("Gra... |
Java | UTF-8 | 2,338 | 2.5 | 2 | [] | no_license | package com.filter;
import java.io.IOException;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import com.opensymphony.xwork2.uti... |
Rust | UTF-8 | 3,106 | 2.859375 | 3 | [] | no_license | use objc_foundation::NSObject;
use super::{AvCaptureDeviceInput, AvCaptureVideoDataOutput};
/// You use an `AVCaptureSession` object to coordinate the flow of data from AV input
/// devices to outputs.
pub struct AvCaptureSession {
obj: *mut NSObject,
pub inputs: Vec<AvCaptureDeviceInput>,
pub outputs: Vec<AvCaptu... |
PHP | UTF-8 | 3,778 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Libraries\Cells\Service\Business;
use App\Libraries\Abstracts\Base\Cell as CellBase;
use App\Exceptions\Business\ServiceExceptionCode;
use App\Exceptions\Jwt\AuthExceptionCode;
use App\Libraries\Instances\Router\Janitor;
use App\Entities\Member\Auth as Member;
use TokenAuth;
use StorageSignature;
... |
JavaScript | UTF-8 | 2,765 | 2.59375 | 3 | [
"MIT"
] | permissive | /* */
(function(Buffer) {
'use strict';
function objectToString(o) {
return Object.prototype.toString.call(o);
}
var util = {
isArray: function(ar) {
return Array.isArray(ar) || (typeof ar === 'object' && objectToString(ar) === '[object Array]');
},
isDate: function(d) {
return type... |
JavaScript | UTF-8 | 1,535 | 2.59375 | 3 | [] | no_license | service_id = param = window.location.search.substring(1);
$.ajax({
url: 'lib/get-store.php',
method: 'POST',
data: {service_id:service_id},
cache: false,
success: function(data){
$('.card-title').text(data[0]['product_title']);
$('.price').text('Strating Price $'+data[0]['product_price']);
$('.card-text').h... |
Python | UTF-8 | 365 | 2.875 | 3 | [
"MIT"
] | permissive | import gym
import numpy as np
env = gym.make('LunarLander-v2')
env.reset()
train_steps = int(1e4)
reward_per_ep = []
for _ in range(train_steps):
_, r, _, _ = env.step(env.action_space.sample()) # take a random action
reward_per_ep.append(r)
env.close()
average_reward_per_ep = np.mean(reward_per_ep)
print... |
Java | UTF-8 | 5,007 | 1.851563 | 2 | [
"Apache-2.0"
] | permissive | package com.example.creation.admin.restapi;
import com.example.creation.admin.annotion.AuthorityVerify.AuthorityVerify;
import com.example.creation.admin.annotion.AvoidRepeatableCommit.AvoidRepeatableCommit;
import com.example.creation.admin.annotion.OperationLogger.OperationLogger;
import com.example.creation.base.e... |
Markdown | UTF-8 | 1,584 | 3.03125 | 3 | [
"MIT"
] | permissive | # Overview of TRiBot Forum Bumper (TFB)
To be ran continuously, will log in to the specified forum account (in data/credentials file), and bump the specified threads. TRiBot has a 4 hour interval between forum bumps.
### Architecture
- Language: [Python](https://www.python.org/)
- Libraries / Modules:
- [cloudflar... |
Java | UTF-8 | 423 | 2.265625 | 2 | [] | no_license | /**
* Copyright 2014-2015, NetEase, Inc. All Rights Reserved.
*
* Date: 2017年5月12日
*/
package com.example.demo;
/**
* Desc:TODO
*
* @author wei.zw
* @since 2017年5月12日 下午8:32:15
* @version v 0.1
*/
public class ForASMTestClass {
private String name;
private String value;
public void display1() {
Syst... |
Python | UTF-8 | 3,907 | 2.796875 | 3 | [] | no_license | """Implementation based on NEAT-Python neat-python/neat/population.py:
https://github.com/CodeReclaimers/neat-python/blob/master/neat/population.py"""
import neuroevolution.reporting as reporting
from neuroevolution.utils import mean
class CompleteExtinctionException(Exception):
pass
class Population:
... |
Java | UTF-8 | 1,202 | 2.4375 | 2 | [] | no_license | package monster.resp;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@WebSe... |
Python | UTF-8 | 6,455 | 3.09375 | 3 | [] | no_license | '''
功能:本程序能将target_file_path下的所有的纯数字的图片,通过确定图片号码num_fill_pic来除去人像,但target_file_path目录下
每张纯数字图片必须存在一张纯数字_predict目标分割图片与之对应,如原图为0.jpg,必须存在0_predict.jpg本程序才能正常运行。
'''
import cv2, os
import numpy as np
import time
target_file_path = './result/test/'
num_fill_pic = 10 # 用来填充的图片序号0-?
image_width = 512
image_height = 512
g_r... |
Markdown | UTF-8 | 11,183 | 2.921875 | 3 | [] | no_license |
Chapter 6: curriculum: Art/Architecture
---------------------------------------
[Art/Architecture](../category/curriculum/artarchitecture/index.html)
---------------------------------------------------------------------
Oscar Niemeyer
==============
One of the most depressing aspects of travel is finding that the ... |
Markdown | UTF-8 | 2,593 | 3.125 | 3 | [] | no_license | ### 2장 기본 select
#### 테이블의 구조 보기
```
desc emp
desc dept
```
#### 기본 Select하기
select * from 테이블명 ;
```
select * from emp;
select * from dept;
```
#### system보기
```
show user
```
#### emp 테이블에서 이름과 급여를 조회하세요.
```
select ename, sal
from emp;
```
#### 사원의 이름과 월급, 월급을 200원 인상한다면 얼마가 될지 조회하세요.
```
se... |
C++ | GB18030 | 3,504 | 2.53125 | 3 | [] | no_license | #pragma once
#include <vector>
class DialogPlus :public CDialogEx
{
DECLARE_DYNAMIC(DialogPlus)
public:
typedef enum
{
RENDER_COMMAND_BEGIN = WM_USER, //Ⱦʼ
RENDER_SAVE_IMAGE, // ͼ
RENDER_LOAD_IMAGE, // ͼ
RENDER_EXIT, // ˳
RENDER_ZOOM_ORIGIN_IMAGE, // ͼԭʼߴ
RENDER_ZOOM_FIT_IMAGE, // ͼӦ
RENDER_ZOOM_IN_... |
Java | UTF-8 | 682 | 3.015625 | 3 | [] | no_license | package ca.mcmaster.oopdesign.visitor;
/**
* @author SeanForFun E-mail:xiaob6@mcmaster.ca
* @date Jul 11, 2018 3:21:40 PM
* @version 1.0
*/
public class Boss implements AccountBillViewer {
private double totalIncome;
private double totalConsume;
@Override
public void view(ConsumerBill bill) {
totalConsume += ... |
C++ | UTF-8 | 2,593 | 2.796875 | 3 | [] | no_license | //============================================================================
// Name : file_client.cpp
// Author : Lars Mortensen
// Version : 1.0
// Description : file_client in C++, Ansi-style
//============================================================================
#include <iostream>
#includ... |
Python | UTF-8 | 537 | 2.5625 | 3 | [] | no_license | #!/usr/bin/env python
#coding=utf-8
import time
import demonhandler
##################################################################
# Runs different tasks once in a hour. #
##################################################################
while(True):
print("Awoken!")
... |
PHP | UTF-8 | 352 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Multi\User\Role;
class Parse
{
public function __invoke(string $role): Role
{
switch ($role) {
case Collaborator::COLLABORATOR:
return new Collaborator();
case Administrator::ADMINISTRATOR:
return new Adm... |
Go | UTF-8 | 896 | 2.796875 | 3 | [
"MIT"
] | permissive | // Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package rand
import (
"bytes"
"compress/flate"
"io"
"testing"
)
func TestRead(t *testing.T) {
var n int = 4e6
if testing.Short() {
n = 1e5
}
b := m... |
Markdown | UTF-8 | 500 | 2.96875 | 3 | [] | no_license | ### About Me
Hello. I'm Shayna Conner. I'm a senior at Western Oregon University and this page is to showcase projects and assignments that I will complete as part of the Software Engineering series (CS 460, 461, and 462).
---
### Software Engineering Series Assignments
* [CS 460 - Software Engineering I](CS460/READ... |
Markdown | UTF-8 | 2,037 | 3 | 3 | [] | no_license | # @karcass/migration-commands
<a href="https://github.com/karcass-ts/cli-service">CliService</a> commands for creation, doing and undoing TypeORM migrations.
This commands included by default in <a href="https://github.com/karcass-ts/karcass">karcass</a>.
## Installation
```
npm install @karcass/migration-commands
`... |
Swift | UTF-8 | 1,239 | 2.84375 | 3 | [] | no_license | //
// DataViewController.swift
// Midterm
//
// Created by Locker,Todd (TRL43) on 11/2/16.
// Copyright © 2016 Locker,Todd. All rights reserved.
//
import UIKit
class DataViewController: UIViewController {
@IBOutlet weak var dataLabel: UILabel?
var dataObject: String = ""
@IBOutlet weak var innerLabe... |
Markdown | UTF-8 | 888 | 2.625 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "How it Feels"
comments: false
date: 2020-03-11 12:00:00 -0500
categories: general
draft: false
---
As crazy as this entire week has been, today feels like the turning point. The day we'll never forget.
In the last hour:
* Donald Trump gave a disastrous speech meant to reassure the country... |
Java | UTF-8 | 333 | 1.742188 | 2 | [] | no_license | package isola.model.html.basic;
import isola.constants.MimeTypes;
public abstract class JavascriptCode extends Script {
/**
*
* Default constructor
*/
public JavascriptCode() {
super(MimeTypes.text_javascript);
}
/**
*
* This method must be implemented by all scripts.
*/
public abstract String ... |
Ruby | UTF-8 | 2,382 | 2.59375 | 3 | [] | no_license | require 'open-uri'
require 'json'
def brands_filename
File.expand_path("../phone_brands.json", __FILE__)
end
def models_filename
File.expand_path("../phone_models.json", __FILE__)
end
def details_filename
File.expand_path("../phone_details.json", __FILE__)
end
open("http://www.handsetdetection.... |
Swift | UTF-8 | 589 | 3.3125 | 3 | [] | no_license | /* Given a non-empty array of integers, return the k most frequent elements.
Example 1:
Input: nums = [1,1,1,2,2,3], k = 2
Output: [1,2]
Example 2:
Input: nums = [1], k = 1
Output: [1]
Note:
You may assume k is always valid, 1 ≤ k ≤ number of unique elements.
Your algorithm's time complexity must be better than O(n... |
Java | UTF-8 | 742 | 3.90625 | 4 | [] | no_license | package com.trainee.aizaz.java;
import java.util.ArrayList;
import java.util.ListIterator;
/**
* The purpose of this class is to get collection objects one by one
* in reverse oder using cursors.
*/
public class TraversingInCollections {
public static void main(String args[]) {
ArrayList<String> al = new... |
C++ | UTF-8 | 382 | 3.28125 | 3 | [
"MIT"
] | permissive | #include <iostream>
#include <string>
// #include <iterator>
// #include <algorithm>
// #include <numeric>
using namespace std;
void swap(int[]);
main()
{
int a[] = {3, 8};
swap(a);
cout << "main: " << a[0] << " " << a[1] << "\n";
return 1;
}
void swap(int a[])
{
int temp = a[0]; a[0] = a[1]; a[1]... |
C# | UTF-8 | 2,508 | 3.234375 | 3 | [] | no_license | using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpgaveFlexyBox;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OpgaveFlexyBox.Tests
{
[TestClass()]
public class ToolsTests
{
[TestMethod()]
public void ... |
C# | UTF-8 | 650 | 2.765625 | 3 | [
"MIT"
] | permissive | using TMPro;
/// <summary>
/// Handles UI, updating general texts and other elements
/// </summary>
public class UIManager : Singleton<UIManager>
{
public TextMeshProUGUI GoldText;
/// <summary>
/// Update gold text when gold changes
/// </summary>
/// <param name="gold"></param>
public void ... |
Python | UTF-8 | 1,144 | 2.796875 | 3 | [] | no_license | from subdomains.date_handler import DateHandler
from subdomains.plate import LicensePlate
from services.settings_handler import SettingsHandler
from services.time_methods import is_time_in_range
class Predictor:
def __init__(self,date_n_time,plates,mode="production") -> None:
self.date_n_time=DateHandler(d... |
C++ | UTF-8 | 479 | 3.578125 | 4 | [] | no_license | /*
Given a Singly Linked List of size N, delete all alternate nodes of the list.
Example 1:
Input:
LinkedList: 1->2->3->4->5->6
Output: 1->3->5
Explanation: Deleting alternate nodes
results in the linked list with elements
1->3->5.
Example 2:
Input:
LinkedList: 99->59->42->20
Output: 99->42
*/
// TC-O(N) SC-O(... |
JavaScript | UTF-8 | 3,024 | 2.71875 | 3 | [] | no_license | import React from 'react';
import ItemList from '../item-list';
import { withData, withSwapiService } from '../hoc-helpers';
// =============================================================================
/**
* Компонент (функция) высшего порядка - HOC;
* В первом параметре принимает компонент со списком собственн... |
Java | UTF-8 | 13,157 | 1.710938 | 2 | [] | no_license | package com.ziploan.team.verification_module.borrowerdetails.credit;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.CardView;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
... |
Markdown | UTF-8 | 1,586 | 2.625 | 3 | [] | no_license | # Article R353-165
I.-Sans préjudice des dispositions des articles L. 353-6 et L. 353-12, en cas de non-respect par le bailleur au sens du I de
l'article R. 353-159, des engagements prévus par la convention, le préfet peut, après avoir mis le gestionnaire en mesure de
présenter ses observations, prononcer des pénalité... |
Markdown | UTF-8 | 16,117 | 3.03125 | 3 | [] | no_license | ---
layout: post
title: Hadoop系列(5)之容量调度器Capacity Scheduler配置
date: 2016-02-01 10:30:35
categories: 大数据
tags: Hadoop
---
## 1. 应用场景
本文只关注配置,关于调度器的算法以及核心内容将在下一篇介绍。
Capacity Scheduler是YARN中默认的资源调度器,但是在默认情况下只有root.default 一个queue。而当不同用户提交任务时,任务都会在这个队里里面按优先级先进先出,大大影响了多用户的资源使用率。现在公司的任务主要分为三种:
* 每天晚上进行的日常任务dailyTask,这些任务需... |
PHP | UTF-8 | 1,066 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\BookRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ApiResource()
* @ORM\Entity(repositoryClass=BookRepository::class)
*/
class Book
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(name="`id`",ty... |
SQL | UTF-8 | 4,087 | 3.234375 | 3 | [
"Apache-2.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 06-05-2020 a las 12:15:38
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... |
Python | UTF-8 | 79 | 2.765625 | 3 | [] | no_license | student={"name":"ashwin","age":23}
print(student['name'])
print(student["age"]) |
Java | UTF-8 | 1,142 | 2.328125 | 2 | [] | no_license | package com.company.spring_rest_app.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.SessionAttribute;
import javax.servlet.http.HttpSession;
import java.time... |
PHP | UTF-8 | 4,203 | 2.90625 | 3 | [] | no_license | <?php
require_once './Util/DataSource.php';
require_once './Util/Usuario.php';
class OperacoesBanco {
private $linkDB;
function __construct() {
$this->linkDB = new DataSource();
}
function __destruct() {
$this->linkDB = NULL;
}
function inserirUser($obj... |
Markdown | UTF-8 | 2,020 | 2.984375 | 3 | [
"MIT"
] | permissive | Fast Expression Evaluator Library (c++, .net)
====
Yet another Expression Evaluator, but with **compilation** into **native code**
With this library you can evaluate math expressions fast and easily.
Get Started:
---
var expression = new ExpressionEvaluator("sqrt(r^2 - x^2)");
expression.SetVariableValue("r"... |
Java | UTF-8 | 1,254 | 2.75 | 3 | [] | no_license | package chapter4;
import EDU.oswego.cs.dl.util.concurrent.Callable;
import java.lang.reflect.InvocationTargetException;
/**
* @author lili
* @date 2022/6/19 10:46
*/
public class FutureResult { // Fragments
protected Object value = null;
protected boolean ready = false;
prot... |
C++ | UTF-8 | 636 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | #ifndef TREEMODELITEM_H
#define TREEMODELITEM_H
#include <QStringList>
class TreeModel;
class TreeModelItem
{
public:
TreeModelItem(QString label);
~TreeModelItem();
QString label() const;
void setLabel(QString label);
void setData(QStringList data);
QVariant data(int index);
void set... |
Markdown | UTF-8 | 4,230 | 2.75 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: Postdoc on regional coastal ocean modelling (Vancouver Island, Canada)
subtitle: University of Victoria
tags: [postdoc, Canada, coastal ocean, numerical modelling, climate change]
comments: false
---
We are seeking a postdoctoral scholar for a Regional Coastal Ocean Modelling position investigat... |
Markdown | UTF-8 | 582 | 3.078125 | 3 | [] | no_license | # The DOM
Spend the next 10 minutes reading through the following introduction to the DOM
https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction
Answer the following questions
1. What is the DOM?
1. What does the DOM do?
1. Is the DOM part of JavaScript?
1. Why might JavaScript need the... |
Java | IBM852 | 3,744 | 2.359375 | 2 | [] | no_license | package com.virtualcondo.controllers;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRespons... |
C++ | UTF-8 | 2,981 | 2.78125 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fstream>
#include <sstream>
#include <vector>
#include <cstdlib>
#include <cstdio>
#include <sys/wait.h>
#include <iostream>
using namespace std;
int main(int argc, char* argv[]) {
//Initial check for arguments
... |
JavaScript | UTF-8 | 2,745 | 2.765625 | 3 | [] | no_license | const { BillModel } = require("../billModel");
const { ObjectId } = require("mongodb");
const moment = require("moment");
const BillList = async () => {
const billList = await BillModel.find({}).catch((err) => {
throw new Error("Get bill failed");
});
return billList;
};
const getBillByID = async ... |
Java | UTF-8 | 663 | 1.765625 | 2 | [] | no_license | package com.pingidentity.adapters.htmlform.pwdreset.model;
import org.sourceid.util.log.AttributeMap;
public class GeneratedCode
{
private AttributeMap attributeMap;
private String code;
public GeneratedCode(AttributeMap map, String code)
{
this.attributeMap = map;
this.code = code;
}
publi... |
Java | UTF-8 | 2,313 | 2.734375 | 3 | [] | no_license | package tr.edu.metu.thesis.gson;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
public class AnswerAdapter extends TypeAdap... |
Markdown | UTF-8 | 9,364 | 3.0625 | 3 | [] | no_license | # 人生是场长跑,你是同学中的哪一个?
【长投学堂14天小白训练营——82期11班】
2019年6月11日 星期二 早上7:00
同学们早上好,新的一天又开始了~ 今天是开营第二天,你按时学习了吗?
每年放假回家,最累不是陪爸妈,而是同学会!
我们来看看长投人眼里的同学会又发生了哪些与理财投资相关的事情呢?
同学会真的是一个神奇的组织,刚毕业那几年是为了联络感情,几年后因为大家的境遇都不相同,共同话题是越来越少了,有的只是各自的吐槽。
这不,班班今年参加同学会的时候,A同学说:“我在市内买了一套房子,现在每个月要还4000的房贷,这样的日子要30年,遥遥无期啊。”
B同学说:“现在生娃了才知道是真的费钱啊,奶粉、尿不湿、... |
Java | UTF-8 | 2,303 | 2.40625 | 2 | [] | no_license | package mattmess.miscarrows.item;
import java.util.List;
import mattmess.miscarrows.MiscArrows;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
p... |
Markdown | UTF-8 | 3,212 | 3.28125 | 3 | [] | no_license | ## Inspiration
This time around, we wanted to focus on the social impact of our product and we thought about how great it would be to make a website that teaches you how to code. We pulled inspiration from sites like CodeHS and are making plans to expand on that.
## What it does
Codegrounds allows someone to learn lan... |
Python | UTF-8 | 6,360 | 2.65625 | 3 | [] | no_license | from sklearn.feature_extraction.text import CountVectorizer
from sklearn.metrics.pairwise import cosine_similarity
from sklearn.feature_extraction.text import TfidfVectorizer
import pickle
import dill
import math
from math import log
parse_fields = ['WORK EXPERIENCE', 'EDUCATION', 'SKILLS', 'AWARDS', 'CERTIFICATIONS',... |
JavaScript | UTF-8 | 5,074 | 2.890625 | 3 | [] | no_license | function downloadCSV() { // se realizeaza download-ul in format CSV
const rows = [
getHeaders(),
getValues()
]; // si iau informatiile din chart-uri
if (rows[1] !== null) { // daca avem informatii in chart-uri
let csvContent = "data:text/csv;charset=utf-8,";
rows.forEach(fun... |
Java | UTF-8 | 296 | 1.515625 | 2 | [] | no_license | package com.cssl.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cssl.pojo.Users;
/**
* @program: ZProj
* @Date: 2019/6/11 16:53
* @Author: Mr.Deng
* @Description:
*/
/**
* plus提供的业务
*/
public interface Userservice extends IService<Users> {
}
|
JavaScript | UTF-8 | 1,245 | 2.5625 | 3 | [] | no_license | /*
*@functionName: JS
*@params1: 参数1
*@params2: 参数2
*@params3: 参数3
*@version: V1.0.5
*/
import {updateQueue} from './Component'
export function addEvent(dom, eventType, handler) {
let store ;
if(dom.store){ //单例模式了
store = dom.store
}else {
dom.store = {}
store = dom.store
}
... |
Python | UTF-8 | 7,299 | 3.046875 | 3 | [
"MIT"
] | permissive | print('Importando as bibliotecas necessárias...')
# Importando as bibliotecas necessárias
from bs4 import BeautifulSoup
import urllib.request as urllib_request
import pandas as pd
import datetime
import time
from urllib.request import Request, urlopen
from urllib.error import URLError, HTTPError
import matplotlib.pyplo... |
C++ | UTF-8 | 13,651 | 2.8125 | 3 | [] | no_license | #include "App.h"
/// <summary>
/// Default constructor
/// </summary>
App::App()
{
//Seed random based on time
srand(time(0));
//Textures for flightweighting
m_floorTexture = new sf::Texture();
m_wallTexture = new sf::Texture();
m_floorTexture->loadFromFile("floor.png");
m_wallTexture->loadFromFile("wall.pn... |
Go | UTF-8 | 212 | 3.3125 | 3 | [] | no_license | package main
import "fmt"
func main() {
const (
sunday = iota
monday
tuesday
wednesday
thursday
friday
saturday
)
fmt.Println(sunday, monday, tuesday, wednesday, thursday, friday, saturday)
}
|
Java | UTF-8 | 24,994 | 1.8125 | 2 | [] | no_license | package hsco.pms.rnt.prm.RNT02030500;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transaction... |
C++ | UTF-8 | 1,868 | 3.5 | 4 | [] | no_license | /*
* @lc app=leetcode.cn id=113 lang=cpp
*
* [113] 路径总和 II
*/
#include <iostream>
#include <vector>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
// @lc code=start
/**
* Definition for a binary tree node.... |
C | UTF-8 | 5,158 | 2.75 | 3 | [] | no_license | /*
* led.c
*
* Created on: 07-Oct-2016
* Author: Admin
*/
/*
* led.c
*
* Created on: 07-Oct-2016
* Author: Admin
*/
/*
* led.c
*
* Created on: 07-Oct-2016
* Author: Admin
*/
#include "MKL25Z4.h"
#include <math.h>
#include "led.h"
LEDColour_t LEDColour=OFF; //Set initial colour
uin... |
Java | UTF-8 | 471 | 1.898438 | 2 | [] | no_license | package test.yangguoqin.com.jni_test;
import android.app.Activity;
import android.os.Bundle;
/**
* @创建者 Administrator
* @创时间 2016/1/28 15:03
* @描述 ${todo}
* @包名 test.yangguoqin.com.jni_test
* @版本 $$Rev$$
* @更新者 $$Author$$
* @更新时间 $$Date$$
* @更新描述 ${todo}
*/
public class aaa extends Activity {
@Override
... |
TypeScript | UTF-8 | 2,091 | 3.078125 | 3 | [
"MIT"
] | permissive | import { ArgumentOutOfRangeException } from "linq-to-typescript"
import { asAsync, expectAsync, itAsync, itEnumerable, itParallel } from "../TestHelpers"
describe("elementAt", () => {
it("String", () => {
expect("abc".elementAt(0)).toBe("a")
expect("abc".elementAt(1)).toBe("b")
expect("abc"... |
Python | UTF-8 | 1,043 | 2.71875 | 3 | [] | no_license | import utils
# set_up
def set_up_profesor():
profesor_list=[
{'DNI':'213233212','nombre': 'Roberto','apellido': 'Pineda'},
{'DNI':'2973273','nombre': 'Braulio','apellido': 'Berlanga'},
{'DNI': '6565906956','nombre': 'Hipolito','apellido': 'Vasquez'},
{'DNI':'355454354','nombre':'Mar... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.