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 |
|---|---|---|---|---|---|---|---|
JavaScript | UTF-8 | 3,232 | 2.8125 | 3 | [] | no_license | import React, { Component } from 'react';
export default class Rewards extends Component {
getItemDropDiv(itemData) {
if (!itemData) {
return <div className="reward-item--no-item">No item drop</div>;
}
return (
<div className="reward-item-parent" >
Item drop received:
{item... |
Go | UTF-8 | 24,070 | 2.671875 | 3 | [] | no_license | package compiler
import (
"fmt"
"github.com/mlmhl/compiler/gstac/compiler/ast"
"github.com/mlmhl/compiler/gstac/errors"
"github.com/mlmhl/compiler/gstac/token"
)
func (compiler *Compiler) compileUnit() {
parser := compiler.parser
logger := compiler.logger
for {
tok, err := parser.Next()
if err != nil {
... |
TypeScript | UTF-8 | 3,888 | 2.609375 | 3 | [] | no_license | import { Item, Product } from '@app/models/item';
export interface MacchineSet {
/*
"Matnr": "SC_LINEA-FB70",
"Email": "",
"Maktx": "CATALOGO LINEA-FB70",
"Token": "",
"Langu": "IT",
"Family": "FB70",
"LoioId": ""
*/
Matnr: string,
Email: string,
Mak... |
Python | UTF-8 | 1,690 | 3.40625 | 3 | [] | no_license | #imports
import pygame
from time import sleep
import sys
pygame.init()
#colours
WHITE = (255,255,255)
BLACK = (0,0,0)
GREEN = (0,255,127)
#functions
def char(x,y):
window.blit(cherry, (x,y))
def text_objects(text, font):
textSurface = font.render(text, True, BLACK)
return textSurface, textSu... |
Markdown | UTF-8 | 777 | 3.859375 | 4 | [] | no_license | ### Channel Buffering
#### Description
By default channels are unbuffered, meaning that they will only accept sends (chan <-) if there is a corresponding receive (<- chan) ready to receive the sent value. Buffered channels accept a limited number of values without a corresponding receiver for those values.
#### Exam... |
Python | UTF-8 | 479 | 3.421875 | 3 | [] | no_license | import pandas as pd
import datetime
x = pd.date_range(start='6/15/2020', end='8/12/2020')
saturdays = [day.date() for day in x if day.weekday() == 5]
fridays = [day.date() for day in x if day.weekday() == 4]
"""
for i in saturdays:
print('Sat: {}'.format(i))
for i in fridays:
print('Fri: {}'.format(i))
... |
Java | UTF-8 | 7,700 | 1.765625 | 2 | [
"Apache-2.0"
] | permissive | package com.softonic.instamaterial.ui.locator;
import android.support.v4.app.FragmentActivity;
import com.softonic.instamaterial.data.locator.DataServiceLocator;
import com.softonic.instamaterial.domain.executor.UseCaseExecutor;
import com.softonic.instamaterial.domain.interactors.GetAuthenticatedUserUid;
import com.s... |
PHP | UTF-8 | 320 | 2.71875 | 3 | [] | no_license | <?php
namespace model;
/*
* Interface: model/iMazeHazard
*
* Interface for maze hazards. All mazehazards must use iMazeHazard interface.
*/
interface iMazeHazard {
public function __construct();
public function GetName();
public function GetMazeTileCodeChar();
public function GetStepRedcution();
}
|
C | UTF-8 | 446 | 2.65625 | 3 | [
"MIT"
] | permissive | // main program for running the processing of the mapped files
#include <stdio.h>
int main(int argc, char *argv[]){
if (argc != 4){
fprintf(stderr, "%s: <indir> <outdir> <-r or -t>\n-t\t\ttraditional 6-column file format\n-r\t\trao format\n\nGenerate chromosome by chromosome files in the specified directory\n\n", a... |
C++ | UTF-8 | 626 | 2.8125 | 3 | [] | no_license | //
// Created by kamila on 16.03.18.
//
#include "SmartTree.h"
using namespace datastructures;
int main(){
std::unique_ptr <SmartTree> x;
std::unique_ptr <SmartTree> root= CreateLeaf(8);
std::unique_ptr <SmartTree> child= CreateLeaf(9);
x= InsertLeftChild(std::move(root),std::move(child));
std::str... |
Java | UTF-8 | 5,372 | 2.3125 | 2 | [] | no_license | package week1;
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Keys;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver... |
C | UTF-8 | 554 | 3.828125 | 4 | [] | no_license | #include<stdio.h>
void sort(int*, int);
void main(){
int x[20],n, i;
puts("Enter number of elements: ");
scanf("%d",&n);
puts("Enter element");
for(i=0;i<n;i++)
scanf("%d",&x[i]);
sort(x,n); //function call
puts("Sorted array is:");
for(i=0;i<n;i++){
printf("%... |
Shell | UTF-8 | 1,362 | 3.265625 | 3 | [] | no_license | #!/bin/sh
#
# Istruzione di Stop del demone cupsd (non serve ai clients)
# valida per sistemi linux
#
architettura=`uname -a | awk -F" " '{print $1}'`
if [ "$architettura" = "Linux" ]; then
/sbin/service cups stop
/sbin/chkconfig cups off
fi
#
# Definisco il print server a seconda della sede
#
host=`hostname`
su... |
C# | UTF-8 | 1,303 | 2.796875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LoanLending.Observers;
using LoanLending.DataSets;
namespace LoanLending.Domain
{
class Client : ILoanObserver
{
private string clientId;
private string name;
priv... |
C# | UTF-8 | 1,287 | 3.078125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StudentManagemetSystem.Data;
using StudentManagemetSystem.Models;
using StudentManagemetSystem.Helpers;
namespace StudentManagemetSystem.Workflows
{
public class ListStudentWorkflow
{
... |
C++ | UTF-8 | 9,226 | 2.546875 | 3 | [] | no_license | #include "StdAfxRegArchLib.h"
/*!
\file RegArchCompute.cpp
\brief implementation of the Simulation / Estimation procedures for general RegArchModel
\author Jean-Baptiste DURAND, Ollivier TARAMASCO
\date dec-18-2006 - last change feb-18-2011
*/
namespace RegArchLib {
/*!
* \fn void RegArchSimul(uin... |
C# | UTF-8 | 1,705 | 3.015625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
public class TextFileCenter : IDayWorkLogStream
{
public IDayWorkLog GetTodayDayWork(string folderpath)
{
var filepath = GetFilePath(folderpath);
var enc = Encoding.GetEncoding("Shift_JIS");
if (File.Exi... |
TypeScript | UTF-8 | 638 | 2.984375 | 3 | [] | no_license | import dayjs from 'dayjs';
import { Timestamp } from '../types';
export const parseTimestamp = (timestampMatch: string): Timestamp => {
const trimmedTimestamp = timestampMatch.trim();
if (!/\d\d:\d\d-\d\d:\d\d/.test(trimmedTimestamp)) {
return null;
}
return { start: trimmedTimestamp.split('-')[0].trim(),... |
C# | UTF-8 | 720 | 3.109375 | 3 | [] | no_license | public static class LastEnumerator
{
public static IEnumerable<MetaEnumerableItem<T>> GetLastEnumerable<T>(this IEnumerable<T> blah)
{
bool isFirst = true;
using (var enumerator = blah.GetEnumerator())
{
if (enumerator.MoveNext())
{
bool isLast;
do
{
var current = enumerat... |
Python | UTF-8 | 614 | 2.765625 | 3 | [] | no_license | import context
import mocks
from menu import Action
def test_init_shouldTakeName():
assert Action("myName").name() == "myName"
def test_run_doesNothing():
menu = mocks.Menu()
Action("").run(menu)
def test_lt_shouldBeTrue():
assert Action("abc") < Action("abd")
def test_lt_shouldBeFalse():
as... |
Markdown | UTF-8 | 2,328 | 3.5625 | 4 | [] | no_license | ---
layout: post
title: programmers(78)level_3(야근지수)
categories: [algorithm]
excerpt: ' '
comments: false
share: false
tags: algorithm programmers level3
date: 2019-08-06
---
## 문제: 78. 야근지수
- 수식을 구해서 풀면 될 줄 알았는데 실패했다
```python
def solution(n, works):
total = sum(works)
cnt = len(works)
result = 0
if... |
Python | UTF-8 | 1,194 | 4.03125 | 4 | [] | no_license | print("Buzzfeed Quiz: Tell Us Your Style & We will Tell You What Subject You’ll Teach")
#Questions the quiz will ask:
question1 = input("On a night out do you prefer: \n A. A Dress \n B. Jeans and Blouse \n C. Romper \n D. Whatever is Clean")
question2 = input("When lounging around the house what do you wear: \n A. T-... |
TypeScript | UTF-8 | 1,398 | 2.71875 | 3 | [
"MIT"
] | permissive | import { Sprite, Game } from "phaser";
export class Swarm extends Sprite {
public static assetName = "swarm";
private enabled: boolean;
private placed: boolean;
private heightLimit = 5;
startingHeight = 0;
currentHeight = 1;
text: Phaser.Text;
constructor(game: Game, x: number, y: numbe... |
Markdown | UTF-8 | 444 | 2.59375 | 3 | [] | no_license | # my-first-repo
git@github.com:eagyemang21/my-first-repo.git
I am an energetic Brooklyn native who thrives off enthusiasm and new things. I am mostly excited about geting started on Marcy Lab this year and that we will
be learning new material, but also make wonderful connections and healthy bonds along the way. I ho... |
PHP | UTF-8 | 2,334 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace jschreuder\SpotDesk\Entity;
use jschreuder\SpotDesk\Value\MailTransportSecurityValue;
use Ramsey\Uuid\UuidInterface;
use DateTimeInterface;
class Mailbox
{
public function __construct(
private UuidInterface $id,
private string $name,
private ?Dep... |
C++ | GB18030 | 1,582 | 3.140625 | 3 | [] | no_license | #include<stdio.h>
#include<vector>
#include<queue>
using namespace std;
struct Node{
int type;
int id;
double price;
double amount;
vector<int> buyer;
};
bool visited[100000];
int n;
double p,r;
vector<Node> nodes(100000);
double bfs(int now){
double sales=0;
queue<Node> q;
visited[now]=true;
q.push(nodes[now]... |
C++ | UTF-8 | 315 | 2.578125 | 3 | [
"MIT"
] | permissive | #pragma once
#include <utility>
#define ASSERT_OK_AND_ASSIGN(dest, expr) \
dest = ({ \
auto __result = (expr); \
ASSERT_TRUE(__result.ok()) << __result.status(); \
std::move(*__result); \
});
|
Python | UTF-8 | 1,540 | 3.625 | 4 | [] | no_license | import sys
#정점의 개수, 간선의 개수, 탐색 시작할 정점의 번호
N, M, V = map(int, sys.stdin.readline().split())
#N+1을 하는 이유는 리스트의 인덱스가 0부터 시작하므로 순서상 헷갈리므로 1을 더해준다!
#즉, 1 2 3 4 5 노드에 각각 1 2 3 4 5를 넣어야 헷갈리지 않는다는 말!(원래의 리스트라면 인덱스 0 1 2 3 4에 1 2 3 4 5가 들어감)
graph_list = [set([]) for _ in range(N+1)]
#간선은 노드끼리의 연결을 의미하므로 a,b에 입력한 노드들은 서로 연결됨... |
Java | UTF-8 | 995 | 2.140625 | 2 | [] | no_license | /**
*
*/
package com.baomidou.springboot.config;
import org.tio.utils.time.Time;
/**
* @Description: Tio配置类
* @Author: LiHaitao
* @CreateDate: 2018/8/14 22:00
* @UpdateUser:
* @UpdateDate: 2018/8/14 22:00
* @UpdateRemark:
* @Version: 1.0.0
*/
public abstract class ServerConfig {
/**
* ... |
Java | GB18030 | 1,053 | 2.578125 | 3 | [] | no_license | package com.milkelkl.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class PageRedirect extends HttpServlet {
... |
JavaScript | UTF-8 | 1,195 | 2.59375 | 3 | [] | no_license |
var express = require('express'); //require
var router = express.Router(); //新对象
router.get('/', function(req, res, next) {
var loginData; //登录变量
if (req.session.user) { //如果有登陆者
loginData = {
isLogin: true, ... |
C# | UTF-8 | 1,823 | 2.90625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DAL
{
public class TimeAtTheDayDAL
{
public bool AddTimeAtTheDay(TimeAtTheDay timeAtTheDay)
{
using (PrayOnTheWayEntities DB = new PrayOnTheWayEntities())
... |
C++ | UTF-8 | 1,910 | 3.6875 | 4 | [] | no_license | #include<cstdio>
#include<iostream>
#include<cstdlib>
using namespace std;
struct Complex;
typedef struct Complex *Opr;
struct Complex{
double a, b;
};
/* Should malloc in main() */
void Assign(Opr Z, double x, double y);
double GetReal(Opr Z);
double GetImage(Opr Z);
void Add(Opr X, Opr Y, Opr Z);
void Subtra... |
PHP | UTF-8 | 1,709 | 2.71875 | 3 | [] | no_license | <?php
include "../Includes/basedir.inc.php";
include "../Includes/config.inc.php";
//NOTE: MAKE SURE YOU DO YOUR OWN APPROPRIATE SERVERSIDE ERROR CHECKING HERE!!!
if(!empty($_POST) && isset($_POST))
{
//make variables safe to insert
$bat = mysql_real_escape_string($_POST['bat']);
$etage = mysql_real_escape_strin... |
Java | UTF-8 | 90 | 1.757813 | 2 | [] | no_license | package com.whitehat.jr.model;
public enum VehicleType {
CAR, SUV, OTHER;
}
|
Python | UTF-8 | 4,305 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | # Copyright (c) 2023, Arm Limited or its affiliates. All rights reserved.
# SPDX-License-Identifier : Apache-2.0
#
# 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.... |
JavaScript | UTF-8 | 1,777 | 2.625 | 3 | [] | no_license | 'use strict';
angular.module('ulyssesApp')
.controller('ScheduleViewCtrl', function ($scope) {
$scope.hour = 135;
$scope.schedule = null;
$scope.timeArray = [];
$scope.earlyTime = new Date('April 13, 2016, 07:00:00');
$scope.lateTime = new Date('April 13, 2016, 17:00:00');
$scope.$parent.sch... |
Python | UTF-8 | 81 | 2.796875 | 3 | [] | no_license | import math
def f(zxc):
q = zxc
return f'{math.pi:.{q}f}'
print(f(4)) |
Python | UTF-8 | 2,361 | 2.6875 | 3 | [] | no_license | import os
from cv2 import cv2
import numpy as np
import requests
import math
import random
from pathlib import Path
import time
from PIL import Image
LAT = [45.35051, 45.65]
LONG = [-122.20, -123.0]
X_SLICE = 50
Y_SLICE = 50
RAW_IMG_PATH = "C:\\Users\\harry\\Anaconda3\\envs\\gputest\\AT-Task2-DL\\TrainingData\\Satel... |
TypeScript | UTF-8 | 290 | 3.75 | 4 | [] | no_license | // 类的类型 将定义好的类做为类型,使用方法和接口做为类型是一样的。
/*
class Person{
name
age
constructor(name:string,age:number){
this.name = name
this.age = age
}
}
let p:Person = new Person('郭丹丹',20)
*/
|
C# | UTF-8 | 4,819 | 2.78125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Brevitee.Analytics
{
public abstract class BaseCrawler: ICrawler
{
static Dictionary<string, ICrawler> _crawlers;
static object _crawlerLock = new object();
... |
Shell | UTF-8 | 1,579 | 3.40625 | 3 | [] | no_license | #!/bin/sh
STRING="eHOF"
echo "Please select ..."
echo 1: Skip
echo 2: Check package $STRING
echo 3: Check package $STRING without vignette
echo 4: Checking eHOF tarball as CRAN
while :
do
read INPUT_STRING
case $INPUT_STRING in
1) break
;;
2) echo "Checking package source ..."
mv ~/.wine... |
Markdown | UTF-8 | 6,816 | 2.9375 | 3 | [] | no_license | 一二〇
第二十八章 两相对质
有时逸和左北斗指路,马车很快地驰抵了楚云秋碰见梅恨天之处。
当然,梅恨天已不在这儿了。
时逸让薛空摹停住了马车,他跳下了车。
他坐在地上仔细看了一阵,然后站起来直抓头。
莫言也跳了下去,道:“怎么了,你不是精通追踪之术的吗?”
时逸皱着眉道:“足迹乱了,怎么这块地儿突然增添了这么多足迹,有另有女,不下几十个之多。”
莫言俯首往地上看去,但他却看不出什么来!
只听逍遥宫圭在车里问道:“可有什么发现吗?”
莫言回身把时逸的发现告诉了逍遥宫主。
逍遥宫主沉默了一下,道:“恐怕这是“双凤门”人留下的足迹,她们追踪而... |
C++ | GB18030 | 259 | 2.90625 | 3 | [] | no_license | #include "pch.h"
// Base64ַĿ
size_t charCount(const char* str, size_t size, const char ch) {
size_t count = 0;
for (size_t i = size - 1; i > size - 4; i--) {
if (str[i] == ch)
count++;
else
break;
}
return count;
} |
Ruby | UTF-8 | 369 | 3.734375 | 4 | [] | no_license | def halvsies(arr)
halfway = arr.size / 2 - 1
halfway = (arr.size / 2.0).round - 1 if arr.size.odd?
second_half = halfway + 1
arr1 = arr[0..halfway]
arr2 = arr[second_half..-1]
[arr1, arr2]
end
puts halvsies([1, 2, 3, 4]) == [[1, 2], [3, 4]]
puts halvsies([1, 5, 2, 4, 3]) == [[1, 5, 2], [4, 3]]
puts halvsie... |
Java | UTF-8 | 672 | 3.453125 | 3 | [] | no_license | /*
53. Maximum Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For example, given the array [-2,1,-3,4,-1,2,1,-5,4],
the contiguous subarray [4,-1,2,1] has the largest sum = 6.
#this problem was discussed by Jon Bentley (Sep. 1984 Vol. 27 No. 9 Commun... |
Ruby | UTF-8 | 2,392 | 2.625 | 3 | [
"MIT"
] | permissive | module Chanko
module Helper
mattr_accessor :files
self.files = {}
def self.reset
self.files.keys.each do |path|
self.remove_old_methods_by_file_path(path)
end
end
mattr_accessor :check_to_update_interval
self.check_to_update_interval = 1.seconds
def self.included(obj)
... |
Java | UTF-8 | 517 | 1.648438 | 2 | [] | no_license | package com.leyou.item.api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* @ClassName CategoryController
* @Description: xxx
* @Author ningning.chai
... |
Java | UTF-8 | 1,111 | 2.34375 | 2 | [] | no_license | package com.anoop.iistconnectfaculty.ViewHolder;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.CheckBox;
import android.widget.TextView;
import com.anoop.iistconnectfaculty.R;
import in.rgpvnotes.alert.myresource.models.AttendanceModel;
import in.rgpvnotes.alert.myres... |
C | UTF-8 | 9,335 | 2.65625 | 3 | [
"MIT"
] | permissive | // SPDX-License-Identifier: MIT
// Integration with Sway WM.
// Copyright (C) 2020 Artem Senichev <artemsen@gmail.com>
#include "sway.h"
#include <errno.h>
#include <json.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
/** IPC magic header... |
JavaScript | UTF-8 | 1,338 | 2.953125 | 3 | [] | no_license |
//const request = require('postman-request');
const loginForm = document.getElementById('loginform');
const emailField = document.getElementById('username');
const passwordField = document.getElementById('password');
const messageOne = document.querySelector('#message-1');
const messageTwo = document.querySelector('... |
TypeScript | UTF-8 | 404 | 2.59375 | 3 | [] | no_license | import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'trimCreditCard'
})
export class TrimCreditCardPipe implements PipeTransform {
transform(value: string, args?: string): string {
const prefix = value.substr(0, 3);
const subfix = value.substr(13, 15);
let data = '';
for (let i = 0;... |
Shell | UTF-8 | 178 | 2.75 | 3 | [] | no_license | #!/bin/bash
if [[ "$#" -ne 1 ]]
then
echo "usage: ./change_pass.sh <Proxy servicio autenticacion>"
else
./src/client.py --Ice.Config=config/Client.config "changepass" "$1"
fi
|
PHP | UTF-8 | 2,263 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Funivan\Cs\Console;
use Funivan\Cs\Configuration\ConfigurationInterface;
use Funivan\Cs\Configuration\CsConfiguration;
use Funivan\Cs\FileProcessor\FixerProcessor;
use Funivan\Cs\Report\Report;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputO... |
SQL | UTF-8 | 11,895 | 3.453125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.6
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
-- Généré le : Dim 14 jan. 2018 à 19:10
-- Version du serveur : 10.1.29-MariaDB
-- Version de PHP : 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 ... |
Ruby | UTF-8 | 2,264 | 3.328125 | 3 | [] | no_license | require 'world'
require 'cell'
require 'renderer/console'
require 'rules/conway'
class GolEngine
def initialize(options = {})
@renderer = get_renderer(options.fetch(:renderer, :console))
@width = options.fetch(:width, @renderer.width)
@height = options.fetch(:height, @renderer.height)
include_ru... |
Java | UTF-8 | 1,078 | 2.9375 | 3 | [] | no_license | package Dec25;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.KeyCode;
import java.nio.file.Paths;
public class Tanpopo extends ImageView {
static Image tanpopoImage = new
Image(Paths.get("images/tanpopo.png").toUri().toString());
static Image fl... |
Java | UTF-8 | 702 | 2.640625 | 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 co.edu.ucundinamarca.figurasgeometricas;
/**
* Clase encargada de establecer la estructura que tendrán todas las figuras geom... |
Java | UTF-8 | 2,987 | 2.390625 | 2 | [] | no_license | package cs.uga.edu.finalproject;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.google.firebase.auth.FirebaseAuth;
import com.google.f... |
Java | UTF-8 | 2,554 | 2.09375 | 2 | [] | no_license | package nvminecraftbros.minecraftaddons.rosegold.items;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraftforge.registries.IForgeRegistry;
import nvminecraftbros.minecraftaddons.MinecraftAddonMod;
public class RoseGoldItems {
public static ItemBase rose_gold_ing... |
Java | UTF-8 | 150 | 2.1875 | 2 | [] | no_license | public class Person {
int h;
int k;
public Person(int height, int peopleAhead)
{
h = height;
k = peopleAhead;
}
}
|
C++ | UTF-8 | 1,692 | 3.15625 | 3 | [] | no_license | #include "string.h"
//#include <cstring>
void String::copy_from(const String& x)
{
if (x.sz <= short_max) {
memcpy(this, &x, sizeof(x));
ptr = ch;
}
else {
ptr = expand(x.ptr, x.sz+1);
sz = x.sz;
space = 0;
}
}
void String::move_from(String& x)
{
if (x.sz <= short_max) {
memcpy(th... |
Java | UTF-8 | 377 | 2.015625 | 2 | [] | no_license | package apache;
import org.apache.commons.io.FileUtils;
import org.testng.annotations.Test;
import java.io.File;
import java.util.Collection;
/**
* Created by Administrator on 12/8/2016.
*/
public class FileUtilsTest {
@Test
public void testListFile() {
Collection collection = FileUtils.listFiles(... |
Java | UTF-8 | 778 | 1.835938 | 2 | [] | no_license | package com.wyc.draw.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wyc.draw.domain.QuestionOption;
import com.wyc.draw.repositories.QuestionOptionRepository;
@Service
public class QuestionOptionService {
... |
Python | UTF-8 | 5,527 | 3.46875 | 3 | [] | no_license | # -*- coding: utf-8 -*-
import numpy as np
"""
Created on Thu Feb 08 09:59:53 2018
@author: Pascal Raux
quicksave generates a formated str array from a list of variables and
saves this array inside a txt file (one column for each variable)
each variable in the array must be a one dimensional vector, ... |
C++ | UTF-8 | 4,683 | 2.6875 | 3 | [] | no_license | //////////////////////////////////////////////////////////////////////////
// CachedParameterisation
// ======================
// High fidelity parameterised geometry in GEANT4 described by data
//
// Author: Christopher M Poole <mail@christopherpoole.net>
// Source: http://github.com/christopherpoole/CachedParameter... |
PHP | UTF-8 | 892 | 2.671875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Library\Api\Request\Mapper;
use App\Library\Api\Exception\InvalidRequestException;
trait JsonRequestTrait
{
protected function validateContentType($contentType)
{
if (strtolower($contentType) !== 'application/json') {
throw new InvalidRequestE... |
Java | UTF-8 | 2,642 | 1.945313 | 2 | [
"Apache-2.0"
] | permissive | /**
* Copyright 1996-2014 FoxBPM ORG.
*
* 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 a... |
Java | UTF-8 | 1,414 | 2.125 | 2 | [
"MIT"
] | permissive | package com.secure.secure_back_end.configuration.insert_on_startup;
import com.secure.secure_back_end.repositories.AuthorityRepository;
import com.secure.secure_back_end.repositories.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Compon... |
C | UTF-8 | 401 | 3.703125 | 4 | [] | no_license | #include <stdio.h>
int main(int argc, char *argv[]){
printf("Command Line Arguments\n\n\n");
printf("Total no of arguments: %d\n\n", argc);
int i;
// We can use argv[1] to get entered words in command line and argv[0] is command to start program
printf("Arguments: \n");
for(i=... |
C# | UTF-8 | 1,678 | 2.953125 | 3 | [
"MIT"
] | permissive | using Loria.Core;
using Loria.Core.Actions.Activities;
using Loria.Core.Modules;
using System.Globalization;
namespace Loria.Modules.DateTime
{
public class DateTimeModule : Module, IActivity
{
public override string Name => "Date and time module";
public override string Description => "It all... |
C++ | UTF-8 | 2,299 | 2.96875 | 3 | [] | no_license | /**
* \file arch/semaphore.hpp
* \brief System-dependant Part of afl/sys/semaphore.cpp
*/
#ifndef AFL_ARCH_SEMAPHORE_HPP
#define AFL_ARCH_SEMAPHORE_HPP
#include "afl/sys/semaphore.hpp"
#if TARGET_OS_POSIX
/*
* POSIX
*/
# include <semaphore.h>
# include <time.h>
class afl::sys::Semaphore::Impl {
public:
... |
C++ | UTF-8 | 3,103 | 2.546875 | 3 | [] | no_license | /*
Copyright (c) 2009-2013, Jack Poulson
All rights reserved.
This file is part of Elemental and is under the BSD 2-Clause License,
which can be found in the LICENSE file in the root directory, or at
http://opensource.org/licenses/BSD-2-Clause
*/
#pragma once
#ifndef ROTE_BTAS_ELEMSCAL_HPP
#define ROTE_... |
PHP | UTF-8 | 649 | 3.46875 | 3 | [] | no_license | <?php
namespace Wordtest;
use Evenement\EventEmitterTrait;
/**
* Emit a 'sequence' event for every 4 letters
* in a given word when calling analyzeWord()
*/
class Sequencer {
use EventEmitterTrait;
/**
* Shoot off word in 4 letter groups
* If word length is less than 4 letters, skip
*/
public function a... |
Markdown | UTF-8 | 338 | 2.53125 | 3 | [] | no_license | # Structures
Cappuccino relies on what are known as `structures` to verify whether a member is allowed to use a certain command or not. If your server is registered, you can build your own structures. Otherwise, there are two base structures that Cappuccino comes with:
- ADM
- Member
## [ADM Docs](./adm.md)
## [Member ... |
C++ | UTF-8 | 890 | 3.09375 | 3 | [] | no_license | #include <vector>
#include "data.h"
using namespace std;
Transaction::Transaction(const Transaction &tr)
{
length = tr.length;
t = new int[tr.length];
for(int i=0; i< length; i++) t[i] = tr.t[i];
}
Data::Data(char *filename)
{
fn = filename;
current=0;
in = fopen(fn,"rt");
}
Data::~Data()
{
if(in) fclose(in)... |
Python | UTF-8 | 1,406 | 2.828125 | 3 | [
"MIT"
] | permissive | from unittest.mock import Mock, call
from pyviews.core.rendering import Node, NodeGlobals, RenderingContext
from pyviews.presenter import Presenter, PresenterNode, add_presenter_to_globals, add_reference, call_on_rendered
class TestPresenter(Presenter):
@property
def one(self):
return self._referenc... |
Markdown | UTF-8 | 642 | 2.515625 | 3 | [] | no_license | # spellCheck
Install python 3
Install virtual environemnt package
In ubuntu(linux) : sudo apt-get install python3-venv
Set up a virtual environment.
python3 -m venv DIR
source DIR/bin/activate
set DIR="venv"
This is to ensure that the following packages are available:
1. pandas
2. numpy
-----... |
Java | UTF-8 | 350 | 1.960938 | 2 | [] | no_license | package com.futurehealth.repository;
import com.futurehealth.domain.Doctor;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;
import java.util.Optional;
public interface DoctorRepository extends JpaRepository<Doctor, Long> {
Optional<Doctor>... |
C++ | UTF-8 | 3,055 | 2.671875 | 3 | [] | no_license | #ifndef VISITOR_TEST_HPP
#define VISITOR_TEST_HPP
#include "gtest/gtest.h"
#include "iterator.hpp"
#include "visitor.hpp"
#include "op.hpp"
#include "rand.hpp"
#include "mult.hpp"
#include "div.hpp"
#include "sub.hpp"
#include "pow.hpp"
#include "add.hpp"
#include "abs.hpp"
#include "trunc.hpp"
#include "paren.hpp"
... |
Markdown | UTF-8 | 870 | 3.59375 | 4 | [
"MIT"
] | permissive | # Homework-3
## My Task
From the provided code I gathered that my task was to introduce logic that would make the website function as a random password generator. I must construct a code using javascript and Html to ask for prompts such as wheather or not the user wanted a password containing any upper case letters, s... |
Java | UTF-8 | 16,118 | 2.015625 | 2 | [
"Apache-2.0"
] | permissive | package org.schulcloud.mobile.data;
import android.util.Log;
import org.schulcloud.mobile.data.local.DatabaseHelper;
import org.schulcloud.mobile.data.local.PreferencesHelper;
import org.schulcloud.mobile.data.model.AccessToken;
import org.schulcloud.mobile.data.model.Contents;
import org.schulcloud.mobile.data.model... |
C++ | UTF-8 | 1,518 | 2.578125 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
template<typename T = int> vector<T> create(size_t n){ return vector<T>(n); }
template<typename T, typename... Args> auto create(size_t n, Args... args){ return vector<decltype(create<T>(args...))>(n, create<T>(args...)); }
int main(){
ios::sync_with_stdio(false);
cin.tie... |
PHP | UTF-8 | 2,939 | 2.625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace BackendBundle\Entity;
/**
* Presupuesto
*/
class Presupuesto
{
/**
* @var integer
*/
private $id;
/**
* @var \DateTime
*/
private $fechaIngreso;
/**
* @var float
*/
private $valor;
/**
* @var \DateTime
*/
private $fechaPago;
... |
Python | UTF-8 | 17,848 | 2.90625 | 3 | [] | no_license | from typing import Tuple, List, Dict, Set, Any
from functools import wraps
import re
from collections import Counter
import numpy as np
import pandas as pd
import torch
from sklearn.feature_extraction import stop_words
# Identify constants for vocabulary operations.
DELIMITERS = re.compile(r' |\\n|\|')
PUNCTUATION = ... |
C# | UTF-8 | 7,119 | 2.59375 | 3 | [] | no_license | using System;
using UnityEngine;
using static SimpleDice.Utils.SimpleDiceUtils;
namespace SimpleDice
{
public struct Face
{
public Face(int id, string value, Vector3 orientation)
{
faceID = id;
faceValue = value;
faceOrientation = orientation;
}
... |
Python | UTF-8 | 203 | 2.78125 | 3 | [] | no_license | import sys
#System Module provides function and module -- Python Runtime Emvironmment
print(sys.path) # Module Directory
#sys.exit() -- Exit interms exception
print("Ashish")
print(sys.version_info) |
Java | UTF-8 | 12,691 | 2.34375 | 2 | [
"MIT"
] | permissive | package com.builtbroken.ishihara;
import com.builtbroken.ishihara.api.UncorrectedGui;
import com.google.common.collect.Lists;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.ren... |
Java | UTF-8 | 1,482 | 2.171875 | 2 | [] | no_license | package com.icetea.manager.pagodiario.api.dto;
public abstract class PersonDto extends BasicDto {
private static final long serialVersionUID = 1L;
private Long id;
private String name;
private String documentType = "DNI";
private Long documentNumber;
private String phone;
private String address;
private Stri... |
Markdown | UTF-8 | 3,360 | 3.21875 | 3 | [
"MIT"
] | permissive | # [chai](https://github.com/chaijs/chai)
## Registration
```js
// using ES6 modules
import { registerAssertions } from 'redux-actions-assertions/chai';
// using CommonJS modules
var registerAssertions = require('redux-actions-assertions/chai').registerAssertions;
// registration
registerAssertions();
```
## Usage
... |
Python | UTF-8 | 155 | 3.40625 | 3 | [] | no_license | IDADE = FLOAT(INPUT('QUAL A SUA IDADE?'))
IF IDADE <= 11
PRINT ("CRIANCA)
ELIF IDADE >= 12 AND IDADE < 18
PRINT ("ADOLESCENTE")
ELSE:
PRINT ("ADULTO") |
C++ | UTF-8 | 692 | 2.78125 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
int power(int x,int y)
{
int i;
int n=1;
for(i=0;i<y;i++)
{
n*=x;
}
return n;
}
int main()
{
int i,j;
int x;
scanf("%d",&x);
vector<int>keep;
int t=0;
for(i=20;!(x>>i)&1;i--);
for(;i>0;i--)
{
if(!((x... |
Shell | UTF-8 | 2,729 | 2.6875 | 3 | [] | no_license | #!/usr/bin/env sh
# To setup the development environment
set -e
cp bash_profile ~/.bash_profile
cp agignore ~/.agignore
cp ./ctags ~/.ctags.d/default.ctags
#cp bash_profile ~/.bash_profile
cp vimrc ~/.vimrc
cp coc-settings.json ~/.vim/coc-settings.json
# Install homebrew
if ! brew -v &> /dev/null
then
curl -fsSL... |
Markdown | UTF-8 | 4,037 | 3.5 | 4 | [] | no_license | 悟空传
今何在
2012-12
========序 在路上========
我总在想人的一生要追求什么,功名利禄?得到这一切之后呢?当你老去的时候,回想一生,你会不会遗憾?似乎不论如何去苦苦追求,总有一些你必须放弃,总有一些你只能怀念,还有一些永远只在梦想中。我们永远在计算成败、取舍与得失,却没有人能找到正确答案。
佛是什么,佛就是虚无,四大皆空,什么都没有了,没有感情没有欲望没有思想,当你放弃这些,你就不会痛苦了。但问题是,放弃了这些,人还剩下什么?什么都没了,直接就死了。所以成佛就是消亡,西天就是寂灭
每个人都有一条自己的西游路,我们都在向西走,到了西天,大家就虚无了,就同归来处了,所有人都不可避免要奔向那个归宿,你... |
PHP | UTF-8 | 318 | 2.765625 | 3 | [] | no_license | <?php
namespace Nassau\CartoonBattle\Services\Farming\LootExtractor;
class GiggitywattsExtractor implements LootHandler
{
/**
* @param mixed $data
* @return \Generator|string[]
*/
public function formatLoot($data)
{
yield $data ? sprintf("%d GiggityWatts", $data) : null;
}
}
|
Java | UTF-8 | 2,161 | 3.125 | 3 | [] | no_license | package sii.maroc;
import static org.hamcrest.CoreMatchers.nullValue;
import java.util.PrimitiveIterator.OfDouble;
public class Vehicles {
private String moteur;
enum typeVehiculeEnum {
CAR,TRUCK,MOTORCYCLE
};
public Vehicles(String moteur) {
super();
this.moteur = moteur;
}
public int consomatio... |
C++ | UTF-8 | 8,735 | 2.859375 | 3 | [
"MIT"
] | permissive | #include "messagecoder.h"
#include "bitcoinunits.h"
#include <boost/lexical_cast.hpp>
CMessageCoder::CMessageCoder() :
terminator('.'), maxSymbolsPerCodeWord(7)
{
// Contains the min and max value for each character
characterRanges = createCharacterRanges();
}
QList<qint64> CMessageCoder::encode(const QS... |
Java | UTF-8 | 777 | 2.4375 | 2 | [] | no_license | package com.practice.bankadvisor.core.mapper;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import org.springframework.util.StringUtils;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
@Mapper
public interface LocalDateMapper {
LocalDateMapper INSTANCE = M... |
C | UTF-8 | 851 | 3.953125 | 4 | [] | no_license | #include<stdio.h>
int main(){
int i;
int a[5];
printf("Enter the numbers to sort");
for (i=0; i<5; i=++i){
printf("Enter the numbers %d ",i + 1);
scanf("%d", &a[i]);
}
//assign the array's first address to variable p
int *p = a;
int q = *a;
int *r = &a[0];
pri... |
TypeScript | UTF-8 | 715 | 2.640625 | 3 | [] | no_license | import { Entity, Column, ManyToOne } from 'typeorm';
import { MinLength, MaxLength, IsDefined } from 'class-validator';
import ResearchCategory from './ResearchCategory';
import AbstractEntity from './AbsrtactEntity';
@Entity('paperTypes')
export default class PaperType extends AbstractEntity {
@MinLength(5, PaperT... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.