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 |
|---|---|---|---|---|---|---|---|
Markdown | UTF-8 | 5,148 | 2.75 | 3 | [
"MulanPSL-2.0",
"LicenseRef-scancode-mulanpsl-2.0-en",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | ---
---
---
title: 2
---
在六月初的几天里出了件事,保姆兼女管家阿加菲娅·米哈伊洛夫娜把她刚腌好的蘑菇送到地下室,脚下一滑摔倒了,导致手腕脱臼。来了那位年轻而又爱闲扯、刚完成大学学业的当地医生。他看看手,说她并没有脱臼,裹上敷布,便留下来吃饭,看来很享受能够同著名的谢尔盖·伊万诺维奇·科兹内舍夫交谈,为表达自己对待事物的开明见解,把县里的种种流言蜚语说给他听,抱怨着地方自治上的糟糕状况。谢尔盖·伊万诺维奇留心听了,并仔细询问,为新的倾听者所激励,畅谈起来,提出几个精辟而颇有分量、受到年轻医生恭敬赞赏的见解,便又进入弟弟所熟悉的,活跃的精神状态,通常他在一番精彩而活跃的谈话之后就会进入这种状态。医生走后... |
C# | UTF-8 | 1,704 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | namespace Discord_Bot.Events
{
using System;
using System.Threading.Tasks;
using System.Windows.Forms;
using Discord.Commands;
using Discord.WebSocket;
public class Message_Received
{
public void Run()
{
Program.Client.MessageReceived += Client_MessageReceived;
... |
C | UTF-8 | 372 | 2.578125 | 3 | [] | no_license | #include<stdio.h>
int main(){
FILE *fp[6];
fp[0] = fopen("/tmp/r.txt", "r");
fp[1] = fopen("/tmp/r+.txt", "r+");
fp[2] = fopen("/tmp/w.txt", "w");
fp[3] = fopen("/tmp/w+.txt", "w+");
fp[4] = fopen("/tmp/a.txt", "a");
fp[5] = fopen("/tmp/a+.txt", "a+");
fclose(fp[0]);
fclose(fp[1]);
fclose(fp[2]);
fclose(f... |
JavaScript | UTF-8 | 342 | 2.546875 | 3 | [] | no_license | import * as constant from '../constants';
const initialState = {
data: {}
};
export function weatherReducer(state = initialState, action) {
switch (action.type) {
case constant.SET_WEATHER: {
return {
...state,
data: action.payload.data,
};
}
default:
r... |
Java | UTF-8 | 697 | 2.578125 | 3 | [] | no_license | /**
*
*/
package org.einnovator.notifications.client.model;
public enum ContentType {
HTML("Html"),
CSS("Css"),
TEXT("Text")
;
private final String displayValue;
ContentType(String displayValue) {
this.displayValue = displayValue;
}
public String getDisplayValue() {
return displa... |
Python | UTF-8 | 1,115 | 2.59375 | 3 | [] | no_license | import socketio
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
from transformers import pipeline
#Start the conection as a Client
sio = socketio.Client()
#Use the hugging models
translation_pipeline = pipeline('translation_en_to_es', model='Helsinki-NLP/opus-mt-en-es')
summarization_pipeline = pipeline... |
Python | UTF-8 | 148 | 2.546875 | 3 | [] | no_license | for _ in range(int(input())):
N,K,D= map(int,input().split())
A=map(int,input().split())
ans=sum(A)//K
print(ans if ans<=D else D)
|
Markdown | UTF-8 | 1,430 | 2.875 | 3 | [] | no_license | ---
title: moveuserfilestore2context
icon: far fa-circle
tags: Administration, Command Line tools, User, Context, Filestore
package: open-xchange-admin
---
# NAME
moveuserfilestore2context - moves a user's files from his own to a context storage.
# SYNOPSIS
**moveuserfilestore2context** [OPTION]...
# DESCRIPTION
... |
Java | UTF-8 | 574 | 3.296875 | 3 | [] | no_license | package weeks9;
import java.io.FileNotFoundException;
public class Main {
public static void main(String[] args) {
try {
System.out.println(3/0);
} catch (IndexOutOfBoundsException | ArithmeticException e) {
System.out.println("IndexOutOfBoundsException 혹은 ArithmeticExcep... |
SQL | UTF-8 | 239 | 3.203125 | 3 | [] | no_license | create table main.t_friendships(
id serial primary key,
userId int,
friendId int,
constraint fk_fuserid foreign key (userId) references main.t_user(id),
constraint fk_friendid foreign key (friendId) references main.t_user(id)
);
|
Java | UTF-8 | 545 | 3.09375 | 3 | [] | no_license | package les1;
public class CofeMashine {
String brendName;
public CofeMashine(String brendName){
this.brendName= brendName;
}
public void brewcofe(boolean filter,boolean water, int size){
if (filter==false){
System.out.println("Clean up filter");
} else
if (water==false){... |
Java | UTF-8 | 1,144 | 3.296875 | 3 | [] | no_license | package xchess;
import java.util.ArrayList;
public class Bishop extends Piece {
public static ArrayList<Point> getPossibleMoves(Point current)
{
ArrayList<Point> moves= new ArrayList<Point>();
int x=current.getX(),y=current.getY();
System.out.println( "Accessing piece at location (" + x + "," + y + ")" );
... |
Markdown | UTF-8 | 5,067 | 2.96875 | 3 | [] | no_license | ---
layout: page
title: Frequently Asked Questions
permalink: faqs.html
---
Below are a few questions we often receive about the Columbia University Libraries Studio.
{: .lead}
### What kinds of events does the Studio usually host?
The Studio is designed for ethical, sustainable, collaborative, <abbr
title="Findable... |
C++ | UTF-8 | 1,864 | 2.890625 | 3 | [
"MIT"
] | permissive | #include<bits/stdc++.h>
using namespace std;
void dijkstras()
{
int n;
cout<<"Enter the number of vertices ";
cin>>n;
int am[n][n];
cout<<"Enter the adjacency matrix"<<endl;
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
cin>>am[i][j];
}
}
int stnd... |
JavaScript | UTF-8 | 1,236 | 2.953125 | 3 | [] | no_license | const c = document.getElementById("c");
const draw = c.getContext("2d");
let CO2 = [];
let temperature = [];
for (let i = 0; i < CO2UTC.length; i++) {
CO2.push(({
ts: CO2UTC[i][0] / 31536000000 + 1970,
value: CO2UTC[i][1]
}))
}
for (let i = 0; i < temperatureUTC.length; i++) {
temperature.push(({
t... |
JavaScript | UTF-8 | 3,972 | 2.640625 | 3 | [] | no_license | import React, { Component, Fragment } from 'react';
import firebase from '../../firebase';
import TodoList from "./table";
import TodosStyles from './style';
class todosPage extends Component {
state = {
form: {
name: "",
hour: ""
},
todos: [],
errorMessage... |
PHP | UTF-8 | 1,133 | 2.59375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Application\Actions\Config;
use App\Application\Models\ConfigModel;
use Psr\Http\Message\ResponseInterface as Response;
use App\Application\Actions\Action;
use Respect\Validation\Validator as v;
class ConfigDeleteAction extends Action
{
/**
* @var ConfigModel
... |
Go | UTF-8 | 2,038 | 2.84375 | 3 | [] | no_license | package main
import (
"encoding/json"
"fmt"
_ "github.com/go-sql-driver/mysql"
"github.com/go-xorm/xorm"
"xorm.io/core"
)
/**
这里也是使用递归的方式来实现,不过这里只是查询一次数据库
*/
var dbenginer *xorm.Engine
//定义的格式如下:[username[:password]@][protocol[(address)]]/dbname[?param1=value1&...¶mN=valueN]
const DATASOURCE = "root:jian... |
C# | UTF-8 | 983 | 2.515625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PathfinderModelling.Model.Archetypes.Brawler
{
class WindingPathRenegade : Archetype
{
public WindingPathRenegade(Classes.Brawler brawler)
{
Name = "Winding Path Renegade";
A... |
Java | UTF-8 | 529 | 3.265625 | 3 | [] | no_license | package com.fundamental;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class FileReaderWritter {
public static void main(String[] args) throws Exception {
FileWriter fw=new FileWriter("tops2.txt");
String s="This is file reader/writter demo";
fw.write(s);
fw.flush(... |
C# | UTF-8 | 2,063 | 3.234375 | 3 | [
"Apache-2.0"
] | permissive | using System;
using System.IO;
namespace LumiSoft.Net.Mime
{
/// <summary>
/// Attachment.
/// </summary>
[Obsolete("This class will be removed, use Mime class instead !")]
public class Attachment
{
private string m_FileName = "";
private byte[] m_FileData = null;
private string m_AttachmentTyp... |
Java | UTF-8 | 221 | 1.8125 | 2 | [] | no_license | package com.unichain.demo.service;
import com.unichain.demo.entity.User;
import com.unichain.demo.service.support.BaseService;
public interface UserService extends BaseService<User> {
User selectUser(User user);
}
|
Java | UTF-8 | 704 | 2.234375 | 2 | [] | no_license | package test;
import java.io.IOException;
import java.util.Iterator;
import javax.swing.JFrame;
import databall.DataBall;
import dataplayer.DataPlayer;
import datateam.DataTeam;
import gui.elements.DrawField;
import gui.elements.EndscreenPanel;
import process.management.CreaTeam;
import process.manage... |
Go | UTF-8 | 1,039 | 2.671875 | 3 | [] | no_license | package mydata
import (
"testing"
"github.com/stretchr/testify/assert"
)
// go test -run '' -v
func TestTList(t *testing.T) {
t.Run("aaaa", func(t *testing.T) {
l := CreateList()
l.Append(0)
l.Append(1)
l.Append(2)
l.Append(3)
assert.Equal(t, "0,1,2,3", l.ToString())
})
t.Run("iiii", func(t *testi... |
Java | UTF-8 | 2,224 | 2.015625 | 2 | [] | no_license | package ml.ibs.epi_droid_app;
import android.util.Log;
import com.orm.dsl.Ignore;
import java.util.Date;
public class StockData extends BaseData {
@Ignore
private static final String TAG = Constants.getLogTag("StockData");
Date send_date = null;
int pheno_quantite_recue = -1;
int pheno_quanti... |
Java | UTF-8 | 2,029 | 2.203125 | 2 | [] | no_license | package com.lauvan.meip.service.db.dao;
import java.util.List;
import org.hibernate.Query;
import org.hibernate.Session;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate5.HibernateTemplate;
import com.lauvan.meip.service.db.entity.BaseEntity;
import co... |
C | GB18030 | 628 | 3.21875 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
typedef int DataType;
typedef struct node{
DataType data;
struct node* next;
}Qnode,*pQnode;
typedef struct {
pQnode front,rear;
}LinkQueue,*pLinkQueue;
//1.еijʼ
pLinkQueue Init_LinkQueue();
//2.жӶӿ
int Empty_LinkQueue(pLinkQueue pQueue);
//3.(1ʾɹ)
int In_LinkQueu... |
Java | UTF-8 | 4,335 | 3.5625 | 4 | [] | no_license | package Meituan;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
/**
* @author pandaxubo
* @description
* 题目描述:
* 在小团的公司中,有n位员工。除了最高领导——小团外,每位员工有且仅有一位直接领导。所以,公司内从属关系可以看成一棵树。
*
* 现在,公司接到一个项目,需要重新划分这n位员工的从属关系。新的划分描述如下:
*
* 1.每个人要么没有下属,要么有至少两个直接下属(即至少有两人的直接领导为这个人)
*
* 2.第 i 个人的下属(包括自己... |
Shell | UTF-8 | 1,471 | 3.640625 | 4 | [] | no_license | #!/bin/bash
set -x
### puppet master hostname
puppet_server_hostname=""
puppet_server_ipaddress=""
if [ -z $puppet_server_hostname ]; then
echo "puppet_server_hostname not set!"
exit
fi
if [ -z $puppet_server_ipaddress ]; then
echo "puppet_server_ipaddress not set!"
exit
fi
### client props
hostname=$(hostname -f... |
Ruby | UTF-8 | 1,069 | 4 | 4 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | # #write out your code here
# def least_coins(cents)
# if cents%25 ==0
# puts {:quarters => cents/25}
# elsif cents%5 == 0
# puts {:nickels => cents/5}
# elsif cents%1 == 0
# puts {:pennies => cents/1}
# elsif cents%10 == 0
# puts {:dimes => cents/10}
# end
# #Code your answer here!
# least_coins(50)
de... |
C | WINDOWS-1251 | 2,439 | 3.390625 | 3 | [] | no_license | #include <stdio.h>
#include <locale.h>
#define N 10
void menu()
{
printf("\n 1. ...\n");
printf("\n\n");
}
int cod(int str[])
{
int i,a;
printf(" -: \n");
do
{
scanf("%d", &a);
}
while (a < 1000 || a > 1009);
for (i = 0; i < N; i++)
{
str[i] = a;
return i... |
Markdown | UTF-8 | 1,759 | 3.296875 | 3 | [] | no_license | +++
title = "DevOps报表"
description = "DevOps报表会通过各种直观的图表向您展示某个项目下关于DevOps的各种指标,比如各个应用的代码提交情况、应用构建情况以及应用的部署情况。"
weight = 7
+++
## 介绍
DevOps报表会通过各种直观的图表向您展示某个项目下关于DevOps的各种指标,比如各个应用的代码提交情况、应用构建情况以及应用的部署情况。其中包含了代码提交图、构建次数图、构建时长图、部署次数图和部署时长图。
通过本文您将了解什么是DevOps报表,以及DevOps报表能传达出什么信息。
- **菜单层次**:项目层
- **菜单路径**:敏捷管理>报表>Dev... |
JavaScript | UTF-8 | 7,148 | 2.96875 | 3 | [] | no_license | // fetch
fetch("http://kea-alt-del.dk/t5/api/productlist")
.then(res => res.json())
.then(data => fml(data));
function fml(dishes) { // call a foreach function for each fetched element
dishes.forEach(addDish);
console.log(dishes.id);
}
// const declaration
const base = "https://kea-alt-del.dk/t5/sit... |
C# | UTF-8 | 1,402 | 2.578125 | 3 | [] | no_license | using CustomerManager.Code.Logic;
using CustomerManager.Code.Models;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace CustomerManager.Controllers
{
public class HomeController : Controller
{
public ActionResu... |
Java | UTF-8 | 417 | 2.109375 | 2 | [] | no_license | package org.jukeboxmc.item;
import org.jukeboxmc.block.BlockPrismarineBricksStairs;
/**
* @author LucGamesYT
* @version 1.0
*/
public class ItemPrismarineBricksStairs extends Item {
public ItemPrismarineBricksStairs() {
super ( "minecraft:prismarine_bricks_stairs" );
}
@Override
public Bl... |
Python | UTF-8 | 870 | 3.140625 | 3 | [
"MIT"
] | permissive | import numpy as np
class FeatureDimension:
"""
Implements a feature dimension of the MAP-Elites algorithm
"""
def __init__(self, name, feature_simulator, bins):
"""
:param name: Name of the feature dimension
:param feature_simulator: Name of the method to evaluate the feature
... |
Java | UTF-8 | 32,477 | 2 | 2 | [] | no_license | package com.redhat.contentspec.processor;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import com.redhat.contentspec.ContentSpec;
import com.redhat.contentspec.Level;
import com.redhat.contentspec.Proces... |
Markdown | UTF-8 | 816 | 2.609375 | 3 | [] | no_license | # Article 85-5
1. Sans préjudice de ce qui est dit aux articles 77-6 et 85-3, les modifications apportées au présent décret par les articles 1er et 3 à 23 du décret n° 67-1252 du 22 décembre 1967 prennent effet à compter du 1er janvier 1968.
Dans tous les cas où les nouvelles dispositions du présent décret se réfèren... |
Java | UTF-8 | 1,530 | 2.65625 | 3 | [] | no_license | package org.adrianwalker.callablefrom;
import org.adrianwalker.callablefrom.test.TestCaller;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import org.junit.Test;
public final class CallableFromTest implements TestCaller {
@Test
public void testCallableFromTestCaller() {
C... |
Markdown | UTF-8 | 3,122 | 3.703125 | 4 | [] | no_license | # Media
A.1. Can you implement the sing() method for the bird? a. How did you unit test it? b. How did you optimize the code for maintainability? (Ask yourself the same question for all following exercises)
<i>Assumption: </i>
All birds can sing. This is a default characteristic of all birds.
A.2. Now, we h... |
Markdown | UTF-8 | 5,245 | 3 | 3 | [
"Apache-2.0"
] | permissive | # Overview of the SynthDet Unity Project
This project utilizes the Unity [Perception](https://github.com/Unity-Technologies/com.unity.perception) package for randomizing the environment and generating ground-truth on each frame.
## Ground truth generation
To generate ground truth, the [Perception Camera](https://gi... |
PHP | UTF-8 | 652 | 2.6875 | 3 | [
"MIT"
] | permissive |
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "admin_master";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$id = $_POST['id'];
if(!empty($... |
Java | UTF-8 | 5,337 | 1.882813 | 2 | [
"Apache-2.0"
] | permissive | package com.yugandhar.mdm.corecomponentref;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import com.yugandhar.common.exception.YugandharCommonException;
import com.yugandhar.common.transobj.TxnTrans... |
Markdown | UTF-8 | 1,107 | 3.015625 | 3 | [] | no_license | # Liri Node App
This is a CLI application that takes in commands, and uses APIs from Twitter, Spotify, and OMDB.
## Use
To use this application, you must clone the repo, then open the directory in your command line. There are several commands you can then enter:
* `node liri.js movie-this "Movie Title"` replacing "Mov... |
PHP | UTF-8 | 1,401 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Http\Controllers\Auth;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\URL;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Hash;
use App\Http\Requests\Auth\ManagerRequest;
class ManagerRegisterController extends Controller
{
/**
* Sho... |
C# | UTF-8 | 1,825 | 2.6875 | 3 | [
"MIT"
] | permissive | #region
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using CommandLine;
using CommandLine.Text;
using OverwatchMatchHistoryTracker.Options.MatchOption;
#endregion
namespace OverwatchMatchHistoryTracker.Options.AverageOption
{
[Verb(nameof(Average), HelpText = _... |
Ruby | UTF-8 | 458 | 3.8125 | 4 | [] | no_license | class Selection
class << self
def sort(array)
length = array.length - 1
for i in 0..length
min = i
for j in (i + 1)..length
min = j if (array[j] < array[min])
end
temp = array[i]
array[i] = array[min]
array[min] = temp
end
show(... |
C++ | ISO-8859-1 | 4,762 | 3.28125 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <math.h>
using namespace std;
enum Color { Negro, Blanco };
inline bool par( int n )
{
return n % 2 == 0;
}
// IMPORTANTE: Si se llama a esta funcion con color negro, el valor inicial de columna tiene que ser 1, sino 0.
long ubicarAlfilesEnColor( int ... |
Markdown | UTF-8 | 1,078 | 3.5625 | 4 | [
"ISC"
] | permissive | # Banana Bread
* **Source**: http://www.simplyrecipes.com/recipes/banana_bread/
* **Prep time**: 10 minutes
* **Cook time**: 55 minutes
* **Yield**: 1 loaf
## Ingredients
* 2-3 very ripe bananas, peeled
* ⅓ cup melted butter
* ¾ cup sugar (½ cup if you would like it less sweet, 1 cup if more sweet)
* 1 egg, be... |
Java | UTF-8 | 1,932 | 2.578125 | 3 | [] | no_license | package com.jy.dataaccess.cache.annotations.interceptor;
import java.lang.reflect.Method;
import org.springframework.aop.framework.AopConfigException;
import org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor;
import com.jy.dataaccess.cache.CachingModel;
/**
*
* @author wdong
*
*/
... |
PHP | UTF-8 | 852 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Http\Controllers\Admin\ResellerController;
class WeeklyDeduction extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'weekly:deduction';
/**
... |
Shell | UTF-8 | 2,717 | 2.921875 | 3 | [] | no_license | #!/bin/sh
echo "Test 1"
set -e
echo "Test 2"
WORKSPACE=${WORKSPACE:=`pwd`}
DERIVED_DATA=${DERIVED_DATA:=`mktemp -qd $WORKSPACE/DerivedData.XXXXX`}
echo "WORKSPACE: $WORKSPACE"
echo "DERIVED_DATA: $DERIVED_DATA"
echo "Test 3"
function cleanup {
echo "Cleaning up..."
rm -fr $DERIVED_DATA
}
echo "Test 4... |
Shell | UTF-8 | 242 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | #!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
source ${DIR}/delta_configs/env.delta
echo
docker-compose up -d
echo
echo "Sleep an additional 120s to wait for docker containers to start"
sleep 120
echo "..."
|
Python | UTF-8 | 1,801 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | import random
import typing
from typing import List
from hearthstone.agent import Agent, Action, generate_valid_actions, BuyAction, EndPhaseAction, SummonAction, \
TavernUpgradeAction
if typing.TYPE_CHECKING:
from hearthstone.cards import Card
from hearthstone.player import Player
class SupremacyBot(Agen... |
Python | UTF-8 | 9,118 | 2.734375 | 3 | [] | no_license | import tensorflow as tf
import numpy as np
import cv2
weights_small='weights/YOLO_small.ckpt'
layer_names = ['conv1s', 'max_pool1', 'conv2', 'max_pool2',
'conv3_1', 'conv3_2', 'conv3_3', 'conv3_4', 'max_pool3',
'conv4_1', 'conv4_2', 'conv4_3', 'conv4_4', 'conv4_5', 'conv4_6', 'conv4_7', 'conv4_... |
C++ | UTF-8 | 1,628 | 2.859375 | 3 | [] | no_license | #include<bits/stdc++.h>
#define INF 999999
#define NIL -1
using namespace std;
int V,d[100],pa[100];
bool S[100];
int ExtractMin()
{
int v,min_,loc_min;
min_=INF;
for(v=0;v<V;v++)
{
if((S[v] == false) && (d[v]<=min_))
{
min_=d[v];
loc_min=v;
... |
C++ | UTF-8 | 1,252 | 2.53125 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int keys[] = {10, 12, 15, 20};
int freq[] = {4, 8, 5, 9};
int n = sizeof(keys)/sizeof(keys[0]);
int dp[n][n];
memset(dp, 0, sizeof(dp));
for(int gap=0; gap<n; gap++)
{
for(int i=0; i<n-gap; i++)
{
int j = ... |
Python | UTF-8 | 1,117 | 2.953125 | 3 | [] | no_license | import csv, json
from datetime import datetime
# Import the Canvas class
from canvasapi import Canvas
# Canvas API URL
API_URL = "https://yourinstitution.instructure.com/"
# Canvas API key
API_KEY = "Token Goes Here"
# Initialize a new Canvas object
canvas = Canvas(API_URL, API_KEY)
#Fill out this stuff below:
cour... |
Go | UTF-8 | 601 | 3.328125 | 3 | [] | no_license | package main
import (
"fmt"
"io/ioutil"
"os"
)
func main() {
fmt.Println("Lector")
new_text := []byte(os.Args[1])
// Escribe o "reescribe el archivo"
write := ioutil.WriteFile("file_test.txt", new_text, 0777)
showError(write)
fmt.Println("\nParametro recibido (Valor a insertar)")
fmt.Println(string(new... |
C++ | UTF-8 | 1,501 | 2.859375 | 3 | [] | no_license | #pragma once
#include <stdint.h>
#include <assert.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <Packet.h>
enum PacketProcessErrors
{
PACKET_PROCESSOR_ERROR_NONE, // everything is fine
PACKET_PROCESSOR_ERROR_KEY_IS_NULL, // we ne... |
Java | UTF-8 | 3,207 | 1.742188 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2018-2019 adorsys GmbH & Co KG
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ... |
Rust | UTF-8 | 403 | 2.84375 | 3 | [
"MIT"
] | permissive | const STARTING_MISSILES: i32 = 8;
const READY_AMOUNT: i32 = 2;
fn main(){
let mut missiles: i32 = STARTING_MISSILES;
let ready: i32 = READY_AMOUNT;
println!("Firing {} of my {} missiles.....", ready, missiles);
missiles = missiles - ready;
println!("{} missiles left", ready);
let (mut x ,y):(i3... |
C++ | GB18030 | 1,957 | 2.921875 | 3 | [] | no_license | #include <iostream>
#include <cstdio>
//
using namespace std;
int a[4][4];
int n,best=0;
void read()
{
char c;
getchar();
for(int i=0; i<n; i++)
{
for(int j=0; j<n; j++)
{
c=getchar();
if(c=='X')
{
a[i][j]=1;
}
... |
SQL | UTF-8 | 1,223 | 3.546875 | 4 | [] | no_license | DROP DATABASE IF EXISTS COMP3095;
CREATE DATABASE IF NOT EXISTS COMP3095;
USE COMP3095;
grant all on COMP3095.* to 'admin'@'localhost' identified by 'admin';
CREATE TABLE USERS
(
id int(11) AUTO_INCREMENT PRIMARY KEY,
employee_number varchar(255),
role varchar(20),
email varchar(255),
password varchar(... |
Java | UTF-8 | 1,616 | 2.71875 | 3 | [] | no_license | package com.shuhao.clean.apps.model.ext;
public class NumberField extends BaseField {
protected boolean allowBlank = true;
protected String blankText = "该项不能为空";
/*private Integer minValue;
private Integer maxValue;*/
private Double minValue;
private Double maxValue;
public String output() throws Exception {... |
C++ | UTF-8 | 2,479 | 2.71875 | 3 | [] | no_license | #include<cstdio>
#include<cmath>
#include<iostream>
#include<vector>
#include<cstring>
#include<algorithm>
using namespace std;
void dfs(int u);
void scc(int u);
vector<int>edge[10010],revedge[10010];
struct data
{
int time,pos;
}timing[10010];
bool comp(data p, data q )
{
return p.time>q.time;
}
... |
Python | UTF-8 | 554 | 4.1875 | 4 | [] | no_license | #Implementation of iterator, lambda
class Spelling:
def __init__(self, word='Python'):
self.word = word
self.index = -1
def __iter__(self):
# some initialization
return self
def __next__(self):
self.index += 1
if self.index == len(self.word):
raise StopIteration
else:
return self.word[self.inde... |
Java | UTF-8 | 337 | 2.53125 | 3 | [] | no_license | package _extends;
/**
* Created by USER on 24.02.2017, 2:14.
*
* @author Vadim Gamaliev <a href="mailto:gamaliev-vadim@yandex.com">gamaliev-vadim@yandex.com</a>
* @version 1.0
*/
public class Sub extends Parent {
public void test() {
System.out.println("Sub test");
}
@Override
public voi... |
Java | UTF-8 | 670 | 2.078125 | 2 | [] | no_license | package com.aurora.core.database.models.constants;
import static com.aurora.core.database.DbTableNames.CORE_STATES;
import lombok.Data;
import lombok.EqualsAndHashCode;
import androidx.room.Entity;
import androidx.room.Ignore;
import lombok.experimental.SuperBuilder;
import com.aurora.core.database.models.helpers.R... |
Java | UTF-8 | 614 | 2.265625 | 2 | [] | no_license | package main.Models.entities;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@Entity
@Table(name = "stock_items")
public... |
TypeScript | UTF-8 | 420 | 3.015625 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | /**
* Represents a CBOR simple value (major type 7).
*/
export enum CborSimpleValue {
/**
* Represents the value 'false'.
*/
False = 20,
/**
* Represents the value 'true'.
*/
True = 21,
/**
* Represents the value 'null'.
*/
Null = 22,
/**
* Represents an undefined value, to be us... |
C# | UTF-8 | 7,070 | 3.203125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
public static void Main(string[] args)
{
Aula04 a = new Aula04();
... |
Markdown | UTF-8 | 409 | 3.203125 | 3 | [
"MIT"
] | permissive | ### 不包含
设置```exclude```为, 将不高亮显示数值小于当前数值部分。
```javascript
class Demo extends React.Component {
render(){
return (
<div className="demo-slider">
<Slider defaultValue={35} exclude />
<Slider defaultValue={65} exclude disabled />
... |
Java | UTF-8 | 1,642 | 2.5 | 2 | [
"MIT"
] | permissive | package com.netease.demo;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
/**
* Created by stone on 16/3/30.
*/
public class DividerItemDecoration extends RecyclerView.ItemDec... |
C# | UTF-8 | 1,140 | 2.78125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CG2.Mathematics;
using CG2.Rendering;
using CG2.Shading;
namespace CG2.Modeling
{
public class Plane : Model
{
#region Properties
public Vector4 Origin;
public Vector4 Normal;
#endregion
#region Init
public ... |
Java | UTF-8 | 783 | 2.359375 | 2 | [] | no_license | package com.dart.common.service.http;
import com.dart.data.domain.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import java.security.Principal;
/**
* @author RMPader
*/
public class UserRequestWrapper extends HttpServletRequestWrapper {
private final... |
Python | UTF-8 | 1,102 | 4.09375 | 4 | [] | no_license | # Pytanie 11 - na podstawie listy jezyki stworz listę jezyki_odwrocone
# zawierającą elementy listy jezyki w odwroconej kolejnosci
jezyki = ['Python', 'Java', 'C#', 'Ruby']
# 1
# jezyki.reverse() # odwróć listę języki (nastąpi nadpisanie wcześniejszej listy)
# jezyki_odwrocone = jezyki # przypisz warto... |
Markdown | UTF-8 | 919 | 2.921875 | 3 | [] | no_license | ---
layout: post
title: "Piano Compositions"
date: 2012-02-25 19:11
comments: false
categories:
- family
tags: video
tags:
- piano
---
Libby and Jasmine composed piano music on the computer. Libby really likes working on the songs, Jasmine, not so much. Libby learned the life-lesson about computers and *saving you... |
C++ | UTF-8 | 3,284 | 2.6875 | 3 | [] | no_license | //////////////////////////////////////////////////////////////////////
// D2Monster.h: interface of the CD2Monster class.
//
// CD2Monster, derived from CD2Unit, is used for manipulating monsters'
// attributes and states.
//
// Written by Abin (abinn32@yahoo.com)
// http://www.wxjindu.com/abin/
//
// July 14th, 2004
/... |
Python | UTF-8 | 722 | 2.78125 | 3 | [] | no_license | import os
import sys
import glob
import argparse
import imghdr
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('dir', help='directory of images')
args = parser.parse_args()
dir = os.path.normpath(args.dir)
for image in os.scandir(dir):
if imghdr.what(image... |
Markdown | UTF-8 | 4,844 | 3.171875 | 3 | [
"MIT"
] | permissive |
NearbyStores for Finding Stores
====
NearbyStores is constructed `async`, so when you instantiate it, you should await it, like this : ` const nearbyStores = await new NearbyStores(...)` this will work in your main node code without wrapping it in an anonymous async function.
If you have cloned this repo, you can run... |
TypeScript | UTF-8 | 3,368 | 2.5625 | 3 | [] | no_license | import { Injectable, NgZone } from '@angular/core';
import { ElectronService } from 'ngx-electron';
import { MediaFile } from '../../file-explorer/models/media-file';
import { MatDialog } from '@angular/material/dialog';
import { SelectUploadDialogComponent } from '../../file-explorer/modals/select-upload-dialog/select... |
C++ | GB18030 | 1,576 | 3.625 | 4 | [] | no_license | #include<iostream>
using namespace std;
struct Node{
int data;
Node *link;
Node(Node *ptr = NULL){ link = ptr; }
Node(const int&item, Node *ptr = NULL)
{data = item; link = ptr;}
};
Node *merge(Node*,Node*);//ϲ
Node *printin(int); //
void printout(Node*);//
Node *merge(Node *a, Node *b){
Node *newhead;
if (a-... |
Markdown | UTF-8 | 982 | 2.828125 | 3 | [] | no_license | # mastermind
A [mastermind](https://en.wikipedia.org/wiki/Mastermind_(board_game)) game I made. This was fun and it was probably the game I made that I played the most. Either this or [gomoku](https://github.com/ca98am79/my-first-programs/tree/master/gomoku), although I was more proud of gomoku because it had some i... |
C | UTF-8 | 7,137 | 2.953125 | 3 | [] | no_license | #include "global.h"
#include "common.h"
Message createElectionMessage(char *content) {
return createCommonMessage(ELECTION, content);
}
Message createElectionOverMessage(char *content) {
return createCommonMessage(ELECTION_OVER, content);
}
Message createMessage(char *content) {
return createCommonMessage(MESS... |
Java | UTF-8 | 1,096 | 2.953125 | 3 | [] | no_license |
package backend;
/**
*
* @author Alex + Aiden
*/
public class AnswerParser {
public AnswerParser() {
}
public void questionType(String questionType, String realAnswer, String answers) {
switch (questionType) {
case "MC":
checkMultipleChoice(realAnswer, answers)... |
PHP | UTF-8 | 331 | 2.984375 | 3 | [] | no_license | <?php
namespace Dancras\TicTacToe\Line;
use Dancras\TicTacToe\ValueObject\Coordinate;
use Dancras\TicTacToe\ValueObject\Symbol;
interface ILine
{
public function set(Coordinate $i, Symbol $symbol);
public function getNumberOfCoordinates();
public function getHighestCoordinate();
public function ge... |
Ruby | UTF-8 | 928 | 2.921875 | 3 | [] | no_license | # Include the helper
require 'spec_helper'
# Tests
describe 'Utils' do
context 'merge method' do
# Define the first array
let(:first) {
{
a: 1,
b: {
c: 2,
d: 3
},
e: {
f: 4,
g: 5
}
}
}
# Define the second a... |
C++ | UTF-8 | 1,008 | 2.578125 | 3 | [] | no_license | #pragma once
#include <cmath>
namespace range_mi {
namespace p_not_measured {
template<unsigned int dimension>
void line(
const unsigned int * const line,
const double * const vacancy,
const double * const width,
unsigned int num_cells,
double dtheta,
double * const output_) {
double width... |
C# | UTF-8 | 927 | 3.09375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lab5A
{
/// <summary>
/// This class contains information on how to create a doctor object
/// </summary>
class Doctor
{
public int ordinal { get; set;... |
C++ | UTF-8 | 1,747 | 2.921875 | 3 | [
"Apache-2.0"
] | permissive | /*
* Repeated_SoftwareSerial_TX
*
* Publish messages of all basic levels every 5 seconds
*
* Tested on:
* - Arduino Mega (ATMEGA 2560)
* - Arduino Uno (ATMEGA 328P)
* Test comments:
* Library works.
* Takes about 6 ms to send messages if baud rate of software serial being used is 115200
* Ch... |
Markdown | UTF-8 | 7,630 | 2.71875 | 3 | [
"MIT"
] | permissive | ---
title: jen week
tags: jen
author: Rob Nugen
date: 1999-04-26
---
<p class=note>(transcribed from my diary)</p>
<p class=date>1:30pm Monday 26 April 1999</p>
<p>Jen and I just finished at KTRU. We had big fun! She browsed the stacks and chose discs and I played them. Great variety and she helped pronounce some o... |
C++ | UTF-8 | 2,682 | 3.328125 | 3 | [] | no_license | #include <iostream>
#include <stdlib.h>
#include <string.h>
#include <fstream>
using namespace std;
struct empleado{
string nombre;
string apellido;
int codemp;
float salario;
};
void mp();
void registro();
void lectura();
int main(){
mp();
system("pause");
exit(1);
}
void mp(){//Me... |
Swift | UTF-8 | 1,139 | 2.703125 | 3 | [] | no_license | //
// ViewController.swift
// DemoSwift116_stackview
//
// Created by zhangshaoyu on 16/9/30.
// Copyright © 2016年 zhangshaoyu. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after load... |
C | UTF-8 | 8,899 | 3.46875 | 3 | [] | no_license | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
int main(int argc, char *argv[])
{
int MAX_DATA=4;
int MAX_ROWS=5;
struct Address {
int id;
int set;
char name[MAX_DATA];
char email... |
Python | UTF-8 | 4,306 | 3.65625 | 4 | [] | no_license | # coding:utf8
# Author : huxiaoyi
# Date: 2019-04-16
# Time: 22:31
# At the halfway point during the Rio Olympics, the United States had 70 medals, Great Britain had 38 medals, China had 45 medals, Russia had 30 medals, and Germany had 17 medals. Create a dictionary assigned to the variable medal_... |
C# | UTF-8 | 2,515 | 2.734375 | 3 | [] | no_license | using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web;
namespace BRSPRJ_A3_WebAPI.Models.SrcMessage
{
/// <summary>
/// 客製Json序列化物件器類別
/// </summary>
public class CustomResolver : Default... |
SQL | UTF-8 | 5,098 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 16-08-2019 a las 21:26:02
-- Versión del servidor: 10.3.16-MariaDB
-- Versión de PHP: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00"... |
PHP | UTF-8 | 6,783 | 3.078125 | 3 | [] | no_license | <?php
/**
* @package PHPClassCollection
* @subpackage Catcher
* @link http://php-classes.sourceforge.net/ PHP Class Collection
* @author Dennis Wronka <reptiler@users.sourceforge.net>
*/
/**
* @package PHPClassCollection
* @subpackage Catcher
* @link http://php-classes.sourceforge.net/ PHP Class Collection
* @... |
Markdown | UTF-8 | 1,291 | 2.75 | 3 | [] | no_license | # 14
Смотрю на него и не вижу:</br>
Называю его глубочайшим.</br>
Вслушиваюсь в него и не слышу:</br>
Называю его тишайшим.</br>
Касаюсь его и не могу ухватить:</br>
Называю его мельчайшим.</br>
Эти три невозможно определить,</br>
Посему я смешиваю их и рассматриваю как одно.</br>
[Это одно] вверху не светло, внизу н... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.