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 |
|---|---|---|---|---|---|---|---|
Markdown | UTF-8 | 779 | 2.75 | 3 | [] | no_license | ## CORS is 💔 Next.js is ♥
Are you frustrated with the CORS error while using Github Jobs API?
Use [this URL](https://github-api-next.vercel.app/api/positions) to get the data without the headache.
You can pass all the query params that main API supports. [See it here](https://jobs.github.com/api)

* edit config file(right now the only two blog theme options are Theme1 and Theme2) and add custom css(in the client directory)
* swap out logo ... |
PHP | UTF-8 | 3,284 | 2.765625 | 3 | [] | no_license | <?php
include 'blob.php';
$target_dir = "./Pictures/";
$name=basename( $_FILES["fileToUpload"]["name"]);
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
$uploadOk = 1;
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
$username;
$address;
$county;
$country;
$dob;
$number;
$message;
... |
C++ | GB18030 | 966 | 3.0625 | 3 | [] | no_license | // 10.cpp : ̨Ӧóڵ㡣
//
#include "stdafx.h"
#include <string>
#include <vector>
#include <iostream>
using namespace std;
class Solution {
public:
bool isMatch(string s, string p) {
int m = s.size();
int n = p.size();
auto matches = [&](int i, int j)
{
if (i == 0) return false;
if (p[j... |
Java | UTF-8 | 505 | 2.515625 | 3 | [] | no_license | package com.example.hkforum.model;
public class Comment {
public String Title, Comment, Username;
public Comment(){
}
public Comment(String Title, String comment, String username) {
this.Title = Title;
this.Comment = comment;
this.Username = username;
}
public String... |
C++ | UTF-8 | 4,733 | 2.609375 | 3 | [
"MIT"
] | permissive | #include "GY_85.h"
void GY_85::SetAccelerometer()
{
//Put the ADXL345 into +/- 4G range by writing the value 0x01 to the DATA_FORMAT register.
Wire.beginTransmission( ADXL345 ); // start transmission to device
Wire.write( 0x31 ); // send register address
Wire.write( 0x01 ); ... |
TypeScript | UTF-8 | 3,641 | 2.75 | 3 | [
"MIT"
] | permissive | import { expect } from 'chai';
import * as sinon from 'sinon';
import { idle } from '../src/index';
describe('Scheduler.Idle', () => {
it('should exist', () => {
expect(idle).exist;
});
it('should act like the async scheduler if delay > 0', () => {
let actionHappened = false;
const sandbox = sinon.s... |
C++ | UHC | 2,450 | 2.65625 | 3 | [] | no_license | #pragma once
#include "Linear.h"
/*====================================================================
Z-Order 浹 ó Player, Enemy, Object
Ʈ ü ̴ GameObject ŬԴϴ.
====================================================================*/
struct tagShadow
{
RECT rc;
vector3 LT, RT, RB, LB;
vector3 pos;
float width,... |
C# | UTF-8 | 2,461 | 2.796875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using BookStorage.Interfaces;
using BookStorage.Models;
using BookStorage.Service;
using BookStorage.Storage;
namespace BookStorage
{
internal class Program
{
private static void Main(string[] args)
{
Book bookForTest = new Book("978-... |
C# | UTF-8 | 835 | 2.53125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BanqueAPP
{
class Program
{
static void Main(string[] args)
{
Client c1 = new Client("Zouhri","Hamza","casa");
Client c... |
C++ | UTF-8 | 1,632 | 2.6875 | 3 | [] | no_license | #include <iostream>
#include <bits/stdc++.h>
#include <chrono>
#include <stdlib.h>
#include <algorithm>
#include "cluster.h"
using namespace std;
using std::cout;
using std::chrono::high_resolution_clock;
using std::chrono::duration;
int main(int argc, char* argv[]) {
srand (time(NULL));
high_resolution_cloc... |
Python | UTF-8 | 1,360 | 2.953125 | 3 | [] | no_license | import csv
import numpy as np
def readCSV(filename, dtype="int64", verbose=True):
"""
Input: Str of csv filename
Output: numpy.ndarray of Nx17
"""
with open(filename, 'r') as foo:
if verbose:
print("Reading labels from {}...".format(filename))
csvreader = csv.reader(foo,... |
TypeScript | UTF-8 | 4,684 | 2.53125 | 3 | [
"MIT"
] | permissive | // tslint:disable:no-reserved-keywords no-bitwise
/**
* Team
*/
export enum Team {
/**
* Good
*/
good,
/**
* Bad
*/
bad,
}
export const enumMapTeam: Record<string, Team> = {
Good: Team.good,
Bad: Team.bad,
good: Team.good,
bad: Team.bad,
};
//
// Role
// --------------------------------... |
Python | UTF-8 | 2,727 | 2.828125 | 3 | [] | no_license | #!/usr/local/bin/python
#Warren Reed
#Principles of Urban Informatics
#Assignment 5, Exercise 3
#Dot Plot
import pandas as pd
from scipy import *
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import *
import pylab
from pylab import *
from matplotlib.dates import MonthLocator, DateFormatter, YearLo... |
TypeScript | UTF-8 | 1,142 | 2.515625 | 3 | [] | no_license | import { instruct } from 'myr';
import fs from 'fs';
import { ReflNode, ReflProgram } from "./ReflNode";
import { StringLiteral } from './StringLiteral';
import { Refl } from '../Refl';
import { Program } from './Program';
export class UsingExpression extends ReflNode {
constructor(public path: ReflNode) { super()... |
Markdown | UTF-8 | 2,724 | 3.125 | 3 | [
"MIT"
] | permissive | # MySQL常见操作
重点:
## 数据库增删改查
[具体操作](https://blog.csdn.net/qq_38345598/article/details/79416578)
[select操作](https://www.cnblogs.com/gates/p/3936974.html)
[SQL面试题](https://www.cnblogs.com/diffrent/p/8854995.html)
### SELECT(重点)
select * from tablename where 条件
### DELETE
删除一行数据
```SQL
delete from Employees
where Employe... |
C# | UTF-8 | 655 | 3.15625 | 3 | [] | no_license | using System;
namespace KnightsTour
{
public class Knight
{
public struct Move
{
public int cols { get; set; }
public int rows { get; set; }
public Move(int cols, int rows) : this()
{
this.cols = cols;
this.rows = ... |
C++ | UTF-8 | 405 | 3.015625 | 3 | [] | no_license | #include<iostream>
using namespace std;
class A{
public:
A() {
}
virtual int getk() {
return 1;
}
void setk(int kk) {
k = kk;
}
void pp() {
printf("%d\n", k);
}
private:
int k;
};
class B : public A{
public:
B() {
setk(6);
}
int getk() {
return 5;
}
};
int main(void){
B... |
Markdown | UTF-8 | 982 | 2.515625 | 3 | [] | no_license | <p align="center">
<img src="https://user-images.githubusercontent.com/85905805/121959526-346ece00-cd65-11eb-8456-17440c1e4559.jpg">
</p>
<h2>Introduction</h2>
</br>
<p>You can download our Windows and Android applications and track your tokens and earnings in your wallet.</p>
<ul>
<li>Goatzilla Windows/Android: Pr... |
Java | UTF-8 | 6,174 | 1.734375 | 2 | [
"Apache-2.0"
] | permissive | package com.umiwi.ui.fragment;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget... |
Java | UTF-8 | 15,130 | 1.976563 | 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 tallervistas;
import java.util.logging.Level;
import java.util.logging.Logger;
import tallerdereparaciones.Conexion;
import ta... |
PHP | UTF-8 | 340 | 2.5625 | 3 | [] | no_license | <?php
$famille=["Maman","Papa","Petit frère","Moi"];
print_r($famille);
$plats=["pizza","hamburger"];
print_r($plats);
$films=["Monstre et companie","Seigneur des anneaux"];
echo $films[0];
$moi= array(
'prenom' => 'Antoine',
'nom' => "Gjeloshaj",
'ville' => "bruxelles",
'age'=> 21,
'aime_le_foot'=>false
);... |
Python | UTF-8 | 1,280 | 3.515625 | 4 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Fri Jan 07 11:17:20 2011
@author: RDC
"""
import unittest
class MyClass:
def __init__(self, value):
self.value = value
def my_method(self):
if self.value < 0 :
result = self.value
else:
result = False
rais... |
Markdown | UTF-8 | 24,737 | 2.890625 | 3 | [
"CC-BY-NC-SA-4.0",
"CC-BY-NC-ND-4.0",
"MIT"
] | permissive | 在分布式系统中,为了保证数据的可靠性与性能,我们不可避免的对数据进行复制与多节点存储,而数据一致性主要为了解决分布式多个存储节点情况下怎么保证逻辑上相同的副本能够返回相同的数据。
> [保证分布式系统数据一致性的 6 种方案 ](http://mp.weixin.qq.com/s?__biz=MzAwMDU1MTE1OQ==&mid=2653546976&idx=1&sn=c3fb2338389a41e7ab998c0c21bd3e5d&scene=23&srcid=0419TGxOI4Nac6fHhWRNDeR0#rd)
分布式系统常常通过数据的复制来提高系统的可靠性和容错性,并且将数据的副本存放到不同的机器上,由于多个副本的... |
Java | UTF-8 | 420 | 1.867188 | 2 | [] | no_license | package com.hacademy.macro;
import java.awt.event.KeyEvent;
import javax.swing.KeyStroke;
import com.tulskiy.keymaster.common.Provider;
public class Test06KeyboardHook {
public static void main(String[] args) {
Provider provider = Provider.getCurrentProvider(false);
provider.register(KeyStroke.getKeyStroke(Key... |
SQL | UTF-8 | 3,854 | 2.953125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `fseletro` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
USE `fseletro`;
CREATE TABLE `comentarios` (
`id` int(11) NOT NULL,
`nome` varchar(200) DEFAULT NULL,
`mensagem` varchar(255) DEFAULT NULL,
`data_publicada` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DE... |
C# | UTF-8 | 1,179 | 3.46875 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
namespace Maximus.Library.Helpers
{
/// <summary>
/// Compare machine names taking domain suffix in account. If both names are FQDN or NetBIOS names, then literal comparison
/// applied, otherwise either name reduced to NetBIOS format.
/// </summary>
public cl... |
Java | UTF-8 | 972 | 1.875 | 2 | [] | no_license | package mum.edu.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.annotation.Propagation;
import mum.edu.dao.RegistrationDao;
import mum.edu.domain.Block;
impor... |
TypeScript | UTF-8 | 27,573 | 2.53125 | 3 | [] | no_license | import { ZODIACTIME } from '../departure/departure-zodiactimestorage';
import { Hour } from './departure-hour';
import { HUONGXUATHANH } from './interface/huong_xuat_hanh';
import { TNBINFO } from './interface/tnb_Info';
import { DanhNgon } from './interface/danhngon';
export class DepartureUtils {
static GMT: num... |
C++ | UTF-8 | 1,734 | 2.609375 | 3 | [] | no_license | #include<iostream>
#include<fstream>
#include<string>
#include<cstring>
#include<cmath>
#include<vector>
#include<algorithm>
#include<queue>
#include<deque>
#include<limits>
#include<bitset>
#include<map>
using namespace std;
#pragma warning (disable:4996)
ifstream in("input.txt");
const int INF = 987654321;
struc... |
C# | UTF-8 | 263 | 2.71875 | 3 | [] | no_license | using System;
namespace Calc.SingleCalculators
{
public class Tan : ISingleOperation
{
public double Calculation(double firstArgument)
{
double result = Math.Tan(firstArgument);
return result;
}
}
}
|
Shell | UTF-8 | 783 | 3.609375 | 4 | [] | no_license | #!/usr/bin/env bash
REG="reg.qiniu.com/ava-os"
TAG="latest"
PUSH=false
CONTROLLER=false
WORKER=false
if [[ $# -lt 1 ]]; then
echo "usage: $0 <controller|worker|all> [--push]"
fi
case $1 in
controller)
CONTROLLER=true
;;
worker)
WORKER=true
;;
all)
CONTROLLER=true
WORKER=true
;;
esac
if [ $# -gt 1 ]; then
... |
PHP | UTF-8 | 607 | 2.65625 | 3 | [] | no_license | <?php
session_start();
function alertSet($msg, $flag = 0){
$types = array('success', 'info', 'warning', 'danger');
$_SESSION['alert'] = array('flag' => $types[$flag], 'msg' => $msg);
}
function alertGet(){
$alert = $_SESSION['alert'];
unset($_SESSION['alert']);
return $alert;
}
function go($url, $msg... |
C# | UTF-8 | 690 | 2.84375 | 3 | [] | no_license | using MvpTest.Models;
using MvpTest.Views;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MvpTest.Presenters
{
public class RectanglePresenter
{
private readonly IRectangle view;
public RectanglePresenter(IRectangl... |
Python | UTF-8 | 693 | 2.734375 | 3 | [] | no_license | from collections import deque
N,M = raw_input().split()
n = int(N)
m = int(M)
cut = 0
A = [[0, 0] for i in xrange(m)]
count = [1 for i in xrange(n + 2)]
count[0] = 0
for i in xrange(m):
x, y = raw_input().split()
A[i][0] = int(x)
A[i][1] = int(y)
for i in xrange(m):
count[A[i][1]] = 0
q = deque()
for i in xra... |
C++ | UTF-8 | 1,663 | 2.609375 | 3 | [] | no_license | #ifndef VACCINES_MODEL_H
#define VACCINES_MODEL_H
#include "vaccine.h"
#include <QAbstractTableModel>
#include <QFile>
#include <QDomDocument>
#include <QTextStream>
class VaccinesModel: public QAbstractTableModel
{
Q_OBJECT
QFile *file_vaccines_repository;
QList<Vaccine> *vaccines_repository;
public:
... |
TypeScript | UTF-8 | 1,698 | 2.515625 | 3 | [] | no_license | export interface User {
user_id?: number,
username?: string,
password?: string,
email?: string
}
export interface Animal {
animal_id?: number,
birthday?: string,
age?: string,
spezies?: string,
name?: string,
image?: string,
weight?: string,
target_weight?: string,
a... |
C++ | UTF-8 | 709 | 3.484375 | 3 | [] | no_license | #include <iostream>
using namespace std;
void afficher(int T[], int N)
{
int i;
for (i = 0;i < N; i++)
cout << T[i] << ' ';
cout << endl;
}
void inserer(int T[], int n)
{
int i, v;
cout << endl;
afficher(T,n + 1);
i = n - 1;
v = T[n];
while (i >= 0 && T[i] > v)
{
T[i + 1] = T[i];
... |
C# | UTF-8 | 10,525 | 3 | 3 | [] | no_license | using System;
using System.Drawing;
using System.Windows.Forms;
namespace Amethyst.Input
{
/// <summary>
/// Class representing the Mouse
/// </summary>
public class Mouse
{
private MouseState m_MouseState;
private bool m_MoveEventFiredSinceUpdated = false;
private bool m_W... |
Markdown | UTF-8 | 3,398 | 3.796875 | 4 | [
"MIT"
] | permissive | ---
title: Dynamic Relationships on Laravel Models
description: How to add dynamic relationships on Laravel models.
permalink: articles/dynamic-relationships-on-laravel-models
date: 2020-05-10
image: /covers/dynamic-relationships-on-laravel-models.png
tags:
- php
- laravel
---
Learn how to add dynamic relation... |
Java | UTF-8 | 697 | 1.75 | 2 | [] | no_license | package com.bc.test;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
i... |
Java | UTF-8 | 261 | 1.6875 | 2 | [] | no_license | package com.erp.repo;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
import com.erp.classes.BillOfMaterial;
@Repository
public interface BOMRepo extends CrudRepository<BillOfMaterial, Integer> {
} |
Java | UTF-8 | 455 | 2.625 | 3 | [] | no_license | package steve.jpong.specs;
public abstract class Player {
protected Paddle player_paddle;
public abstract boolean check_collisions(Ball b);
public abstract void initialize_paddle();
public Player(){
player_paddle = new Paddle( 15, 10, 75 );
initialize_paddle();
}
public Paddle getPaddle(){
return player_pa... |
Python | UTF-8 | 595 | 2.515625 | 3 | [] | no_license | from django.db import models
# Create your models here.
class Programming_Authors(models.Model):
programming_languages = models.CharField(max_length=20)
authors = models.CharField(max_length=100)
date_of_birth = models.DateField()
def __str__(self):
return self.authors
class ProgrammingFrame... |
C | GB18030 | 1,816 | 3.6875 | 4 | [] | no_license | #define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
struct ListNode* mergeTwoLists(struct ListNode* l1, struct ListNode* l2) {
/* */
if (l1 == NULL || l2 == NULL) {
return l1 != NULL ? l1 : l2;
}
/* ȡϲ֮ͷڵ */
struct ListNode* mergeHead = l1->val > l2->val ? l2 : l1;
/* ¼нڵֵСĽڵ㣬ڱ */
struct ListNode* cur1 = mer... |
Markdown | UTF-8 | 6,405 | 3.046875 | 3 | [] | no_license | ## Building Multi-tenant applications on MongoDB
20140812 https://web.archive.org/web/20140812091703/http://support.mongohq.com/use-cases/multi-tenant.html
MongoDB is very popular for SaaS applications, and we are frequently asked "how should I build an application that can handle multiple customers?" We have two go... |
Markdown | UTF-8 | 1,361 | 2.734375 | 3 | [] | no_license | Solution
========
First Step: Image Overlay
-------------------------
The first task is to develop an algorithm that take two images of the same thing captured at different times, and to generate a single transformation that will map the gross features of the second image onto the first. The images may have different... |
JavaScript | UTF-8 | 701 | 3.453125 | 3 | [] | no_license | let year = +prompt('Введите свой возраст');
let age;
if (isNaN(year)){
age = 'Нужно ввести цифрами! Перезагрузите страницу!';
}
else if (0 >= year){
age = 'Загрузка: подождите пока родитесь!';
}
else if (year <= 10){
age = 'Привет малой!';
}
else if (year <= 18){
age = 'Здарова братан!';
}
else if (y... |
Ruby | UTF-8 | 303 | 3.46875 | 3 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | def count_strings(array)
total = 0
array.count do |element|
if element.class == String
total += 1
end
end
total
end
def count_empty_strings(array)
total = 0
array.count do |element|
if element == ""
total += 1
end
end
total
end |
C | UTF-8 | 2,461 | 3.296875 | 3 | [] | no_license | #include <stdio.h>
#include "my_functions.h"
#include <string.h>
int is_separator(int c)
{
char separator[] = " ,;:-.!?";
for (int i = 0; separator[i] != '\0'; i++)
{
if (c == separator[i])
return YES;
}
return NO;
}
int str_equality(const char *str1, const char *str2)
{
... |
Java | UTF-8 | 1,839 | 3 | 3 | [
"Apache-2.0"
] | permissive | import java.sql.*;
import java.util.ArrayList;
import java.util.TreeSet;
//Driver drv = new com.mysql.cj.jdbc.Driver(); ?????
public class SqlApp {
public static void main(String[] args) throws ClassNotFoundException, SQLException {
String userName = "root";
String password = "";
String connectUrl = "jdbc:mys... |
Python | UTF-8 | 257 | 3.34375 | 3 | [] | no_license | x=raw_input().split(' ')
a=int(x[0])
b=int(x[1])
sm=0
if a>=b:
while b!=0:
sm=sm+a/b
temp=a
a=b
b=temp%b
else:
while a!=0:
sm=sm+b/a
temp=b
b=a
a=temp%a
print sm
|
C++ | UTF-8 | 7,017 | 2.65625 | 3 | [] | no_license | #include "pch.h"
#include "Camera.h"
#include "ResourceManager.h"
static auto TiledF = [](float& a, float imageSize, float count)
{
if (a > imageSize * (count / 2))
{
while (a > imageSize* (count / 2))
{
a -= imageSize * count;
}
}
else if (a < -imageSize * (count / 2))
{
while (a < -imageSize * (count... |
C | UTF-8 | 1,540 | 2.765625 | 3 | [
"MIT"
] | permissive | #include "simd.h"
#include <stdio.h>
#include <stdlib.h>
void solve(int W, int H, int N, float *input, float *output) {
const int CHUNK_SIZE = 64;
#pragma omp parallel for
for (int i = 0; i < H; i += CHUNK_SIZE) {
float *tmp_buf =
(float *)malloc(sizeof(float) * W * (CHUNK_SIZE + N - 1));
... |
Python | UTF-8 | 343 | 3.03125 | 3 | [] | no_license | import pickle
import numpy as np
model = pickle.load(open('model.pkl','rb'))
# prediccion de un nuevo dato
nuevo_dato1 = np.array([[0.199713, 4.323565]])
# Ahora encontramos la etiqueta o clase de este nuevo individuo
label_pred_load21 = model.predict(nuevo_dato1)
#etiqueta_nueva_dato1 =
print("Etiqueta nuevo dato... |
PHP | UTF-8 | 338 | 3.421875 | 3 | [] | no_license | <?php
$student_array[0] = "Angelina";
$student_array[1] = "Edwin";
$student_array[2] = "Lavanya";
$student_array[3] = "Syafiqah";
echo "The student with second index is ".$student_array[1]."<br>";
echo "The student with fourth index is ".$student_array[3]."<br>";
echo "My class has a total of ".count($student_array)."... |
Markdown | UTF-8 | 2,112 | 2.953125 | 3 | [
"MIT"
] | permissive | ---
title: 以哥念
date: 15/08/2018
---
在安提阿犹太领袖的煽动下,地方当局鼓动一个暴徒起来反对保罗和巴拿巴,并将他们赶出城(徒13:50)。然而,门徒满心喜乐又被圣灵充满(徒13:52)。然后传道士们到以哥念城去了。
`阅读徒14:1-7。保罗与巴拿巴在以哥念做工的结果是什么?`
在以哥念,保罗和巴拿巴持续着他们先向犹太人然后再向外邦人传讲的习惯。保罗在安提阿的讲道(徒13:16-41)指出了在他们传道中犹太人优先背后的主要原因:以色列的被拣选,及其所包含的一切(罗3:2;9:4,5),以及上帝实现了祂从戴维子孙中、出一位救主的应许。尽管许多犹太人拒绝福音,但保罗从未失去大批犹太人悔改的希望... |
C++ | UTF-8 | 1,879 | 3.203125 | 3 | [] | no_license | #include <cstdlib>
#include<stdlib.h>
#include<iostream>
#include<fstream>
#include<math.h>
/*
Tarea 02 Ayudantia Paralela
Kevin Gatica Oportus
19.034.012-0
*/
using namespace std;
/*
void escribirArchivo(){
ofstream f;
f.open("archivo.txt",ios::out);//crear archivo.txt
int num=0;
for (int i=0;i<10... |
Python | UTF-8 | 1,246 | 3.578125 | 4 | [] | no_license | import openpyxl
from pprint import pprint
plik = openpyxl.load_workbook("example2.xlsx")
# print(plik)
arkusze = plik.sheetnames
print(arkusze)
aktywny_arkusz = plik.get_sheet_by_name("Owoce")
print(f"Aktywny arkusz: {aktywny_arkusz.title}")
# kokórki
komorka = aktywny_arkusz["A1"]
print(komorka)
print(komorka.v... |
SQL | UTF-8 | 2,650 | 4.21875 | 4 | [] | no_license | -- 写法1
select level,
count(distinct video_id) as video_num,
sum(vv) as vv_num,
sum(vv)/count(distinct video_id) avg_vv
from
(
select case when vv>=100000 then "10w+"
when vv>=50000 then "5w+"
when vv>=20000 then "2w+"
when vv>=10000 then "1w+"
when vv>=8000... |
C++ | UTF-8 | 17,487 | 3.21875 | 3 | [] | no_license | #include "Camera.h"
Camera::Camera(const size_t width, const size_t height, const dvec3& eye)
: _eye_point(eye), _camera_film(width, height), _scene(nullptr),
_distribution(std::uniform_real_distribution<double>(0.0, 1.0))
{
setupCameraMatrix();
computePixelWidth();
}
void Camera::loadScene(Scene* scene)
{
_scen... |
Java | UTF-8 | 952 | 3.03125 | 3 | [] | no_license | package cz.cvut.cizpelant.engine.commands;
import cz.cvut.cizpelant.engine.abstraction.GameCommand;
import cz.cvut.cizpelant.engine.abstraction.GameCommandResult;
import cz.cvut.cizpelant.engine.model.Game;
public class HelpCommand implements GameCommand {
private String helpMessage;
public HelpCommand() {
Str... |
Java | UTF-8 | 16,976 | 1.734375 | 2 | [] | no_license | package com.bluewhite.product.product.service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.persistence.criteria.Predicate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.... |
Shell | UTF-8 | 3,794 | 3.53125 | 4 | [] | no_license | #!/bin/bash
# This scrip should set up st terminal emulator
if [[ $EUID -ne 0 ]]; then
echo -e "\n\x1b[31;01m Run this script with 'sudo -E' \x1b[39;49;00m\n"
exit 1
fi
if [ $HOME = '/root' ]; then
echo -e "\n\x1b[31;01m Run this script with 'sudo -E' \x1b[39;49;00m\n"
exit 1
fi
if [ -z ${SUDO_USER} ]... |
Swift | UTF-8 | 2,074 | 2.609375 | 3 | [] | no_license | //
// ItemViewController.swift
// imdbClient
//
// Created by TONY on 17/05/2019.
// Copyright © 2019 TONY. All rights reserved.
//
import UIKit
class ItemView: UIView {
var posterImage: UIImageView!
var titleLabel: UILabel!
var topInfoLabel: UILabel!
var ratingLabel: UILabel!
var otherIn... |
Markdown | UTF-8 | 6,993 | 3.3125 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "Multiple Layouts Made Easy with CSS Grid"
category: fpx
---
The software we develop at [Revalize](https://www.revalizesoftware.com) serves a
wide range of customers from a wide range of industries. Designing for so many
different types of users can be daunting—what works for a group of u... |
Java | UTF-8 | 1,100 | 2.125 | 2 | [] | no_license | package com.softnexos.back.rest;
import com.softnexos.back.model.Cargos;
import com.softnexos.back.service.CargosService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.... |
Java | UTF-8 | 2,732 | 2.578125 | 3 | [] | no_license | package zztest.view.recyclerview.recyclerview;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
import com.turui.yuncheng.R;
import java.util.ArrayList;... |
Java | UTF-8 | 2,126 | 2.53125 | 3 | [] | no_license | package kict.edu.my.cheapr;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.wid... |
C++ | UTF-8 | 447 | 3.09375 | 3 | [] | no_license | #ifndef Shape_h
#define Shape_h
#include <iostream>
#include <string>
class Shape {
public:
Shape(const std::string& name) { name_ = name; }
virtual void draw() const = 0;
//virtual void move() = 0; // add also move() function
virtual std::string name() const { return name_; }
virtual void print() const {
... |
Ruby | UTF-8 | 1,992 | 2.859375 | 3 | [
"WTFPL"
] | permissive | require File.join(File.dirname(__FILE__), "..", "test_helper.rb")
class AlignerTest < Test::Unit::TestCase
class TestClass
attr_accessor :cells
include Aligner
end
def setup
Petri.stubs(:image_dimensions).returns(Point.new(640, 480))
Petri.stubs(:num_genes).returns(3)
Petri.stubs(:num_poi... |
C | UTF-8 | 8,015 | 2.734375 | 3 | [] | no_license | /*
* main.c
*
* Created on: Jan 15, 2020
* Author: micheal_onsy
*/
#include "E2PROM.h"
#include "UART.h"
#include "Timer1.h"
#define M2_READY 0x10
/*Prototype*/
void APP_VidTIMER(void);
/*global variable */
uint8 g_flag=0;
uint8 g_flag1=0;
int main (void)
{
/*
* Local Variables used In Project
* 1- Co... |
Markdown | UTF-8 | 12,669 | 2.578125 | 3 | [] | no_license | <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"/></head><body><div class="section" title="A wumpus világ"><div class="titlepage"><div><div><h1 class="title"><a id="id576362"/>A wumpus világ </h1></d... |
Python | UTF-8 | 421 | 3.359375 | 3 | [] | no_license |
class Singleton:
"""Singleton
a simple Singleton class decorator
"""
# on @ decoration
def __init__(self, aClass):
self.__aClass = aClass
self.__instance = None
# on instance creation
def __call__(self, *args, **kargs):
if self.__instance ... |
C# | UTF-8 | 4,377 | 2.875 | 3 | [] | no_license | using System;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using ModelService;
namespace UtilityService
{
public class Internet
{
private static readonly HttpClient HttpClient = new HttpClient();
private static bool _hasInternetAccess = false;
static Internet(... |
C++ | UTF-8 | 1,408 | 3.171875 | 3 | [] | no_license | /**
* HC-12 + Hardware Serial
*
* Receiver
* Capture HC-12 serial transmissions, parse the value, and transmit to servo
*/
#include <Servo.h>
#define SERVO_PIN 3
const int rxDelayMs = 10;
const float angleValMin = 1;
const float angleValMax = 179;
const char delimiterStart = '[';
const char delimiterEnd = ']';... |
Python | UTF-8 | 409 | 3.75 | 4 | [] | no_license | # returns the sum of all the numbers that can be written as
# the sum of fifth powers of their digits
def getAnswer():
s=0
for i in range(600000): # upper bound on the possible answers
num = "{0:06d}".format(i)
p=0
for ch in num:
p += int(ch)**5
if p==i:
p... |
Python | UTF-8 | 7,179 | 2.625 | 3 | [] | no_license | import numpy as np
import cv2
import glob
import os
import pickle
import time
from sklearn.svm import LinearSVC
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
from skimage.feature import hog
from config import *
# Define a function to return HOG features and vi... |
Markdown | UTF-8 | 2,136 | 2.9375 | 3 | [] | no_license | ## Netty ByteBuf
> 参考链接: https://skyao.gitbooks.io/learning-netty/content/buffer/inheritance.html
### ByteBuf 模块

#### ByteBuf基础实现类
按照是否支持池共享分为( `PooledByteBuf`是4.x之后的新特性, netty3.*和之前版本并不支持):
- `PooledByteBuf`
- `UnpooledByteBuf`
区别在于使用 UnPooled Buffer 时每次都会分配一个新的缓冲区, 而当使用 Pooled b... |
Markdown | UTF-8 | 3,463 | 2.9375 | 3 | [
"MIT"
] | permissive | # fdir - a 4DOS Dir command recreation in Swift
## What?
In the old days of MSDOS existed a shell replacement called [4DOS](https://www.4dos.info/). One of the best features was the ability to annotate files and folders with comments, so while listing a directory wth `dir` you could see directly there what a folder c... |
Java | UTF-8 | 521 | 1.726563 | 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 Inf;
import java.util.ArrayList;
import Inf.Ubi_Silla;
/**
*
* @author anpip
*/
public class Datos_Pers {
public ... |
Java | UTF-8 | 1,416 | 2.671875 | 3 | [
"MIT"
] | permissive | package com.direwolf20.buildinggadgets.common.util.spliterator;
import com.direwolf20.buildinggadgets.common.building.BlockData;
import net.minecraft.util.math.BlockPos;
import javax.annotation.Nullable;
import java.util.Spliterator;
import java.util.function.BiPredicate;
import java.util.function.Consumer;
import ja... |
Java | UTF-8 | 4,256 | 2.703125 | 3 | [] | no_license | package com.examplemodel.examplemodel;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
import java.util.ArrayList;
import java.util.List;
import... |
C++ | UTF-8 | 1,286 | 2.53125 | 3 | [
"MIT"
] | permissive | //
// Created by Battary on 26.03.2020.
//
#pragma once
#include <map>
#include <memory>
#include <string>
#include "game/lib/ECS/ECS.h"
// Components
#include "game/components/ControlComponent.h"
#include "game/components/LocationComponent.h"
#include "game/components/PreviousLocationComponent.h"
#include "game/com... |
Python | UTF-8 | 435 | 3.421875 | 3 | [] | no_license |
def calculate_change(money, idx):
if money < 10:
return
while money >= unit[idx]:
money -= unit[idx]
change[idx] += 1
calculate_change(money, idx+1)
return
for tc in range(1, int(input())+1):
money = int(input())
change = [0] * 8
unit = [50000, 10000, 5000, 1000, 5... |
C# | UTF-8 | 1,255 | 2.703125 | 3 | [] | no_license | using GalexyOnlineStore.Application.Interface.Contexts;
using GalexyOnlineStore.Common;
using System;
using System.Collections.Generic;
using System.Linq;
namespace GalexyOnlineStore.Application.Services.Users.Queries.GetUsers
{
public class GetUsersService : IGetUsersService
{
private readonly IDatab... |
C | UTF-8 | 1,754 | 4.5625 | 5 | [] | no_license | /*
You are given two array, first array contain integer which represent heights of persons and second array contain how many persons in front of him are standing who are greater than him in term of height and forming a queue. Ex
A: 3 2 1
B: 0 1 1
It means in front of person of height 3 there is no person standing, p... |
Python | UTF-8 | 3,587 | 3.0625 | 3 | [] | no_license | #########
# Authors: Kyle Nielsen John Drake TODO add your name if you edit this file
# For: CIS 433 at UOregon
# Date of creation: February 6, 2019
# Last update: March 7, 2019 TODO keep updated
# Language: Python 3
# Credit: TODO credit outside sources if applicable
# Program state: Basic check for name-email combo... |
Java | UTF-8 | 1,763 | 2.78125 | 3 | [] | no_license | package info.timgraves.higherorlower;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
import java.util.Random;
public class MainActivity extends AppCompatActivity {
private ... |
Java | UTF-8 | 1,226 | 2.09375 | 2 | [] | no_license | package com.cmpay.lww.service;
import com.cmpay.lww.bo.MenuInfoBO;
import com.cmpay.lww.bo.RoleInfoBO;
import com.cmpay.lww.bo.RoleMenuInsertBO;
import com.cmpay.lww.dto.MenuInfoDTO;
import com.cmpay.lww.entity.MenuDO;
import java.util.List;
/**
* 菜单服务类
*
* @author lww
* @since 2020-06-21
*/
public interface Me... |
Markdown | UTF-8 | 1,427 | 3.65625 | 4 | [] | no_license | # 2. Making Your Codes Smarter
Now that you've learned **the primary data types, ways to manipulate to them, and how to express and combine them through methods**, let's dive a bit deeper into methods. Remember from section 1.9, when we mentioned the concept of **functional abstraction**, methods allow us to simplify ... |
Markdown | UTF-8 | 13,041 | 2.9375 | 3 | [
"MIT"
] | permissive | #Using the new Tutum Stream API
## Part Two: Practical Use Cases of the Tutum Stream API
##Introduction
Tutum recently introduced its new [Tutum Stream API](http://blog.tutum.co/2015/04/07/presenting-tutum-stream-api/).
This is a great new feature that allows you to use WebSockets to monitor
Events from your Tutum ac... |
C++ | UTF-8 | 4,135 | 2.625 | 3 | [] | no_license | #include "database.h"
DataBase::DataBase(QString time, int temperature, int humidite, QString user, QString four, double CO2, int chute, QString tv)
{
try
{
sql::Driver *driver;
sql::Connection *con;
//sql::ResultSet *res;
//sql::PreparedStatement *pstmt;
int id_sensor;
int num;
QString ... |
Markdown | UTF-8 | 1,596 | 3.015625 | 3 | [] | no_license | ---
title: Data Files
---
# Data Files
At the time of writing, there are only two data files the site draws from.
1. data/westlaw/settings.yml
2. data/checkpoint/settings.yml
The settings file makes it possible to share the majority of code. For example the 'Application Frame' draws its top menu navigation from a p... |
Java | UTF-8 | 3,735 | 2.84375 | 3 | [] | no_license | import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ForgotPassword extends JFrame {
private JPanel contentPane;
private JTextField tfUserName;
private JTextField tfAnswer;
public ForgotPassword() {
setTitle("Forgot Password");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBo... |
Java | UTF-8 | 1,793 | 2.21875 | 2 | [
"MIT"
] | permissive | package com.tikal.jenkins.plugins.multijob;
import hudson.EnvVars;
import hudson.Extension;
import hudson.model.*;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import javax.annotation.Nonnull;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collecti... |
Java | UTF-8 | 3,051 | 2.0625 | 2 | [] | no_license | package cn.com.trade365.sxca_proxy_exchange.handler.impl;
import cn.com.trade365.sxca_proxy_exchange.core.ObjectTypeEnum;
import cn.com.trade365.sxca_proxy_exchange.core.Repositories;
import cn.com.trade365.sxca_proxy_exchange.core.RestComponent;
import cn.com.trade365.sxca_proxy_exchange.entity.RelationEntity;
import... |
C# | UTF-8 | 8,292 | 2.5625 | 3 | [
"BSD-3-Clause",
"CC-BY-3.0",
"FTL",
"Zlib",
"Bitstream-Vera",
"MPL-2.0",
"curl",
"MIT",
"OFL-1.1",
"BSL-1.0",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-free-unknown"
] | permissive | using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
// TODO: Add comments describing what this class does. It is not obvious.
namespace Godot
{
public static partial class GD
{
public static object Bytes2Var(byte[] bytes, bool allowObjects = false)
{
... |
Java | UTF-8 | 2,347 | 3.1875 | 3 | [
"MIT"
] | permissive | /*
* 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 keyboardhero;
import java.awt.Color;
import java.awt.Font;
import java.io.IOException;
import javax.swing.JButton;
... |
JavaScript | UTF-8 | 1,426 | 3.359375 | 3 | [] | no_license |
const form = document.querySelector("#contactForm");
const fName = document.querySelector("#fname");
const fNameError = document.querySelector(".fNameError");
const lName = document.querySelector("#lname");
const lNameError = document.querySelector(".lNameError");
const email = document.querySelector("#email");
con... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.