language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
C++
UTF-8
1,392
3.34375
3
[]
no_license
#include <iostream> #include <vector> #include <fstream> using namespace std; long long ans = 0; void merge(vector<int> &array, int front, int mid, int end) { vector<int> left(array.begin() + front, array.begin() + mid + 1), right(array.begin() + mid + 1, array.begin() + end + 1); //vector的結尾是null 所以尾巴要+1...
Java
UTF-8
1,607
2.453125
2
[]
no_license
/** * AppInjector.java * * Skarpetis Dimitris 2016, all rights reserved. */ package dskarpetis.elibrary.init; import java.util.Arrays; import java.util.List; import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.Module; /** * A general object that initializes one unique Gui...
Java
UTF-8
1,268
2.296875
2
[]
no_license
package com.yasoka.eazyscreenrecord.activities.live_youtube; import com.google.api.services.youtube.model.LiveBroadcast; public class EventData { private LiveBroadcast mEvent; private String mIngestionAddress; public LiveBroadcast getEvent() { return this.mEvent; } public void setEvent(L...
Java
UTF-8
10,509
2.03125
2
[]
no_license
package com.axel.akcosmetics.Buyers; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.app.AlertDialog; import android.content.DialogInterface; import android.co...
TypeScript
UTF-8
260
2.515625
3
[ "MIT" ]
permissive
import { RGBColor } from 'react-color' type Id<T> = string & { kind: T } export interface Palette { palette_id: Id<'palettedId'> uid: Id<'userId'> creator: string colors: RGBColor[] name: string likes: number created: string liked: boolean }
Java
UTF-8
2,807
2.25
2
[]
no_license
package com.atguigu.shoppingmall0224.type.fragment; import android.util.Log; import android.view.View; import android.widget.AdapterView; import android.widget.GridView; import android.widget.Toast; import com.alibaba.fastjson.JSON; import com.atguigu.shoppingmall0224.R; import com.atguigu.shoppingmall0224.base.BaseF...
Shell
UTF-8
1,494
2.59375
3
[]
no_license
#!/usr/bin/env bash #---------------------------------------------------- # Scripts does below # - Create RBAC rule for API server to kubelet access #---------------------------------------------------- # Author: Ansil H (ansilh@gmail.com) # Date: 11/25/2018 #---------------------------------------------------- sou...
Python
UTF-8
1,062
3.5
4
[]
no_license
# 10830 행렬 제곱 # 분할 정복으로 행렬의 거듭제곱을 빠르게 계산하는 문제 def matrix_mul(mat1, mat2, x): result = [[0] * x for _ in range(x)] for i in range(x): for j in range(x): for k in range(x): result[i][j] += mat1[i][k] * mat2[k][j] for i in range(x): for j in range(x): ...
Markdown
UTF-8
5,981
2.78125
3
[]
no_license
--- description: "How to Prepare Favorite Palak mishmash curry (Palong shaaker ghonto)" title: "How to Prepare Favorite Palak mishmash curry (Palong shaaker ghonto)" slug: 5807-how-to-prepare-favorite-palak-mishmash-curry-palong-shaaker-ghonto date: 2020-05-06T07:58:26.122Z image: https://img-global.cpcdn.com/recipes/f...
Python
UTF-8
417
4.0625
4
[]
no_license
def sum_and_pow(a1, a2): def my_sum(): return a1 + a2 def my_pow(a): return a * a return my_pow(my_sum()) print(sum_and_pow(1, 2)) print() # 9 def make_adder(x): def adder(n): return x + n return adder f = make_adder(10) print(f(5)) print(f(-1)) print() # 15 # 9 make_...
PHP
UTF-8
1,210
2.734375
3
[ "BSD-3-Clause" ]
permissive
<?php declare(strict_types=1); namespace EoneoPay\ApiFormats\External\Libraries\JsonApi; use EoneoPay\ApiFormats\External\Interfaces\JsonApi\JsonApiConverterInterface; use EoneoPay\ApiFormats\External\Interfaces\JsonApi\JsonApiHydratorInterface; use WoohooLabs\Yang\JsonApi\Schema\Document; class JsonApiConverter imp...
Java
UTF-8
142
1.570313
2
[]
no_license
package ch01.ex02; public class Error { public static void main(String[] args) { // null.println("Hello, world"); } }
JavaScript
UTF-8
1,635
2.953125
3
[]
no_license
canvas = document.getElementById('myCanvas'); ctx = canvas.getContext("2d"); car1_width = 120; car1_height = 70; car1_x = 10; car1_y = 10; car2_width = 120; car2_height = 70; car2_x = 10; car2_y = 10; car1_image = "https://i.postimg.cc/YqdnnNX1/car1.png" car2_image = "https://cdn.pixabay.com/photo/2012/04/12/23/48/car-...
Go
UTF-8
1,206
2.78125
3
[ "MIT" ]
permissive
package dbManager import ( "database/sql" "fmt" "log" ) // GetAllPortinformers ... todo description func GetAllPortinformers(db *sql.DB) map[int]string { var resultSet = map[int]string{} inputQuery := "SELECT id_portinformer, portinformer_description FROM portinformers" rows := runSelect(db, inputQuery) defe...
Java
UTF-8
334
1.570313
2
[]
no_license
package com.example.TrackHub.repository; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; import com.example.TrackHub.model.TeamMembers; import java.io.Serializable; @Repository public interface TeamMembersRepository extends CrudRepository<TeamMembers, Ser...
C++
UTF-8
3,248
3.125
3
[]
no_license
//基于TCP的简单网络通信demo //使用c++对tcp_socket进行封装 #include<iostream> #include<unistd.h> #include<sys/socket.h> #include<stdio.h> #include<stdlib.h> //atoi #include<string> #include<string.h> #include<arpa/inet.h> //htons inet_addr class TcpSocket{ public: TcpSocket():_sockfd(-1){} //1.创建套接字 bool Socket() ...
Python
UTF-8
419
4.03125
4
[]
no_license
# Assignment 2 H = 176 W = 145 Gh = input('Enter your height guess: ') Gw = input('Enter your weight guess: ') # if (Gh == 0 / Gw == 0)/(Gh == 0 & Gw == 0): if Gh > 0: if Gw > 0: if Gh > H & Gw > W: print("Both are Higher") elif Gh < H & Gw < W: print("Both are Lower") elif (Gh < H & Gw > W)/(Gh >...
Java
UTF-8
766
3.125
3
[]
no_license
package shuo.laoma.basic.c4; public class Demo { /** * @param args */ public static void main(String[] args) { int a = 25; System.out.println(Integer.toBinaryString(a)); //二进制 System.out.println(Integer.toHexString(a)); //十六进制 System.out.println(Long.toBinaryString(a)); //二进制 System.out.println(Lon...
Markdown
UTF-8
2,741
2.640625
3
[]
no_license
--- description: 'Лабораторная работа по Теме 1. VLAN, trunking 1.1' --- # Лабораторная по теме 1 {% file src="../../.gitbook/assets/lab001.zip" caption="Начальная конфигурация" %} В лабораторной работе может быть несколько заданий соответственно в папках \(task1, task2 и т.д.\). Участникам нужно будет загрузить кон...
JavaScript
UTF-8
259
2.859375
3
[ "MIT" ]
permissive
/** * Find two connected nodes using the quick find algorithm. * * @param {Array} ids * @param {Number} p * @param {Number} q * @return {Boolean} true if connected * @api public */ module.exports = function(ids, p, q) { return ids[p] === ids[q] }
C++
UTF-8
636
4.25
4
[]
no_license
/* Binoy Das Gupta Bitwise operators(AND,OR,XOR,Left shift,Right shift) 05-07-2021 */ #include<iostream> using namespace std; int main() { int x=11,y=5,z1,z2,z3,z4,z5; z1=x&y; z2=x|y; z3=x^y; z4=y<<1; z5=y>>1; cout<<"The value of X&Y ="<<z1<<endl; cout<<"The value of X|Y ="<<z2<<endl; ...
Markdown
UTF-8
1,568
2.71875
3
[]
no_license
### 格式要求 #### 标题格式: * 标题1:黑体、三号居中 * 标题2:黑体四号居左 * 标题3:黑体小四居左 * 标题4:黑体五号居左 **注:由于老师所给模板中有不在上述标题格式中的项目名称和作业名称,特将其分别作为五级标题和六级标题** #### 段落要求:单倍行距,段前0.5行、段后0.5行 #### 文字格式:首行缩进,宋体五号,单倍行距 #### 图表格式:图、表均需有图题、表题,包括编号、名称。采用小5号宋体加粗,居中,编号按照章节编排,如图1-1、图2-1这种形式 **所有的英文字体都采用Times New Roman** ### 使用说明 #### 编写与预览 1. 打开typora->文件->偏好设置...
C++
UTF-8
940
2.78125
3
[ "MIT" ]
permissive
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <CL/sycl.hpp> #include <iostream> using namespace cl::sycl; int main() { constexpr int N = 100; auto R...
C++
UTF-8
2,611
2.890625
3
[]
no_license
#pragma once #include <set> #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <climits> #include "constants.h" #include "player.h" #include "point.h" #include "utils.h" using RP::Point; using namespace std; #define OBSTACULE_RADIUS 5 /** * \defgroup Pathpl...
PHP
UTF-8
2,513
2.890625
3
[]
no_license
<?php use Illuminate\Database\Seeder; use Carbon\Carbon; class A06_RacesCompetitors extends Seeder { private const MAX_COMPETITOR_COUNT_PER_RACE = 8; /** * Run the database seeds. * * @return void */ public function run() { $types = DB::table('types')->get(); ...
Python
UTF-8
4,954
2.96875
3
[]
no_license
"""User model tests.""" # run these tests like: # # python -m unittest test_user_model.py import os from unittest import TestCase from models import db, User, Message, Follows from flask_bcrypt import Bcrypt # BEFORE we import our app, let's set an environmental variable # to use a different database for tests ...
Java
UTF-8
1,635
2.890625
3
[]
no_license
package engine; import board.Board; import board.Color; public class PositionEvaluatorProcess implements Runnable { private Stockfish engine; //Stockfish est associe a un processus private String fen; private Color currentPlayer; public boolean isAlive=false; public Evaluation evaluation=null; public Position...
Java
UTF-8
883
2.0625
2
[]
no_license
package com.example.gameSystem.service; import com.example.gameSystem.dao.LotteryRecordDao; import com.example.gameSystem.entity.LotteryRecord; import org.apache.http.client.utils.DateUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util....
Java
UTF-8
4,377
1.976563
2
[]
no_license
package com.nettactic.commerces.model; import java.io.Serializable; import org.json.JSONObject; /** * 订单记录 * * @author ruan * */ public class MyOrderModel implements Serializable { /** * */ private static final long serialVersionUID = 1L; private String OrderNo = ""; ...
Markdown
UTF-8
3,264
3.25
3
[ "MIT" ]
permissive
## Flame **Flame** 是一个 PHP 框架,借用 PHP Generator 实现 协程式 的编程服务。目前,flame 中提供了如下功能: 1. 协程核心; 1. 核心协程函数; 2. [时间协程函数](/php-flame/flame_time) - 调度休眠、定时器; 3. [操作系统函数](/php-flame/flame_os) - 异步进程、PHP 路径; 4. [日志输出](/php-flame/flame_log); 2. [协程式网络](/php-flame/flame_net); 1. [HTTP 客户端](/php-flame/flame_net_http) - 支持 ...
Python
UTF-8
408
3.15625
3
[]
no_license
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Time : 19-9-4 下午4:00 # @Author : nan # @File : utils.py import random def generate_random(s, e): """ 生成随机进度 :param s: 开始 :param e: 结束 :return: 取开始结束区间 """ if s == e: s = s - 2 return random.randint(s, e) if __name__...
JavaScript
UTF-8
2,453
3.203125
3
[]
no_license
$(document).ready(function(){ //Display information modal box $(".what").click(function(){ $(".overlay").fadeIn(1000); }); //Hide information modal box $("a.close").click(function(){ $(".overlay").fadeOut(1000); }); // Variables var secretNumber; var checkInput; var u...
C++
UTF-8
10,027
3.234375
3
[]
no_license
#include <iostream> #include <fstream> #include <string> #include "Player.h" #include "Team.h" using namespace std; int main() { Player playArray[100]; //array of players. Max is 100 string name; string pos; int stat; int playerCounter = 0; //keeps track of which player is referenced in th...
C++
UTF-8
1,169
3.171875
3
[]
no_license
#ifndef FIGURE_H #define FIGURE_H #include "Point.h" #include <vector> enum COLOR { WHITE, BLACK, GRAY, BLUE }; std::map < COLOR, glm::vec3> Color; class Figure { private: Point position; COLOR color; bool selected; bool firstMove; public: Figure(Point position, COLOR color); ~Figure() {} virtual void select()...
Markdown
UTF-8
1,442
2.734375
3
[]
no_license
第一原理思维 爱情课 财富课 财务自由度=投资净收益/总支出 导致贫穷的四个因素 - 意外 - 疾病 - 无规划的支出 - 脆弱的投资系统 吸引力法则:关注什么就吸引什么。 从目标出发,努力聚集资源。 富人思维:不给自己设限,充分利用包括钱在内的所有资源努力达成目标,而不局限于自己现在的处境和条件。 以终为始,你真正的目标是什么? 理财先规划 货币每天都在贬值,仅仅存钱是不够的。 以为人性的即时满足的原因,我们往往会拖延 克服拖延的方法 任务分解 将大任务分解为小任务,越具体越好,并且要切实可行。 任务达成,即时反馈,给自己奖励。 目标是可执行的,可达到的 愿望可以...
JavaScript
UTF-8
867
2.53125
3
[]
no_license
import _ from "lodash"; import { CREATE_INVENTORY, EDIT_INVENTORY, FETCH_INVENTORY, DELETE_INVENTORY_ITEM } from "../actions/types"; const initialState = {}; export default (state = initialState, action) => { switch (action.type) { case CREATE_INVENTORY: return { ...state, [action....
JavaScript
UTF-8
295
3.90625
4
[]
no_license
//Prompts and Alerts var width = prompt("we are calculationg the area of a rectangle. \nPlease enter the width"); var height = prompt("Please enter the height."); var area = width * height; //console. log(area);// var result = "The area of your rectangle is " + area + " sq feet"; alert(result)
Shell
UTF-8
289
3.140625
3
[]
no_license
#!/bin/bash # # paarsuse kontroll # echo -n "Sisesta suvaline täisarv: " read arv # arvutamine jääk 2-ga jagamisel jaak=$(( $arv % 2 )) # 4 % 2 => 0 -> siis arv on paaris if [ $jaak -eq 0 ] then echo "$arv on paaris" else echo "$arv on paaritu" fi # tingimuse kontroll on lõppenud
Java
UTF-8
802
3.078125
3
[]
no_license
//**************************************************************************************** // Author: Tianlong Song // Name: Main.java // Description: Main class for testing // Date created: 02/09/2015 //**************************************************************************************** import java.io.*; import j...
Java
UTF-8
2,314
1.984375
2
[]
no_license
package vc.thinker.b2b2c.action; import java.io.IOException; import java.io.PrintWriter; import java.util.Date; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotatio...
Markdown
UTF-8
2,127
2.8125
3
[]
no_license
--- title: 为 R 代理 author: gaoch date: '2019-10-28' slug: r-proxy categories: - R tags: - R - proxy --- 今天想用 scholar 包抓一下自己的 Google Scholar profile,发现不翻墙打不开。 要设代理,参考了 @GuangchuangYu 发表的[一次解决所有代理问题](https://guangchuangyu.github.io/cn/2018/09/proxychains/), 却仍然没有解决自己的问题。 因为我用的是 Windows,proxychains 却只能用于类 Unix 系统。...
PHP
UTF-8
246
2.546875
3
[]
no_license
<?php interface IStock { public function ajouter($stock); public function lister(); public static function getById($id); public static function getQuantiteByLivreId($id); public function modifier($stock); public function supprimer($id); }
Swift
UTF-8
268
3.40625
3
[]
no_license
import UIKit func isPrime(_ number: Int) -> Bool { return number > 1 && !(2..<number).contains { number % $0 == 0 } } var i = 1 var num = 0 var count = 0 while count < 1001 { i += 1 if isPrime(i) { num = i count += 1 } } print(num)
C++
UTF-8
1,582
2.96875
3
[]
no_license
/** * \file ParticlePool.h * * \author Theo Chupp * * \brief Controller class for the snowfall */ #pragma once #include "ParticleList.h" class CParticlePool { public: CParticlePool(); virtual ~CParticlePool(); /** \brief Copy constructor disabled */ CParticlePool(const CParticlePool&) = delete; /** \brief Assig...
Python
UTF-8
1,093
2.671875
3
[]
no_license
# class for hold compartment class Compartment: def __init__(self, id=0, sediment_rad=0, remain_fluid=0, sed_solid_frac=0, fluid_solid_frac=0, sed_size=None, fluid_size=None, fluid_out=0, fluid_size_out=None, fluid_out_frac=0, ...
Java
UTF-8
710
2.296875
2
[]
no_license
package com.mayur.springbootstarter.topic; public class Topic { private String id; private String name; private String descritption; public Topic() { } public Topic(String id, String name, String descritption) { super(); this.id = id; this.name = name; this.descritption = descritption...
Java
UTF-8
2,823
3.0625
3
[]
no_license
package ccc19; import java.io.*; import java.util.*; public class Question4 { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); static StringTokenizer t; static int attractions = 0; static int max_toVisit = 0; static int[] score; static Map<String, Integer> map = new HashMap<>(); ...
Shell
UTF-8
284
3.0625
3
[ "MIT" ]
permissive
#!/bin/bash # Mihai Criveti: generate LOGIN splash for MVS # Usage: ./generate-logo.sh dino > out logo=$1 IFS=$'\n' linum=7 for line in $(cat ${logo}) do echo " \$SBA (${linum},15)\n" echo " DC C'$line'\n" echo " \$SF (SKIP,HI)\n" ((linum++)) done
Markdown
UTF-8
778
2.796875
3
[]
no_license
# watch-files A quick intro to node + gulp that is helpful for almost any project. **NOTE:** This is meant to be a tool if you are not using an IDE. If you are using an IDE and have a compiler running then this will likely not be of much assistance to you ## Pre-requesites for this tool - NodeJs must be installed ...
SQL
UTF-8
2,994
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 21-02-2018 a las 09:24:24 -- Versión del servidor: 10.1.29-MariaDB -- Versión de PHP: 7.2.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
Java
UTF-8
512
2.078125
2
[]
no_license
package com.wgq.service.impl; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.wgq.dao.UserDataBaseDao; import com.wgq.entity.User; import com.wgq.service.UserDataBaseService; @Service public class UserDataBaseServiceImpl implements UserDataBaseService { @Resource priva...
C++
UTF-8
3,714
2.609375
3
[ "UCAR" ]
permissive
/** * This file tests the data-chunk transmission of class `Channel`. * * Copyright 2017 University Corporation for Atmospheric Research. All rights * reserved. See the file COPYING in the top-level source-directory for * licensing conditions. * * @file: ChunkChannel_test.cpp * @author: Steven R. Emmerson */...
Python
UTF-8
5,159
2.9375
3
[]
no_license
import sqlite3 import csv import re regex = r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b' def quit_application(): print("***********************************************") print('Thanks for visiting') print("***********************************************") exit() def writetodb(...
C++
UTF-8
1,038
3.09375
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cassert> using namespace std; typedef long long ll; ll GetInterestingCount(const char a, const char b, const ll X, const ll Y) { ll Count = 0; for (int i = 3; i <= 17; i++) { string Cur = ""; for (int j = 0...
Markdown
UTF-8
637
2.625
3
[ "BSD-3-Clause" ]
permissive
# return-jsx-in-map map 的返回值目前限制必须为一个 JSX Element。如不想多一层标签嵌套,可使用 Fragment 包裹 map 返回的值。 ## Rule Details Examples of **incorrect** code for this rule: ```jsx <View> {list.map((item, index) => { return ( item > 1 ? <View>1</View> : <View>2</View>); })} </View> ``` Examples of **correct** code for this rule: ...
Markdown
UTF-8
1,016
3.0625
3
[]
no_license
# Hacklahoma-2019 ![Hive Wars Logo](/Bees%20vs%20Wasps/Images/Logo.jpg) ## Hacklahoma 2019 Team Members: ### Drew Harris [@oudrew] ### Jacob Courtney [@] ### Jacob Robinett [@robibuilder] ### Max Brooks [@maxrbooks99] ## General Description: Hi! Our project is titled HiveWars! This is a 2 player virtual card game wr...
C++
UTF-8
999
2.90625
3
[]
no_license
#pragma once #include "Mesh.h" #include "Joint.h" #include "VAO.h" #include "Texture.h" #include <vector> class AnimatedMesh : Mesh { public: AnimatedMesh(VAO* mesh, Texture* texture, Joint* rootJoint, unsigned int numberOfJoints); ~AnimatedMesh(); virtual void draw() override; // returns the model VAO* getMo...
Python
UTF-8
2,474
3.109375
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Sat Jul 14 15:05:47 2018 @author: Administrator """ #收集数据 #添加时间函数库 from time import sleep #添加json库 import json #添加urllib2库 import requests #@retX:样本玩具特征矩阵 #@retY:样本玩具的真实价格 #@setNum:获取样本的数量 #@yr:样本玩具的年份 #@numPce:玩具套装的零件数 #@origPce:原始价格 def searchForSet(retX,retY,setNum,yr,numPce,...
Java
UTF-8
1,622
2.125
2
[]
no_license
package X; import android.graphics.Camera; import android.graphics.Matrix; import android.view.animation.Animation; import android.view.animation.Transformation; import android.widget.ImageView; /* renamed from: X.2IS reason: invalid class name */ public class AnonymousClass2IS extends Animation { public int A00...
Java
UTF-8
927
2.03125
2
[]
no_license
package com.seleniumTesting.dominos; import com.seleniumTesting.Browser; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import java.util.List; /** * Created by jerem on 5/12/2016. */ public class LocationSearchResults { public static final String url = "http://www.dominos.com"; //di...
Java
UTF-8
961
1.601563
2
[]
no_license
/*************************************************************************** * Product made by Quang Dat * **************************************************************************/ package com.vtc.gamerid.gateway.game.service; import java.util.List; import com.vtc.gamerid.gateway.common.dao.entity.GameRankingItem...
Python
UTF-8
20,913
3.859375
4
[]
no_license
# # Regular Expressions import re # # Regular expressions allow us to search a text for strings matching a specific pattern. # # Besides Python and other programming languages we can also use command line tools that know how to apply regexs, like grep, sed, or awk. log = "July 31 07:51:48 mycomputer bad_process[12345...
Python
UTF-8
384
3.21875
3
[]
no_license
from PIL import Image im = Image.open('resources/cave.jpg') (w, h) = im.size even = Image.new('RGB', (w//2, h//2)) odd = Image.new('RGB', (w//2, h//2)) for i in range(w): for j in range(h): p = im.getpixel((i, j)) if (i + j) % 2 == 1: odd.putpixel(( i//2, j//2 ), p) else: even.putpixel(( i//2, j//2), p...
Markdown
UTF-8
12,110
2.75
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: 'Tutorial: Configure Salesforce for automatic user provisioning with Azure Active Directory| Microsoft Docs' description: Learn the steps required to perform in Salesforce and Azure AD to automatically provision and de-provision user accounts from Azure AD to Salesforce. services: active-directory author: je...
Java
UTF-8
649
2.0625
2
[]
no_license
package com.product.product.security; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @Slf4j @Component public class LoginSuccessHandler {// implements ServerAuthenticationSuccessHandler { // // private ServerRedirectStrategy redirectStrategy = new DefaultServerRedirectStrategy()...
C++
UTF-8
528
3.0625
3
[]
no_license
#include <iostream> #include <sstream> #include <string> #include <cctype> using namespace std; int main() { string line, word; while(getline(cin, line)) { int flag = 0; int count = 0; char c; istringstream stream(line); while (stream.get(c)) { if (flag == 0) { if (isalp...
Java
UTF-8
1,249
2.28125
2
[]
no_license
import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @WebServlet(name = "Servlet", value = "/ht...
C
UTF-8
1,503
2.578125
3
[ "MIT" ]
permissive
/* ** main.c */ #include <stdio.h> #include <stdlib.h> #include "tnode.h" #include "build_structs.h" #include "char_set.h" #include "data.h" #include "parse_regex.h" #include "program_args.h" #include "altlist.h" #include "grouplist.h" #include "vlrlist.h" /* Global glob g */ gg g; int num_words_already_output = 0; ...
PHP
UTF-8
2,804
2.546875
3
[]
no_license
<?php include ("configReclammation.php"); include ("Reclammation_class.php"); class crudReclammation{ public $conn; function __construct() { $c=new config(); $this->conn=$c->getConnexion(); } function insertReclammation($rect,$conn){ $req1="INSERT INTO reclammations (messageR,etat,user_id) VALUES (...
C
UTF-8
2,197
2.875
3
[]
no_license
#include <sys/types.h> #include <sys/socket.h> #include <stdio.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #include <stdlib.h> #include <pthread.h> #include <string.h> #include <signal.h> int sendState = 0; int sockfd; pid_t pid; void *thread_recieveData(void *arg); void *thread_sendSignal(v...
C#
UTF-8
822
2.5625
3
[]
no_license
using System; using System.Threading; using System.Threading.Tasks; using Domain; using MediatR; using Persistence; namespace Application.Paraleleet { public class Details { public class Query : IRequest <Paraleljaa> { public Guid ParaleljaaId {get; set;} } public c...
Shell
UTF-8
2,082
3.1875
3
[]
no_license
#!/bin/bash # configFinderDefaults.sh # version: 1.0 # created: 23 Feb 2018 # author: Tobias Morrison # # A script to configure sane defaults in a new user account. # Choices are based on years of feedback from clients. Nothing #+ is forced here and users can customise their envoiroment #+ after this has run. # # Desi...
Java
UTF-8
227
1.703125
2
[ "Apache-2.0" ]
permissive
package net.sf.cotta.memory; import java.nio.channels.FileChannel; public class AccesssUtil { public static FileChannel createInMemoryOutputChannel() { return new InMemoryOutputFileChannel(new ByteArrayBuffer()); } }
Java
UTF-8
1,763
3.640625
4
[]
no_license
import java.util.Scanner; public class arrayToBST{ class Node{ int key; Node left,right; Node(){} } class BST{ Node root; BST(){ root=null; } Node preInsert(int[] arr,int start,int end){ if(start>end){ return null; } Node root=new Node(); root.key=arr[start]; i...
C++
UHC
2,575
4.15625
4
[]
no_license
// Ÿ Է¹޴ Լ, Ȯϴ Լ, ϴ Լ ϰ Ȱϴ α׷ //#include <iostream> //using namespace std; // //// (Ÿ) //int input(); //bool process(int year); //void output(int year, bool result); // //int main() //{ // // Input, processing, output // int year = input(); // bool result = process(year); // output(year, result); // ...
Java
UTF-8
2,868
2.296875
2
[]
no_license
package com.github.saphyra.apphub.service.skyxplore.game.domain.data.stored_resource; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import java.util.List; import java.util.UUID; import static org.asser...
Shell
UTF-8
1,370
3.484375
3
[ "MIT" ]
permissive
#!/usr/bin/env bash set -e # # Configures the server's private IP and sets zsh as the default shell # # Configure this machine's private network apt update apt install -y jq private_ip="$(curl -s http://169.254.169.254/v1.json | jq '.interfaces[1].ipv4.address' | tr -d '"')" echo "network: version: 2 renderer: n...
Java
UTF-8
1,024
3.625
4
[ "MIT" ]
permissive
package com.greghaskins.spectrum; import java.util.function.Supplier; /** * This is a convenience class to make working with Java closures easier. Variables from outer * scopes must be {@code final} to be referenced inside lambda functions. Wrapping objects in a * {@link #Variable} instance allows you to get/set v...
C#
UTF-8
2,197
3.421875
3
[]
no_license
using System; namespace Battleship { /// <summary> /// Represents a cell in the board. /// </summary> public class Cell { #region Fields private bool isBusy; private string name; private int locationX; private int locationY; private Ship ship; ...
Java
UTF-8
3,344
2.390625
2
[]
no_license
package cn.sunshine.servlet; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServl...
Java
UTF-8
13,373
1.789063
2
[]
no_license
package com.sample.soundcloud.network.models; import android.text.TextUtils; import com.google.gson.annotations.SerializedName; import com.sample.soundcloud.realm.models.RealmTrack; /** * Created by etiennelawlor on 3/21/15. */ public final class Track { // Sample JSON // { // kind: "track", // ...
PHP
UTF-8
1,808
2.828125
3
[ "MIT" ]
permissive
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Image extends Model { //Constants image's type const MAIN_BANNER = 1; const GENERAL_BANNER = 2; const SIDE_BAR = 3; const LOGO = 4; const FOOTER = 5; const DIRECTORY = 'images/upload/image'; /** * The database table used by th...
C#
UTF-8
5,510
2.75
3
[]
no_license
using System; using System.Linq; using Inventory.Data; using Inventory.ServiceLayer; using NUnit.Framework; namespace Inventory.Tests { [TestFixture] public class ServiceTests { private MerchantDatabase m_MerchantDatabase; [TestFixtureSetUp] public void Setup() { ...
Python
UTF-8
165
3.0625
3
[]
no_license
N = str(input()) lenN = len(N) fN =N[0:(lenN - 1)//2] lN =N[(lenN + 3)//2-1:] print(("No","Yes")[(0,1)[fN == fN[-1::-1]]*(0,1)[lN == lN[-1::-1]]*(0,1)[lN == fN]])
Java
UTF-8
1,351
2.703125
3
[]
no_license
package com.profilewise.model; import java.util.List; import java.util.Arrays; import java.util.Optional; import java.util.stream.Stream; public enum RoleEnum { Admin("Admin", Arrays.asList("Admin", "Manager", "Employee", "HOD", "Student"), PermissionEnum.ALL), Manager("Manager", Arrays.asList("Manager"...
Python
UTF-8
4,002
2.875
3
[]
no_license
import re from itertools import product def getPNList(): """ Builds initial list of Part Numbers """ pn_re = re.compile(r'\d{3}-\d{5}') all_pns = [] while True: print "Qual Build PN List" print "==================" print '\n'.join(all_pns) print new_...
Markdown
UTF-8
5,955
2.734375
3
[]
no_license
Annual Reading List =================== This is a list of books and articles to read every year. There will be up to 10 items on this list at a time. Titles will be switched out as they become stale to me. Previously listed works are [archived](/archive.md). - [x] = has been read this year. Books ===== ##### 1. - [x...
Python
UTF-8
1,183
2.5625
3
[ "MIT" ]
permissive
# import tinder # import pytest # def test_redis_queue(): # q = tinder.RedisQueue('queue_test') # q.clear() # assert q.available() == 0 # # with pytest.raises(Exception): # # q.pop_at_least_one() # q.push('abc') # q.push(3.5) # q.push(-3) # q.push(4) # batch = q.pop_at_leas...
Markdown
UTF-8
4,096
2.640625
3
[ "MIT" ]
permissive
## Generalized Product Quantization Network for Semi-supervised Image Retrieval Tensorflow implementation of GPQ Accepted to CVPR 2020 - <a href="https://openaccess.thecvf.com/content_CVPR_2020/papers/Jang_Generalized_Product_Quantization_Network_for_Semi-Supervised_Image_Retrieval_CVPR_2020_paper.pdf">paper</a> ...
PHP
UTF-8
3,009
2.703125
3
[]
no_license
<?php /** * TaskAssignment * * This class has been auto-generated by the Doctrine ORM Framework * * @package rdbeportal * @subpackage model * @author Your name here * @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $ */ class TaskAssignment extends BaseTaskAssignment { ...
Markdown
UTF-8
1,596
3.109375
3
[]
no_license
## Participants * Joshua Concon * Yon Lin Brandon Liang * Arianne Franchesca Lavada * Chiaho Lee * Peng Jie Lin * Ian Xu * Yuheng Wu ## Sprint Goal Our sprint goal for Sprint 2 is to complete all assigned user stories and have a working demo ready for our meeting with the TA and Product Owner. ## User Stories To Be...
C++
UTF-8
1,682
2.828125
3
[ "BSD-3-Clause", "LicenseRef-scancode-free-unknown" ]
permissive
#include "peano/grid/CellFlags.h" #include <sstream> std::string toString( const peano::grid::CellFlags& cellFlags ) { switch (cellFlags) { case peano::grid::Undefined: return "undefined"; case peano::grid::Leaf: return "leaf"; case peano::grid::StationaryButIrregular: return "station...
Python
UTF-8
295
2.671875
3
[ "MIT" ]
permissive
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Dec 18 15:39:26 2018 @author: max """ import os def walkfs(startdir, findfile): output=[] for root, dirs, files in os.walk(startdir): if findfile in files: output.append(root) return root
Python
UTF-8
1,018
3.703125
4
[]
no_license
import random def generate_random_octet(octets=4): ip_range = tuple(range(1, 256)) for _ in range(octets): yield str(random.choice(ip_range)) def main(): # Keep Asking until they give you a number!!! # Been Benchmarking with 500,000 prompt = False if prompt: while True: ...
Python
UTF-8
1,212
2.9375
3
[]
no_license
import numpy as np class DecisionStumps(): def __init__(self): self.best_cut = None def getRule(self,X_input,y,weight): X = X_input.copy() min_error = 9999.999 #Calculates every single cut possible for c in range(len(X[0])): errors = (X[:,c] != y) ...
Markdown
UTF-8
1,811
2.9375
3
[]
no_license
# ViewDeckStoryboardExample This is a very, very simple example of showing how to integrate [ViewDeck](https://github.com/Inferis/ViewDeck) into an Storyboard project on XCode. It consists of a "Middle" view controller & a "Left" view controller, very similar to Facebook for iOS v4.x & v5.0. With some modification...
Java
UTF-8
284
2.1875
2
[]
no_license
package in.co.srdt.unif.enums; public enum EmailType { Work_Email("Work_Email"), Home_Email("Home_Email"); private String description; private EmailType(String description) { this.description = description; } public String getDescription() { return description; } }
Rust
UTF-8
968
3.125
3
[]
no_license
fn digest_sha256_0(s: &str) -> String { extern crate crypto; use crypto::digest::Digest; let mut digest = crypto::sha2::Sha256::new(); digest.input_str(s); return format!("{}", digest.result_str()); } fn digest_sha256_1(s: &str) -> String { use sha2::Digest; let mut digest = sha2::Sha256::new(); digest.updat...
Java
UTF-8
1,028
2.265625
2
[]
no_license
package com.angelis.tera.game.presentation.network.packet.server; import java.nio.ByteBuffer; import com.angelis.tera.game.presentation.network.connection.TeraGameConnection; import com.angelis.tera.game.presentation.network.packet.TeraServerPacket; import com.angelis.tera.game.process.model.player.Player; p...
Swift
UTF-8
2,282
3.25
3
[]
no_license
// // MediaItem.swift // SimpleScrob // // Created by Josh Freed on 10/9/17. // Copyright © 2017 Josh Freed. All rights reserved. // import UIKit import MediaPlayer typealias MediaItemId = MPMediaEntityPersistentID // // Representation of a song as it exists in the media library right now // struct MediaItem { ...