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 |
|---|---|---|---|---|---|---|---|
Python | UTF-8 | 365 | 3.3125 | 3 | [] | no_license |
def super_reduced_string(txt):
while True:
if txt == "":
return "Empty String"
else:
counter = 0
for i in txt:
if i*2 in txt:
txt = txt.replace(i*2, "")
else:
counter += 1
if coun... |
C++ | UTF-8 | 364 | 2.90625 | 3 | [] | no_license | #include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
int arr[100],i,j,k,sum=0,n;
cin>>n;
for(i=0;i<n;i++)
cin>>arr[i];
for(i=0;i<n;i++)
{cout<<arr[i]<<" ";}
cout<<endl;
//adding element of array
for(i=0;i<n;i++)
{
sum=sum+arr[i];
}
... |
C# | UTF-8 | 731 | 2.515625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Xunit;
namespace Day_02.Test
{
public class Test
{
[Fact]
public void Task1_1()
{
Assert.Equal("58", Program.Task1(new List<string> { "2x3x4" }));
}
[Fact]
publ... |
PHP | UTF-8 | 1,069 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\Post;
use Illuminate\View\View;
class BlogController extends Controller
{
final public function index(): View
{
$args = \func_get_args();
$routeId = $args[0] ?? null;
$slug = null;
if (count($args) > 2) {
abo... |
Java | UTF-8 | 448 | 2.640625 | 3 | [] | no_license | package oriel.oriel_card_game.card;
import lombok.AllArgsConstructor;
import lombok.ToString;
@ToString
@AllArgsConstructor
public class Defence {
private final Card attacker;
private final Card defencer;
public int getPenetrationDamage() {
return Math.max(this.attacker.getAttackPower().getValue() - this.de... |
Java | UTF-8 | 1,631 | 2.078125 | 2 | [] | no_license | package com.nichecs.entity;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.... |
TypeScript | UTF-8 | 408 | 3.34375 | 3 | [] | no_license | function largestOfFour(nums: number[][]): number[] {
const returnArray: number[] = [];
for(let thisSet of nums){
returnArray.push(Math.max(...thisSet))
}
return returnArray;
}
console.log(largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]) );
console.log(larg... |
C# | UTF-8 | 1,301 | 2.515625 | 3 | [
"MIT"
] | permissive | using System.Data.Entity.ModelConfiguration;
namespace YasunliESModel.Models.Mapping
{
public class SellingPriceMap : EntityTypeConfiguration<SellingPrice>
{
public SellingPriceMap()
{
// Primary Key
this.HasKey(t => t.Id);
// Properties
this.Pro... |
TypeScript | UTF-8 | 371 | 2.578125 | 3 | [] | no_license | import mongoose from 'mongoose';
export interface ITodoDocument extends mongoose.Document {
task: string;
completed: boolean;
}
const todoSchema = new mongoose.Schema({
task: String,
completed: Boolean,
}, {
timestamps: true,
});
// tslint:disable-next-line:variable-name
const Todo = mongoose.model<ITodoDo... |
Markdown | UTF-8 | 1,568 | 2.65625 | 3 | [] | no_license | Wikipedia Dump Geoparser
========================
####Philipp Kats, May 2015
## Describtion
This couple of scripts were written as part of [walkable streets](http://walkstreets.org/) project, lead by Andrew Karmatskiy.
First script parses wikipedia Json dump line by line with the use of **ijson** module, and return st... |
PHP | UTF-8 | 2,880 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Class Currency | src/Currency.php
*
* @category Library
* @package ABGEO\NBG
* @author Temuri Takalandze <takalandzet@gmail.com>
* @license MIT https://github.com/ABGEO07/nbg-currency/blob/master/LICENSE
* @link https://github.com/ABGEO07/nbg-currency
*/
namespace ABGEO\NBG;
use ABGEO\NBG\... |
Python | UTF-8 | 4,975 | 4.03125 | 4 | [] | no_license | #####################################################################
# @file level2/solution1.py
# @author James Hind
# @date 2/11/2020
#
# @details
# You need to pass a message to the bunny prisoners, but to avoid detection, the
# code you agreed to use is... obscure, to say the least. The bunnies are g... |
JavaScript | UTF-8 | 1,354 | 2.703125 | 3 | [] | no_license | import Promise from 'bluebird';
// IMPORT FROM CLIENT REACT
import UserService from 'APP/services/userService';
import Logger from 'APP/utils/logger';
// IMPORT FROM CLIENT REACT
// ACTIONS AVAILABLE
export const UPDATE_USER_LOADING_STATUS = 'UPDATE_USER_LOADING_STATUS';
export const UPDATE_LOGGED_IN_USER = 'UPDATE_L... |
Java | UTF-8 | 5,624 | 2.453125 | 2 | [] | no_license | package com.example.atmsimulator.login.presenter;
import android.content.Context;
import com.example.atmsimulator.R;
import com.example.atmsimulator.models.AtmData;
import com.example.atmsimulator.models.account.Account;
import com.example.atmsimulator.models.users.Admin;
import com.example.atmsimulator.models.users.... |
Ruby | UTF-8 | 1,511 | 2.734375 | 3 | [] | no_license | module OpenBankingObjectSerializer
extend ActiveSupport::Concern
include FastJsonapi::ObjectSerializer
included do
# OpenBanking camel cases all attributes
set_key_transform :camel
end
# OpenBanking capitalizes data, links, meta
# FIXME? maybe the single-element array for a single resource should ... |
Python | UTF-8 | 1,309 | 3.421875 | 3 | [] | no_license | #
# @lc app=leetcode.cn id=32 lang=python3
#
# [32] 最长有效括号
#
# https://leetcode-cn.com/problems/longest-valid-parentheses/description/
#
# algorithms
# Hard (28.44%)
# Likes: 386
# Dislikes: 0
# Total Accepted: 27.6K
# Total Submissions: 96.3K
# Testcase Example: '"(()"'
#
# 给定一个只包含 '(' 和 ')' 的字符串,找出最长的包含有效括号的子串... |
Shell | UTF-8 | 1,184 | 3.921875 | 4 | [] | no_license | #!/bin/sh
#
# Like 'lsa', only it lists items in *all* files in your TODO_DIR
# So, 'rlsa' = "Really List All"
#
# Author: Jon Smajda
# License: GPL, http://www.gnu.org/copyleft/gpl.html
# URL: http://github.com/smajda/todo.actions.d
############# config:
## 1. list the files you want to show
#mytodos=(todo nxt sm... |
Java | UTF-8 | 3,002 | 3.34375 | 3 | [
"BSD-2-Clause",
"BSD-2-Clause-Views"
] | permissive | package xbneditor;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
/**
* This is a custom built dialog box that lets the user have three options
* on whether they want to save, or not save, or cancel the operation.
* The only difference between cancel and no is th... |
Swift | UTF-8 | 5,146 | 3.21875 | 3 | [] | no_license | import UIKit
let player1: [String:Any] = ["name":"Joe Smith", "height":42, "playedSoccer":true, "guardians":"Jim and Jan Smith"]
let player2: [String:Any] = ["name":"Jill Tanner", "height":36, "playedSoccer":true, "guardians":"Clara Tanner"]
let player3: [String:Any] = ["name":"Bill Bon", "height":43, "playedSoccer":t... |
PHP | UTF-8 | 873 | 2.625 | 3 | [] | no_license | <?php
require '../../vendor/autoload.php';
require '../statUtil.php';
use CpChart\Data;
use CpChart\Image;
$statData = getDataFromFile();
$data = new Data();
foreach ($statData as $lang => $values) {
$data->addPoints($values, $lang);
}
$data->setAxisName(0, "Students");
$data->addPoints(['I', 'II', 'III', 'IV',... |
Java | SHIFT_JIS | 2,691 | 2.78125 | 3 | [] | no_license | /*
* 쐬: 2004/12/22
*
* TODO ̐ꂽt@C̃ev[gύXɂ͎փWv:
* EBhE - ݒ - Java - R[hEX^C - R[hEev[g
*/
package jp.ac.keio.sfc.ht.matsu.mugi.util;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.Iterator;
import jp.ac.keio.sfc.ht.matsu.mugi.locationanalyzer.gis.postgis.LayerArrayList;
import jp.ac.keio.s... |
JavaScript | UTF-8 | 3,808 | 2.703125 | 3 | [] | no_license | 'use strict';
import * as THREE from 'three';
class Tile {
constructor(x, y) {
this.needsUpdate = true;
this.color = this.getRandomColor();
this.hasBrick = false;
this.geometry = new THREE.BoxBufferGeometry(0.9, 0.9, 0.9);
this.material = new THREE.MeshPhongMaterial({
color: new THREE.Color(this.color),
... |
Java | UTF-8 | 3,065 | 4.15625 | 4 | [] | no_license | package Day15;
import java.util.Iterator;
import java.util.LinkedList;
/**
* @Author LinQ
* Date: 2020/11/24
* Weather:Rainy
*/
/*
------Collection 单列集合的根接口
----------List 如果实现了List 接口的集合类,具备的特点:有序,可重复
-------------ArrayList ArrayList底层维护了一个object的数组实现的,特点是:查询速度快,增删慢
什么时候使用ArrayList:如果目前的数据是查询多,增删比较少的时... |
SQL | WINDOWS-1251 | 7,630 | 3.515625 | 4 | [] | no_license | use Course_Project;
create table Admin
(
Id int,
Login nvarchar(50),
Password nvarchar(50)
)
drop table Admin
insert into Admin(Id,Login, Password)
values (1,'Admin', 'Admin')
create table Customers
(
Customer_id int primary key identity(1,1),
Login nvarchar(50),
Password nvarchar(max),
Name nvarchar(20)
)
select *... |
Python | UTF-8 | 1,035 | 3.359375 | 3 | [] | no_license | num1 = int(input())
num2 = int(input())
num3 = int(input())
num4 = int(input())
num5 = int(input())
num_of_negative = 0
num_of_pos = 0
num_of_odd = 0
num_of_even = 0
if(num1 >= 0) :
num_of_pos+=1
else :
num_of_negative +=1
if(num2 >= 0) :
num_of_pos +=1
else:
num_of_negative +=1
if(num3 >= 0) :
num... |
Java | UTF-8 | 8,858 | 2.40625 | 2 | [] | no_license | package com.json.itemdecoration.image;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Matrix;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.AppCompatImageView;
import android.util.AttributeSet;
import android.... |
C# | UTF-8 | 1,724 | 2.96875 | 3 | [] | no_license | using Microsoft.AspNet.SignalR.Client;
using Osystems;
using System;
namespace OsystemsConsole
{
class Program
{
static void Main(string[] args)
{
//send message to hub
Console.WriteLine("enter \"q\" to quit application");
string body;
do
... |
Java | UTF-8 | 1,103 | 2.3125 | 2 | [] | no_license | package de.dhbw.socialfunnel.dao;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import de.dhbw.socialfunnel.model.Networks;
import de.dhbw.s... |
Java | UTF-8 | 2,403 | 2.671875 | 3 | [] | no_license | package timestamp_writer;
import conf.Settings;
import entities.dto.Message;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.util.List;
/**
* Class, which generates a dataset from timestamp list, collected by topology ... |
Java | UTF-8 | 4,090 | 2.328125 | 2 | [] | no_license | package setup;
import exceptions.UnclearAppTypeException;
import exceptions.UnknownPatformException;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.remote.AndroidMobileCapabilityType;
import io.appi... |
TypeScript | UTF-8 | 1,593 | 2.921875 | 3 | [
"MIT"
] | permissive | import * as vsc from 'vscode'
import { CompletionItemBuilder } from '../completionItemBuilder'
import { BaseExpressionTemplate } from './baseTemplates'
import { getIndentCharacters } from '../utils'
export class IfTemplate extends BaseExpressionTemplate {
buildCompletionItem (code: string, position: vsc.Positi... |
Java | UTF-8 | 2,428 | 3.75 | 4 | [] | no_license | package leetcode.first50;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in the array which gives... |
Python | UTF-8 | 19,546 | 2.703125 | 3 | [
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown"
] | permissive | import threading
from time import sleep
import pytest
import redis
import redis.client
from .. import testtools
def _push_thread(r: redis.Redis) -> threading.Thread:
def run():
sleep(0.5)
r.rpush('foo', 'value1')
sleep(0.5)
# Will wake the condition variable
r.set('bar', ... |
Markdown | UTF-8 | 1,070 | 2.6875 | 3 | [] | no_license | update 6/9/2017
This is the repo for the old Code for Boulder site, still hosted at [http://www.codeforboulder.org/](http://www.codeforboulder.org/) as of 6/9/2017.
If you'd like to contribute to the current site, please go to [this repo](https://github.com/CodeForBoulder/CodeForBoulder)!
------
# codeforboulder.or... |
Markdown | UTF-8 | 2,271 | 2.703125 | 3 | [] | no_license |
如下是服务器常用端口介绍,关于 Windows 下更多的服务应用端口说明,请参考微软官方文档([Windows 的服务概述和网络端口要求](https://support.microsoft.com/zh-cn/help/832017/service-overview-and-network-port-requirements-for-windows?spm=5176.7740724.2.3.omd4DB%3Fspm%3D5176.7740724.2.3.omd4DB))。
| 端口 | 服务 | 说明 |
|---------|---------|---------|
| 21 | FTP | FTP 服务器所开放的端口,用... |
JavaScript | UTF-8 | 6,921 | 2.53125 | 3 | [] | no_license | var map;
var markers = [];
// Model
// Hard-coded data for marker locations
var locations = [{
title: 'The Ragged Edge Coffee House',
location: {
lat: 39.830697,
lng: -77.233677
},
address: '110 Chambersburg St.',
yelpID: 'the-ragged-edge-coffee-house-gettysburg'
},
{
title: 'T... |
Java | UTF-8 | 9,503 | 2.28125 | 2 | [] | no_license | package com.mojang.launcher.game.runner;
import com.google.common.collect.Lists;
import com.mojang.launcher.Launcher;
import com.mojang.launcher.game.GameInstanceStatus;
import com.mojang.launcher.updater.DownloadProgress;
import com.mojang.launcher.updater.VersionSyncInfo;
import com.mojang.launcher.updater.download.... |
Java | UTF-8 | 292 | 1.90625 | 2 | [] | no_license | package com.lechuan.midunovel1.demo.utils;
import android.content.Context;
import android.widget.Toast;
public final class FoxBaseToastUtils {
public static void showShort(Context context, CharSequence text) {
Toast.makeText(context,text,Toast.LENGTH_SHORT).show();
}
}
|
JavaScript | UTF-8 | 941 | 2.5625 | 3 | [] | no_license | import {useReducer , useEffect} from 'react'
import axios from 'axios'
const initialState = {
productCards:[] ,
loading:true
};
function reducer(state, action) {
switch (action.type) {
case "make_request":
return { loading: true, productCards: [] };
case "get_data":
return { ...state, loading: false, pro... |
Python | UTF-8 | 8,982 | 2.84375 | 3 | [
"BSD-2-Clause"
] | permissive | """ Functions for working with command-line interaction """
from .collection import is_collection_like, merge_dicts
from argparse import (
ArgumentParser,
_SubParsersAction,
_HelpAction,
_VersionAction,
SUPPRESS,
)
import sys
__classes__ = ["VersionInHelpParser"]
__all__ = __classes__ + ["build_cl... |
JavaScript | UTF-8 | 1,405 | 2.53125 | 3 | [] | no_license | import {
READ_ROLES,
READ_ONE_ROLE,
CREATE_ROLE,
UPDATE_ROLE,
DELETE_ROLE,
CLEAR_ROLE,
START_ROLES_RELOAD,
FINISHED_ROLES_RELOAD,
} from "../types/roles";
const initialState = {
roles: [],
role: {},
error: {},
loading: false,
readable: false,
};
export default function (state = initialState,... |
Markdown | UTF-8 | 4,318 | 4.03125 | 4 | [] | no_license | ## :算法之排序(归并,快速排序)
### :pencil2:归并排序
<a href="https://github.com/wuqinqiang/">
<img src="https://github.com/wuqinqiang/Lettcode-php/blob/master/images/mergeSort.jpeg">
</a>
**归并排序的原理就是把一个数组从中间开始分成左右两个数组,对左右两个数组进行排序,最后对排序完的两个部分进行合并,就是一个有序的数组了。**
**它的思想就是每次把分组分成两个部分,直到不能再继续分下去为止,那么递归就是用来解决这种问题的。**
... |
Java | UTF-8 | 443 | 1.710938 | 2 | [] | no_license | package com.goeuro.testtask.model.datasource;
import com.goeuro.testtask.model.Station;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.Set;
/**
* Created by etsatsina on 14-Aug-16.
*/
@Component
@Getter
@NoArgsConst... |
Python | UTF-8 | 3,798 | 2.96875 | 3 | [] | no_license | from requests.sessions import session
from bs4 import BeautifulSoup as bs
from requests_html import HTMLSession
import pandas as pd
# from googleapiclient.discovery import build
# from pprint import pprint
# Enter Your video url here
video_url = "https://www.youtube.com/watch?v=4aWMGUF5RMw"
session = HTMLS... |
Markdown | UTF-8 | 7,198 | 2.96875 | 3 | [] | no_license | # Summer 2018 Project
## InsertCSV
- First off, import `*_Edges.csv`, `*_Nodes.csv`, and `*_Connections.csv` into `tEdgeAttributes`, `tNodeAttributes`, and `tNode_Edge_Connections` tables, respectively (**skip the first row of the files, which are headers**).
- All indices must start at 0.
- `*_Edges.csv` contain... |
Java | UTF-8 | 2,675 | 1.578125 | 2 | [] | no_license | package com.tencent.p177mm.pluginsdk.p1078e;
import android.os.Bundle;
import android.text.TextUtils;
import com.google.android.gms.measurement.AppMeasurement.Param;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.p177mm.sdk.platformtools.C4990ab;
import java.util.HashMap;
/* renamed from: com.... |
JavaScript | UTF-8 | 366 | 2.625 | 3 | [] | no_license | export default function NewsAPI (api_key) {
return {
getNews (options) {
const queryString = Object.entries(options).map(([k, v]) => `${k}=${encodeURIComponent(v)}`).join('&');
return fetch(`https://newsapi.org/v2/top-headlines?${queryString}&language=en&apiKey=${api_key}`)
... |
Python | UTF-8 | 180 | 3.25 | 3 | [] | no_license | def _flatten(L):
for item in L:
try:
yield from flatten(item)
except TypeError:
yield item
def flatten(L):
return list(_flatten(L)) |
Java | UTF-8 | 391 | 1.867188 | 2 | [] | no_license | package com.home.app.repository;
import com.home.app.domain.BarcodeReqReader;
import org.springframework.stereotype.Repository;
import org.springframework.data.jpa.repository.*;
/**
* Spring Data JPA repository for the BarcodeReqReader entity.
*/
@SuppressWarnings("unused")
@Repository
public interface BarcodeReq... |
C++ | GB18030 | 1,561 | 2.640625 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
string s,a,b;
getline(cin,s);
getline(cin,a);
getline(cin,b);
vector<int> v_is,v_ia,v_ib;
for(int i=0;i<s.length();i++){
int tmp=s[i]-'0';
if(tmp==0)
v_is.push_back(10);
else
v_is.push_back(tmp);
}
for(int i=... |
TypeScript | UTF-8 | 1,544 | 2.65625 | 3 | [] | no_license | /// <reference path="../../geometry/Angle.ts" />
/// <reference path="../../geometry/Vector.ts" />
/// <reference path="../../geometry/Orbit2.ts" />
namespace jpvCommon.test.orbit {
import Angle = geometry.Angle;
import Vector = geometry.Vector;
import Orbit = geometry.Orbit2;
import Assert = assertion.Assert;
... |
C++ | UTF-8 | 1,502 | 2.65625 | 3 | [] | no_license | #include <SoftwareSerial.h>
#include <TinyGPS++.h>
#include <SPI.h>
#include "RF24.h"
float lattitude,longitude; // create variable for latitude and longitude object
SoftwareSerial gpsSerial(8,9);//rx,tx
TinyGPSPlus gps;// create gps object
RF24 myRadio(7, 8);
byte addresses[][6] = {"0"};
typedef struct package Packa... |
C++ | UTF-8 | 444 | 2.65625 | 3 | [] | no_license | #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int cow[20005];
int main()
{
int n,l;
scanf("%d %d",&n,&l);
for(int i = 0;i < n;i++)
scanf("%d",&cow[i]);
sort(cow,cow + n);
int j = n - 1;
int ans = 0;
for(int i = 0;i < n;i++)
{
while(cow[i]... |
Markdown | UTF-8 | 4,263 | 2.734375 | 3 | [] | no_license | # Overview
`neo-paper v1.0.1`
This is a paper wallet for the Neo Smart Economy. neo-paper is the introductory work for neo-burner.
This work has been mostly refactored now, but was largely inspired by, and originally structurally based on, the work of Austin Griffith for Ethereum. Thank you for your fantastic work, ... |
C | UTF-8 | 207 | 3.21875 | 3 | [] | no_license | #include<stdio.h>
void main(){
char str[80];
int i;
printf("Enter a string:\n");
gets(str);
for(i=strlen(str); i<80; i++)
strcat(str, ".");
puts(str);
}
|
Java | UTF-8 | 540 | 3.3125 | 3 | [] | no_license | package com.acm.problems;
import java.math.BigInteger;
import java.util.Scanner;
public class Problem_495 {
public static void main(String[] args) {
BigInteger results[] = new BigInteger[5001];
results[0]= BigInteger.ZERO;
results[1]= BigInteger.ONE;
Scanner sc = new Scanner(System.in);
while (sc.hasNe... |
C++ | UTF-8 | 687 | 2.84375 | 3 | [
"MIT"
] | permissive | #ifndef ABSTRACTSYSTEMPROVIDER_HPP
#define ABSTRACTSYSTEMPROVIDER_HPP
#include "ash/fsm/ISystemProvider.hpp"
namespace ash {
namespace fsm {
/**
* An abstract variety of ISystemProvider. All it does is fill in the priority.
*/
template<class C, class I>
class AbstractSystemProvider : public ISystemProvider<C, I>
{... |
Markdown | UTF-8 | 874 | 2.796875 | 3 | [] | no_license | # Typing Robot

*A robot called "tybot" that helps you practice typing.*
---
This is a typing software for programmers. It will generate random printable ascii character strings, like
```
rNl+@g7f2e>(... |
Markdown | UTF-8 | 811 | 2.75 | 3 | [
"MIT"
] | permissive | # URL2io-app-samples
App samples of using [URL2io API](http://www.url2io.com/docs)
# Samples
Sample | API or feature | Screenshot | Link
--- | --- | --- | ---
<a href="https://github.com/url2io/url2io-app-samples/tree/master/pageless">Pageless</a> | <a href="#url2article">article</a> | <a target='_blank' href='http... |
C# | UTF-8 | 1,872 | 2.5625 | 3 | [] | no_license | using RestSharp;
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Security;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace AIKI.CO.Diafaan.Helper
{
public class SMSSeverCommand
{
private CancellationTokenSource cancellationTokenSour... |
PHP | UTF-8 | 3,503 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
function route2class() {
$prefix = request()->is('admin/*') ? 'admin-panel ' : '';
return $prefix . str_replace('.', '-', Route::currentRouteName());
}
function get_tree($categories, $level = 0) {
$tree = array();
foreach ($categories as $category) {
array_push($tree, array(
'... |
Python | UTF-8 | 643 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
"""This example lights up half the NeoPixels red while button A is being pressed, and half the
NeoPixels green while button B is being pressed."""
from adafruit_circuitplayground import cp
cp.pixels.brightness = 0.3
... |
Markdown | UTF-8 | 2,519 | 2.9375 | 3 | [] | no_license | # 如何连接我的数据
---
**图表库并不包含市场数据**,你必须提供所需格式的数据。示例数据引擎集成了雅虎金融API的历史数据。图表可以用两种方式接收数据:
1. 使用服务器推送技术实时更新,例如通过WebSocket。这样你的图表将会自动更新价格。为了达到这个目的,你必须使用JavaScript API并且准备好自己的传输方法。
2. 在PULL /脉冲\(pulse\)/刷新的基础上进行更新(如今天的大多数基于Web的图表),其中图表数据每X秒更新一次(图表客户端将要求服务器模拟PUSH更新),或者被用户手动重新加载。 为此,请使用UDF协议并编写自己的datafeed包装器。
### JavaScript API... |
JavaScript | UTF-8 | 1,255 | 2.84375 | 3 | [] | no_license | const ReadOnly = ({ value }) => ({
value,
showMore: false,
showExpand: false,
init() {
this.truncate();
},
truncate() {
this.$nextTick(() => {
const el = this.$root.querySelector(".read-more-content");
el.innerHTML = "";
el.appendChild(documen... |
Java | UTF-8 | 403 | 2.53125 | 3 | [] | no_license | package org.capg.training;
public class InheritanceActivity {
public static void main(String[] args) {
Manager manager=new Manager(126534,"Peter","Chennai India",237844,65000);
manager.calculateSalary();
manager.calculateTransportAllowance();
Trainee trainee=new Trainee(29846,"jack","Mumbai India",442085,450... |
Python | UTF-8 | 410 | 2.65625 | 3 | [] | no_license | # Script to list all the indexes with category, name, sequence. Can be used to cache a list
# of reagents.
import re
from genologics.lims import *
from genologics import config
def main():
lims = Lims(config.BASEURI, config.USERNAME, config.PASSWORD)
reagent_types = lims.get_reagent_types()
for reg in re... |
C# | UTF-8 | 455 | 2.9375 | 3 | [] | no_license | using System;
using System.IO;
using System.Security.Cryptography;
namespace PBFramework.Utils
{
public static class FileUtils {
/// <summary>
/// Returns an MD5 hash of specified file.
/// </summary>
public static string GetHash(FileInfo file)
{
using(var md5 = MD5.Create())
{
using(var s... |
C++ | UTF-8 | 1,532 | 2.640625 | 3 | [] | no_license | #ifndef CONTROLLER_HH
#define CONTROLLER_HH
#include <cstdint>
/* Congestion controller interface */
class Controller
{
private:
bool debug_; /* Enables debugging output */
/* Add member variables here */
uint64_t windowSize;
double packetsPerSecond;
double poissonValue;
uint64_t packetCounter;
uint64... |
Java | UTF-8 | 743 | 3.375 | 3 | [] | no_license | package examples.threads.counter;
public class ACounter implements Counter {
int value;
public synchronized int getValue() {
sleep();// forcing thread switch on context switch
System.out.println("getValue<--" + value);
return value;
}
public synchronized void increment() {
int temp = value; // si... |
Ruby | UTF-8 | 655 | 2.53125 | 3 | [] | no_license | class Sell < Offer
attr_accessor :rent_confirm, :rent_price, :rent_period
validates :rent_period, :rent_price, :presence => true, :if => :rent_confirm
validates :price, :numericality => { :only_integer => true }, :if => :rent_confirm
validates :price, :numericality => { :only_integer => true }
validates :pri... |
Swift | UTF-8 | 1,307 | 2.515625 | 3 | [
"MIT"
] | permissive | //
// ViewController.swift
// GSBasis
//
// Created by gloomy.meng.049@gmail.com on 05/10/2019.
// Copyright (c) 2019 gloomy.meng.049@gmail.com. All rights reserved.
//
import UIKit
import GSBasis
enum UserStatusNotifier: String, NotifierType {
case login
case logout
}
//class ViewController: UIView... |
Markdown | UTF-8 | 4,631 | 2.625 | 3 | [] | no_license | # Manifold Mixup
Unofficial implementation of [ManifoldMixup](http://proceedings.mlr.press/v97/verma19a/verma19a.pdf) (Proceedings of ICML 19) for [fast.ai (V2)](https://docs.fast.ai/) based on [Shivam Saboo](https://github.com/shivamsaboo17)'s [pytorch implementation](https://github.com/shivamsaboo17/ManifoldMixup) o... |
Java | UTF-8 | 1,268 | 2.359375 | 2 | [] | no_license | package com.kmurawska.playground.akka.adaptiveloadbalancing;
import akka.actor.ActorSystem;
import akka.actor.Props;
import com.kmurawska.playground.akka.adaptiveloadbalancing.actor.FactorialCalculator;
import com.kmurawska.playground.akka.adaptiveloadbalancing.actor.MetricsListener;
import com.typesafe.config.Config;... |
C# | UTF-8 | 2,467 | 3.09375 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Wisa
{
static public class Schools
{
private static List<School> all = new List<School>();
public static List<School> All { get => all; }... |
Java | UTF-8 | 6,765 | 1.8125 | 2 | [] | no_license | package com.example.vasialeleka.news.activities;
import android.content.Intent;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v4.... |
Markdown | UTF-8 | 205 | 2.609375 | 3 | [] | no_license |
| **Pons, superior** identified on various resolutions |
| 256 resolution, the component index number is 129|
|:---:|
|  | |
C++ | UTF-8 | 1,173 | 2.546875 | 3 | [] | no_license | #pragma once
#ifndef COLAPRIORIDADEXTENDIDAHEAP_H
#define COLAPRIORIDADEXTENDIDAHEAP_H
#include "ColaPrioridadExtendida.h"
template <class T, class P>
class ColaPrioridadExtendidaHeap: public ColaPrioridadExtendida<T, P>
{
private:
Array<Puntero<Tupla<T, P>>> cola;
nat cantElem;
Puntero<FuncionHash<T>> fHash;
Com... |
Markdown | UTF-8 | 1,160 | 2.5625 | 3 | [] | no_license | # Face Landmarks detection
Code sample is located in [here](https://github.com/Logitech/lauzhack2019/tree/master/cv/logi-cv-toolbox/FacialLandmarkDetection).
This is a quick example of how to use face detection together with facial landmarks detection. Having facial landmarks you can estimate the head position in 3D ... |
PHP | UTF-8 | 484 | 2.53125 | 3 | [] | no_license | <?php
// DB credentials.
define('DB_HOST','sql202.epizy.com');
define('DB_USER','epiz_29887245');
define('DB_PASS','sGiaaOuFPjusP');
define('DB_NAME','epiz_29887245_srms');
// Establish database connection.
$mysqli = new mysqli($host, $dbuser, $dbpass, $dbname);
try
{
$dbh = new PDO("mysql:host=".DB_HOST.";d... |
Python | UTF-8 | 338 | 4.25 | 4 | [] | no_license | import pandas as pd
# Lambda functions are anonymous functions (MATLAB's @)
def ret(x):
return x
# ==
ret = lambda x: x
# We can define it and then use it
(lambda x: x + 1)(2) # prints 3
# They're useful when we want to do some quick operation with a function
df = pd.DataFrame({'a': [1, 2, 3]})
df['a'].apply(la... |
Markdown | UTF-8 | 7,192 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | # The-Framework
Structure, set of Java libraries and basic functionality which help me to build simple web applications.
## General idea about The Framework
For understanding of the idea of The Framework and why to use it, we have to go to the history.
On my early beginning as a programmer I learned many stuff and ... |
Markdown | UTF-8 | 2,699 | 2.96875 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | ---
layout: page
title: About the author
permalink: /about/
---
<div class="author-image">
<img src="/assets/img/matt-black-and-white2.jpg">
</div>
## About the author
My name is Matt Henderson. I run a [design and development company](http://makaluinc.com) building products in the consumer and blockchain industri... |
Markdown | UTF-8 | 1,296 | 2.578125 | 3 | [] | no_license | # Article R762-19
Les assurés ont droit aux prestations de l'assurance invalidité s'ils justifient de douze mois consécutifs d'adhésion à titre
personnel, au premier jour du mois au cours duquel est survenue l'interruption de travail suivie d'invalidité ou la
constatation de l'état d'invalidité résultant de l'usure pr... |
TypeScript | UTF-8 | 394 | 3.265625 | 3 | [
"MIT"
] | permissive | export function hex_to_u8(str: string): Uint8Array {
let size = str.length / 2;
let buf = new Uint8Array(size);
let character = '.js';
for (let i = 0, len = str.length; i < len; ++i) {
character += str.charAt(i);
if (i > 0 && (i % 2) === 1) {
buf[i >>> 1] = parseInt(charact... |
Python | UTF-8 | 1,095 | 4.71875 | 5 | [] | no_license | # Q6
# Create a deck of cards class. Internally, the deck
# of cards should use another class, a card class.
# Your requirements are:
#
# The Deck class should have a deal method to deal
# a single card from the deck
# After a card is dealt, it is removed from the deck.
# There should be a shuffle method which rearrang... |
Java | UTF-8 | 657 | 2.796875 | 3 | [] | no_license | package shixzh.j2x3.y2017.m06.d29;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
public class InputStreamTest {
public static void main(String[] args) throws IOException {
InputStream input = new BufferedInputStream(System.in);
int bytesAvailable = 0;... |
Java | UTF-8 | 7,726 | 2.25 | 2 | [] | no_license | package elab3.com.buducamama2;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.Toast;
import com.google.firebase.... |
JavaScript | UTF-8 | 821 | 3.078125 | 3 | [] | no_license | const calculateRating = (player) => {
const goalsPerGame = Math.round((player.goals / player.games) * 100) / 100;
const winPercentage = Math.round((player.wins / player.games) * 100) / 100;
const lossPercentage = Math.round((player.losses / player.games) * 100) / 100;
const motmsPerGame = Math.round((player.mot... |
Java | UTF-8 | 7,287 | 1.710938 | 2 | [] | no_license | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.pdulvp.data.provider;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.ecl... |
Python | UTF-8 | 1,088 | 2.5625 | 3 | [] | no_license | '''
根据下列提供的文本信息, 用python正则表达式获取eth0的ip地址
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether ac:bc:32:9b:a8:43
inet6 fe80::1c2a:a657:8d99:c399%en0 prefixlen 64 secured scopeid 0x4
inet 192.168.100.104 netmask 0xffffff00 broadcast 192.168.100.255
nd6 options=201<PERFORMNUD,DAD>
... |
Go | UTF-8 | 5,500 | 2.53125 | 3 | [
"MIT"
] | permissive | package api
import (
"cas-schools/model"
"cas-schools/service"
// // "baseinfo"
// "dbclient"
"encoding/json"
// "fmt"
"github.com/gorilla/mux"
// "hash/fnv"
// fnv.New32a() h.Sum32() https://play.golang.org/p/_J2YysdEqE
// "io"
"log"
"net/http"
// "os"
// "reflect"
// "regexp"
"strconv"
// "strings"
... |
Python | UTF-8 | 106 | 2.9375 | 3 | [] | no_license | def my_func(f,arg):
return f(arg)
my_func(lambda x: 2*x*x,5)
#anonymous functions are called lambdas
|
Java | UTF-8 | 1,872 | 2.546875 | 3 | [] | no_license | package jagerfield.mobilecontactslibrary.ElementContainers;
import android.database.Cursor;
import jagerfield.mobilecontactslibrary.FieldElements.NumberElements.LabelElement;
import jagerfield.mobilecontactslibrary.FieldElements.NumberElements.NormNumElement;
import jagerfield.mobilecontactslibrary.FieldElements.Numb... |
C | UTF-8 | 641 | 2.890625 | 3 | [] | no_license | #include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <pwd.h>
#include <dirent.h>
#include <stdlib.h>
#include <sys/wait.h>
int main(int argc, char *argv[])
{
if (argc < 2)
{
fprintf(stderr, "Sintaxa apel: mk nume_fif... |
PHP | UTF-8 | 298 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
$data = [
'type' => 'hidden',
'name' => 'email',
'id' => 'hiddenemail',
'value' => 'john@example.com',
'class' => 'hiddenemail',
];
echo form_input($data);
/*
* Would produce:
* <input type="hidden" name="email" value="john@example.com" id="hiddenemail" class="hiddenemail" />
*/
|
Java | UTF-8 | 820 | 2.078125 | 2 | [] | no_license | package com.aru.mispectacle.model;
/**
* Created by Md Zakir Hossen on 10/08/2015.
*/
public class SpectacleCategory {
public static final String COLUMN_CATEGORY_ID = "categoryId";
public static final String COLUMN_CATEGORY_NAME = "categoryName";
private long spectacleCategoryId;
private String spec... |
Markdown | UTF-8 | 866 | 2.59375 | 3 | [] | no_license | # Article L353-5
Les agents mentionnés aux articles L. 511-3 et L. 511-21 du code de la consommation sont habilités à rechercher et constater
les infractions prévues aux articles L. 353-1 et L. 353-2 du présent code, dans les conditions prévues à l'article L. 511-5
du code de la consommation.
**Liens relatifs à cet a... |
Ruby | UTF-8 | 350 | 3.625 | 4 | [] | no_license | class MyClass
def add_tables ( param1 )
@tables = param1
end
def whadda_we_got
puts "OK we got some #{@tables} Tables Here!"
#puts "And some #{chairs} chairs too!"
end
#def what_else_we_got
#whadda_we_got
#end
end
my_class = MyClass.new
puts my_class.class
my_class.add_tables ("white... |
Python | UTF-8 | 2,175 | 3 | 3 | [] | no_license | """ Module for job searching on CareerBuilder.com. """
from job_searcher.job import Job
from job_searcher import JobSearcher
import requests
from bs4 import BeautifulSoup
class CareerBuilder (JobSearcher):
""" JobSearcher for CareerBuilder.com. """
BASE_URL = 'http://api.careerbuilder.com/v2/jobsearch'
... |
Java | UTF-8 | 48,485 | 1.664063 | 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 COMPRAS;
import elsolecito_programa.CLIENTES.ClientesDeudores;
import elsolecito_programa.CLIENTES.FRM_Clientes_Alta;
import e... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.