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 | 5,994 | 1.828125 | 2 | [
"Apache-2.0"
] | permissive | /*==============================================================================
Copyright (c) 2017 Rizky Kharisma (@ngengs)
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.ap... |
C | UTF-8 | 1,406 | 3.90625 | 4 | [] | no_license | //Tom Burright
//Stuxnet 2.0
#include <stdio.h>
int main(void)
{
//Task i: Declare and zeroize an int array with a dimension equal to the number of students + 1
int classAge[13] = { 0 }; //zeroize?
//Task ii: Set index 0 with the age* of the instructor
classAge[0] = 75;
//Task iii: Fill the elements of the arr... |
C++ | UTF-8 | 289 | 2.828125 | 3 | [] | no_license | //맞은 코드
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
for (int i = 0;i < N;i++)
cout << i + 1 << "\n";
}
//시간초과
/*
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
for (int i = 0;i < N;i++)
cout << i + 1 << endl;
}*/ |
PHP | UTF-8 | 3,856 | 2.734375 | 3 | [] | no_license | <?php
namespace xBeastMode\RainbowArmor\Task;
use pocketmine\item\Item;
use pocketmine\nbt\tag\CompoundTag;
use pocketmine\Player;
use pocketmine\scheduler\Task;
use xBeastMode\RainbowArmor\RainbowArmor;
class ArmorTickTask extends Task{
/** @var RainbowArmor */
protected $plugin;
/** @var P... |
Java | UTF-8 | 12,793 | 1.835938 | 2 | [] | no_license | package com.ambition.improve.entity;
import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.Cascade;
import com.ambition... |
Python | UTF-8 | 571 | 4.0625 | 4 | [] | no_license | """
Given a number, return all its prime divisors in a list. Create a function
that takes a number as an argument and returns all its prime divisors.
* n = 27
* All divisors: `[3, 9, 27]`
* Finally, from that list of divisors, return the prime ones: `[3]`
### Examples
prime_divisors(27) ➞ [3]
p... |
Markdown | UTF-8 | 913 | 3 | 3 | [] | no_license | # [Personal Library](https://www.freecodecamp.org/learn/quality-assurance/quality-assurance-projects/personal-library)
[](https://repl.it/@Panda4817/personal-library)
A freecodecamp project for the quality assurance certificate. A library API im... |
Markdown | UTF-8 | 1,289 | 2.796875 | 3 | [
"MIT"
] | permissive | # mapeo-migrate
Commandline tool for mapeo migrating databases from the older format to the
latest.
## Migrate from osm-p2p-db to kappa-osm
```
npm run migrate /path/to/datafile.mapeosinangoe output/
```
Where `datafile.mapeosinangoe` is an [osm-p2p-syncfile](https://github.com/digidem/osm-p2p-syncfile), and `out... |
Python | UTF-8 | 190 | 3.65625 | 4 | [] | no_license | def space():
statement = input("Irj be egy mondatot: ")
new_statement = ""
for letter in statement:
new_statement += letter + " "
print(new_statement)
space() |
Markdown | UTF-8 | 1,499 | 3.296875 | 3 | [] | no_license |
* `code` {string} 将被编译和运行的JavaScript代码
* `contextifiedSandbox` {Object} 一个被[上下文隔离化][contextified]过的对象,会在代码被编译和执行之后充当`global`对象
* `options`
* `filename` {string} 定义供脚本生成的堆栈跟踪信息所使用的文件名
* `lineOffset` {number} 定义脚本生成的堆栈跟踪信息所显示的行号偏移
* `columnOffset` {number} 定义脚本生成的堆栈跟踪信息所显示的列号偏移
* `displayErrors` {boolean} 当值为真的时... |
PHP | UTF-8 | 2,976 | 2.765625 | 3 | [] | no_license | <?php
namespace Webservices\StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for geoLocationDistanceSortedPostcodesRequestType StructType
* @subpackage Structs
* @author JCID <info@jcid.nl>
*/
class GeoLocationDistanceSortedPostcodesRequestType extends AbstractStructBase
{
/... |
Java | UTF-8 | 6,488 | 2.046875 | 2 | [
"Apache-2.0"
] | permissive | package com.netcai.admin.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
public class BuyerReceipt implements Serializable{
/**
*/
private static final long serialVersionUID = -8261082704694840981L;
/**
* 自增ID
*/
private Long brId;
/**
* 买家ID
*/
privat... |
PHP | UTF-8 | 612 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* PhpStorm
* @access public (访问修饰符)
* @author wuhaiyan <wuhaiyan@huishoubao.com>
* @copyright (c) 2017, Huishoubao
*/
namespace App\Order\Modules\Inc;
class StoreAddress
{
/**
* 获取线下门店地址
* @param int $appid
* @return array
*/
public static function getStoreAddress(int $appid)... |
JavaScript | UTF-8 | 298 | 2.6875 | 3 | [] | no_license | /* Color picker */
const colorPicker = document.querySelector('.project__color-picker');
const editorBackground = document.querySelector('.editor__container');
colorPicker.addEventListener(
'input',
function () {
editorBackground.style = `background:${colorPicker.value}`;
},
false
);
|
C++ | UTF-8 | 4,121 | 2.625 | 3 | [] | no_license | #include "PlayState.h"
#include <ctime>
PlayState::PlayState()
{
//ctor
}
void PlayState::Init()
{
srand(time(0));
shader.Setup("res/shaders/vertexshader.vs", "res/shaders/fragmentshader.fs");
background.Setup(shader, string("background"));
background.SetScale(glm::vec3(1,1,1));
background.up... |
Java | UTF-8 | 985 | 2.96875 | 3 | [] | no_license | package logicaDeProgramação;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class CalcularDiferencaData {
public void calcularDiferencaData(String data1, String data2) throws ParseException{
StringBuilder stringBuilder1 = new StringBuilder(data1);
stringBuilder1... |
C++ | UTF-8 | 648 | 2.875 | 3 | [] | no_license | #include "Peceptron.h"
Peceptron::Peceptron()
{
alpha = 0.1f;
theta = 0.2f;
w1 = 0.3f;
w2 = -0.1f;
for (int p = 0; p < 20; p++)
{
int i = p % 4;
std::cout << "i = " << i << std::endl;
X = (x1[i] * w1) + (x2[i] * w2);
std::cout << "X = " << X << std::endl;
if (X >= theta)
{
Y = 1;
std::cout <... |
Java | UTF-8 | 177 | 1.71875 | 2 | [] | no_license | package cn.orditech.entity;
import java.io.Serializable;
/**
* Created by kimi on 2017/6/11.
*/
public interface BaseEntity extends Serializable {
Long getId ();
}
|
C++ | UTF-8 | 504 | 3.09375 | 3 | [] | no_license | #include "PlayerData.h"
PlayerData::PlayerData(unsigned int cash) {
this->cash = cash;
}
void PlayerData::takeCard(Card a, std::shared_ptr<Player> const & p) {
a.setOwner(p);
cards.push_back(a);
}
void PlayerData::performCardChange(int index, Card card) {
cards[index].suit = card.suit;
cards[inde... |
JavaScript | UTF-8 | 1,212 | 3.5 | 4 | [] | no_license | /**
1- In a build system, jobs have dependencies.
We want to create a scchedule for the build system in which jobs are ordered based on their dependencies. A job should appear in the schedule when all dependent jobs are already scheduled.
{
j1: [j2],
j2: [j3, j4],
j3: [j4]
j4: []
}
**/
console.log(scheduler({... |
Python | UTF-8 | 47 | 3.015625 | 3 | [] | no_license | a=int(input())
b=int(input())
c=(a*b)
print(c)
|
Markdown | UTF-8 | 702 | 3.03125 | 3 | [
"MIT"
] | permissive | <h1 dir="rtl">الحَجَّاجُ بن يوسُف يَحكُم العِراقَ .</h1>
<h5 dir="rtl">العام الهجري: 75
العام الميلادي: 694
</h5>
<p dir="rtl">حَكَم الحَجَّاجُ بن يوسُف بعدَ أن قَضى على ابنِ الزُّبيرِ، حَكَم الحِجازَ كُلَّها ثمَّ وَلَّاهُ عبدُ الملك أَمْرَ العِراق بدلًا مِن خالدِ بن عبدِ الله القَسْريِّ، فصارت العِراق للحَجَّاج،... |
Java | UTF-8 | 2,384 | 3.453125 | 3 | [] | no_license | package io.akessler.day04;
import io.akessler.AdventUtility;
import java.util.*;
public class Day4 {
public static void main(String[] args) {
List<String> lines = AdventUtility.readInput(4);
int answer1 = part1(lines);
int answer2 = part2(lines);
System.out.println(answer1);
... |
C# | UTF-8 | 925 | 2.578125 | 3 | [] | no_license | using ThoughtWorks.Test.SalesTaxes.Library;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
namespace ThoughtWorks.Test.SalesTaxes.LibraryTests
{
[TestClass()]
public class BasketInputOneTest_Given_input_one {
Basket basket;
[TestInitialize]
public void ... |
Java | UTF-8 | 384 | 3.09375 | 3 | [] | no_license |
package clases;
public class Pair {
private int one;
private int two;
public Pair(int a, int b){
one = a;
two = b;
}
public int getFirst(){
return one;
}
public int getSecond(){
return two;
}
public void setFirst(int a){
one = a;
... |
C# | UTF-8 | 1,173 | 3.703125 | 4 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _1
{
class ShellSort : AbstractSortable
{
public override void Alghorithm(int[] arr)
{
int array_size = arr.Length;
int i, j, inc, temp;
... |
Java | UTF-8 | 8,548 | 3.03125 | 3 | [] | no_license | package com.company;
import java.io.*;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
// ./p1 <Document set> <Query file>
public class p1 {
static File stopWords = new File("stop-word-list.txt");
// Create a TreeSet from the provided stopWords file. ... |
C# | UTF-8 | 6,314 | 2.921875 | 3 | [] | no_license | using System;
using System.Collections.ObjectModel;
using System.Linq;
using System.Runtime.Serialization;
namespace ExoActive
{
/**
* The Attribute struct starts with a base value from a NamedValue object. Each Attribute is given a GUID upon
* creation and also maintains a version that increments whenev... |
Java | UTF-8 | 10,009 | 3.015625 | 3 | [] | no_license |
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
/**
* This is a skeleton for realizing a very simple database user interface in java.
* The interface is an Applet, and it implements the interface ActionListener.
* If the user performs an action (for example he presses a button), the procedure acti... |
Java | UTF-8 | 181 | 1.765625 | 2 | [] | no_license | package br.feevale.physis.request;
import javax.servlet.http.HttpServletRequest;
public interface RequestTypeValidator {
public boolean isValid(HttpServletRequest request);
}
|
Markdown | UTF-8 | 4,646 | 2.8125 | 3 | [] | no_license | 2020.05.20
### social Login
- allauth - 인스톨
- 사용할 사이트에 사용할 유저들이 많이 사용하는 소셜 하나만!! 선택하는 것을 추천
- 왜?
1. 프로젝트에서 가장 중요한 건 정해진 시간안에 필요한 핵심 기능을 개발하는 것
2. 여러 개의 소셜 로그인을 쓰는 서비스를 켰을 때 어떤 경험을 했는지
편리성 ↑, 협업 발생, 데이터 분활, 복잡
## 오후 라강
- HTTP : stateless => "로그인한 상태" 성립 X
- 매번 `sessionid` 를 통해 넘겨준다. ~ 계속 로그인 유지
- 문... |
Python | UTF-8 | 322 | 3.4375 | 3 | [] | no_license | lista = ['Ala', 'ma', 'kota']
output = ''
for slowo in lista:
for i in range(len(slowo), 0, -1):
output += slowo[i-1]
print(output)
output = ''
print()
#NOTE: Znalazłem też szybsze rozwiązanie jednopętlowe (przy małej pomocy dokumentacji):
#zadanie 3.1
for x in lista:
print(x[::-1])
### |
Shell | UTF-8 | 1,157 | 2.796875 | 3 | [] | no_license | #!/bin/bash
# escape არის დეფინიცია სხვადასხვა ტექსტური თუ სისტემური მნიშვნელი რომელიც გამოიყენება "\"_ის მნიშვნელით
# იმისთვის რომ "echo"_მ მიიღოს escape სიმბოლოს მნიშვნელი საჭიროა დაემატოს " -e". მაგალითად: echo -e "ტექსტი\nტექსტი\n"
# "printf" ფორმატული ბეჭდვა თავის თავში მოიცავს escape მხარდაჭერას
echo -e "alert\a... |
JavaScript | UTF-8 | 16,957 | 2.71875 | 3 | [] | no_license | /**
* Element 입력 이벤트 필터 서비스
* @author X0114723
*/
jQuery.fn.extend({
/**
* 입력 필터
* @param {Object} options - 필터 옵션
* options : {
* filter - 필터명
* minLen - 입력 최소 길이(default : 0)
* maxLen - 입력 최대 길이(default : none)
* }
*/
valid : function(options) {
Filters._initFilters(this, options);
v... |
C++ | UTF-8 | 1,155 | 2.53125 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
//defined my macro functions
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
//defined my macro strings
#define ENDL "\n"
#define SPACE " "
//defined my constants
const int INF = 0x3f3f3f3f;
const int MOD = 1000000007;
const double EPS = 1e-8;
cons... |
Java | UTF-8 | 4,421 | 1.90625 | 2 | [] | no_license | /************************************************************************
* Copyright (c) 2011-2012 HONG LEIMING.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, ... |
Java | UTF-8 | 3,038 | 2.21875 | 2 | [] | no_license | package com.example.bautista.prueba_listar;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAd... |
Go | UTF-8 | 1,606 | 2.953125 | 3 | [
"MIT"
] | permissive | package main
import (
"encoding/csv"
"encoding/json"
"flag"
"fmt"
"io"
"os"
"strings"
"github.com/paidright/datalab/util"
)
var version = flag.Bool("version", false, "Just print the version and exit")
var quiet = flag.Bool("quiet", false, "Tone down the output noise")
var format = flag.String("format", "kv",... |
Markdown | UTF-8 | 5,922 | 2.515625 | 3 | [] | no_license | ---
description: "Easiest Way to Make Ultimate Chipotle Caldo De Mariscos(&#34;7seas soup&#34;)"
title: "Easiest Way to Make Ultimate Chipotle Caldo De Mariscos(&#34;7seas soup&#34;)"
slug: 2924-easiest-way-to-make-ultimate-chipotle-caldo-de-mariscos-and-34-7seas-soup-and-34
date: 2020-05-15T22:29:03.95... |
SQL | UTF-8 | 345 | 3.703125 | 4 | [] | no_license | #12. Mostrar los actores que actuaron en la/s película/s más largas.
SELECT ac.first_name AS Nombre, ac.last_name AS Apellido, fi.title AS Pelicula, fi.length AS Duracion
FROM actor ac
LEFT OUTER JOIN film_actor fa ON ac.actor_id = fa.actor_id
LEFT OUTER JOIN film fi ON fa.film_id = fi.film_id
GROUP BY ac.actor_id... |
Markdown | UTF-8 | 2,210 | 2.609375 | 3 | [
"MIT"
] | permissive | # X-ACTION
This element holds the data that __is__ the Event Action submitted to the [Action Bus](/actions).
## Usage
This element should only ever exists within a parent **`<x-action-activator>`** tag. The parent tag defines how and when the child actions are submitted to the [Action Bus](/actions).
#### In-Attrib... |
Java | UTF-8 | 394 | 2.46875 | 2 | [] | no_license | package mindmelt;
public class BlockGate extends BlockDoor
{
protected BlockGate(int id)
{
super((byte)id);
}
protected String getName()
{
return "gate";
}
protected int getUpper()
{
return BlockType.gate.id;
}
prot... |
JavaScript | UTF-8 | 2,430 | 2.859375 | 3 | [] | no_license | let fileLoader = {
init(dropZoneName, url, maxFileZize) {
this.url = url || '/';
this.maxFileZize = maxFileZize || 10000;
this.dropZone = document.getElementById(dropZoneName);
if (!typeof(window.FileReader)) {
this.dropZone.innerHtml = `Your browser is bad`;
this.dropZone.classList.add('e... |
C# | UTF-8 | 17,588 | 2.609375 | 3 | [] | no_license | using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Windows.Forms.Design;
using Syste... |
C# | UTF-8 | 6,884 | 3.015625 | 3 | [
"Unlicense"
] | permissive | using System;
using System.IO;
using System.Collections.Generic;
using System.Text;
namespace LibBSP {
/// <summary>
/// Class representing a group of <see cref="Entity"/> objects. Contains helpful methods to handle Entities in the <c>List</c>.
/// </summary>
[Serializable] public class Entities : List<Entity> {
... |
Java | UTF-8 | 2,211 | 2.265625 | 2 | [] | no_license | package entity.adverstising;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 待机广告
* </p>
*
* @author hzh
* @since 2018-... |
Swift | UTF-8 | 4,375 | 3.109375 | 3 | [
"Apache-2.0"
] | permissive | /// - Important: to make `@Environment` properties (e.g. `horizontalSizeClass`), internally accessible
/// to extensions, add as sourcery annotation in `FioriSwiftUICore/Models/ModelDefinitions.swift`
/// to declare a wrapped property
/// e.g.: `// sourcery: add_env_props = ["horizontalSizeClass"]`
import SwiftUI
ex... |
PHP | ISO-8859-1 | 2,836 | 2.640625 | 3 | [] | no_license | <?php session_start();
require_once("../../../../../../data/connstat.php");
require_once '../file/Classes/PHPExcel/IOFactory.php';
$folder = "../file/documents/";
$archiv="../file/archives/";
if ($_SESSION['login']){
}
else {
header("Location:login.php");
}
$id_user = $_SESSION['id_user'];
$datesys=date("Y-m-d");
... |
Markdown | UTF-8 | 10,046 | 2.921875 | 3 | [] | no_license | ---
title: Quick Start Guide for Using Kubernetes in Rancher
layout: rancher-default-v1.6
version: v1.6
lang: en
---
## Quick Start Guide for Using Kubernetes in Rancher
---
In this guide, you'll learn how to quickly get started using Kubernetes in Rancher v1.6, including:
* Preparing a Linux Host
* Launching Ranche... |
JavaScript | UTF-8 | 4,456 | 3.28125 | 3 | [] | no_license | let data = [
{value:'第一条测试',fontSize:20,color:'red',speed:2,time:0,},
{value:'第二条测试',time:1}
]
//外部类封装不彻底,想用面向对象思维那么不需要多少外部变量和方法,所以ctx,video应该都在DANMU类中
let $ = document.querySelector.bind(document)
let canvas = $('#canvas')
let video = $('#video')
let name = $('#text')
let submit = $('#submit')
let range = $('#ran... |
Java | UTF-8 | 911 | 2.515625 | 3 | [] | no_license | package qilaihai.dao;
import java.util.Date;
import java.util.List;
import qilaihai.domain.User;
import qilaihai.domain.Weibo;
public interface WeiboDao extends BaseDao<Weibo> {
/**
* 查找某一用户(或所有用户)在某一间隔内的所有Weibo
* @param poster
* 发出这些微博的用户,必须包含id属性。如果为null,则查找所有用户发出的微博
* @param begin
* 发出这些微博的开始时间,可以... |
Python | UTF-8 | 1,953 | 3.078125 | 3 | [] | no_license |
import unittest
from .. import color_scale
class TestColor64(unittest.TestCase):
def ints(self, x, y):
return list(map(int, color_scale.color64(x,y)))
def test_black(self):
self.assertEqual([0, 0, 0], self.ints(0,0))
def test_white(self):
self.assertEqual([255, 255, 255], self.... |
Java | UTF-8 | 1,421 | 2.53125 | 3 | [] | no_license | package com.ecodeup.dao;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import com.ecodeup.model.Formation;
import com.ecodeup.model.JPAUtil;
public class FormationDAO implements IFormationDAO{
EntityManager entity = JPAUti... |
PHP | UTF-8 | 2,272 | 3.203125 | 3 | [] | no_license | <?php
// koneksi ke database
// (nama host database/hostname, username mysql, password, database)
$conn = mysqli_connect("localhost", "root", "", "phpdasar");
// ambil data dari tabel mahasiswa / query data mahasiswa
// (koneksi ke database=$conn diatas, querynya mau apa/ data mahasiswa)
$result = mysqli_query($conn, ... |
Python | UTF-8 | 3,004 | 2.625 | 3 | [] | no_license |
from imutils.video import VideoStream
from imutils import face_utils
import numpy as np
import RPi.GPIO as GPIO
import argparse
import imutils
import time
import dlib
import cv2
GPIO.setmode(GPIO.BCM)
for i in (23, 24, 25, 16, 20, 21):
GPIO.setup(i, GPIO.OUT)
def euclidean_dist(ptA, ptB):
return np.linalg.no... |
JavaScript | UTF-8 | 3,311 | 2.828125 | 3 | [] | no_license | /**
* PHP Email Form Validation - v3.1
* URL: https://bootstrapmade.com/php-email-form/
* Author: BootstrapMade.com
*/
(function () {
"use strict";
let forms = document.querySelectorAll('.php-email-form');
forms.forEach(function (e) {
e.addEventListener('submit', function (event) {
event.preventDefaul... |
Java | UTF-8 | 1,814 | 2.4375 | 2 | [] | no_license | package com.qfedu.hr.service;
import com.qfedu.hr.pojo.User;
import java.sql.SQLException;
import java.util.List;
public interface UserService {
/**
* 通过用户名userName和password借助于 UeserDao操作数据库
* @param userName 用户名
* @param password 密码
* @return 在数据库中找到 User对象 找不到返回null
* @throws SQLExcep... |
Java | UTF-8 | 1,573 | 2.109375 | 2 | [] | no_license | package com.qubuyer.business.register.model;
import com.qubuyer.bean.register.RegisterEntity;
import com.qubuyer.business.register.presenter.ISetPwdPresenter;
import com.qubuyer.constant.NetConstant;
import com.qubyer.okhttputil.callback.HttpCallback;
import com.qubyer.okhttputil.helper.HttpInvoker;
import com.qubyer.... |
Python | UTF-8 | 1,750 | 2.703125 | 3 | [] | no_license | #! python3
#*--coding=utf8--*
import requests
import json
import re
import time
import openpyxl
def getVV(name, id):
url = 'http://cache.video.qiyi.com/jp/pc/' + id +'/'
headers_chrome = {
'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36'... |
JavaScript | UTF-8 | 16,484 | 3.34375 | 3 | [] | no_license |
var svgWidth = 960;
var svgHeight = 500;
var margin = {
top: 20,
right: 40,
bottom: 80,
left: 100
};
var width = svgWidth - margin.left - margin.right;
var height = svgHeight - margin.top - margin.bottom;
// Create an SVG wrapper, append an SVG group that will hold our chart,
// and shift the latter by le... |
Java | UTF-8 | 1,628 | 2.671875 | 3 | [] | no_license | package com.revature.daos;
import java.util.List;
import org.hibernate.Session;
import com.revature.models.ReimbursementType;
import com.revature.utils.HibernateUtil;
public class TypeDAO implements TypeDAOInterface{
@Override
public ReimbursementType getType(int id) {
//open a new sesssion
Session ses = Hi... |
Java | GB18030 | 1,935 | 3.515625 | 4 | [] | no_license | package ߵԪ;
import java.util.Scanner;
/*
* 3.дģ˻ܡҪ£
ԡ˺šַС
ȡѯûʾϢ
ʾԭմմ
ȡʱССܾտʾٱXXX
*/
public class yinhang {
int number;
String name;
String address;
int shengyu;
int minshengyu;
public void yinhang (int number1,String name1,String address1,int shengyu1,int minshengyu1)
... |
C# | UTF-8 | 5,198 | 2.859375 | 3 | [] | no_license | namespace OneSheeldClasses
{
public class OneSheeldPrint : ShieldParent
{
ShieldIds shieldId = 0x00;
byte print_fn_id = 0x00;
byte write_fn_id = 0x00;
public OneSheeldPrint(ShieldIds shid, byte writefnid, byte printfnid)
: base(shid)
{
shieldId = ... |
Markdown | UTF-8 | 4,535 | 2.875 | 3 | [] | no_license | # Code-Maven Workshops in Israel
Lead by [Gabor Szabo](https://www.linkedin.com/in/szabgab/).

## Schedule of the public events that are usually free to participate in
* Check out the [Meetup page](https://www.meetup.com/code-mavens/) or see the [earlier ... |
Java | UTF-8 | 4,520 | 2.25 | 2 | [] | no_license | package com.somoplay.magicworld;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx... |
Markdown | UTF-8 | 4,663 | 3.078125 | 3 | [
"Apache-2.0"
] | permissive | # Log Package
The log package provides a common interface that can be used in applications and
libraries along with reference implementation wrappers for logrus, zap, the Go
standard library package, and for a CLI.
[](https://goreportcard.... |
Java | UTF-8 | 1,714 | 2.9375 | 3 | [] | no_license | package ui.gui;
import java.awt.*;
import static java.awt.GridBagConstraints.*;
public class CustomBagConstraints {
//EFFECTS: returns a GridBagConstraints with default values except for given gridx and gridy
public static GridBagConstraints customConstraint(int gridx, int gridy) {
GridBagConstrain... |
JavaScript | UTF-8 | 620 | 2.734375 | 3 | [] | no_license | const term = require( 'terminal-kit' ).terminal
module.exports = function(string="foo", type='none', new_line = true){
if(new_line){
string += "\r\n"
}
switch(type){
case "msg":
term(string)
break
case "info":
term.green(string)
break
... |
C++ | UTF-8 | 950 | 3.53125 | 4 | [] | no_license | //给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序。
//
// 示例:
//
// 输入: [0,1,0,3,12]
//输出: [1,3,12,0,0]
//
// 说明:
//
//
// 必须在原数组上操作,不能拷贝额外的数组。
// 尽量减少操作次数。
//
// Related Topics 数组 双指针
#include <iostream>
#include <vector>
using namespace std;
//leetcode submit region begin(Prohibit modification and deletion)
c... |
Java | UTF-8 | 1,619 | 2.140625 | 2 | [] | no_license | package hochschule.de.bachelorthesis.view.onboarding;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.databinding.DataBindingUtil;
import androidx.fragment.a... |
JavaScript | UTF-8 | 775 | 3.4375 | 3 | [] | no_license | /*
Promise.all的规则:
传入的所有promise都是fulfilled,则返回由他们的值组成的,状态为fulfilled的新promise
只要有一个promise是rejected,则返回rejected状态的新promise,且它的值是第一个rejected的promise值
只要有一个promise是pending,则返回一个pending状态的新promise
*/
Promise.all=function (promiseArr) {
let index=0;
let result=[];
return new Promise((resolve,reject)=>{
... |
Java | UTF-8 | 1,082 | 3.109375 | 3 | [] | no_license | package leetcode_test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class TallCompare
{
public List<ArrayList<Integer>> reconstructQueue(int[][] people) ... |
Java | UTF-8 | 647 | 1.78125 | 2 | [] | no_license | package com.xiaodou.server.mapi.request;
import com.xiaodou.summer.validator.annotion.NotEmpty;
/**
* @name @see com.xiaodou.course.web.request.order.PayOrderRequest.java
* @CopyRright (c) 2016 by Corp.XiaodouTech
*
* @author <a href="mailto:zhaodan@corp.51xiaodou.com">zhaodan</a>
* @date 2016年6月2日
*... |
Go | UTF-8 | 5,010 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | package fastpaxos
import (
"sync"
"time"
"github.com/op/go-logging"
"domino/common"
"domino/fastpaxos/rpc"
)
var logger = logging.MustGetLogger("fastpaxos")
const (
OP_STOP = "s"
OP_WRITE = "w"
OP_READ = "r"
)
type ClientProposal struct {
Op *rpc.Operation
Idx *common.Future
Delay ti... |
Python | UTF-8 | 468 | 2.734375 | 3 | [] | no_license | """
Device constants are used during instantiation of interface classes (such as
:class:`alphasign.interfaces.local.USB`) to describe particular sign devices.
The following constants are defined in this module:
* :const:`USB_BETABRITE_PRISM` = (0x8765, 0x1234)
--------
Examples
--------
Connect to a BetaBrite Prism... |
TypeScript | UTF-8 | 902 | 3.59375 | 4 | [
"MIT"
] | permissive | import Sequence from "./Sequence";
export class Reduce {
/**
* Reduces the whole sequence to a single value by invoking `operation` with each element
* from left to right. For every invocation of the operation `acc` is the result of the last
* invocation. For the first invocation of the operation `... |
Python | UTF-8 | 2,681 | 2.75 | 3 | [] | no_license | #!/usr/bin/env python3
import socket
import argparse
import argparse_parent_base
from multiprocessing import Pool
import time
from printer import Printer
from misc import read_host_from_file, valid_port
class Scanner():
def __init__(self):
self.timeout = 1
socket.setdefaulttimeout(self.timeout)
... |
C | UTF-8 | 254 | 3.171875 | 3 | [
"CC0-1.0"
] | permissive | #include <stdio.h>
#include "part.h"
void print_part(part p) {
printf("Part - name: %10s, number: %7d, cost: $%7.2lf, count%7d\n", p.name, p.number, p.cost, p.count);
}
extern part global_part;
void print_global_part() {
print_part(global_part);
}
|
Python | UTF-8 | 1,111 | 4.5625 | 5 | [] | no_license | # Demonstrates simple sequence protocol implementation by Fibonacci Sequence
# NOTE: Don't use it on production, for demo purpose only
from collections.abc import Sequence
class Fibonacci(Sequence):
def __init__(self, nmax):
self.length = nmax
self._items = []
self._calculate()
def... |
Java | UTF-8 | 1,886 | 2.296875 | 2 | [] | no_license | package br.com.project.domain.entity;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
import org.junit.platform.commons.util.ReflectionUtils;
class BaseEntityTest {
@Test
void hasMethodGetCreatedDate() {
assertTrue(
ReflectionUtils.isMethodPresent(
... |
Ruby | UTF-8 | 311 | 3.828125 | 4 | [] | no_license | =begin
Crea un programa llamado solo_impares.rb que dado n muestre en pantalla los primeros n
números impares.
Tip: el número siguiente a un par siempre es un impar :)
Uso:
ruby solo_impares.rb 5
1 3 5 7 9
=end
#Programa creado.
n=ARGV[0].to_i
n.times do |i|
i +=1
print "#{2*i-1} "
end
puts
|
C# | UTF-8 | 2,585 | 2.515625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Queue;
namespace Village.Games.Api
{
public class ConnectionStrings
{
public string Azure... |
C# | UTF-8 | 6,504 | 2.671875 | 3 | [
"MIT"
] | permissive | using System;
using UnityEngine;
namespace Zios.Containers{
public class Mutant{
public object original;
public object current;
public override string ToString(){return this.current.ToString();}
public static implicit operator int(Mutant value){return (int)value.current;}
public static implicit operator floa... |
Java | UTF-8 | 326 | 2.109375 | 2 | [] | no_license | package com.ironhack.RestAPI.controller.dto;
import com.ironhack.RestAPI.enums.Department;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
@Getter
@Setter
public class DepartmentDTO {
@Enumerated(EnumType.STRING)
private Department departme... |
Swift | UTF-8 | 2,437 | 2.890625 | 3 | [] | no_license | //
// AppExtensions.swift
// ChatMessageSplitApp
//
// Created by Stuti on 31/03/19.
// Copyright © 2019 iOS. All rights reserved.
//
import UIKit
extension NSObject {
class var className: String {
return String(describing: self)
}
}
extension UIViewController {
func showAlert(for messag... |
Java | UTF-8 | 3,508 | 3.140625 | 3 | [] | no_license | package Eligorithms;
import java.util.ArrayList;
public class MonteCarloSearchTreeNode
{
private ArrayList<MonteCarloSearchTreeNode> children;
private MonteCarloSearchTreeNode parent;
private ConnectFourGame game;
private ConnectFourMove move;
private int wins;
private int possibili... |
Python | UTF-8 | 604 | 4.5 | 4 | [] | no_license | #Ryan Walters Dec3 2020 -- Practicing for statement loops using a list of animals that share a similar characteristic
#Initial list and for statement loop with initial print
animal_list = ['bear', 'lion', 'shark', 'panther', 'anaconda']
for animal in animal_list:
print(animal.title())
#New loop with a message... |
JavaScript | UTF-8 | 1,833 | 2.53125 | 3 | [] | no_license | const Component = require('./Component')
const ContentPage = require('./ContentPage')
/**
* 模板中的占位符默认配置,可覆盖
*/
const TEMPLATE_KEY = {
styleKey: 'page-style',
conentKey: 'page-content',
scriptKey: 'page-script',
exScriptKey: 'external-script',
exStyleKey: 'external-style'
}
/**
* 表示全局模板的类,根据模板编译... |
Markdown | UTF-8 | 1,886 | 3.296875 | 3 | [
"MIT"
] | permissive | # State Backstage
State can be very slippery to work with, as it's not normally directly visible in your story--you can only infer from its side effects. Chapbook provides tools to track and even change state as you test your story.
## The State Tab
Under the State tab, you'll find a Variables heading. This shows th... |
Python | UTF-8 | 194 | 3.125 | 3 | [] | no_license | # coding:utf-8
print('%c' % 97)
print('%c' % 'a')
print('%u' % -1)
print('{:d}'.format(1))
print('{:f}'.format(1.2))
print('%o' % 24)
print('%x' % 32)
number = int('123ab', 16)
print(number) |
Python | UTF-8 | 1,993 | 3.15625 | 3 | [] | no_license | import sys
import multiprocessing
from time import perf_counter as timer
from utils import get_prime_factors
def get_num_factors_for_prime(n, prim):
counter = 0
while n%prim == 0:
counter += 1
n /= prim
return counter
def get_num_factors(n):
# very slow but works ¯\_(ツ)_/¯
factor... |
Java | UTF-8 | 325 | 3.15625 | 3 | [] | no_license | package com.toolsq.javafundamentals;
// Can not inherit the class
public class FinalKeywordDemo {
// Member is a constant
int i=0;
public void setI(int a)
{
i = a;
}
// final keyword will stop it from being overridden
public void showMessage()
{
System.out.println("SuperClas");
}
... |
Python | UTF-8 | 590 | 2.6875 | 3 | [] | no_license | #get ip list from /var/log/auth.log
# use key word from cause each connection starts being recorded using a "From" word
import re
l=list()
mystr="from"
f = open("auth.log")
f_ip = open("ip.txt", "r+")
for line in f:
line=line.strip()
if mystr in line:
x=re.findall('from\S* [0-9.]+', line) # read line, f... |
Java | UTF-8 | 751 | 3.4375 | 3 | [] | no_license |
//Demonstrates the use of an array of objects.
public class GameDriver
{
//Creates a GameCollection object and adds some games to it.
//Prints reports on the status of the collection.
public static void main(String [] args)
{
GameCollection games = new GameCollection();
games.a... |
C# | UTF-8 | 1,816 | 3.234375 | 3 | [] | no_license | using FOS.Models.Interfaces;
using FOS.Models.Models;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Flooring_Ordering_System
{
public class LiveProductRepository : IProductRepository
{
private const string... |
Python | UTF-8 | 741 | 2.671875 | 3 | [] | no_license | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
import os
app = Flask(__name__)
baseDir = os.path.abspath(os.path.dirname(__file__))
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + os.path.join(baseDir , 'test.sqlite')
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db = SQLAlchemy(app)
c... |
Python | UTF-8 | 2,081 | 3.171875 | 3 | [] | no_license | def merge_ranges(input_range_list):
res=list()
for i in range(len(input_range_list)):
isMatched=False
for j in range(len(res)):
#case A
if input_range_list[i].lower_bound==res[j].lower_bound \
and input_range_list[i].upper_bound==res[j].upper_bound:
... |
Markdown | UTF-8 | 5,443 | 3 | 3 | [] | no_license | ---
layout: page
title: "Q190966: BUG: IntelliSense Limitations with Templates"
permalink: /kb/190/Q190966/
---
## Q190966: BUG: IntelliSense Limitations with Templates
{% raw %}
Article: Q190966
Product(s): Microsoft C Compiler
Version(s): 6.0
Operating System(s):
Keyword(s): kbVC600bug
Last Modified: 05-MAR... |
C++ | UTF-8 | 685 | 2.53125 | 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.
*/
/*
* File: NodoCurso.cpp
* Author: Steven
*
* Created on July 12, 2018, 8:21 PM
*/
#include "NodoCurso.h"
No... |
Markdown | UTF-8 | 931 | 2.6875 | 3 | [
"MIT",
"Apache-2.0"
] | permissive |
#Requirements
Plugin requires the following
- Stellar Javascript SDK
- Jquery
#Installation
Include Jquery
`<script src="jquery-min.js"></script>`
Include `stellar-js-sdk`
`<script src="stellar-sdk.js"></script>`
Include `stellar-instant-transfer.js`
`<script src="stellar-instant-transfer.js"></script>`
Add the ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.