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,781 | 3.6875 | 4 | [] | no_license | package lab3.Tasks;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.Serializable;
import java.io.ObjectOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
public class TaskA implements Serializable {
private int[] arr;
... |
Java | UTF-8 | 13,071 | 2.328125 | 2 | [
"Apache-2.0"
] | permissive | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
Markdown | UTF-8 | 2,647 | 3.625 | 4 | [] | no_license | # 3. ํ - 3) ์ด์ค์ฐ์ ์์ํ
### โจ๋ฌธ์
> ###### ๋ฌธ์ ์ค๋ช
>
> ์ด์ค ์ฐ์ ์์ ํ๋ ๋ค์ ์ฐ์ฐ์ ํ ์ ์๋ ์๋ฃ๊ตฌ์กฐ๋ฅผ ๋งํฉ๋๋ค.
>
> | ๋ช
๋ น์ด | ์์ ํ(๋์ด) |
> | ------ | ------------------------------ |
> | I ์ซ์ | ํ์ ์ฃผ์ด์ง ์ซ์๋ฅผ ์ฝ์
ํฉ๋๋ค. |
> | D 1 | ํ์์ ์ต๋๊ฐ์ ์ญ์ ํฉ๋๋ค. |
> | D -1 | ํ์์ ์ต์๊ฐ์ ์ญ์ ํฉ๋๋ค. |
>
> ์ด์ค ์ฐ์ ์์ ํ๊ฐ ํ ์ฐ์ฐ operations๊ฐ ๋งค๊ฐ๋ณ์๋ก ์ฃผ์ด์ง ๋, ๋ชจ๋ ์ฐ... |
Swift | UTF-8 | 1,133 | 2.609375 | 3 | [] | no_license | //
// TableViewCell.swift
// auto_coursework
//
// Created by ะะปะตะบัะฐะฝะดั ะะพะฝะพะผะฐัะตะฒ on 04.05.17.
// Copyright ยฉ 2017 Alexander Ponomarev. All rights reserved.
//
import UIKit
class TableViewCell: UITableViewCell {
var shadowed: Bool = false
override func layoutSubviews() {
super.layoutSubv... |
Python | UTF-8 | 358 | 4.46875 | 4 | [
"MIT"
] | permissive | #Faรงa um programa que pergunte ao usuario o valor do produto,
#e mostre o valor final com 5% de desconto.
valorProduto = float(input('Qual o valor do produto? R$ '))
desconto = (valorProduto * 5) / 100
vFinal = valorProduto - desconto
print('O valor do produto รฉ R${}'.format(valorProduto))
print('O novo valor com o d... |
PHP | UTF-8 | 2,362 | 2.53125 | 3 | [] | no_license | <?php
require('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'app-top.php');
$ERROR=false;
$ERROR_MSG='';
if(isset($_REQUEST['table'])) {$table = $_REQUEST['table'];} else { $ERROR=true; $ERROR_MSG .='1;';} /* numele tabelei in care se face interogarea *... |
Python | UTF-8 | 579 | 3.125 | 3 | [] | no_license | import pandas as pd
from sklearn import linear_model
import matplotlib.pyplot as plt
# read data
# dataframe = pd.read_fwf('brain_body.txt')
dataframe = pd.read_csv('challenge_dataset.txt', sep=',',
header=None, names=['Brain', 'Body'])
# brain measurments
x_values = dataframe[['Brain']]
# body measurements
y_valu... |
Java | UTF-8 | 915 | 2.046875 | 2 | [] | no_license | package com.javapai.practice.springdata;
import java.util.List;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb... |
Markdown | UTF-8 | 810 | 2.5625 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "The worst-paying jobs for college grads boast this sneaky advantage"
posturl: https://www.washingtonpost.com/news/wonk/wp/2017/05/15/the-worst-paying-jobs-for-college-grads-boast-this-sneaky-advantage/
tags:
- Job automation
---
{% include post_info_header.md %}
I don't like these type of art... |
C | UTF-8 | 2,197 | 3.765625 | 4 | [] | no_license | #include "pch.h"
#include <stdio.h>
#include <stdlib.h>
void wypisywanie(float tab[]);
void uzupelnianie(float tab[]);
void sortowanie(float tab[]);
float srednia(float tab[], float a);
float dodawanie(float tab[]);
float minimum(float tab[]);
float maximum(float tab[]);
float mediana(float tab[]);
void suma2(float ta... |
PHP | UTF-8 | 4,170 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace CEmerson\DBSafe\CredentialsProviders;
use Aws\Exception\AwsException;
use Aws\SecretsManager\SecretsManagerClient;
use CEmerson\DBSafe\Exceptions\ErrorFetchingCredentials;
use DateInterval;
class AWSSecretsManagerCredentialsProvider extends AbstractCredentialsProvider
{
/... |
Java | UTF-8 | 1,790 | 2.8125 | 3 | [] | no_license | package com.zqh.midd.kafka.quickstart;
import java.util.*;
import kafka.javaapi.producer.Producer;
import kafka.producer.KeyedMessage;
import kafka.producer.ProducerConfig;
/**
* Created by hadoop on 14-11-19.
*
* https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+Producer+Example
*/
public class TestProduc... |
C | UTF-8 | 9,960 | 2.53125 | 3 | [] | no_license | #include <stdlib.h>
#include <string.h>
#include <math.h>
#include "BabyX.h"
#include "tabpanel.h"
#define PI 3.1415926535897932384626433832795
typedef struct
{
BABYX *bbx;
BBX_Panel *pan;
BBX_Canvas *tabpane_can;
BBX_Canvas *left_can;
BBX_Canvas *bottom_can;
BBX_Canvas *right_can;
int Ntabs;
int current;
... |
C++ | UTF-8 | 486 | 2.53125 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
int bs(int a[],int s,int e,int x)
{
if(s<=e)
{
int mid = s + (e-s)/2;
if(a[mid]==x)
return 1;
if(a[mid]<x)
return(bs(a,mid+1,e,x));
if(a[mid>x])
return(bs(a,s,mid-1,x));
}
return 0;
}
int main()
{
int n,m,i,a[100000... |
Markdown | UTF-8 | 5,597 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | ๏ปฟ## SnippetPx
### Overview
The SnippetPx module enhances the snippet experience in PowerShell by offering
a new format for Snippets: plain, ordinary ps1 files. These snippets are not
just blocks of script that could be injected into a file. They are also
invocable! This enables better reuse of commonly used pieces of... |
Shell | UTF-8 | 846 | 4.03125 | 4 | [] | no_license | #!/bin/bash
# linux toggle led using sysfs
gpio_dir=/sys/class/gpio
echo "Linux Toggle LED"
# check options
while getopts "u" opt; do
case ${opt} in
u )
if [ $# -ne 2 ]; then
echo "Script need 1 parameter - GPIO Pin Number"
exit
fi
echo "Unexport GPIO Pin $2"
echo $2 > "$gpio_dir/unexport"
... |
TypeScript | UTF-8 | 1,415 | 2.78125 | 3 | [
"MIT"
] | permissive | import Direction from "./direction"
import {Phone} from "./phone"
import {Mail} from "./mail"
// type Sexo="hombre"|"mujer"
export class Person{
protected nombre:string;
protected apellidos:string;
protected edad:number;
protected dni:number;
protected cumpleaรฑos:string;
protected colorFa... |
C++ | UTF-8 | 3,034 | 2.875 | 3 | [] | no_license | /*
ACMICPC
๋ฌธ์ ๋ฒํธ : 17406
๋ฌธ์ ์ ๋ชฉ : ๋ฐฐ์ด ๋๋ฆฌ๊ธฐ 4
ํ์ด ๋ ์ง : 2020-08-12
Solved By Reamer
*/
#include <iostream>
#include <tuple>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
int arr[51][51] = {0};
int tmpArr[51][51] = {0... |
C# | UTF-8 | 913 | 2.953125 | 3 | [] | no_license | ๏ปฟ/*
* Christian Wright
* 30JUL2021
* APA
*
* API Application
*
*/
using System;
using System.Collections.Generic;
namespace Wright_Christian_API
{
public class Artist
{
//Properties
public string ArtistID { get; }
public string ArtistName { get; }
public Artist(stri... |
C | UTF-8 | 1,572 | 4 | 4 | [] | no_license | #include <stdlib.h>
#include <stdio.h>
#include "functions.h"
void left(int a[], int N) {
int temp = a[0];
for (int i = 0; i < N - 1; i++) {
a[i] = a[i + 1];
}
a[N - 1] = temp;
}
void right(int a[], int N) {
N = N - 1;
int temp = a[N - 1];
for (int i = N - 1; i > 0; i--) {
... |
Java | UTF-8 | 3,302 | 2.9375 | 3 | [] | no_license | package com.computinglife.slpa.core;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
import java.util.Map.Entry;
import org.jgrapht.graph.DefaultWeightedEdge;
import com.computinglife.slpa.entity.IntegerNode;
import com.computingli... |
Python | UTF-8 | 867 | 3.1875 | 3 | [] | no_license | #
# @lc app=leetcode id=38 lang=python3
#
# [38] Count and Say
#
# @lc code=start
class Solution:
def countAndSay(self, n: int) -> str:
countAndSayString = '1'
for i in range(1, n):
countList = []
for j in countAndSayString:
if(len(countList) == 0):
... |
JavaScript | UTF-8 | 1,236 | 3.171875 | 3 | [] | no_license | var weapons = ['AK-47', 'bombs', 'machine-gun', 'laser-gun'];
var soldier = {
name: "Mark",
age: 23,
weight: 70,
weapon: weapons[3],
sayHi: function(name) {
console.log("Hello " + name);
}
};
function add(a, b) {
return a + b;
}
function subtract(a, b) {
return a - b;
}
// var age = prompt("How ... |
Ruby | UTF-8 | 917 | 2.890625 | 3 | [
"MIT"
] | permissive | class ClusterTools::WorkerPool
def initialize(expiration=180)
@expiration = expiration
@tasks = {} # :task => [host1, host2 ...]
@workers = {} # "host" => timestamp
end
def add(host, tasks)
tasks.each do |act|
add_or_update_task(host, act)
@workers[host] = Time.new
end
end
de... |
Ruby | UTF-8 | 1,082 | 2.796875 | 3 | [] | no_license | require 'mars_one/errors'
module MarsOne
module MissionParser
class IOMissionReader
attr_accessor :io
def initialize(io)
self.io = io
end
def read_field
match_data = io.readline.match(/^(\d+)\s(\d+)$/)
raise MarsOne::InputFormatError.new('Can\'t parse field line... |
Python | UTF-8 | 645 | 2.75 | 3 | [] | no_license | #!/usr/local/bin/python3
import sys
# Check for one input argument
if len(sys.argv) != 2:
print('Usage: reindex [name of index file to reindex]')
sys.exit()
filename = str(sys.argv[1])
outfile = filename + '.reindex'
runningTotal = 0
with open(filename,'r') as ifp, open(outfile,'w') as ofp:
for line in... |
C++ | UTF-8 | 441 | 2.65625 | 3 | [
"MIT"
] | permissive | /*
Library for managing a sliding potentiometer
*/
#ifndef Slider_h
#define Slider_h
#include "Arduino.h"
class Slider {
public:
byte nLights;
Slider(int sliderPin, int minChangeForUpdate);
void Init();
void UpdateState();
bool GetSliderUpdate(int *newValue);
int GetValue();
void ForceUpdate();
pri... |
SQL | UTF-8 | 4,630 | 3.34375 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE sa."CTIAWF_MONTHLY_BONUS_PRC" (
ip_run_date IN DATE,
ip_enroll_promo_code IN VARCHAR2,
ip_pend_promo_code IN VARCHAR2
)
AS
/********************************************************************************/
/* Copyright 2004 Tracfone Wireless Inc. All rights reserved ... |
Python | UTF-8 | 6,897 | 3.46875 | 3 | [] | no_license | import numpy as np
from tronproblem import *
from trontypes import CellType, PowerupType
import random, math
from queue import Queue, LifoQueue, PriorityQueue
def get_safe_actions(board, loc, has_armor):
"""
USING FOR VORONOI ONLY
FROM TRONPROBLEM, BUT TAKES INTO ACCOUNT ARMOR
Given a game board and a... |
Python | UTF-8 | 33,340 | 2.796875 | 3 | [] | no_license | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import csv
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import Dataset
import random
random.seed(12796)
####################################################################################
###############... |
Java | UTF-8 | 374 | 1.828125 | 2 | [] | no_license | package com.james.dao;
import java.util.List;
import com.james.entity.Interview;
public interface InterviewDao {
int addInterview(Interview interview);
int deleteInterview(Integer interviewId);
int updateInterview(Interview interview);
Interview queryInterviewByUserId(Integer userId);
... |
Markdown | UTF-8 | 2,449 | 2.78125 | 3 | [] | no_license | # Deploying PG Applications to Heroku - 8/17/2020
After verifying that our app works, it's time to deploy to Heroku!
* Make sure the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) is installed and working.
* Specify a version of Ruby in the `Gemfile`.
* Add `puma` to the `Gemfile`.
* Run `bundle inst... |
Markdown | UTF-8 | 3,165 | 2.609375 | 3 | [] | no_license | # Homework #4
10 points
**DUE: Saturday, March 2 by 12:00pm**
For easiest viewing of these instructions, view online on Github.com or use a Markdown previewer.
### Getting Started
1. Download a ZIP file of this repository, unzip it into a folder, and then convert that folder
into your own git repository. (Altern... |
Java | UTF-8 | 1,962 | 1.914063 | 2 | [] | no_license | package android.support.v4.text;
import android.util.Log;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
final class f
{
private static final String a = "ICUCompatIcs";
private static Method b;
private static Method c;
static
{
try
{
Class localClass = Cl... |
C++ | UTF-8 | 1,141 | 3.609375 | 4 | [] | no_license |
#include "StringLinkedList.h"
#include "StringNode.h"
#include <string>
#include <iostream>
using namespace std;
StringLinkedList::StringLinkedList() // constructor
: head(NULL) {}
StringLinkedList::~StringLinkedList() // destructor
{
while (!empty())
removeFront();
}
bool StringLinkedList::em... |
Java | UTF-8 | 1,700 | 2.796875 | 3 | [] | no_license | package com.careerguidance.model;
import java.util.ArrayList;
import java.util.Hashtable;
/**
* Career class, define university instance and attributes of a career,
* and APIs for accessing career data.
*/
public class Career extends BaseObject {
double avgSalary;
ArrayList<String> skillsRequired;
... |
Python | UTF-8 | 682 | 2.875 | 3 | [] | no_license | import discord
from discord.ext import commands
"""Imports"""
def get_prefix(bot, message):
prefixes = ['c', 'C']
if not message.guild:
return '?'
return commands.when_mentioned_or(*prefixes)(bot, message)
initial_extensions = ['cogs.fun',
'cogs.utility', ]
"""List of cogs"... |
JavaScript | UTF-8 | 1,114 | 2.734375 | 3 | [] | no_license | import React,{useState, useEffect, useReducer} from "react";
import {City, StateCode, MyAPIKey} from "../constants/constants";
const errorMessage = (err)=>{
console.log(err)
}
const apiResponse = (prev, resp)=>{
// console.log(prev)
// console.log('response is - ' + resp)
return resp
}
... |
C# | UTF-8 | 765 | 2.671875 | 3 | [] | no_license | ๏ปฟusing System.Text;
using System.Threading;
using Configit.Grid;
namespace GridTestTaskProcessor {
public class NameRepeaterTaskProcessor : TaskProcessor<string, int, bool, string> {
public override string TypeKey => "NameRepeater";
public override string Name => "Name Repeater";
public override string ... |
Ruby | UTF-8 | 1,857 | 3.375 | 3 | [] | no_license | class NodeRenderer
def initialize(tree)
@tree = tree
end
def render(node = nil)
node = @tree.root if node.nil?
descendant_stats = count_descendants(node)
# All of the node's data attributes
render_attributes(node)
# How many total nodes there are in the sub-tree below this node
... |
C# | UTF-8 | 4,713 | 2.671875 | 3 | [] | no_license | ๏ปฟusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework;
using COMP3351_Game_Engine;
namespace COMP3351_Engine_Demo
{
class HostileMind : Mind
{
// the change in location
private Vector2 _dLocation;
... |
JavaScript | UTF-8 | 4,816 | 2.84375 | 3 | [] | no_license | const express = require('express');
const bodyParser = require('body-parser');
const router = express.Router();
const ds = require('./datastore');
const datastore = ds.datastore;
const BOAT = "Boat";
const LOAD = "LOAD";
//const URL = "http://localhost:8080";
router.use(bodyParser.json());
/************************... |
C# | UTF-8 | 1,578 | 2.546875 | 3 | [] | no_license | ๏ปฟusing GunStore;
using GunStore.Builder;
using GunStore.Decorator;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace GunStoreTest
{
[TestClass]
public class GunStoreDecoratorTests
{
private AbstractGun gun;
[TestInitialize]
public void Initialize()
{
... |
JavaScript | UTF-8 | 3,640 | 2.53125 | 3 | [] | no_license | var db = require("../db.js")
let models = {
userCreation(req, res) {
let userEmail = req.body.email
let mobileNumber = req.body.mobileNumber
userEmail = userEmail.toLowerCase()
db.User.find({}, (err, users) => {
if (err) {
res.send({ message: `unable to ... |
Python | UTF-8 | 154 | 3.046875 | 3 | [] | no_license | import sys
biggest_num = - sys.maxsize
for num in range(3):
num = int(input())
if num > biggest_num:
biggest_num = num
print(biggest_num)
|
C++ | UTF-8 | 1,057 | 2.578125 | 3 | [] | no_license | #pragma once
#include <string>
#include <SDL.h>
#include "window.h"
#include "SDL_image.h"
#include <iostream>
#include <string>
#include "window.h"
class Sprite
{
public:
enum Flip
{
NO_FLIP = SDL_FLIP_NONE,
HORZ_FLIP = SDL_FLIP_HORIZONTAL,
VERT_FLIP = SDL_FLIP_VERTICAL
};
Sprite();
... |
Java | UTF-8 | 122 | 1.820313 | 2 | [] | no_license | package com.kharim.games.blackjack.players;
/**
* kharim
*/
public enum Seats {
ONE, TWO, THREE, FOUR, FIVE, SIX
}
|
Java | UTF-8 | 312 | 2.03125 | 2 | [] | no_license | package com.anja.task1.app.data;
import java.util.List;
/**
* Created by Anna on 29.05.2016.
*/
public interface OrderRepository {
void setSelectedOrder(Order selectedOrder);
Order getSelectedOrder();
List<Order> getOrders(Order.Status status, int amount, int offset);
void clearCache();
}
|
C++ | UTF-8 | 8,846 | 2.859375 | 3 | [] | no_license | #include <iostream>
#include <fstream>
#include <memory>
#include <atomic>
#include <mutex>
#include <initializer_list>
#include <type_traits>
#include <typeinfo>
#include <utility>
#include <vector>
#include <list>
#include <string.h>
#include <algorithm>
#include <iterator>
#include <unordered_map>
// Boost Library H... |
Python | UTF-8 | 391 | 2.53125 | 3 | [] | no_license | import sys
import boto3
from boto3.dynamodb.conditions import Key, Attr
dynamodb = boto3.resource('dynamodb')
table=dynamodb.Table('LAX')
da=sys.argv[1]
year=sys.argv[2]
#print (da)
#print (year)
response = table.scan(FilterExpression=Attr('DA').eq(da) & Attr('Year').eq(year), ProjectionExpression='NOP')
items = respon... |
C++ | UTF-8 | 1,268 | 2.796875 | 3 | [] | no_license | #include <QCoreApplication>
#include <QStringList>
#include <QTextStream>
#include "arguments.h"
Arguments::Arguments()
{
QStringList argList = QCoreApplication::arguments();
QString option;
auto it = argList.begin();
++it; // Skip application name
for (; it != argList.end(); ++it)
{
QString arg = *it;
if (a... |
PHP | UTF-8 | 3,521 | 2.515625 | 3 | [
"GPL-2.0-only",
"MIT"
] | permissive | <?php
class Ongkoskirim_Id_License {
function __construct($lib=""){
// supaya tidak dobel2 panggil lib
if( empty($lib) )
$this->lib = new Ongkoskirim_Id_Library();
else
$this->lib = $lib;
$this->license_url = "http://store.".$this->lib->domain."/";
$this->product_id = "oid";
$this->option_prefix ... |
Java | UTF-8 | 897 | 2.375 | 2 | [] | no_license | package com.bonvoyage.daos;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.bonvoyage.models.Users;
import com.bonvoyage.repository.UserRepository;
@Repository
public class UserDaoImpl implements UserDao {
@Autowir... |
C# | UTF-8 | 1,608 | 3.453125 | 3 | [] | no_license | ๏ปฟusing System;
namespace Chap02_01
{
class Program
{
static void Main(string[] args)
{
// 1๋ฐ์ดํธ = 8๋นํธ
byte a = 100;
// byte ์๋ฃํ์ size๋ 1๋ฐ์ดํธ(8bit),
// ํํ ๋ฒ์๋ 0 ~ 255, 0 ~ 2์ 8์น - 1 -> 0
sbyte b = 127;
// byte ์๋ฃํ์ size๋ 1๋ฐ์ดํธ... |
C++ | UTF-8 | 3,101 | 3.25 | 3 | [
"MIT"
] | permissive | #ifndef _DATABASE__
#define _DATABASE__
#include <string>
#include <unordered_map>
#include "sqlite3.h"
#include <vector>
/**
* class DataBase
*
* The abstract class DataBase provide an unified
* interface for managing any king of database
* that supports key-value pair
*/
class DataBase
{
protected:
std:... |
Python | UTF-8 | 1,129 | 3 | 3 | [] | no_license | import matplotlib
matplotlib.use("TkAgg")
import pylab
import networkx as nx
n_m = 100 #number of movable things
n_n = 1 #number of non-movable things
r = 0.1
class agent:
pass
def init():
global agents
agents = []
for i in range(n_m):
ag = agent()
ag.x = pylab.random()
ag.y = pylab.random()
ag.can_mov... |
C | UTF-8 | 3,149 | 2.703125 | 3 | [
"Unlicense"
] | permissive | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* map.c :+: :+: :+: ... |
C# | UTF-8 | 1,648 | 3.203125 | 3 | [] | no_license | ๏ปฟusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Techcraft7_DLL_Pack.Utils
{
public static class OtherUtils
{
public static void InLineSwitch<T>(T value, Dictionary<T[], Action> cases)
{
if (cases.Any(kv => kv.Value == null))
{
... |
Python | UTF-8 | 493 | 2.609375 | 3 | [] | no_license | #!/usr/bin/env python
import numpy
from sklearn import cluster, datasets
X = [
[2,4],
[3,3],[3,4],
[5,4],[5,6],[5,8],
[6,4],[6,5],[6,7],
[7,3],[7,4],
[8,2],
[9,4],
[10,6],[10,7],[10,8],
[11,5],[11,8],
[12,7],
[13,6],[13,7],
[14,6],
[15,4],[15,5] ];
print len(X)
X... |
Java | UTF-8 | 351 | 1.5625 | 2 | [] | no_license | package com.repsly.edu.libs;
import android.app.Application;
import com.tumblr.remember.Remember;
/**
* Application cool class.
*/
public class EventApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
Remember.init(getApplicationContext(), "com.example.te... |
C | UTF-8 | 617 | 2.65625 | 3 | [] | no_license | #include<mpi.h>
#include<stdlib.h>
#include<stdio.h>
int main(int argc,char** argv){
int rank,size,epp;
int* dataSend=NULL;
int i,n;
float res;
float pie;
MPI_Init(NULL,NULL);
MPI_Comm_rank(MPI_COMM_WORLD,&rank);
MPI_Comm_size(MPI_COMM_WORLD,&size);
if(rank==0){
printf("Enter the value of n\n");
scanf("... |
C++ | UTF-8 | 1,282 | 3.171875 | 3 | [] | no_license | #include <iostream>
#include "Numeros.h"
#include <ctime>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int main()
{
Numeros * num;
num = new Numeros();
int numero;
int resultado = 0;
vector <int > rango;
vector < int > primos;
int cantPrimos = 0;
clock_t start, finish; //... |
JavaScript | UTF-8 | 919 | 3.21875 | 3 | [] | no_license |
const state = {
usersBreedChoice: 'blah'
};
init();
function init(){
handleSubmit();
}
function handleSubmit(){
$('form').submit(function(event){
state.usersBreedChoice = $('.js-query').val();
$('.js-query').val('');
getDataFromAPI(state.usersBreedChoice, displayData);
//handleNextButton();... |
Java | UTF-8 | 606 | 1.96875 | 2 | [
"MIT"
] | permissive | package com.example.granny.repository;
import com.example.granny.domain.entities.Location;
import com.example.granny.domain.entities.User;
import com.example.granny.domain.entities.VerificationToken;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
imp... |
Markdown | UTF-8 | 1,570 | 2.75 | 3 | [] | no_license | # GENOMEPERI
Python Module for handling SNP txt data
This module can read txt files created by either 23&Me or Ancestry.com
The resulting SNP_GENOME object has a list RSINDEX which can be used to call SNP data from the dictionary GENOME
SNP_GENOME objects have two dictionaries: .GENOME and .CHROMOSOME_COUNT_LOG
.GEN... |
Java | UTF-8 | 9,788 | 2.6875 | 3 | [] | no_license | package controller;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Optional;
import java.util.ArrayList;
import javafx.event.EventHandler;
import javafx.scene.input.MouseEvent;
import application.MyStage;
import javafx.animation.AnimationTim... |
C | UTF-8 | 435 | 2.890625 | 3 | [] | no_license | /*
** EPITECH PROJECT, 2021
** output_last_char
** File description:
** antman
*/
#include "my.h"
list_t *output_last_char(list_t *chars, char *file, int i)
{
infos_t info;
for (int j = 0, len = len_list(chars); j < len; j++) {
if (get_at(chars, j).c == file[i]) {
info.output = get_at(char... |
Markdown | UTF-8 | 1,531 | 2.6875 | 3 | [] | no_license | # Smart Library Application
It can be use like a Book Library. Where student can Issue book and Return book easily.It is very easy application and functionalities are easily implemented. In this application, Student can easily See the available books and Issue or Return books. This project will be useful to the people ... |
Java | UTF-8 | 2,941 | 2.625 | 3 | [] | no_license | package client.testing.util;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.Reader;
import java.io.StringWriter;
import java.io.Writer;
import java.nio.charset.Charset;
public class IOUtils
{
private static final int DEFAULT_BUFF... |
PHP | UTF-8 | 426 | 3.140625 | 3 | [] | no_license | <?php
$persona1='pedro';
$persona2='juan';
$_persona3='carlos';
function saludar(){
global $persona1;
echo "hola".$persona1;
}
//saludar();
$a=true;
$b=2;
$c=2.76;
$d='a';
$e=[1,2,3];
$f=new stdClass();
$g=NULL;
echo ' '.gettype($a);
echo ' '.gettype($b);
echo ' '.gettype($c);... |
Shell | UTF-8 | 651 | 3.359375 | 3 | [] | no_license | #!/bin/bash
if [ $# == 0 ]
then
read -p "Enter 1st Number " n1
read -p "Enter 2nd Number " n2
echo "Sum is:"
echo `expr $n1 + $n2`
echo "Difference is:"
echo `expr $n1 - $n2`
echo 'Product is: '
echo `expr $n1 \* $n2`
if [ n2 != 0 ]
then
echo 'Division is:'
echo `expr $n1 / $n2`
fi
if [ n... |
C++ | UTF-8 | 1,667 | 2.515625 | 3 | [] | no_license | #ifndef SKYBOX_H
#define SKYBOX_H
#ifdef __APPLE__
#include <OpenGL/gl3.h>
#include <OpenGL/glext.h>
#include <OpenGL/gl.h> // Remove this line in future projects
#else
#include <GL/glew.h>
#endif
#include <GLFW/glfw3.h>
#include <glm/mat4x4.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <vector>
#include <i... |
Java | UTF-8 | 5,240 | 1.960938 | 2 | [] | no_license | package com.jameswong.worklist.fragment;
import android.support.design.widget.NavigationView;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v4.widget.DrawerLayout;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
imp... |
Ruby | UTF-8 | 171 | 3.078125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | def oxford_comma(array)
case array.size
when 1
return array.first
when 2
return array.join(' and ')
else array << "and #{array.pop}"
return array.join(', ')
end
end
|
Markdown | UTF-8 | 325 | 2.578125 | 3 | [
"MIT"
] | permissive | # manicMiner-taoSdl
This is the simplified classes diagram, which might give you a clue on how
the program is structured:

Also, in this folder you can find the a little documentation for the game,
such as the [original levels](./originalLevels) and the [original sprites](./originalSprite... |
C# | UTF-8 | 2,223 | 2.59375 | 3 | [] | no_license | using NUnit.Framework;
using RestSharp;
using RestSharpWithSpecFlow.Model;
using System.Collections.Generic;
namespace RestSharpWithSpecFlow
{
[TestFixture]
public class Tests
{
[Test]
public void TestGetRequest()
{
var restClient = new RestClient("http://localhost:3000... |
Java | UTF-8 | 822 | 1.789063 | 2 | [] | no_license | package eg.ipvii.fotp.proxy;
import net.minecraft.item.Item;
//import eg.ipvii.fotp.tileentity.TileEntityJar;
//import eg.ipvii.fotp.tileentity.render.RendererJar;
//import net.minecraft.item.Item;
//import net.minecraftforge.client.model.ModelLoader;
//import net.minecraftforge.fml.client.registry.ClientRegistry;
pu... |
Java | UTF-8 | 1,307 | 2.671875 | 3 | [] | no_license | package fr.eseo.poo.projet.artiste.vue.formes;
import java.awt.Color;
import java.awt.Container;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import fr.eseo.poo.projet.artiste.modele.Coordonnees;
import fr.eseo.poo.projet.artiste.modele.formes.Ligne;
import fr.eseo.poo.projet.artiste.vue.ihm.Panneau... |
C++ | UTF-8 | 2,912 | 2.890625 | 3 | [] | no_license | #include "LinearAlgebra/dense/memory_chunk_aliasing_p.hpp"
#include "LinearAlgebra/dense/matrix.hpp"
#include "LinearAlgebra/dense/matrix_view.hpp"
#include "LinearAlgebra/dense/vector.hpp"
#include "LinearAlgebra/dense/vector_view.hpp"
#include <gtest/gtest.h>
using namespace LinearAlgebra;
TEST(Memory_Chunck_Alias... |
Python | UTF-8 | 304 | 3.640625 | 4 | [] | no_license | def unlimied_item(*args, **keyword_args):
for key , items in keyword_args.items():
print('{} : {}'.format(key,items))
for i in args:
print(i)
unlimied_item(1,3,4,4,name='rakib',age=22)#1 to 5
unlimied_item(*[1,2,3,4])#1 to 5
print("THE elements are {} ,{} ,{}".format(*[1,2,3]))
|
Java | UTF-8 | 1,552 | 3.25 | 3 | [] | no_license | import java.io.*;
public class Printer {
private final Reader reader;
Printer(String path) throws FileNotFoundException {
reader = new FileReader(getClass().getResource(path).getFile());
}
Printer(InputStream in) {
// usato nei test, dove non si legge un file, ma si genera un input s... |
Swift | UTF-8 | 3,676 | 2.84375 | 3 | [] | no_license | //
// ListOfPhotosViewController.swift
// Photos
//
// Created by Marat Shagiakhmetov on 05.05.2021.
//
import UIKit
import Alamofire
class ListOfPhotosViewController: UITableViewController {
var wallpapers: [Wallpaper] = []
override func viewDidLoad() {
super.viewDidLoad()
tableV... |
Java | UTF-8 | 1,012 | 2.328125 | 2 | [] | no_license | package VYtrack;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.Assert;
import org.testng.annotations.Test;
import pages.LoginPage;
import utils.BrowserUtils;
import utils.ConfigurationReader;
import utils.Driver;
public class LoginTest... |
Java | UTF-8 | 1,185 | 2.125 | 2 | [] | no_license | /**
* Hana Project
* Copyright 2014 iRush Co.,
*
*/
package com.hanaph.gw.ea.person.service;
import java.util.List;
import java.util.Map;
import com.hanaph.gw.ea.person.vo.PersonLineVO;
/**
* <pre>
* Class Name : PersonLineService.java
* ์ค๋ช
: ๊ฐ์ธ๊ฒฐ์ฌ๋ผ์ธ Master Service
*
* Modification Information
* ์์ ์ผ... |
Shell | UTF-8 | 533 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | #!/bin/bash
# {{ ansible_managed }}
# Starts the Mesos master process for cluster '{{ mesos_cluster_name }}'.
ulimit {{ mesos_ulimit_options }}
MESOS_MASTER_ARGS=(
--cluster='{{ mesos_cluster_name }}'
--ip='{{ mesos_ip }}'
--log_dir='{{ mesos_log_dir }}/{{ safe_mesos_cluster_name }}/master'
--port='{{ mesos_... |
Markdown | UTF-8 | 1,504 | 2.515625 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: LVM_SETTOOLTIPS message (Commctrl.h)
description: Sets the tooltip control that the list-view control will use to display tooltips. You can send this message explicitly or use the ListView\_SetToolTips macro.
ms.assetid: 5b4335a4-e9f0-4b13-b00b-516af3b60bf1
keywords:
- LVM_SETTOOLTIPS message Windows Control... |
Java | UTF-8 | 1,438 | 2.34375 | 2 | [] | no_license | package com.eshore.wbtimer.executor.common.exception;
import com.poson.ibsspub.util.MessageFormatter;
/**
* ๆ่ฟฐ:
*
* @author Yjm
* @create 2018/5/24 12:31
*/
public class CRMException extends RuntimeException
{
public CRMException(String expCode, String expDesc)
{
super(String.format("\u3010\u5F0... |
Swift | UTF-8 | 671 | 2.71875 | 3 | [] | no_license | //
// FlagCell.swift
// AllFlags
//
// Created by mac os on 18.06.16.
// Copyright ยฉ 2016 Khrystenko Dmytro. All rights reserved.
//
import UIKit
class FlagCell: UICollectionViewCell {
@IBOutlet weak var thumbImg: UIImageView!
@IBOutlet weak var nameLbl: UILabel!
var flag: Flag!
... |
PHP | UTF-8 | 342 | 2.734375 | 3 | [] | no_license | <?php
namespace App\TopVotes\Exceptions;
use App\Core\Exceptions\Exception;
class TopNotFoundException extends Exception
{
/**
* TopNotFoundException constructor.
*
* @param string $top
*/
public function __construct(string $top)
{
parent::__construct("ะขะพะฟ '$top' ะฝะต ะฝะฐะนะดะตะฝ!"... |
PHP | UTF-8 | 2,206 | 2.515625 | 3 | [] | no_license | <?php
namespace Chobit\Service\Installer;
use Symfony\Component\Validator\Constraints;
use Chobit\Service\AbstractInstaller;
class MySQL extends AbstractInstaller {
public $configFile = 'config.php';
public $template = <<<'EOL'
<?php
// database for MySQL
$app['db.dsn'] = 'mysql:%%DATABASE%%';
$app['db.user']... |
C++ | UTF-8 | 1,642 | 2.75 | 3 | [
"MIT"
] | permissive | /* -*- Mode: C++; indent-tabs-mode: nil -*- */
#ifndef SCHWA_CONFIG_SERIALISATION_H_
#define SCHWA_CONFIG_SERIALISATION_H_
#include <string>
#include <schwa/config/op.h>
namespace schwa {
namespace config {
class Main;
/**
* Configuration option for loading serialised config options from a file. Th... |
Java | UTF-8 | 1,794 | 2.765625 | 3 | [] | no_license | package com.example.movierecyclerview;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.List;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
public class Adapt... |
Python | UTF-8 | 11,214 | 2.59375 | 3 | [] | no_license | '''
Created on 8 May 2016
@author: guerec01
'''
from indexer.storage.cache import CacheStore
from indexer.storage.index import IndexStore
from urllib.parse import urlparse
from rdflib.namespace import RDF, OWL, FOAF, RDFS
from rdflib.graph import Dataset, Graph
from indexer.util.namespaces import INDEXER, PROV
from rd... |
PHP | UTF-8 | 134 | 2.59375 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace Domain;
interface ProductStorageInterface
{
public function add(Product $product);
}
|
Python | UTF-8 | 3,446 | 2.515625 | 3 | [] | no_license | import sys
sys.path.append('/home/ubuntu/caffe-master/python')
import caffe
import os.path
import rsquared as r2
from pylab import *
#set to use CPU and not GPU
caffe.set_mode_cpu()
#check for enough arguments
if len(sys.argv) != 6 and len(sys.argv) != 7 and len(sys.argv) != 8 and len(sys.argv) != 9:
exit("Er... |
Java | UTF-8 | 1,914 | 2.265625 | 2 | [] | no_license | package com.mercado.mineiro.administration.common.web;
import com.mercado.mineiro.administration.common.exception.DomainException;
import com.mercado.mineiro.administration.common.base.EntityBase;
import lombok.Getter;
import lombok.Setter;
import org.springframework.http.ResponseEntity;
import org.springframework.ste... |
PHP | UTF-8 | 2,797 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
/**
* core/MY_Controller.php
*
* Default application controller
*
* @author JLP
* @copyright 2010-2013, James L. Parry
* ------------------------------------------------------------------------
*/
class Application extends CI_Controller {
protected $data = array(); // parameters for ... |
JavaScript | UTF-8 | 3,104 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | var M = require('mstring'),
f = require('util').format;
var id = 0;
var generateId = function() {
return id++;
}
var resetId = function() {
id = 0;
}
var clone = function(o) {
var opts = {};
for(var name in o) opts[name] = o[name];
return opts;
}
var generatePathAndObject = function(self, context) {
//... |
Markdown | UTF-8 | 10,544 | 2.671875 | 3 | [
"MIT"
] | permissive | ---
layout: default
title: Interfaccia da linea di comando per WordPress
direction: ltr
---
[WP-CLI](https://wp-cli.org/) รจ un insieme di strumenti da linea di comando per la gestione delle installazioni [WordPress](https://wordpress.org/). Potete aggiornare plugin, configurare installazioni multisito e molto altro, ... |
JavaScript | UTF-8 | 626 | 2.796875 | 3 | [] | no_license | const axios = require('axios');
const moment = require('moment');
const bangkokForecast = async () => {
// put your code here !!
let openweathermapAPI = 'https://api.openweathermap.org/data/2.5/forecast/daily?q=Bangkok,THA&cnt=7&appid=e5446373eef6128679c7fa8a1951d788&units=metric'
try {
let datas = await axi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.