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 |
|---|---|---|---|---|---|---|---|
C# | UTF-8 | 1,196 | 3.578125 | 4 | [] | no_license | using System;
using System.Diagnostics;
namespace SortingArrays
{
class SelectionSort
{
public void Sort(int[] input)
{
var watch = Stopwatch.StartNew();
try
{
int smallestIndex;
for (int i = 0; i < input.Length - 1; i++)
... |
Python | UTF-8 | 4,367 | 4.59375 | 5 | [] | no_license | # Chapter 3 - If Statements (Quiz Game)
# Basic Comparisons
a = 1
b = 2
c = 3
d = 4
e = 4
if b > a:
print("b > a")
if a > b:
print("a > b")
if b < c:
print("b < c")
if b >= a:
print("b >= a")
if d >= e:
print("d >= e")
if d == e:
print("d == e (equal to)")
if a != b:
print("a != b (n... |
Java | UTF-8 | 457 | 2 | 2 | [] | no_license | package com.example.a.myapplication.bean;
/**
* Created by Administrator on 2016/12/26.
*/
public class PayModel extends BaseModel {
/**
* o : null
* e : null
*/
private Object o;
private Object e;
public Object getO() {
return o;
}
public void setO(Object o) {
... |
PHP | UTF-8 | 1,156 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\Cristales\Http\Requests;
use App\Http\Requests\Request;
class CategoriaCristalRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* ... |
C++ | UTF-8 | 3,348 | 2.515625 | 3 | [
"MIT"
] | permissive | #include "util.h"
#include "rubyvalue.h"
#include <QString>
#include <string>
#include <memory>
#include <cxxabi.h>
#ifdef HAVE_RUBY_THREAD_H
#include <ruby/thread.h>
#else
extern "C" {
void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
void *rb_thread_call_without_gvl(void *(*func)(void *), void *data... |
C | UTF-8 | 824 | 3.015625 | 3 | [] | no_license | #include "common.h"
void rmpath(char *path) {
int ret = rmdir(path);
if (ret == -1) {
perror("rmdir err");
exit(-1);
}
}
void recursive_rmpath(char *path) {
DIR *dir = NULL;
struct dirent *entry = NULL;
if ((dir = opendir(path)) != NULL) {
while ((entry = readdir(dir))) {
if (strcmp(entry->d_name, "... |
Java | UTF-8 | 668 | 2.203125 | 2 | [] | no_license | package com.geektask.TestStarter;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.geektask.SchoolSpringBoot.SchoolService;
import com.geektask.SchoolSpringBoot.Student;
@RestController
public c... |
Java | UTF-8 | 2,496 | 2.40625 | 2 | [] | no_license | package com.ipartek.formacion.incidencias.repositorio;
import java.util.ArrayList;
import java.util.List;
import java.util.TreeMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import com.... |
Markdown | UTF-8 | 921 | 2.609375 | 3 | [] | no_license | # FTPS-Patch
FTPS patch for windows to allow proper passive mode uploading.
Utilizes (and includes a copy of, for archival purposes) [MOVEit Freely CLI](https://moveitsupport.ipswitch.com/SUPPORT/mifreely/mifreely.htm) and provides a small wrapper to replace the standard Windows ftp.exe
This was created to enable com... |
Python | UTF-8 | 3,163 | 2.515625 | 3 | [] | no_license | # -*- coding: utf-8 -*-
from handlers import RequestHandler
import feedparser
from bson import ObjectId
class RssAddHandler(RequestHandler):
def get(self):
category = [item['name'] for item in self.db.category.find()]
'Other' in category and category.remove('Other')
self.render('rss/add.ht... |
C# | UTF-8 | 5,133 | 2.640625 | 3 | [
"MIT"
] | permissive | namespace Slinqy.Test.Functional.Models.ExampleAppPages
{
using System;
using System.Globalization;
using OpenQA.Selenium;
using OpenQA.Selenium.Support.PageObjects;
using Utilities.Polling;
using Utilities.Strings;
/// <summary>
/// Models the form for creating a new queue.
/// </... |
Markdown | UTF-8 | 6,947 | 3.09375 | 3 | [] | no_license | ---
title: "A quick ruby DSL for creating L-Systems"
date: 2021-03-24
programming/topics:
- Generative Art
- Procedural Content
programming/languages:
- Ruby
---
{{< wikipedia "L-Systems" >}} are pretty awesome. With only a bare few rules, you can turn something like this:
```ruby
LSystem.new("Barnsley Fern") do
s... |
PHP | UTF-8 | 2,887 | 2.578125 | 3 | [] | no_license | <?php
//controller for all functions related to admin
class Admin_user extends Vb_Controller {
private $js_css_array = array('vb_css' => array('vb_admin'), 'vb_js' => array('admin_user'));
public function __construct() {
parent::__construct($this->js_css_array);
}
/**
* user page show... |
TypeScript | UTF-8 | 670 | 2.578125 | 3 | [] | no_license | import { Directive ,ElementRef,Input,Output,HostListener} from '@angular/core';
@Directive({
selector: '[appHighlight]'
})
export class HighlightDirective {
constructor(private el:ElementRef) {
//el.nativeElement.style.backgroundColor ="Red";
}
@Input('appHighlight') highlightColor: string;
@I... |
Markdown | UTF-8 | 6,685 | 3.078125 | 3 | [] | no_license | @[TOC]
# 前言
> 在迭代任务繁多、需求紧张、需求复杂的情况下,有时候开发人员为了追赶需求,而不考虑设计模式、设计原则、系统性能等,给系统埋了很多坑,欠下了许多技术债。当系统性能达到用户无法接受的程度,往往这个时候领导才意识到要安排一个性能优化的任务给开发,然后进行一些代码重构。下面介绍我所了解的Java性能优化的一些技术手段以及我在实际项目中遇到的问题和优化手段。
# 性能优化的7种技术手段
系统优化从大方向来说可以分为两类:业务优化和技术优化,前者是产品经理或者BA所关注的方向,后者是开发所关注的方向。目前常见的系统优化策略大致可分为以下7类:

parser.add_argument('--json', type=str,
help='input json file')
parser.add_argument('--yaml', type=str,
help='output yaml file')
args =... |
C# | UTF-8 | 5,242 | 3.125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using Stephen.Webb.HR.DataTransferObjects;
using Stephen.Webb.HR.DataAccess;
using Stephen.Webb.HR.Repository;
namespace Stephen.Webb.HR.Domain
{
public interface IEmployeeManagement
{
void AddEmployee(EmployeeExternal employeeExternal... |
Shell | UTF-8 | 130 | 2.65625 | 3 | [] | no_license | #!/bin/bash
for((x=0;;x++))
do
echo "Test number : " $x
./gener $x >input.txt
./pro <input.txt || break
done
cat input.txt
|
C | UTF-8 | 847 | 3.84375 | 4 | [] | no_license | /**
* CSCI3020U Operating Systems Lab 04
* Copyright (C) 2018 Eyaz Rehman, Rishabh Patel. All Rights Reserved.
*/
#include "queue.h"
#include <stdlib.h>
void queue_push(node_t **head, proc_t process) {
// Create a new node
node_t *new_node = (node_t *)malloc(sizeof(node_t));
new_node->process = process... |
TypeScript | UTF-8 | 402 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | import Task from "./Task"
import * as async from "async"
export
interface ArgsCheckPrerequ {
names: Array<string>;
}
/**
*/
export default
class CheckPrerequ extends Task {
exec( args: ArgsCheckPrerequ, done: ( boolean ) => void ) {
async.forEach( args.names, ( name, cb ) =>
this.ch... |
C# | UTF-8 | 584 | 2.890625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MovieSearch
{
public static class FileParsing
{
public static List<Movie> ProcessBasicsFile(string path)
{
Console.WriteLine();
... |
Java | UTF-8 | 1,366 | 2.390625 | 2 | [] | no_license | package pl.wiktor.kafkaapi.services;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.kafka.support.SendResult;
import org.springframework.stereotype.Service;
import org.springframework.util.conc... |
Go | UTF-8 | 2,533 | 3.0625 | 3 | [] | no_license | package handlers_test
import (
"bytes"
"encoding/json"
"files/file_server/handlers"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"net/http/httptest"
"os"
"testing"
)
const (
test_img_url = "./test_png.png"
url = "localhost:8080/upload"
)
func TestAddHandler(t *testing.T) {
upl := &handlers.Upl... |
Java | UTF-8 | 1,365 | 1.726563 | 2 | [] | no_license | package xproject.xcr;
import xproject.xcr.xlock.XLockManager;
import xproject.xcr.xnodetype.XNodeTypeManager;
import xproject.xcr.xobservation.XObservationManager;
import xproject.xcr.xquery.XQueryManager;
import xproject.xcr.xversion.XVersionManager;
import xproject.xrmi.XRemote;
public interface XWorkspace... |
C++ | UTF-8 | 804 | 2.734375 | 3 | [] | no_license | #include "Timer.h"
Timer::Timer() :
m_timestep(0.0),
m_time(0.0),
m_smoothstep(0.0),
m_smoothstepF(0.0f),
m_frameCount(0)
{
long long frequency;
QueryPerformanceFrequency((LARGE_INTEGER*)&frequency);
m_period = 1.0f / static_cast<double>(frequency);
QueryPerformanceCounter((LARGE_INTEGER*)&m_startupTimestamp... |
Java | UTF-8 | 1,450 | 2.671875 | 3 | [] | no_license | package entity;
import javax.persistence.*;
import java.time.LocalDateTime;
@Entity
public class ArticleEntity {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id", unique = true, nullable = false)
private long id;
private String content;
private String title;
priva... |
Markdown | UTF-8 | 4,973 | 2.625 | 3 | [] | no_license | ---
title: "Feral Opener Reference"
date: 2018-09-03
authors: ['Xanzara']
published: true
---
### General Feral Opener Sequence
## Note about openers
An opener is not a big part of your dps. To most this might be immediately obvious, but a lot of people tend to vastly overrate the importance of a good opener. With th... |
Shell | UTF-8 | 236 | 2.6875 | 3 | [
"MIT"
] | permissive | #!/bin/bash
#
# Activate Qt5 environment settings and deactivate those for Qt4
# Applies for this session only; still gotta source it!
#
[ $QT4DIR ] && pathremove $QT4DIR/bin
[ $QT5DIR ] && pathappend $QT5DIR/bin
echo $PATH
export PATH
|
Markdown | UTF-8 | 1,119 | 3.046875 | 3 | [
"MIT"
] | permissive | # token_crowdsale

This repository consists of developing a crowdsale token offering (catkatToken) expected to run for 24 weeks with the objective of raising 300 Ether.
To test the code the token objective was reduced to 20 and the run time 5 mins.
## Contract design:
The catkatT... |
Java | UTF-8 | 3,080 | 2.203125 | 2 | [] | no_license | package com.sewaseven.sewaseven;
import androidx.annotation.NonNull;
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.EditText;
import android.widget.TextView... |
PHP | UTF-8 | 342 | 2.84375 | 3 | [] | no_license | <?php
interface EventEmitterInterface
{
public function on($event, $listener);
public function once($event, $listener);
public function removeListener($event, $listener);
public function removeAllListeners($event = null);
public function listeners($event);
public function emit($event, array $ar... |
Swift | UTF-8 | 1,702 | 2.890625 | 3 | [] | no_license | //
// LineFireCountDownController.swift
// NoticeMe
//
// Created by 王俊仁 on 16/5/22.
// Copyright © 2016年 王俊仁. All rights reserved.
//
import UIKit
class CircleLineFireCountDownController: BaseCountDownViewController {
var lineLayer = CAShapeLayer()
override func viewDidLoad() {
super.viewDidLoa... |
Python | UTF-8 | 339 | 3.75 | 4 | [] | no_license | """사용자로부터 정수를 입력 받아 정수의 자릿수의 합을
계산하는 프로그램을 작성 하시오. 1234를 입력하였다면 1+2+3+4를 게산
하면 된다."""
num=input('정수를 입력하시오: ')
num2=sorted(num)
num2=map(int,num2)
num2=list(map(int,num2))
print(num2)
sum_result=sum(num2)
print(sum_result)
|
C | UTF-8 | 1,386 | 2.96875 | 3 | [] | no_license | #include <stdio.h>
int main(){
while(1){
int n1,n2;
scanf("%d",&n1);
if(n1==0)
return 0;
else{
//get input
int i,j,end1,end2,sum1,sum2,sum;
int arr1[n1];
for(i=0;i<n1;i++)
scanf("%d",&arr1[i]);
scanf("\n%d",&n2);
int arr2[n2];
//DEBUG
//printf("%d %d\n",n1,n2);
for(i=0;i<n2;i... |
Markdown | UTF-8 | 1,091 | 3.078125 | 3 | [] | no_license | Homework 3
===
學習歷程
---
一開始想說,既然input都是確定的,那我就做一個彈性/擴充性很低的程式,雖然醜而且很難修改,但至少可以算出答案吧!要是寫一個彈性很好的程式,結果算不出答案來就好笑了。
順利算出答案之後,發現自己的code超醜XD所以去參考了一下其他同學的code,發現其他同學有做能夠自由改變input的code,覺得我這樣實在不太行,就做了三個function:
1.payoff()用來計算call和put的payoff,可以用"call"和"put"切換公式
2.probability()考慮不同n的情況,所以不只能帶入n = 3了,而能夠彈性的變化
3.PV()用來讓code更加簡潔,使用者... |
Java | UTF-8 | 706 | 2.359375 | 2 | [] | no_license | package com.github.artfly;
import com.github.artfly.di.ObjectsGraph;
import com.github.artfly.log.ConsoleLogger;
import com.github.artfly.log.Logger;
import com.github.artfly.repo.User;
import com.github.artfly.web.UserController;
public class Main {
public static void main(String[] args) {
ObjectsGraph ... |
C++ | UTF-8 | 508 | 2.75 | 3 | [] | no_license | // Main Memory (RAM)
#ifndef MEMORY_H
#define MEMORY_H
#include <cstdint>
class SMS;
class Memory {
public:
Memory(SMS& smsP);
uint8_t getByte(uint16_t addr);
void setByte(uint16_t addr, uint8_t val);
private:
uint8_t RAM[0x2000]; // 8 KB of RAM
uint8_t mapReg;... |
Python | UTF-8 | 203 | 3.375 | 3 | [] | no_license | import numpy as np
arr = np.arange(0,12)
print (arr)
print (arr[0:6])
arr[2:5] = 20
print (arr)
arr2 = arr[3:6]
arr2[:] = 29
print (arr2)
print (arr)
# creating new array copy
arrcopy = arr.copy()
|
Java | UTF-8 | 1,881 | 2.109375 | 2 | [
"MIT"
] | permissive | package com.example.saar.Gallery;
import android.graphics.drawable.ColorDrawable;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.KeyEvent;
import android.view.MenuItem;
import android.view.Window;
import android.view.WindowManager;
import com.bu... |
Markdown | UTF-8 | 1,901 | 2.734375 | 3 | [] | no_license |
TestFairy SDK for PhoneGap/Cordova is currently available for iOS and Android apps.
## Installation
To add the plugin to your project via [npm](https://www.npmjs.com/package/com.testfairy.cordova-plugin), simply run the following command from Terminal:
```
cordova plugin add com.testfairy.cordova-plugin
```
Altern... |
C# | UTF-8 | 1,387 | 2.640625 | 3 | [] | no_license | using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using ClientBarometer.Contracts.Requests;
using ClientBarometer.Contracts.Responses;
using ClientBarometer.Domain.Clients;
using ClientBarometer.Domain.Models;
using Flurl.Http;
namespace ClientBarometer.Implementations.Clients... |
Python | UTF-8 | 1,391 | 2.515625 | 3 | [
"MIT"
] | permissive | from sqlalchemy import Column, Integer, String, Float, Boolean, ForeignKey
from sqlalchemy.orm import relationship
from src.infra.sqlalchemy.config.database import Base
class Usuario(Base):
__tablename__ = 'usuario'
id = Column(Integer, primary_key=True, index=True)
nome = Column(String)
senha = Colu... |
C# | UTF-8 | 2,628 | 3.46875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
namespace _2_Observer
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
class Hospital
{
public CoronaEvent CoronaEvent { get; private set; }
}
class Co... |
SQL | UTF-8 | 11,737 | 3.34375 | 3 | [
"Apache-2.0"
] | permissive | -- Copyright 2018-2022 Cargill Incorporated
--
-- 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... |
C++ | UTF-8 | 5,839 | 2.875 | 3 | [
"BSL-1.0"
] | permissive | #include <catch2/catch.hpp>
#include <pcp/algorithm/common.hpp>
#include <pcp/algorithm/estimate_normals.hpp>
#include <pcp/common/normals/normal.hpp>
#include <pcp/common/normals/normal_estimation.hpp>
#include <pcp/common/points/point.hpp>
#include <pcp/common/points/point_view.hpp>
#include <pcp/common/points/vertex... |
C# | UTF-8 | 2,754 | 3.296875 | 3 | [] | no_license | using System;
namespace simulacro
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Bienvenido!");
Console.WriteLine("Ganas si tienes 100 puntos o más o si sacas un 12 seguido de un 10." + "\n"
+ "pierde... |
Ruby | UTF-8 | 2,102 | 2.546875 | 3 | [] | no_license | class TagsController < ApplicationController
def show
if params["id"] != nil
@tag = Tag.find_by(id: params["id"])
@user = @tag.draw_users
@map = Hash.new
@user.each do |user|
@map[user] = user.follower_users.count
end
@user = @map.sort_by{ |_, v| -v }
@user... |
C++ | UTF-8 | 1,090 | 3.015625 | 3 | [
"MIT"
] | permissive | #ifndef CUSTOM
#define CUSTOM
#include "../Blackbox/gui/events/MouseButtonEvent.h"
#include "../Blackbox/gui/events/BaseEventFactory.h"
#include <iostream>
#include <map>
class Component;
class Custom : public mouse_button_event::DefaultMouseEvent
{
public:
inline virtual void mouseLeftButtonC... |
JavaScript | UTF-8 | 118 | 2.546875 | 3 | [] | no_license |
var arr = angular.copy([1, 2, 3]);
console.log(arr)
var arr2 = [4, 5, 6];
console.log(arr2);
console.log(arr2[1]); |
Python | UTF-8 | 1,239 | 2.640625 | 3 | [
"Unlicense"
] | permissive | import tweepy
import wordcloud
from Credentialstwitter import *
from wordcloud import WordCloud, STOPWORDS
import matplotlib.pyplot as plt
auth = tweepy.OAuthHandler(ConsumerKey, ConsumerSecret)
api = tweepy.API(auth)
text = " "
tweets = api.user_timeline(screen_name ="maiconkusterkkk", count=1000, include_rts = Fals... |
TypeScript | UTF-8 | 407 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | import { BusinessRule } from '@core/shared/business-rule';
import bcrypt from 'bcrypt';
export class OldPasswordMustBeValidRule extends BusinessRule {
message = 'Old password is invalid.';
constructor(private readonly oldPassword, private readonly hashedPassword: string) {
super();
}
public async isBroke... |
Java | UTF-8 | 5,194 | 2.21875 | 2 | [] | no_license | package com.engage.service;
import static com.engage.util.Constants.NULL_EMPTY_DATE;
import static com.engage.util.Constants.NULL_EMPTY_REASON;
import static com.engage.util.Constants.NULL_EMPTY_VALUE;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.verify;
import static org.mockito... |
Java | UTF-8 | 157 | 2 | 2 | [] | no_license | package com.lambda.app;
public interface Persona {
void caminar();
default void hablar() {
System.out.println("Hola chiquita c:");
}
}
|
Markdown | UTF-8 | 2,972 | 3.234375 | 3 | [] | no_license |
# Polyfills
The JavaScript language steadily evolves. The new proposals get analyzed and, if they look worthy, are appended to the list at <https://tc39.github.io/ecma262/> and then progress to the [specification](http://www.ecma-international.org/publications/standards/Ecma-262.htm).
Each JS engine has its own idea... |
PHP | UTF-8 | 1,357 | 3.03125 | 3 | [] | no_license | <<<<<<< HEAD
<html>
<head>
<title></title>
<style>
.centrado{text-align: center;}
</style>
</head>
<body>
<div class="centrado">
<?php
$num = $_POST['num'];
/*for($i=2; $i <= $num - 1; $i++) {
if($num % $i) {
$msg = "El número $num no es primo";
... |
TypeScript | UTF-8 | 402 | 3.640625 | 4 | [
"MIT"
] | permissive |
// extends
type Diff2<T, U> = T extends U ? never : T; // 找出T的差集
type Filter2<T, U> = T extends U ? T : never; // 找出交集
type diff21 = Diff2<"a" | "b" | "c" | "d", "a" | "c" | "f">;
type filter21 = Filter2<"a" | "b" | "c" | "d", "a" | "c" | "f">;
// infer
type Func<T> = T extends () => infer R ? R : boolean;
... |
Python | UTF-8 | 576 | 2.5625 | 3 | [] | no_license | from sqlalchemy.ext.hybrid import hybrid_property
from app import db
from app import bcrypt
class User(db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(128), nullable=False)
email = db.Column(db.String(128), nullable=False)
_password =... |
Java | UTF-8 | 307 | 2.03125 | 2 | [] | no_license | package com.tresleches.aadp.interfaces;
/**
* Interface to identify and perfomrming a Task.
* Task can be any activity or fragment which needs Dialog for Progress.
* @author Parag Sagar
*
*/
public interface AADPTask {
public void performTask();
public void performOfflineTask();
}
|
Python | UTF-8 | 797 | 3.203125 | 3 | [
"MIT"
] | permissive | # -*- coding: UTF-8 -*-
# Just for test & memo... Nothing related to actual project.
def fib(n):
"""print a Fibonacci series"""
a, b = 0, 1
while a < n:
print a,
a, b = b, a + b
# class bcolors:
# """testing color formatting"""
# PURPLE = '\033[95m'
# BLUE = '\033[94m'
# GR... |
Java | UTF-8 | 2,122 | 2.1875 | 2 | [] | no_license | package com.example.generalquizapp.Views;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.os.SystemClock;
import android.view.View;
import android.widget.Button;
import android... |
C# | UTF-8 | 701 | 2.859375 | 3 | [] | no_license | using System.Collections.Generic;
namespace ACM.BL
{
public class Product : EntityBase
{
public Product()
{
}
public Product(int productId)
{
ProductId = productId;
}
public int ProductId { get; set; }
public string ProductName { ge... |
Markdown | UTF-8 | 14,198 | 2.75 | 3 | [
"CC-BY-4.0"
] | permissive | ---
title: "Deep Links"
url: /refguide/mobile/using-mobile-capabilities/deep-links/
weight: 20
description: Connect URLs to your native mobile app by adding a deep link.
aliases:
- /howto/mobile/native-deep-link/
---
## 1 Introduction
While URLs typically open websites, they can also open an installed app on your... |
Markdown | UTF-8 | 3,783 | 2.71875 | 3 | [] | no_license | ---
title: Fairfield Horseshoe
author: James Bateson
date: "2019-03-21"
location: Ambleside, Lake District
header: /assets/images/walks/fairfield-horseshoe/fairfield-horseshoe-hero.jpg
listing: /assets/images/walks/fairfield-horseshoe/fairfield-horseshoe-listing.jpg
summary: This is the walk I was most looking forward ... |
Python | UTF-8 | 5,202 | 2.890625 | 3 | [] | no_license | import itertools
file_to_write_vulns=input("Donnez le nom du fichier où les vulnérabilité seront écrites:")
char_erase = input("Pour effacer le contenu du fichier, veuillez taper \"E\" :")
if char_erase == "E":
open(file_to_write_vulns, 'w').close()
list_properties = list()
list_combination=list()
list_negation_pr... |
Python | UTF-8 | 175 | 3.84375 | 4 | [] | no_license | salario = float(input('Qual é o seu salario? R$'))
novo= salario + (salario*15)/100
print('Seu salario era R${:.2f}, com reajuste está R${:.2f}'.format(salario, novo))
|
Python | UTF-8 | 1,852 | 4.65625 | 5 | [] | no_license | """
This problem was asked by Microsoft.
Let's represent an integer in a linked list format by having each node represent a digit in the number. The nodes make up the number in reversed order.
For example, the following linked list:
1 -> 2 -> 3 -> 4 -> 5
is the number 54321.
Given two linked lists in this format, r... |
Swift | UTF-8 | 3,332 | 2.578125 | 3 | [
"MIT"
] | permissive | //
// IterativeDeepening.swift
// Gomoku Zero
//
// Created by Jiachen Ren on 10/20/18.
// Copyright © 2018 Jiachen Ren. All rights reserved.
//
import Foundation
class IterativeDeepeningCortex: MinimaxCortex {
var completed = false
var setup: (ZeroPlus, Int) -> ()
var layers: Layers
var bestMove:... |
Java | UTF-8 | 2,318 | 2.03125 | 2 | [] | no_license | package org.ck.teach.teachplatform.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import or... |
Python | UTF-8 | 489 | 3.109375 | 3 | [] | no_license | def lines(nombreArchivo,N):
try:
f = open(nombreArchivo,'r')
l = f.readlines()
for i in l:
k=i.split()
return l[:N]
except:
return("error")
def dictionary(R):
dic={}
for i in R:
E={}
k=i.split()
E={'nombre':k[3][:-1]}
E={'resto':k[3:]}
print E['nom... |
Java | UTF-8 | 610 | 3.390625 | 3 | [
"MIT"
] | permissive | package com.github.jackprogramsjp.javacalc;
public class Token {
public enum Type {
NUMBER,
PLUS,
MINUS,
MULTIPLY,
DIVIDE,
LPAREN,
RPAREN
}
public Type type;
public double value;
public Token(Type type) {
this.type = type;
}
... |
C++ | UTF-8 | 1,047 | 3.53125 | 4 | [] | no_license | #include "Sales_data.h"
//#include "7.21.cpp"
//a program to use each of the contstructors from 7.11.cpp
std::istream &read(std::istream &is, Sales_data &item)
{
double price = 0;
is >> item.bookNo >> item.units_sold >> price;
item.totalRevenue = price * item.units_sold;
return is;
}
std::ostream &print(std... |
Markdown | UTF-8 | 7,721 | 2.859375 | 3 | [] | no_license | <div class="read-content j_readContent" id="">
<p> 好吧,你仔细看着映照出的自己,半透明的躯体,人类四肢和一个脑袋。没什么特别啊,你的五官因为灵魂的原因而看不真切,只能模糊看出个大概样貌。转生之殿,这里到底是干嘛的?<p> 正在你纳闷的时候,一个亡魂接近这个建筑。她警惕的看着你,双手捂着胸口。慢慢靠近那个蘑菇建筑。这是个人类女性,大概是人类。你只能这么想,因为对方有六对手臂,却有个人类的身体。你奇怪的看着对方,你发现除了多出来的手臂,身体和普通女性人类亡魂没什么不同的地方。<p> 为了表示友好,你稍稍退后一些,等着那个大概是人类的女性靠近建筑... |
Java | UTF-8 | 384 | 2.21875 | 2 | [] | no_license | /**
* Unlink the TabLayout and the ViewPager
*/
public void detach(){
mAdapter.unregisterAdapterDataObserver(mPagerAdapterObserver);
mTabLayout.removeOnTabSelectedListener(mOnTabSelectedListener);
mViewPager.unregisterOnPageChangeCallback(mOnPageChangeCallback);
mPagerAdapterObserver=null;
mOnTabSelectedLi... |
Java | UTF-8 | 734 | 3.4375 | 3 | [] | no_license | package matrix;
public class SearchA2DMatrix {
public static void main(String[] args) {
int[][] matrix = {{1}};
int t = 8;
int[][] matrix1 = {{1,3,5,7},{10,11,16,20},{23,30,34,60}};
int t1 = 30;
System.out.print(searchMatrix(matrix, t));
System.out.print(searchMatrix... |
Java | UTF-8 | 1,221 | 3.625 | 4 | [] | no_license | package com.charkun704;
import java.util.*;
public class Main {
public static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int[] arr = getInts(5);
int[] sorted = sortArr(arr);
printArr(sorted);
}
public static int[] getInts(int arrSize){
... |
Python | UTF-8 | 1,989 | 3.875 | 4 | [] | no_license | print("ERP System:v3")
Emp={}
def add_Employee():
Emp_List=[]
EmpID=int(input("Enter the employee ID\n"))
if EmpID in Emp.keys():
print("Already exists.\n")
else:
name=input("Add name of the new employee\n")
Emp_List.append(name)
age=input("Add age of the new employee\n")
Emp_List.a... |
Java | UTF-8 | 3,785 | 1.921875 | 2 | [] | no_license | package com.yjh.db.dao;
import com.yjh.db.domain.AllSppp;
import com.yjh.db.domain.AllSpppExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@Repository
public interface AllSpppMapper {
/**
* This method was generated by MyBatis Gener... |
Java | UTF-8 | 1,196 | 2.765625 | 3 | [] | no_license | package clases;
public class Paciente {
private String nombre;
private String apellido;
private String tel;
private String dni;
private Genero tipoGenero;
public Paciente(String nombre, String apellido, String tel, String dni, Genero tipoGenero) {
super();
this.nombre = nombre;
this.apellido = apelli... |
C | UTF-8 | 1,347 | 2.640625 | 3 | [] | no_license | #include <stdio.h>
#include "future.h"
#include "asyncio.h"
typedef struct {
int errno;
future_status_e status;
void *result;
future_done_callback done_callback;
void *done_args;
}_future_t;
future_t future_create()
{
_future_t *f = (_future_t *)malloc(sizeof(_future_t));
f->errno = 0;
... |
JavaScript | UTF-8 | 556 | 2.59375 | 3 | [] | no_license | import React, { useState } from "react";
import data from "../../../data";
import OperatorButton from "./OperatorButton.js";
//import any components needed
//Import your array data to from the provided data file
const operators = data.operators;
const Operators = () => {
const [operator, setOperator] = useState(o... |
Markdown | UTF-8 | 1,033 | 2.546875 | 3 | [] | no_license | # Out of Stock Checker
<p align='center'>
<a href="https://github.com/sujaysathya/out_of_stock_checker/issues">
<img src="https://img.shields.io/github/issues/sujaysathya/out_of_stock_checker?style=flat-square" alt="GitHub Issues" >
</a>
<a href="https://github.com/sujaysathya/out_of_stock_checker/stargazers">
... |
JavaScript | UTF-8 | 2,470 | 2.578125 | 3 | [] | no_license | import { createSlice } from '@reduxjs/toolkit';
export const newsSlice = createSlice({
name: 'featureNews',
initialState: {
data: [],
filtered_data: {
posts: []
},
loading: true,
error: null
},
reducers: {
loadNews: (state) => {
state.loading = true;
},
errorNews: (state, action) => {
stat... |
TypeScript | UTF-8 | 4,477 | 2.65625 | 3 | [] | no_license | import { Dictionary } from '@shared-types'
import { XMysqlApi } from './'
import { HttpClient } from '@services'
export enum RulePriority {
Minor = 'Minor',
Trivial = 'Trivial',
Medium = 'Medium',
Major = 'Major',
Critical = 'Critical'
}
export enum RuleType {
VillageInsight = 'VillageInsight... |
Go | UTF-8 | 5,492 | 2.78125 | 3 | [] | no_license | package leaders
import (
"context"
"database/sql"
"fmt"
"log"
"strconv"
"strings"
"time"
"confusion.com/bwoo/database"
"confusion.com/bwoo/misc"
)
func createLeaderInDb(leader Leader) (*misc.Status, error) {
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
defer cancel()
feature... |
Ruby | UTF-8 | 260 | 2.859375 | 3 | [] | no_license | class Proc
def flip
->(a,b){ self.(b,a) }.curry
end
end
class Object
def _?
->(a,b){self ? a : b}.curry
end
end
p($<.to_a.last.split.map(&:to_i.to_proc >> :to_s.to_proc.curry(2).flip.(2) >> :reverse.to_proc >> :index.to_proc.flip.('1')).min)
|
C# | UTF-8 | 1,206 | 3.453125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PropertiesIndexators
{
class Exc10
{
public string[] Str = new string[] {"Come"," on",","," try"," to"," fill"," me"};
public string this[int k]
{
... |
Java | UTF-8 | 8,541 | 2 | 2 | [] | no_license | package com.indihx.org.controller;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.Requ... |
PHP | UTF-8 | 1,413 | 2.515625 | 3 | [] | no_license | <?php
namespace App\publicModule\Presenters;
use Mpdf\Mpdf;
use Nette\Application\UI\Form;
use Nette\Utils\Image;
class HomepagePresenter extends \BasePresenter {
public function createComponentLoginForm() {
$form = new Form();
$form->addEmail('email')
->setRequired('email: ' . \Constants::FORM... |
Python | UTF-8 | 7,101 | 2.546875 | 3 | [] | no_license | #!/usr/bin/python3
########################################################################
# Copyright (c) 2018-2019 Robert Bosch GmbH
#
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl... |
Markdown | UTF-8 | 544 | 2.90625 | 3 | [
"MIT"
] | permissive | ### PHP Framework Interop Group
[*PHP-FIG*](http://www.php-fig.org/)
<br>
Proponen recomendaciones de estándar.
- **PSR-7** - HTTP Messages
- **PSR-15** - Server middleware
<aside class="notes">
- Son un grupo de proyectos de PHP que se unieron para definir proposiciones de estandar<br>
- Existen desde hac... |
Java | UTF-8 | 2,127 | 2.796875 | 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 com.fpt.da;
import com.fpt.entity.Student;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLEx... |
JavaScript | UTF-8 | 1,719 | 2.9375 | 3 | [] | no_license | /**
* @desc this checks if params is an integer
* @param {integer} input
*
* @return {boolean} returns a true
*/
const checkInput = (input) => {
if (Number.isInteger(Number(input))) {
return true
}
}
/**
* @desc this checks if input is empty
* @param {integer} input
*
* @return {boolean} returns a true
*/
... |
JavaScript | UTF-8 | 1,791 | 2.578125 | 3 | [
"MIT"
] | permissive | import React from 'react';
import PropTypes from 'prop-types';
class ImageUpload extends React.Component {
constructor(props) {
super(props);
this.file = null;
this.caption = null;
this.encodedFile = null;
this.onSubmit = props.onSubmit;
this.state = {
image: null,
caption: null
... |
Java | UTF-8 | 1,487 | 2.25 | 2 | [
"Unlicense"
] | permissive | package za.co.twyst.GA144.assembler;
import org.junit.Test;
public class TestDROP extends AssemblerTest {
private static final boolean DEBUG = false;
private static final String DROP0 = "antlr 0 org\n"
+ " drop\n";
private static final String DROP1 = "antlr 0 org\n"
... |
Java | UTF-8 | 555 | 1.921875 | 2 | [] | no_license | package ex_2.parser;
public class JsonParserInfo {
public static final String FILE_TO_PARSE = "src/main/resources/colors.json";
public static final String FILE_TO_CREATE = "src/main/resources/new_colors.json";
public static final String COLORS = "colors";
public static final String CODE = "code";
p... |
Python | UTF-8 | 1,743 | 2.609375 | 3 | [] | no_license | #!/usr/bin/env python
"""
Compile a list of sites & site years used in the final analysis
That's all folks.
"""
__author__ = "Martin De Kauwe"
__version__ = "1.0 (15.08.2017)"
__email__ = "mdekauwe@gmail.com"
import os
import sys
import glob
import pandas as pd
import codecs
import numpy as np
from tabulate import t... |
JavaScript | UTF-8 | 778 | 3.25 | 3 | [
"Apache-2.0"
] | permissive | /**
* Bind columns with bubble/scatter chart definition according to titles.
*/
function processBubbleTitle(row) {
var checklist = ['name', 'lat', 'lng', 'value'];
var res = {
name : null,
lat: null,
lng : null,
value : null,
valid : false
};
var c = 0;
for (var i = 0; i < row.length; i++) {
... |
C++ | UTF-8 | 4,203 | 2.53125 | 3 | [] | no_license |
#include <QtCore/QCoreApplication>
#include <QtCore/QFileInfo>
#include <QtGui/QPixmap>
#include <QtGui/QPainter>
struct img_processor_base
{
img_processor_base(const QString & odir, QImage * pix_logo)
:outDir(odir), pPixLogo(pix_logo)
{}
void center_draw(QImage & dest, const QImage & img)
{
QPainter painter(... |
JavaScript | UTF-8 | 538 | 3.34375 | 3 | [] | no_license | var restrict = window.prompt("Enter a letter to restrict the list of songs");
function addFavoriteSong(songName){
if (!songName.includes(restrict))
favoriteSongs.push(songName);
}
//comment
var favoriteSongs = [];
addFavoriteSong("Trap");
addFavoriteSong("Paranoid");
addFavoriteSong("Hand of God"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.