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,654 | 2.140625 | 2 | [] | no_license | package com.braintech.cmyco.utils;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.support.v7.internal.widget.DialogTitle;
import android.view.Gravity;
impo... |
Python | UTF-8 | 6,805 | 2.734375 | 3 | [] | no_license | import sys, os, re, math, copy
def FarthestFirstTraversal(data, k):
start = data[0]
centers = [start]
data.remove(start)
while len(centers)<k:
max_value = 0
max_point = []
for i in data:
distance = []
for j in centers:
tmp_distance = 0
... |
Java | UTF-8 | 2,612 | 2.4375 | 2 | [] | no_license | package soup.movie.data.soup.model;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class Movie {
@SerializedName("id")
private String id;
@SerializedName("title")
private String title;
@SerializedName("thumbnail")
private String thumbnailUrl;
@Seriali... |
C | UTF-8 | 407 | 3.609375 | 4 | [] | no_license | #include<stdio.h>
int main() {
int i, j, temp;
int arr[9]={1, 5, 8, 12, 31, 42, 57, 65, 81};
printf("Ascending order;\n");
for(i=0;i<9;i++) {
printf("%d ", arr[i]);
}
for(i=0, j=8;i<4, j>=5;i++, j--) {
temp=arr[i];
arr[i]=arr[j];
arr[j]=temp;
}
printf("\nDescending order;\n");
for(i=0;i<9;... |
Java | UTF-8 | 1,815 | 3 | 3 | [] | no_license | package model;
import IA.Gasolina.Distribucion;
import representation.Global;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Optional;
public class Trip extends LinkedList<Petition> {
public Trip() { }
public Trip(Trip copy) {
super(copy);
}
@Override
public b... |
Python | UTF-8 | 743 | 2.625 | 3 | [
"MIT"
] | permissive | # Copyright (c) 2019 Thomas Howe
from problem_sets.environment import Environment
from problem_sets.gen.manager import registered_gens, load_gens
def gen_problem(set_id: str):
"""
Attempt to generate problem with generator id 'set_id' (generators have an infinite virtual "set")
"""
problem_id = Non... |
Java | UTF-8 | 22,038 | 1.84375 | 2 | [
"Apache-2.0"
] | permissive | package com.ieeton.agency.activity;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.RejectedExecutionException;
import org.json.J... |
Markdown | UTF-8 | 867 | 3.125 | 3 | [] | no_license | # 穿越时空的深度网络架构
在本节中,我们将回顾从 LeNet5 开始在整个深度学习历史中出现的里程碑架构。
## LeNet 5
在 1980 年代和 1990 年代,神经网络领域一直保持沉默。 尽管付出了一些努力,但是架构非常简单,并且需要大的(通常是不可用的)机器力量来尝试更复杂的方法。
1998 年左右,在 Bells 实验室中,在围绕手写校验数字分类的研究中,Ian LeCun 开始了一种新趋势,该趋势实现了所谓的“深度学习-卷积神经网络”的基础,我们已经在第 5 章,简单的前馈神经网络中对其进行了研究。
在那些年里,SVM 和其他更严格定义的技术被用来解决这类问题,但是有关 CNN 的基础论文表明,与当时的现有... |
Python | UTF-8 | 1,670 | 4.25 | 4 | [] | no_license | '''절댓값 힙은 다음과 같은 연산을 지원하는 자료구조이다.
배열에 정수 x (x ≠ 0)를 넣는다.
배열에서 절댓값이 가장 작은 값을 출력하고, 그 값을 배열에서 제거한다. 절댓값이 가장 작은 값이 여러개일 때는, 가장 작은 수를 출력하고, 그 값을 배열에서 제거한다.
프로그램은 처음에 비어있는 배열에서 시작하게 된다.
입력
첫째 줄에 연산의 개수 N(1≤N≤100,000)이 주어진다. 다음 N개의 줄에는 연산에 대한 정보를 나타내는 정수 x가 주어진다. 만약 x가 0이 아니라면 배열에 x라는 값을 넣는(추가하는) 연산이고, x가 0이라면 배열에서 절댓값이 가장... |
C | UTF-8 | 159 | 2.609375 | 3 | [] | no_license | /*
** EPITECH PROJECT, 2019
** CPool_rush1_2019
** File description:
** main
*/
void rush(int x, int y);
int main(void)
{
rush(15, 15);
return (0);
} |
C++ | UTF-8 | 5,373 | 2.6875 | 3 | [] | no_license | /**
* @file
* @author Matthew Parkan <matthew.parkan@gmail.com>
* @version 1.0
*
* @section LICENSE
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License... |
Java | UTF-8 | 20,267 | 1.664063 | 2 | [] | no_license | package com.example.kelys.Models;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPre... |
Java | UTF-8 | 769 | 2.703125 | 3 | [] | no_license | package cn.pgyyd.mcg.singleton;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
//TODO: 重写此类,更改为 时间+机器ID+random 组合而成的ID
public class JobIDGenerator {
private static long nodeId;
public static void init(int id) {
nodeId = id % 100;
}
private s... |
Python | UTF-8 | 3,642 | 2.734375 | 3 | [] | no_license | import markdown
import re
from fenced_code_plus import FencedCodePlusExtension
import unittest
import pytest
unadorned_code_block_md = """\
```
def foo():
bar = 4
return 8
```
"""
unadorned_code_block_html = """\
<pre><code>def foo():
bar = 4
return 8
</code></pre>"""
only_language_md = """\
``` pyth... |
Java | UTF-8 | 2,620 | 3.640625 | 4 | [] | no_license | package recursion_dc_dp.p120;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @author :lennyz
* @desc: 2020/11/12 11:04 PM
* 给定一个三角形,找出自顶向下的最小路径和。每一步只能移动到下一行中相邻的结点上。
* 相邻的结点 在这里指的是 下标 与 上一层结点下标 相同或者等于 上一层结点下标 + 1 的两个结点。
* 例如,给定三角形:
* <p>
* [
* [2],
* ... |
Python | UTF-8 | 3,824 | 3.5 | 4 | [] | no_license | """
MontyHallProblem
Description:
"""
import random
import math
# constants.
NUM_DOORS = 3
# end constants.
carDoor = None
def generateCarDoor():
global carDoor
carDoor = random.randint(1, NUM_DOORS)
def getRemainingChoices(toExclude, lo, hi):
uwu = []
for i in range(lo, hi):
canAdd = True
... |
Java | UTF-8 | 430 | 2.140625 | 2 | [] | no_license | package com.tae.letscook.Utils;
import android.content.Context;
import android.view.inputmethod.InputMethodManager;
/**
* Created by Eduardo on 02/01/2016.
*/
public class KeyboardUtils {
public static void showKeyboard(Context context) {
InputMethodManager imm = (InputMethodManager) context.getSystemS... |
SQL | UTF-8 | 4,825 | 3.15625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 3.3.9.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 21, 2012 at 02:16 PM
-- Server version: 5.5.9
-- PHP Version: 5.2.17
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER... |
Java | WINDOWS-1252 | 499 | 2.9375 | 3 | [] | no_license | package fcu.iecs.oop.password;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner keyboard = new Scanner(System.in);
String in;
while(true){
System.out.println("пJ@r : ");
in = keyboard.next();
if(in.compareTo("exit") == 0) break;
PasswordEncor... |
TypeScript | UTF-8 | 1,026 | 2.890625 | 3 | [] | no_license |
// throttleTime: lo contrario que debounceTime, emite el valor al llamar al obs y luego ignora las demas x segs
import { asyncScheduler, fromEvent } from 'rxjs';
import { throttleTime, distinctUntilChanged, map, pluck } from 'rxjs/operators';
const click$ = fromEvent(document, 'click');
// Esto es útil para control... |
Python | UTF-8 | 1,634 | 2.859375 | 3 | [] | no_license | # login attempts
class User():
def __init__(self, first_name, last_name, age, city):
self.first_name = first_name
self.last_name = last_name
self.age = age
self.city = city
self.login = 0
self.password = ''
def greet(slef):
print('Welcome %s %s, ... |
Java | UTF-8 | 2,624 | 2.796875 | 3 | [] | no_license | package radar.scale.test;
import radar.model.AnalysisResult;
import radar.model.Model;
import radar.model.ModelSolver;
import radar.model.Parser;
import radar.utilities.Helper;
public class RADAR_Performance {
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
String outputDi... |
PHP | UTF-8 | 433 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\User;
use App\Models\User;
use App\Repositories\User\UserRepositoryInterface;
class UserRepository implements UserRepositoryInterface
{
public $model;
public function __construct(User $user)
{
$this->model = $user;
}
public function all()
{
r... |
C | UTF-8 | 1,594 | 2.984375 | 3 | [] | no_license | /*
* basics_header_init.h
*
* Created on: 10 de nov. de 2016
* Author: Pablo
*/
#ifndef BASICS_HEADER_INIT_H_
#define BASICS_HEADER_INIT_H_
#include "header.h"
static inline void pin_set(uint8_t port, uint8_t pin, bool estado)
{
Chip_GPIO_SetPinState(LPC_GPIO, port, pin, estado);
}
static inline bool ... |
C# | UTF-8 | 590 | 2.59375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ggj_engine.Source.Level
{
public class Tile
{
public int Type;
public bool Walkable;
public int X, Y;
public Tile Parent;
public float GScore, HScore, FScore;
public... |
C++ | UTF-8 | 1,109 | 3.09375 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
const int inf = INT_MAX;
bool is_valid(int n, int m, int i, int j){
return i > -1 && j > -1 && i < n && j < m;
}
int main(){
int n, m; //n no of rows and m no of columns
cin >> n >> m;
vector<vector<int>> v(n, vector<int>(m));
for (int i = 0; i <... |
Python | UTF-8 | 1,219 | 3.25 | 3 | [] | no_license | # Read Input
f = open("input.txt", "r")
actionNorth = "N"
actionSouth = "S"
actionEast = "E"
actionWest = "W"
actionLeft = "L"
actionRight = "R"
actionForward = "F"
directionNorth = 0
directionEast = 1
directionSouth = 2
directionWest = 3
direction = directionEast
startX = 0
startY = 0
x = startX
y = startY
waypoin... |
Markdown | UTF-8 | 1,699 | 2.625 | 3 | [
"MIT"
] | permissive | # Crypto-Vote
This is a demonstration of how Blind Signature can be used in the scenario of E-Voting.
Read the reference or [my presentation at INFAS 2017](https://www.slideshare.net/s3131212/ss-76836570) for more information on how the schema works.
# Screenshot

 {
int num, i;
char str[19], c;
FILE *fp, *fop;
fp = fopen ("numbers.txt", "w");
if(fp == NULL)
{
printf("Error!");
return;
}
for(;num!=-1;){
printf("Enter number between 1-10: ");
scanf("%d", &num);
fpri... |
C | UTF-8 | 2,145 | 3.65625 | 4 | [] | no_license | #include <stdio.h> //inclusione delle librerie necessarie al programma
#include <string.h>
#include <stdlib.h>
#include <time.h>
#define MAX 128 //limite dei caratteri per le stringhe
int main ( void )
{
char M[128];
printf( "Inserire una stringa M da cifrare\n"); //inserimento da parte dell'utente della st... |
Java | UTF-8 | 6,177 | 2.3125 | 2 | [] | no_license | /***
* MainCounterFragment.java
* Fragment that displays the cross counter.
* Here you can choose what project you want to count up and down and
* you can ... count the crosses in it up and down.
*
* It has one counter to count half crosses and one counter to count full crosses
*/
package com.example.skysk... |
Python | UTF-8 | 11,380 | 3.75 | 4 | [] | no_license | import pygame
import time
import random
#Tutorial PART 42.
pygame.init() # Initialise pygame
white = (255,255,255) # (|RED|GREEN|BLUE|)
black = (0, 0, 0)
red = (255,0,0)
green = (0,155,0)
display_width = 800
display_height = 600
gameDisplay = pygame.display.set_mode([display_width,display_height]) # Set... |
SQL | UTF-8 | 4,802 | 3.359375 | 3 | [] | no_license | COL con_id FOR 999 HEA 'Con|ID';
COL pdb_name FOR A30 HEA 'PDB Name' FOR A30 TRUNC;
COL avg_et_ms FOR 99,999,990.000 HEA 'Avg Elapsed|Time (ms)';
COL avg_cpu_ms FOR 99,999,990.000 HEA 'Avg CPU|Time (ms)';
COL avg_io_ms FOR 99,999,990.000 HEA 'Avg User IO|Time (ms)';
COL avg_appl_ms FOR 99,999,990.000 HEA 'Avg Appl|Time... |
TypeScript | UTF-8 | 330 | 3.125 | 3 | [
"MIT"
] | permissive | module behaviourTree {
/**
* 包装一个ExecuteAction,这样它就可以作为一个ConditionalAction使用
*/
export class ExecuteActionConditional<T> extends ExecuteAction<T> implements IConditional<T>{
public constructor(action: (t: T) => TaskStatus) {
super(action);
}
}
}
|
Markdown | UTF-8 | 3,330 | 2.765625 | 3 | [] | no_license | ---
layout: page
title: Coding Projects
permalink: /projects/
---
<head>
<!-- <link rel="stylesheet" type="text/css" href="page.css"> -->
<style>
.entry{
/* --background-color: #F5F5F5; */
display: grid;
border-style: solid;
border-color: #F5F5F5;
grid-auto-rows: auto;
padding: 5%;
position: r... |
Java | UTF-8 | 461 | 2.15625 | 2 | [] | 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 calcula2;
import javax.swing.JOptionPane;
/**
*
* @author rpachotome
*/
public class Vista {
public static void impri... |
SQL | UTF-8 | 418 | 3.109375 | 3 | [] | no_license |
CREATE TABLE Movie(
movie_id SERIAL,
movie_name varchar(100),
movie_year date,
ratings int
);
CREATE TABLE Actor(
actor_id SERIAL,
actor_first_name varchar(100),
actor_last_name varchar(100),
actor_age INT
);
CREATE TABLE Actress(
actress_id SERIAL,
actress_first_name varchar(100),
actress_last_name varchar(100),
ac... |
PHP | UTF-8 | 610 | 2.78125 | 3 | [] | no_license | <?php
class View {
public $route;
private $val_arr;
public function __construct($route){
$this->route = $route;
}
public function renderView(){
foreach($this->val_arr as $key => $val){
if (!is_object($val) && !is_array($val)){
$$key = $val;
}
}
include_once(APP_DIR.'vie... |
Markdown | UTF-8 | 3,432 | 2.953125 | 3 | [] | no_license | ---
layout: default
title: '从接种新冠疫苗谈群体免疫'
date: 2021-04-03T00:00:00.000000+08:00
author:
display_name: 冰室山人
---
从接种新冠疫苗谈群体免疫
作者:冰室山人
近期,中国开始大规模开展新冠疫苗接种工作,现在乡镇医疗卫生机构都能接种新冠疫苗了。据国务院联防联控机制发布的消息,截至3月27日,我国接种剂次已超一亿。只要产能跟得上,以中国体制的动员能力,大部分民众很快就能接种上疫苗。毕竟,中国体制能让整个社会停摆很长一段时间,这种动员能力,是其他国家无法做到的。
现在媒体、政府公众号都大力号召民众去接种新冠疫苗,目的很... |
Java | GB18030 | 971 | 2.671875 | 3 | [] | no_license | package com.ws.service.impl;
import java.util.ArrayList;
import java.util.List;
import com.ws.domain.Customer;
import com.ws.service.CustomerService;
public class CustomerServiceImpl implements CustomerService {
public void save(Customer customer) {
System.out.println("ͻˡ");
}
public void delete(Long id) {
... |
JavaScript | UTF-8 | 6,225 | 3.234375 | 3 | [] | no_license | 'use strict';
// BANKIST APP
// Data
const account1 = {
owner: 'Jonas Schmedtmann',
movements: [200, 450, -400, 3000, -650, -130, 70, 1300],
interestRate: 1.2, // %
pin: 1111,
};
const account2 = {
owner: 'Jessica Davis',
movements: [5000, 3400, -150, -790, -3210, -1000, 8500, -30],
interestRate: 1.5,
... |
Markdown | UTF-8 | 6,344 | 3.234375 | 3 | [] | no_license |
### [MongoDB ](../MongoDB.md) > [Administration and Maintenance](Administration and Maintenance.md) > Scalability
___
As your data grows, your sever won't be able to handle the high rate of queries and the larger sets will exceed the server storage capacity. To address these issues, you will have to do either a ve... |
Java | UTF-8 | 1,150 | 2.109375 | 2 | [
"MIT"
] | permissive | package org.master.common;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.*;
/**
* Created by kaenry on 2016/9/20.
* RestExceptionHandler
*/
@Con... |
Markdown | UTF-8 | 9,443 | 2.90625 | 3 | [
"MIT"
] | permissive | ### 1. Overview
ROBOTIS-OP3 Action Editor Node
This chapter explains how to create and edit action file used in the [op3_action_module] of ROBOTIS-OP3.
#### 1.1 Action File
The action file contains ROBOTIS-OP3’s poses and time data. The current position describes positions of Dynamixels which converted from a... |
Markdown | UTF-8 | 833 | 3.125 | 3 | [] | no_license |
<div>
<h1 style="text-align:center; color:#005086;">Tweety - The Twitter Clone</h1>
<h3 style="text-align:center; margin-top:-11px; color:#005086;">A Twitter clone.</h1>
<br />
<p>
Made in Laravel 6, currently, this is the basic version of Twitter with basic functionalities.
We're going to extend the features of the... |
PHP | UTF-8 | 317 | 3.46875 | 3 | [] | no_license | <?php
$X = 100;
$Y = 50;
$Z = ($X == $Y) xor ($X > $Y);
echo "($X == $Y) xor ($X > $Y) :";
if ($Z == true) {
echo "Hello PHP";
}
echo "<br>";
echo "<br>";
echo "($X == $Y) xor ($X > $Y) : ";
if ($Z == false) {
echo "Maaf Kondisinya tidak sesuai";
}
?> |
Java | UTF-8 | 1,172 | 3.234375 | 3 | [] | no_license | /*****************************************************************************
* Author: Rahul Jagetia
* Date: 10/06/2019
* Project Description: Class to define Deck for Rummy. Provides a deck of
* cards, and allows users to pull from the "deck" object
*
*******************************************************... |
JavaScript | UTF-8 | 1,053 | 2.90625 | 3 | [
"MIT"
] | permissive | const
randomHelper = require('../helpers/random-helper'),
enums = require('../model/enums'),
surnames = require('../model/surnames'),
names = require('../model/names');
let getNameRandom = {
execute: function (gender) {
let nameModel;
switch (enums.genders[gender]) {
case enums.genders.male:
... |
SQL | UTF-8 | 765 | 4 | 4 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS CUSTOMER_ORDER(
id UUID NOT NULL,
creation_time TIMESTAMP,
address VARCHAR,
city VARCHAR,
country VARCHAR,
email VARCHAR,
first_name VARCHAR,
last_name VARCHAR,
phone VARCHAR,
zipcode VARCHAR,
price NUMERIC(19,2) NOT NULL,
PRIMARY KEY (id)
);
C... |
C++ | UTF-8 | 4,537 | 2.59375 | 3 | [] | no_license | /*
* HaoRan ImageFilter Classes v0.3
* Copyright (C) 2012 Zhenjun Dai
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation; either version 2.1 of the License, or (at your
* option) an... |
Swift | UTF-8 | 479 | 3.59375 | 4 | [
"MIT"
] | permissive | //: [Previous](@previous)
import Foundation
enum SegueIdentifier: String {
case ShowPhoto
case NewPhoto
case Share
}
func performSegue(id: String) {
let segue = SegueIdentifier(rawValue: id)
if let segue = segue {
switch segue {
case .ShowPhoto:
print("Perform ShowPhoto")
case .NewPhoto:
... |
Swift | UTF-8 | 384 | 2.90625 | 3 | [] | no_license | //
// CategoryModel.swift
// Charity_App
//
// Created by Sankeerth V S on 4/16/21.
//
import Foundation
class CategoryModel {
var categoryID: String = ""
var imageURL: String = ""
var name: String = ""
init(categoryID: String, imageURL: String, name: String) {
self.categoryID = catego... |
Java | UTF-8 | 3,691 | 2.0625 | 2 | [] | no_license | package com.tuxing.sdk.db.entity;
// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
// KEEP INCLUDES - put your custom includes here
import java.util.List;
// KEEP INCLUDES END
/**
* Entity mapped to table feed.
*/
public class Feed implements java.io.Serializable {
private Long id;
... |
PHP | UTF-8 | 5,539 | 2.65625 | 3 | [] | no_license | <?php
/*
* SifeiService
* cfdi33®
* ® 2017, Softcoatl
* http://www.softcoatl.mx
* @author Rolando Esquivel Villafaña, Softcoatl
* @version 1.0
* @since dic 2017
*/
namespace cfdi33;
require_once ("cfdi33/utils/SOAPClient.php");
require_once ("cfdi33/SelloCFDI.php");
require_once ("PACService.php");
class S... |
Java | UTF-8 | 8,482 | 2.390625 | 2 | [
"Apache-2.0",
"LicenseRef-scancode-unicode"
] | permissive | /*
* Copyright (C) 2014 The Android Open Source Project
*
* 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 app... |
C# | UTF-8 | 1,024 | 2.5625 | 3 | [
"MS-PL"
] | permissive | using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Threading;
namespace STPWPDemo
{
public partial class SpinTextBlock : UserControl
{
public event EventHandler<EventArgs> Increment;
... |
Java | UTF-8 | 1,584 | 2.5625 | 3 | [
"MIT"
] | permissive |
package mage.cards.i;
import java.util.UUID;
import mage.abilities.Mode;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CounterUnlessPaysEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.DrawDiscardControllerEffect;
import mag... |
PHP | UTF-8 | 419 | 3.25 | 3 | [] | no_license | <?php
$sum = 0;
$fh = fopen('input_d02.txt','r');
while ($line = fgetcsv($fh, 1000, "\t")) {
sort($line);
for ($i = 0; $i < count($line); $i ++) {
for ($j = count($line) - 1; $j >= 0; $j--) {
if ($line[$j] != $line[$i] && $line[$j] % $line[$i] === 0) {
$sum += $line[$j] / ... |
C++ | UTF-8 | 1,145 | 2.609375 | 3 | [
"MIT"
] | permissive | #include "Plane.h"
Plane::Plane()
{
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
Id = new float[4];
Id[0] = 1.0f;
Id[1] = 1.0f;
Id[2] = 1.0f;
Id[3] = 1.0f;
Ia = new float[4];
Ia[0] = 1.0f;
Ia[1] = 1.0f;
Ia[2] = 1.0f;
Ia[3] = 1.0f;
Is = new float[4];
Is[0] = 1.0f;
Is[1] = 1.0f;
Is[2] = 1.0f;
Is[3] = ... |
Swift | UTF-8 | 5,748 | 2.78125 | 3 | [] | no_license | //
// ViewController.swift
// stopwatch
//
// Created by nttr on 2017/07/14.
// Copyright © 2017年 nttr. All rights reserved.
//
import UIKit
class ViewController: UIViewController, UITableViewDataSource {
@IBOutlet var label: UILabel!
var countNum: Int = 0
var isTimerRunning: Bool = false
var ti... |
Java | UTF-8 | 1,918 | 2.03125 | 2 | [] | no_license | package com.lala.lashop.ui.user.presenter;
import com.lala.lashop.base.mvp.BasePresenter;
import com.lala.lashop.http.ApiSubscribers;
import com.lala.lashop.http.HttpResult;
import com.lala.lashop.http.exception.ApiException;
import com.lala.lashop.ui.user.model.UserDetailModel;
import com.lala.lashop.ui.user.view.Use... |
C# | UTF-8 | 896 | 2.515625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xrm.Sdk.Metadata;
namespace MarkMpn.FetchXmlToWebAPI
{
/// <summary>
/// Provides metadata for the <see cref="FetchXmlToWebAPIConverter"/>
/// </summary>
public interface IMetadataProvider
{
/// <summary>
... |
Python | UTF-8 | 1,418 | 2.5625 | 3 | [
"MIT"
] | permissive | # -*- coding: utf-8 -*-
"""pytest Roles API wrapper tests and fixtures."""
import pytest
import ciscosparkapi
__author__ = "Chris Lunsford"
__author_email__ = "chrlunsf@cisco.com"
__copyright__ = "Copyright (c) 2016-2018 Cisco and/or its affiliates."
__license__ = "MIT"
# Helper Functions
def get_list_of_roles(... |
C# | UTF-8 | 1,499 | 2.515625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Gastos.DB;
using Gastos.Models;
namespace App_Gastos_Mensais
{
public partial class MainPage : ContentPage
{
public MainPage()
... |
Python | UTF-8 | 63 | 2.765625 | 3 | [] | no_license | from math import pi
radius = 8
area = pi * 8 ** 2
print(area)
|
Swift | UTF-8 | 1,341 | 4.71875 | 5 | [] | no_license | //: ## 神奇的转义功能
//: 你已经利用将字符放在引号之间的方法定义了很多字符串。但如果想创建一个包含引号的字符串,该怎么办呢?
//:
//: 可以尝试直接将引号加入字符串中间。
//:
//: 取消以下 `badString` 代码行的注释,看看会发生什么:
//let badString = "He said, "Hi there!" as he passed by."
//: 出现了一个错误,因为 Swift 在遇到第二个引号(就是`“Hi”`之前)时就认为字符串定义已经完成。它不知道如何解析代码行的其余部分。
//:
//: 尝试完以后,重新给代码加上注释,这样错误就消失了。
//: ### 解决方案
//: 要在... |
Java | UTF-8 | 980 | 3.171875 | 3 | [] | no_license | package InterviewCake;
public class CakeOrderChecker {
public static boolean checkCakeOrders(int[] takeOut, int[] dineIn, int[] servedOrders) {
int takeOutIndex = 0;
int dineInIndex = 0;
if (servedOrders.length != dineIn.length + takeOut.length) {
return false;
}
... |
C# | UTF-8 | 3,323 | 3.015625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TicTacToeCommon.Interfaces;
namespace TicTacToeCommon
{
public class Player : ITicTacToePlayer
{
// properties
public int PlayerID { get; set; }
public string Playe... |
Markdown | UTF-8 | 7,314 | 3 | 3 | [
"MIT"
] | permissive | ---
title: QuicKey
comments: true
---
# Use <b><kbd>ctrl</kbd><kbd>tab</kbd></b> as a QuicKey shortcut
Do you wish Chrome had the same <b><kbd>ctrl</kbd><kbd>tab</kbd></b> tab navigation as Firefox? There are two key features Chrome is missing:
- **Switch to the previously used tab**
- Press <b><kbd>ctrl</kbd><... |
Shell | UTF-8 | 439 | 2.5625 | 3 | [] | no_license | if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
echo "Merge happend and starting deployment"
docker build -t="scriptnull/mm-filter:$BRANCH.$BUILD_NUMBER" .
docker push scriptnull/mm-filter:$BRANCH.$BUILD_NUMBER
ssh ubuntu@34.209.45.202 echo "hello world"
ssh ubuntu@34.209.45.202 docker rm -f mm-filter-app || tr... |
Java | UTF-8 | 2,373 | 2.40625 | 2 | [] | no_license | package baseclass;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.opera.OperaDriver;
import org.testng.annotations.AfterTest;
import com.aventstack.extentrepo... |
C# | UTF-8 | 2,810 | 2.5625 | 3 | [
"MIT"
] | permissive | using TicTacToe.IO;
using UniRx;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
namespace TicTacToe
{
/// <inheritdoc />
/// <summary>
/// Main menu of the game
/// </summary>
public class MainMenu : MonoBehaviour
{
/// <summary>
/// New game button
... |
PHP | UTF-8 | 1,651 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Codingbeard\Devtools\Message;
class GenerateMessageProcessorMessage
{
/**
* @devtoolsOverwritable
*
* @var string
*/
protected $namespace;
/**
* @devtoolsOverwritable
*
* @var string
*/
protected $processorName;
/**
* @devtoolsOverwritable
*
* @var array
... |
C# | UTF-8 | 5,846 | 2.625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
using System.Data;
namespace DataAccess
{
public class EmpleadosData : ConnectionToSql
{
private SqlDataReader LeerFilas;
//ATRIBUTOS
privat... |
C++ | UTF-8 | 7,455 | 2.875 | 3 | [] | no_license | #include <QOsg/PropertyUtils.h>
#include <iomanip>
#include <osg/io_utils>
using namespace osgDB;
// same as std::to_string but allows us to set precision for decimal numbers
template <typename T>
std::string to_string_with_precision(const T a_value, const int n = 6)
{
std::ostringstream out;
out... |
C++ | UTF-8 | 947 | 3.765625 | 4 | [] | no_license | /**********************************************************************
Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1
/ \
2 5
/ \ \
3 4 6
The flattened tree should look like:
1
\
2
\
3
\
... |
C++ | WINDOWS-1250 | 25,473 | 3 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <fstream>
#include "Piece.h"
using namespace std;
//Turn Number
int turn_number = 0;
//The Board
int Board[8][8] = { 0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
... |
Markdown | UTF-8 | 18,574 | 2.8125 | 3 | [
"Apache-2.0",
"CC-BY-3.0"
] | permissive | ---
title: 'Images'
authors:
- estelleweyl
description: An overview of images in HTML.
date: 2023-02-14
tags:
- html
---
Decorative images, such as background gradients on buttons or background images on sections of content or the full page,
are presentational and should be applied with CSS. When an image adds con... |
Python | UTF-8 | 6,406 | 3.3125 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Fri Jun 15 14:59:16 2018
@author: abhinav.jhanwar
"""
# Artificial Neural Network
# Installing Theano
# pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
# Installing Tensorflow
# pip install tensorflow
# Installing Keras
# pip install --upgrade keras
# ... |
C# | UTF-8 | 967 | 2.546875 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TogglePlateform : MonoBehaviour
{
// temps de disparation de la plateforme
public float time = 5;
//temps avant le prochain switch
private float remaining_time = 0;
//booléen de switch
private bool is... |
Markdown | UTF-8 | 1,074 | 2.90625 | 3 | [
"MIT"
] | permissive | # gulp-styledocdown
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
> [styledocdown](https://github.com/etylsarin/styledocdown) plugin for [gulp](https://github.com/wearefractal/gulp)
## Usage
First, install `gulp-styledocdown` as a development dependency:
```shell
npm install --sav... |
C++ | UTF-8 | 544 | 2.828125 | 3 | [] | no_license | #include "BitMap.h"
#include <iostream>
using namespace BitMap_Lib;
using namespace std;
int main(int argc, char* argv[])
{
string path = "image.bmp";
try
{
auto map = new BitMap(path);
auto x = map->width() / 2;
auto y = map->height() / 2;
auto channel = 0;
auto pixle = map->getDa... |
Markdown | UTF-8 | 919 | 2.515625 | 3 | [] | no_license | ---
title: 云间
date: 2019-01-18 15:48:14
tags:
- 古筝
- 自冾
categories:
- 创作
---

### 终于是完成了一首
《云·间》这首作品在挣扎中诞生了。
最近每天播放量都在500+,持续了3天了,不知道是哪家忘记关了电脑。挺好,放着吧,让久违的虚荣心喷薄而出吧。
纪老师听了这首作品后,提到说可以投稿给上海民族乐团。这意味着得把它变成人能看得懂的谱,对我来说是个不小的挑战。音乐中的听说读写,读应该是我现在最短的板,这是个好机会。万一选上,可就光宗耀祖了。
想要离舒适区远一点,舒适区反而会追上来,我是越来越胆大,... |
Java | UTF-8 | 3,496 | 2.0625 | 2 | [] | no_license | /*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* th... |
Java | UTF-8 | 2,555 | 2.53125 | 3 | [] | no_license | import common.AbstractRequest;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.N... |
JavaScript | UTF-8 | 1,243 | 2.8125 | 3 | [
"CC0-1.0",
"MIT"
] | permissive | $( document ).ready(function() {
var manualCheck=false;
window.applicationCache.addEventListener('cached', handleCacheEvent, false);
window.applicationCache.addEventListener('checking', handleCacheEvent, false);
window.applicationCache.addEventListener('downloading', handleCacheEvent, false);
window.applicationCac... |
Python | UTF-8 | 909 | 2.703125 | 3 | [] | no_license | from pyspark import SparkContext, SparkConf
conf = SparkConf().setMaster("local[2]").setAppName("filter")
sc = SparkContext(conf=conf)
filter_data = {"emp_id": '609373628', "index": 2} # could be fetch from anywhere
lookup = sc.broadcast(filter_data)
lines = sc.textFile('poc.csv')
def format_lines(l):
lookup_m... |
Python | UTF-8 | 1,100 | 3.21875 | 3 | [] | no_license | import time
def coinChange(coins, amount):
m = 2**31 - 1
def coinChangeHelper(index, amount, count):
nonlocal m, coins
if amount == 0:
m = min(m, count)
for j in range(index, len(coins), 1):
if coins[j] <= amount < (m - count)*coins[j]: # most important line
... |
JavaScript | UTF-8 | 964 | 3.484375 | 3 | [] | no_license | var victims = []
var volunteers = []
var combine = []
var names = []
var names2 = []
var response = prompt("How many victims?")
var vicinfo = function(name, phone, address){
name = prompt("What is the victims name?")
phone = prompt("What is the victims phone?")
address = prompt("What is the victims address... |
Python | UTF-8 | 3,506 | 2.921875 | 3 | [] | no_license | import time
import os
import sys
import RPi.GPIO as GPIO
if sys.version_info[0] == 3:
from _thread import *
else:
from thread import *
class PI_ADC:
def __init__(self, num_avgs, limit):
self.num_avg = 0 #init to 0
if (num_avgs < 1):
num_avgs = 1
self.max_num_... |
C# | UTF-8 | 2,822 | 2.6875 | 3 | [
"MIT"
] | permissive | using System;
using System.Xml;
using System.Text;
using System.Collections.Generic;
namespace GenieLamp.Core.Metamodel
{
class AttributesCollection : MetaObjectNamedCollection<IAttribute, Attribute>, IAttributes
{
#region Constructors
public AttributesCollection(Model model)
: base(model)
{
... |
Java | ISO-8859-10 | 8,727 | 2.75 | 3 | [] | no_license | /* NodePairTable.java */
package elvira;
import java.util.Vector;
import elvira.Relation;
import elvira.FiniteStates;
import elvira.potential.PotentialContinuousPT;
/**
* This class implements a pair of values
* (<code>FiniteStates,Vector</code>), where the <code>Vector</code> contains
* <code>Relations</code> wh... |
Java | UTF-8 | 1,595 | 3.296875 | 3 | [] | no_license | /**
* Created by Administrator on 2017/1/11.
*/
public class HeapSort extends SortMethod{
public static void adjustHeap(int[] arr,int node,int size){
//叶节点无需调节
if(node*2+1<size){
int right=node*2+2;
int left=node*2+1;
if(right<size){
if(arr[rig... |
Markdown | UTF-8 | 41,942 | 2.9375 | 3 | [] | no_license | # 酒店预订系统软件详细设计描述文档
## 文档修改历史
| 修改人员 | 日期 | 修改原因 | 版本号 |
| :------: | --------- | ------------------------ | ------ |
| 陈泔錞 | 2020.5.24 | 框架搭建 | v0.1 |
| 陈泔錞 | 2020.6.20 | 初步完善业务逻辑层的分解 | v0.2 |
| 陈泔錞 | 2020.6.30 | 完成详细设计文档 | v1.0 |
| | | ... |
Python | UTF-8 | 907 | 4.1875 | 4 | [] | no_license | # Задача-2: Исходные значения двух переменных запросить у пользователя.
# Поменять значения переменных местами. Вывести новые значения на экран.
# Решите задачу, используя только две переменные.
# Подсказки:
# * постарайтесь сделать решение через действия над числами;
# * при желании и понимании воспользуйтесь синтакси... |
C# | UTF-8 | 2,661 | 3.09375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace guessing
{
class Program
{
static void Main(string[] args)
{
Console.BackgroundColor = ConsoleColor.DarkCyan;
Console.Clear();
... |
C++ | UTF-8 | 932 | 2.53125 | 3 | [
"MIT"
] | permissive | //
// File: SoundManager.hpp
// Class: SoundManager
// Author: John Barbero Unenge
// All code is my own except where credited to others.
//
// Copyright (c) 2012 Catch22. All Rights Reserved.
//
// Date: 17/9-2012
//
// License: The following code is licensed under the Catch22-License
... |
Markdown | UTF-8 | 720 | 3.5 | 4 | [] | no_license | # 问题描述
购房从银行贷了一笔款d,准备每月还款额为p,月利率为r,计算多少月能还清。计算还清月数的公式如下:
m=(log(p/(p-d*r))/log(1+r)
# 格式
## 输入
三个数d,p,r,以空格分隔。(d,p为整数,且200000<=d<=500000,1000<=p<=10000.r为实数,且0.005<=r<=0.02)
## 输出
一个数m(保留两位小数)
# 样例数据
<style>
table,table tr th, table tr td { border:1px solid #0094ff; }
table { width: 200px; min-height... |
C | UTF-8 | 6,187 | 3.0625 | 3 | [] | no_license | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
#include <stdarg.h>
#include "newzpost.h"
#include "../ui/errors.h"
static long buff_data_length(char *fmt, va_list ap);
file_entry * file_entry_alloc(){
file_entry * fe = malloc(sizeof(file_entry));
fe->parts = NULL;
fe->filename = NULL... |
C# | UTF-8 | 618 | 4.09375 | 4 | [
"MIT"
] | permissive | using System;
using System.Linq;
/// <summary>
///
/// Write a method that reverses the digits of given decimal number.
///
/// </summary>
class ReverseNumber
{
static void Main()
{
// Input
Console.Write("Enter number to reverse: ");
double number = double.Parse(Console.ReadLine());
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.