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
551
4.28125
4
[]
no_license
#include<stdio.h> int sum(int, int); int product(int, int); void swap(int*, int*); int main(){ int num1, num2; puts("Enter two number:\n"); scanf("%d%d",&num1,&num2); printf("Sum is %d\n",sum(num1, num2)); printf("Porduct is %d\n",product(num1, num2)); printf("Before swapping A= %d, B= %d\n",num1, num2); swap(&...
Markdown
UTF-8
568
2.515625
3
[]
no_license
_Senior Operations Engineer with more than 10 years of experience in DevOps environments—specializing in observability, Kubernetes, large scale time series databases, and physical infrastructures._ In my career I've focused on building with quality. The systems I build are reliable, are maintainable, and have an empha...
Python
UTF-8
1,237
3.578125
4
[]
no_license
# Define an array, where each element will be one line of verse poem_array = [] # Open the LaTeX file created by pandoc containing the text of the poems with open("latex_poems.tex", "r") as poems: lines = poems.readline() for line in poems: # Add each line in the file to a new element in the array ...
Ruby
UTF-8
564
2.5625
3
[]
no_license
class AnonymousPerson extend ActiveModel::Naming def first_name "Anonym" end def last_name "Användare" end def name first_name end def to_s "Anonym" end def id nil end # Use some dynamic programming voodo for syntactic sugar, again, DRY ...
Python
UTF-8
2,647
2.859375
3
[ "MIT" ]
permissive
#!/usr/bin/env python3 from generators.workflows import Workflow from generators.interactive import generate_task_list_interactively from generators.tasks import * import sys import argparse def parse_args(args): """ By default, argparse treats all arguments that begin with '-' or '--' as optional in the hel...
Python
UTF-8
3,661
4.25
4
[]
no_license
# 기초 정렬 # 문제 2750번 수 정렬하기 # Sorting(정렬) # O(nlogn) 정렬 : 퀵 정렬(quick sort), 병합 정렬(merge sort), 힙 정렬(heap sort) import sys r = sys.stdin.readline n = int(r()) input_data = list(int(r()) for _ in range(n)) input_data.sort() for i in input_data: print(i) # # 병합 정렬 # def merge_sort(data): # # 리스트가 2개 미만일 경우 ...
C#
UTF-8
1,638
2.53125
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraScroll : MonoBehaviour { public float zoomSpeed = 2.0f; public float smoothSpeed = 2.0f; public float minOrtho = 3.0f; public float maxOrtho = 5.0f; public float minY = 0; public float maxY = 3.0f; private float...
PHP
UTF-8
231
2.859375
3
[]
no_license
<?php require 'connectie.php'; $sql = 'SELECT * FROM gebruikers'; try{ $result = $db->query($sql); foreach ($result as $row){ echo $row['voornaam'] . "<br>"; } }catch(PDOexception $e){ echo "Error: " . $e; }
JavaScript
UTF-8
1,544
2.65625
3
[]
no_license
function itemChange(){ var changeItem = ["배송준비","배송중","배송완료"]; var changeItem2 = ["취소대기","취소완료"]; var selectItem = $("#category").val(); $('#subcategory').empty(); if(selectItem == "1"){ var option = $("<option value=''>분류 선택</option>"); $('#subcategory').append(option); for(var count = 0; count...
C++
UTF-8
585
2.875
3
[]
no_license
#include "servo.cpp" #include <csignal> #include <iostream> #include "mraa.hpp" int running=1; void sig_handler(int signo) { if (signo == SIGINT) { printf("closing PWM nicely\n"); running = 0; } }; int main() { signal(SIGINT, sig_handler); Servo claw(15),doorl(13,false),doorr(12,false); whi...
Go
UTF-8
972
2.734375
3
[]
no_license
package handle import ( "github.com/gin-gonic/gin" "github.com/sirupsen/logrus" "go-dynamicKey/pkg/errno" "net/http" ) type Result struct { Code int `json:"code"` Message string `json:"message"` Data interface{} `json:"data"` } func SendBadRequest(c *gin.Context) { ...
Markdown
UTF-8
600
2.9375
3
[]
no_license
# crypto ## Algoritmo de criptografia Criptografia inspirada pela cifra de César (ouvi sobre em uma aula), os caracteres das letras são adicionados da quantidade de letras presentes na palavra em que estão ("oi" vira "qk", e "oii" vira "rll"). Letras maiúsculas continuam maiúsculas, e o mesmo para minúsculas. Os númer...
C#
UTF-8
2,578
2.703125
3
[]
no_license
/********************************************************************** * Autor: Leandro Dornela Ribeiro * Contato: leandrodornela@ice.ufjf.br * Data de criação: 12/2018 * Modificação: * ********************************************************************/ using UnityEngine; /// <summary> /// Classe mãe para ...
Java
UTF-8
5,274
2.203125
2
[]
no_license
package com.lithouse.client; import static com.lithouse.client.Constants.DEBUG_TAG; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.ParseException; import org.apache.http.client.ClientProtoco...
Python
UTF-8
3,940
3.125
3
[ "MIT" ]
permissive
# Module to persist (save/load) profiles created in the application Keep Up The Pace import shelve from random import randrange import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))) import libs.applibs.profilem.profile as profile import libs.applibs.profilem.enumandc...
Java
UTF-8
622
2.1875
2
[]
no_license
package com.student.reg.dto; public class StudentCourseDTO { private int studentcourseID; private int userId; private int courseId; public int getStudentcourseID() { return studentcourseID; } public void setStudentcourseID(int studentcourseID) { this.studentcourseID = student...
Markdown
UTF-8
640
2.6875
3
[]
no_license
# GNU_Radio_Guitar # Description This project uses GNU Radio Companion to create digitial guitar pedals. I created 3 pedals for the guitar. They include: * Cosine Modulation (ie Tremelo) * Delay * Railing (ie Overdrive) # Installation The attached files can be simply run through the GNU Radio Companion GUI. # Hardw...
JavaScript
UTF-8
546
2.625
3
[ "MIT", "BSD-3-Clause" ]
permissive
var logic = function( currentDateTime ){ // 'this' is jquery object datetimepicker if(currentDateTime!==null){ if( currentDateTime.today()===newDate.today() ){ this.setOptions({ minTime:currentTime }); }else{ this.setOptions({ minTime:'0:00' }); } } }; jQuery('#timeStart1').datetimepick...
C
UTF-8
1,129
3.484375
3
[]
no_license
#include<stdio.h> #include<stdlib.h> struct stack{ int max; char ch[20]; int top; }; void push(char element,char *st,int *top){ *top=*top+1; st[*top]=element; } char pop(struct stack *st){ if(st->top==-1) return -1; char ch=st->ch[st->top]; st->top-=1; return ch; } void display(char postfix[]){ printf("Testing\...
JavaScript
UTF-8
4,483
2.515625
3
[]
no_license
const token = document.getElementById("_csrf").value; Vue.http.headers.common['X-CSRF-TOKEN'] = token; var app = new Vue({ el: '#display-manager', data: { display: { id: 0, name: '', diagonal: '', density: '', idDisplayType: 0, idR...
TypeScript
UTF-8
166
2.65625
3
[]
no_license
export class Core { constructor() { console.log('Core module loaded!'); } getName(name: string): string { return `Hello ${name}`; } }
C++
WINDOWS-1251
18,401
3.5
4
[]
no_license
#include<iostream> #include<vector> #include<string> #include<set> #include<deque> #include<map> using namespace std; class vertex;// , edge class edge { vertex* begin;//и , vertex* end;// public: edge() { this->begin = 0; this->end = 0; } edge(vertex* Begin, vertex* End) { this->begin =...
C#
UTF-8
885
2.578125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Coopec_Lib { public class PhotoClient { private int id; private string photo; public int Id { get { return id; } set { id = value; } } privat...
Java
UTF-8
1,252
2.171875
2
[]
no_license
package tech.sosa.triage_assistance_service.applications.application; import org.everit.json.schema.Schema; import org.json.JSONObject; import org.json.JSONTokener; import tech.sosa.triage_assistance_service.shared.application.service.ApplicationRequest; import tech.sosa.triage_assistance_service.shared.applicat...
Markdown
UTF-8
1,553
3.1875
3
[]
no_license
# My Personal MD Cheatsheet ## Headers ``` # H1 ## H2 ### H3 #### H4 ##### H5 ###### H6 ``` --- ## Emphasis Italics, with *asterisks* or _underscores_. Strong emphasis, aka bold, with **asterisks** or __underscores__. Combined emphasis with **asterisks and _underscores_**. Strikethrough uses two tildes. ~~Scratch ...
C++
UTF-8
1,393
3.828125
4
[]
no_license
// 9_6.h // Node.h // 节点类模板 #ifndef NODE_H #define NODE_H template<class T> class Node{ private: Node<T> * next; // 指向后继节点的指针 public: T data; // 数据域 Node (const T &data, Node<T> * next=0); // 构造函数 void insertAfter(Node<T> * p); // 在本结点之后...
JavaScript
UTF-8
1,866
2.828125
3
[ "MIT" ]
permissive
var buster = typeof window !== 'undefined' ? window.buster : require('buster'); var assert = buster.assert; var fail = buster.referee.fail; var when = require('../when'); var sentinel = {}; function assertFulfilled(s, value) { assert.equals(s.state, 'fulfilled'); assert.same(s.value, value); } function assertRejec...
C++
UTF-8
623
2.78125
3
[ "MIT" ]
permissive
#ifndef BUTTON_H #define BUTTON_H #include <Particle.h> class Button { String name; String currentStatus; public: uint16_t x0, x1; uint16_t y0, y1; uint16_t w, h; String buttonText; uint16_t textOffsetLeft; uint16_t textOffsetTop; Button(String name, uint16_t x0, uint16_t y0, ui...
Markdown
UTF-8
3,170
3
3
[]
no_license
Exercices : interagir avec une base de données via Python Attention : Afin de garder les choses simples et vous permettre de vous concentrer sur les problématiques liées aux bases de données, les applications que vous produirez dans le cadre de ces exercices seront sans interfaces graphiques et pour un usage théoriqu...
TypeScript
UTF-8
1,932
2.609375
3
[ "MIT" ]
permissive
import CodeMirror from 'codemirror'; import 'codemirror/addon/mode/simple'; // https://codemirror.net/demo/simplemode.html // TODO support error linting (CodeMirror as any).defineSimpleMode("zaml", { // The start state contains the rules that are initially used start: [ // Block labels {regex: /#[^#\s\n}]...
Markdown
UTF-8
8,142
3.046875
3
[]
no_license
# 离屏渲染 ##GPU屏幕渲染有两种方式: (1)On-Screen Rendering (当前屏幕渲染) 指的是GPU的渲染操作是在当前用于显示的屏幕缓冲区进行。 (2)Off-Screen Rendering (离屏渲染) 指的是在GPU在当前屏幕缓冲区以外开辟一个缓冲区进行渲染操作。 当前屏幕渲染不需要额外创建新的缓存,也不需要开启新的上下文,相对于离屏渲染性能更好。但是受当前屏幕渲染的局限因素限制(只有自身上下文、屏幕缓存有限等),当前屏幕渲染有些情况下的渲染解决不了的,就使用到离屏渲染。 相比于当前屏幕渲染,离屏渲染的代价是很高的,主要体现在两个方面: (1)创建新缓冲区要想进行离屏渲染,首先要创建一个新...
Markdown
UTF-8
36,572
2.859375
3
[]
no_license
# Creating a Simple App with Redux-ORM Move to latest * "react": "^16.8.6", * "react-bootstrap": "^1.0.0-beta.5", * "react-datepicker": "^2.5.0", * "react-datetime": "^2.16.3", "react-dom": "^16.8.6", "react-jsonschema-form": "^1.2.1", "react-pure-render": "^1.0.2", "react-redux": "^6.0.1", "react...
C++
UTF-8
363
2.78125
3
[ "MIT" ]
permissive
/* g++ --std=c++20 -pthread -o ../_build/cpp/language_ascii.exe ./cpp/language_ascii.cpp && (cd ../_build/cpp/;./language_ascii.exe) https://en.cppreference.com/w/cpp/language/ascii */ #include <iostream> int main() { std::cout << "Printable ASCII [32..126]:\n"; for (char i = ' '; i <= '~'; ++i) { std::cout << ...
Python
UTF-8
512
4.25
4
[]
no_license
# Given two strings, write a method to decide if one is a permutation of the other. def is_permutation(s1, s2): # LOG COST # O(n lg n) solution - just sort the strings and O(n) compare # Can be done in O(n) using a hash table but requires O(n) space s1 = sorted(s1) s2 = sorted(s2) return True if s1 == s2 else Fa...
PHP
UTF-8
4,077
2.671875
3
[]
no_license
<?php include '../controllers/common.php'; auth_check(); $username = $_SESSION['username']; $userid = $_SESSION['userID']; //if(isset($_POST) && count($_POST) > 0) if(isset($_POST) && count($_POST) > 0){ if(isset($_POST['title']) && isset($_POST['description'])){ $validated = true; }else{ $v...
Python
UTF-8
439
2.875
3
[]
no_license
class Solution(object): def containsNearbyDuplicate(self, nums, k): """ :type nums: List[int] :type k: int :rtype: bool """ hash_table = {} for i,v in enumerate(nums): if v in hash_table and i - hash_table[v] <= k: return True ...
C#
UTF-8
3,099
3.0625
3
[]
no_license
using System; using System.Collections.Generic; public class VendingMachine { private decimal ValorInserido = new decimal(0); private decimal ValorTotalDeVendas = new decimal(0); private List<Produto> Produtos = new List<Produto>(); private Produto ProdutoSelecionado; public void Abastecer() { ...
C++
UTF-8
383
2.546875
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int main() { int n = 0; int t1 = 0; int t2 = 1; cin>>n; int cont = 3; cout<<"-> "<<t1<<" ->"<<t2; while(cont<= n){ int t3=t1+t2; if(t3 < n){ cout<<" -> "<<t3; t1=t2; t2=t3; cont +=1; }else{ ...
PHP
UTF-8
1,357
2.578125
3
[ "MIT" ]
permissive
<?php namespace App; use App\Models\Employee; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; class User extends Authenticatable { use Notifiable; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [...
C#
UTF-8
966
2.578125
3
[]
no_license
using Microsoft.AspNetCore.Mvc; using System.Threading.Tasks; using WebApi3.Models; using WebApi3.Services; namespace WebApi3.Controllers { [ApiController] [Route("api/warehouses2")] public class Warehouses2Controller : ControllerBase { private IProductService2 _iProductService2; publ...
SQL
UTF-8
4,435
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 11, 2019 at 05:48 AM -- Server version: 10.1.29-MariaDB -- PHP Version: 7.2.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
Java
UTF-8
1,777
2.3125
2
[]
no_license
package ng.com.bitsystems.mis.converters.accounts.payment.insurance; import ng.com.bitsystems.mis.command.accounts.payments.insurrance.InsuredConsultationCommand; import ng.com.bitsystems.mis.converters.consultation.BookConsultationCommandToBookConsultation; import ng.com.bitsystems.mis.models.accounts.payments.insura...
Markdown
UTF-8
6,722
2.859375
3
[ "Unlicense" ]
permissive
# Why Minecraft is the most important game of the decade Published at: **2019-11-07T16:30:00+00:00** Author: **Charlie Hall** Original: [Polygon](https://www.polygon.com/2019/11/7/20952214/minecraft-most-important-game-of-the-decade-2010) When I first heard about Minecraft, it was how its creator, Markus “Notch” P...
Java
UTF-8
2,653
2.375
2
[]
no_license
package avaliacao_pratica_andrecremonezi.andrecremoneziprova.model.persistence; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.util.List; import avaliacao_pratica_andrecremonezi.andrecremoneziprova.model.entities.SocialNetwork; public...
C#
UTF-8
5,110
3.078125
3
[]
no_license
// Name: Gene Pressinger // CSC339 - Spring 2021 // Assignment 4 using System; using System.Drawing; using System.Windows.Forms; namespace Connect4 { public partial class Form1 : Form { private Board board; public Form1() { InitializeComponent(); ...
Python
UTF-8
428
3.390625
3
[]
no_license
c = soma = 0 x = 1 while c < 2 and x == 1: n = float(input()) if n < 0 or n > 10: print("nota invalida") if 0 <= n <= 10: soma += n c += 1 if c == 2: print("media = {:.2f}".format(soma/2)) x = -1 while x < 1 or x > 2: print("novo calculo (1-sim 2-nao)"...
Java
UTF-8
2,672
2.203125
2
[ "MIT" ]
permissive
package rocks.frieler.android.beans; import static org.hamcrest.CoreMatchers.hasItem; import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.MatcherAssert.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import android.content.Context; import android....
C++
GB18030
1,340
3.46875
3
[]
no_license
// ƣл˹(Sierpinski)ΣҲеƬ // 뻷Visual C++ 6.0EasyX 2011ݰ // £2010-11-16 // #include <graphics.h> #include <conio.h> #include <time.h> /* ˵һʵֹ̣ 3 P[0]P[1]P[2] 1 P Ƶ P [0, 2] ڵ n P = P P[n] е㣻 ظִв (3)(5) Ρ ܼ򵥣ȻԺܴ󣬵ǽȫƵģһȤͼҲǴ˵ел˹Ρϲл˹ε £ עΪЧ(1)ֶָˡϲĻԽ޸Ϊ */ void main() { srand((unsigned)time(NULL)); // POINT P[3]...
PHP
UTF-8
2,532
2.671875
3
[]
no_license
<?php //if(!isset($_SESSION["login"])){ // header("Location: http://fieldofdreams.ml/Sign-In.html"); //} // Get the PHP helper library from https://twilio.com/docs/libraries/php //Database: //Table-> user_phonenumbers; column-> phonenum; require __DIR__ . '/twilio-php-master/Twilio/autoload.php'; // Loads the ...
Markdown
UTF-8
7,985
3.09375
3
[]
no_license
--- author: name: Rob Hawkes picture: 112529 body: "I'm new here - so Hi everybody =D\r\n\r\nCurrently I'm working on the logo and website for my freelance web design company. The company is called Rawkes - I want to portray youth, strength and a feel of modernism in the logo.\r\n\r\nI have come up with some ...
PHP
UTF-8
1,486
2.875
3
[ "Apache-2.0" ]
permissive
<?php namespace SparkPost\Test\TestUtils; class ClassUtils { private $class; public function __construct($fqClassName) { $this->class = new \ReflectionClass($fqClassName); } /** * Allows access to private methods. * * This is needed to mock the GuzzleHttp\Client responses ...
Java
UTF-8
6,949
2.28125
2
[]
no_license
package stage_one.chicken; import java.awt.Cursor; import java.awt.Graphics; import java.awt.Point; import java.awt.Toolkit; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import javax.swing.ImageIcon; i...
Java
UTF-8
1,625
1.828125
2
[]
no_license
package org.jxjz.framework.util; import org.jxjz.common.util.PropUtils; public class ConfigUtil { public static String environment; public static String server_app_host_url; public static String server_app_host; public static String sys_session_mode; public static String sys_appSecre...
Java
UTF-8
467
3.5625
4
[]
no_license
package kadai; public class Kadai05 { public static void main(String[] args) { int a = 30; int b = 20; System.out.print("大きいほうの値は"); if(a > b) { System.out.println(a +"です。"); }else { System.out.println(b + "です。"); /*if(a > b) { System.out.println("大きいほうの値はaです。"); ...
C++
UTF-8
724
4.15625
4
[]
no_license
#include <iostream> #include <vector> int findMissingNumber(const std::vector<int>& numbers) { int len = numbers.size() + 1; // one number missing in array, hence added 1 // find xor of all numbers from 1 .. n int xor_n = 0; for (int i = 1; i <= len; i++) { xor_n ^= i; } std::cout << "xor of n numbers: " << xo...
Java
UTF-8
907
2.21875
2
[]
no_license
package com.example.wjx.xing.db; public class TableSkill extends BaseDataBase { public final static String TABLE_NAME = "table_skill"; public final static String COLUMN_ID = "id"; public final static String COLUMN_NAME = "name"; public final static String COLUMN_MAX_LEVEL = "max_level"; private static final long ...
Java
UTF-8
609
1.929688
2
[]
no_license
package net.helpscout.api.model.report.user; import java.util.List; import lombok.AccessLevel; import lombok.Data; import lombok.experimental.FieldDefaults; import net.helpscout.api.cbo.Status; @Data @FieldDefaults(level = AccessLevel.PRIVATE) public class ConversationStats { Integer number; Integer respons...
Markdown
UTF-8
3,127
2.828125
3
[]
no_license
## Arduino 1 ```C #include "DHT.h" #define DHTPIN 4 // Digital pin connected to the DHT sensor // Feather HUZZAH ESP8266 note: use pins 3, 4, 5, 12, 13 or 14 -- // Pin 15 can work but DHT must be disconnected during program upload. // Uncomment whatever type you're using! //#define DHTTYPE DHT11 // DHT 11 #defi...
Java
UTF-8
6,566
2.140625
2
[]
no_license
package co.ryred.checkerservlet; import co.ryred.checkerservlet.configuration.InvalidConfigurationException; import co.ryred.checkerservlet.configuration.file.YamlConfiguration; import com.google.common.base.Throwables; import org.apache.commons.io.IOUtils; import org.apache.log4j.Level; import org.apache.log4j.Logger...
Java
UTF-8
634
2.046875
2
[]
no_license
package Test.DAO; import BusinessLogic.Project.AbstractProject; import BusinessLogic.Project.Project; import Facade.Chat.ChatFacade; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; /** * * @author Guillaume...
C++
UTF-8
4,478
3.6875
4
[]
no_license
/** Akash Chaurasia (achaura1) akashc@jhu.edu */ #include "edit.h" /** Function to return the nth letter of the alphabet @param i the numbered alphabet to return @return a string with one desired alphabetical character */ string get_nth_letter(const int i) { //make string of alphabet to refer to ...
Markdown
UTF-8
1,712
3.1875
3
[]
no_license
--- layout: post title: "How to self-host a blog" date: 2018-08-21 categories: Programming --- One of the purposes of this blog is to experiment with simple ways put up a blog on the web without depending on any blogging platform. For this I wanted a free way to deploy static web pages on my own domain name. For th...
Shell
UTF-8
595
2.8125
3
[]
no_license
# Set HOSTNAME and PS1 HOSTNAME=`hostname -s` PS1="$HOSTNAME%; " # Keybindings set -o vi alias __A=`echo "\020"` # up arrow = ^p = back a command alias __B=`echo "\016"` # down arrow = ^n = down a command alias __C=`echo "\006"` # right arrow = ^f = forward a character alias __D=`echo "\002"` # left ar...
C#
UTF-8
2,707
3.609375
4
[]
no_license
using System; namespace Exercicios_de_fixação_1 { class Program { static void Main(string[] args) { { static float CalcularMedia(float[] numeros){ float soma = 0; for (var i = 0; i < numeros.Length; i++) { // soma = soma + numeros [i]; ...
C++
UTF-8
823
2.515625
3
[]
no_license
#include<cstdio> #include<cstring> char field[110][110]; int d[8][2]={1,0,-1,0,0,1,0,-1,1,1,-1,-1,1,-1,-1,1}; int r,c; void dfs(int x,int y) { int next_x,next_y,i; field[x][y]='*'; for(i=0;i<8;i++) { next_x=x+d[i][0]; next_y=y+d[i][1]; if(next_x>=0&&next_x<r&&next_y>=0&&next_y<c&...
C
UTF-8
1,603
3.421875
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<time.h> #include"sorting.h" int main(int argc, char ** argv){ //argv[0]: excecutable, ./proj1 //argv[1]: type of sort, i or s //argv[2]: input file name, #.b //argv[3]: output file name, #seq.t //argv[4]: output file name, #s.b clock_t start; clock_t end; ...
Markdown
UTF-8
11,840
2.84375
3
[ "BSD-3-Clause" ]
permissive
# API Reference ## Router ### Configuration Creates a mock `Router` instance, ready to be used as decorator/manager for activation. > <code>respx.<strong>mock</strong>(assert_all_mocked=True, *assert_all_called=True, base_url=None*)</strong></code> > > **Parameters:** > > * **assert_all_mocked** - *(optional) bool ...
Shell
UTF-8
1,108
3.828125
4
[]
no_license
#!/bin/bash # Tai Sakuma <sakuma@fnal.gov> ##____________________________________________________________________________|| function create_backUpFile_path { local outfile=$1 local timenow=$(date '+%y%m%d_%H%M') local i=1 local ext=${outfile##*.} local backUpFile=${outfile%.*}_${timenow}_${i}.${ext...
Markdown
UTF-8
8,114
2.6875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
# Scowl [![status](http://joss.theoj.org/papers/1b9d09aab8754997884a04c081cfc019/status.svg)](http://joss.theoj.org/papers/1b9d09aab8754997884a04c081cfc019) Scowl provides a Scala DSL allowing a declarative approach to composing OWL expressions and axioms using the [OWL API](http://owlapi.sourceforge.net). ## Usage ...
Python
UTF-8
1,862
2.765625
3
[ "MIT" ]
permissive
from __future__ import annotations from typing import TYPE_CHECKING, Any from .base import TelegramObject class Invoice(TelegramObject): """ This object contains basic information about an invoice. Source: https://core.telegram.org/bots/api#invoice """ title: str """Product name""" des...
TypeScript
UTF-8
1,532
3.296875
3
[]
no_license
import { createHandyClient, IHandyRedis } from 'handy-redis'; /** * Cache client class integrated with handy-redis library. * The API is to use in asynchronous code. */ export default class CacheClient { private client: IHandyRedis; private readonly VALUE_EXISTS = 1; /** * Create new cache client. * ...
C++
UTF-8
487
3.59375
4
[]
no_license
#include<iostream> #include<math.h> using namespace std; bool isPrime(int n) { for (int j = 2; j <= sqrt(n); j++) { if (n % j == 0) { return false; } } return true; } int main() { int num1, num2; cin >> num1 >> num2; cout << "Prime no. bw " << num1...
Markdown
UTF-8
3,068
2.78125
3
[ "MIT" ]
permissive
--- layout: page title: About permalink: /about/ image: /assets/images/mcarroll.jpg --- # About Me <br /> I am an IBM Senior Cloud Engineer who specializes in the Watson Data and AI services. I work primarily by leveraging technical skills build cloud-native solutions for customers. Before joining IBM I worked for [...
Markdown
UTF-8
2,465
2.921875
3
[]
no_license
## Aggregation Example Proof of Concept application of a mock telemetry aggregation. Logic done using akka, primarily streams, since they present a nice fit for high frequency data (small in size).<br /> *Notes*: Some presumptions are taken into account when designing this. - Data is always correct (i.e no negative ...
Markdown
UTF-8
3,051
2.578125
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: Create a canvas app from Figma (preview) description: Learn about how to create canvas apps from Figma. author: mduelae ms.topic: article ms.custom: canvas ms.reviewer: mkaur ms.date: 06/01/2022 ms.subservice: canvas-maker ms.author: kaagar search.audienceType: - maker contributors: - mduelae --- # Cre...
Markdown
UTF-8
1,375
3.8125
4
[]
no_license
# 0647 - Palindromic Substrings Difficulty | Tags | Links | Solutions ----------- | ---- | ----- | ----- Medium | String, Dynamic Programming | [Leetcode](https://leetcode.com/problems/palindromic-substrings) | [solution](https://leetcode.com/problems/palindromic-substrings/solution/) ----------- <p>Given a string...
Markdown
UTF-8
3,597
2.78125
3
[]
no_license
# 다른 분산장부 기술 Quorum : 이더리움 기반 Permissioned Corda : 사업간 자동화된 법적 동의를 기록, 관리 Chain Core : 재무서비스 기관에 의해 디자인됨 ## Chain core []( https://chain.com/technology/) Chain Core is an enterprise permissioned blockchain system that is mostly focused on financial services, like currencies, securities, derivatives, g...
Java
UTF-8
2,569
2.109375
2
[]
no_license
package com.cookandroid.haje; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.ImageButton; import android.widget.TextView; import android.widget.Toast; import com.google.firebase.auth.Fi...
Ruby
UTF-8
685
2.8125
3
[]
no_license
class EntityParser attr_reader :entity def initialize entity=nil @entity = entity check_entity unless entity.nil? end def find_entity Dir['*.vhd'].each do |vhd_file| open(vhd_file) do |vhd_file_content| if not vhd_file_content.grep(/entity\s+#{@entity}\s+/).empty? @vhd_entity_file = vhd_file ...
Java
UTF-8
323
1.820313
2
[]
no_license
package iotgo.bean; import lombok.*; @Data @Builder public class UserTag { private String uuid; private String tagName; private String tagDesc; private String tagType; private long createAt; private long updateAt; /** * 是否拥有该标签 */ private boolean haveTag; }
PHP
UTF-8
265
2.765625
3
[]
no_license
<?php session_start(); if (isset($_SESSION['login'])) { echo "Selamat Datang ".$_SESSION['login']; echo "<a href='session2,5.php'>(session2,5.php)</a> Logout"; }else { die("Anda Belum Login. Silahkan Login<a href=session1.php>disini</a>"); }
Java
UTF-8
1,118
2.109375
2
[]
no_license
// isComment package com.github.mobile.ui; import android.app.AlertDialog; import android.content.Context; /** * isComment */ public class isClassOrIsInterface extends AlertDialog { /** * isComment */ public static AlertDialog isMethod(final Context isParameter) { return new LightAlertDia...
Java
UTF-8
3,585
2.140625
2
[]
no_license
package com.rec.model; import java.util.ArrayList; import java.util.Date; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import...
Markdown
UTF-8
3,646
2.71875
3
[]
no_license
# How to install open mpi on Raspberry pi (fixing the arm) MPI is most famous communication protocol for parallel computing. As time passed, a lot of parallel programming languages have been sprang up, but still, MPI is dominant in high performance computing. The key characteristic of MPI is versatility. Thus, its use...
Markdown
UTF-8
1,932
2.828125
3
[]
no_license
--- uid: bb9ab3ea0c546b87900fafd21424cd19 title: 3.2 Asymptotics course_id: 6-042j-mathematics-for-computer-science-spring-2015 type: course layout: course_section parent_title: 3.2 Asymptotics --- * [<Little oh Big Oh]({{< baseurl >}}/sections/counting/tp8-3/vertical-5c04897d10e6) * [3.2.1Asymptotic Notation: Vid...
Python
UTF-8
902
2.671875
3
[]
no_license
import cv2 import numpy as np #img_name = "image4.pgm" #img = cv2.imread(img_name) def segmentation(im): #im = cv2.resize(im, (250, 288)) h, w = im.shape[:2] print(h,w) #cv2.waitKey(0) #for image 3 should not blur #for image 4 blur(3,3),mask 111 111 4/8 #blur 2,2 for image3 im = cv2.blur...
C++
UTF-8
7,008
2.90625
3
[ "MIT" ]
permissive
#pragma once #include "intrhash.h" #include "nodeallc.h" namespace intrhash_map_priv { template <class K, class T, class O, class A> struct impl { using value_type = std::pair<const K, T>; struct node_t : public value_type , public intrhash_item_t<node_t> { ...
Java
UTF-8
1,026
2.0625
2
[]
no_license
package com.capgemini.account.Account; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.context.a...
PHP
UTF-8
1,498
2.578125
3
[ "Apache-2.0" ]
permissive
<?php require 'vendor/autoload.php'; // Report ALL errors error_reporting(E_ALL); // Turn assertion handling way the hell up to fatal assert_options(ASSERT_ACTIVE, 1); assert_options(ASSERT_CALLBACK, function ($script, $line, $message) { throw new \Exception($message); }); // Set an error handler that catches EVE...
JavaScript
UTF-8
1,494
2.859375
3
[ "WTFPL" ]
permissive
var phone = require('phone'), _ = require('lodash'), areacodes = require('../data/areacodes.json') ; function validateAndNormalizeNumber(num) { var numData = phone(num), number = numData.length > 0 ? numData[0] : false, country = numData.length > 0 ? numData[1] : '' ; if(!number) { thr...
Shell
UTF-8
2,106
3.96875
4
[]
no_license
#!/bin/bash . /usr/local/lib/monitor-functions . /etc/monitoring/hostname LogFile="${LogDir}/services.log" LogContent="$(sed 1d "$LogFile")" MailSubject="Service was not running" NotRunning=() RestartVarnish=0 Process="$(basename $0)" restartService() { echo "Restarting service $1..." | tee -a "$LogFile" ser...
Python
UTF-8
3,005
2.984375
3
[ "BSD-3-Clause" ]
permissive
""" Sky statistics computation class for `~skymatch.skymatch` and `~skymatch.skymatch._weighted_sky`. :Authors: Mihai Cara :License: :doc:`LICENSE` """ # THIRD PARTY from stsci.imagestats import ImageStats from copy import deepcopy __all__ = ['SkyStats'] __taskname__ = 'skystatistics' __author__ = 'Mihai Cara' cla...
C
UTF-8
592
3.40625
3
[ "MIT" ]
permissive
#include <stdio.h> #include <stdlib.h> char *reverse_string(char *input_string); char *reverse_string(char *input_string) { int i=0; int j=0; char *return_string; char filled_buffer[16]; while (input_string[i]!='\0') i++; while (i!=0) { filled_buffer[j]=input_string[i-1]; ...
Java
UTF-8
2,888
2.03125
2
[]
no_license
/** * * Copyright (c) 2016 乐视云计算有限公司(lecloud.com). All rights reserved * */ package com.letv.portal.task.gce.service.add.impl; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; ...
Java
UTF-8
2,101
3.921875
4
[]
no_license
package java_example.threads.lesson93; public class ConcurrentMain { public static void main(String[] args) { // 1-й Способ создания нового потока var th0 = new SimpleThread(); th0.start(); System.out.println("hello from main"); var th1 = new SimpleThread(); th1.start(); th1.interrupt(...
Markdown
UTF-8
1,652
3.90625
4
[]
no_license
# python中的else `else`在python中使用还是挺多的,有些用法还是和其他的语言中不太一样 ## 1. if/else 这个是很常用的,条件判断成立则执行`if`下的语句,否则执行`else`下的 ```python if condition: # executed when condition == True ... else: # executed when condition == False ``` ## 2. for/else 这个用法的情况会发生在当需要遍历一个集合之类的东西的时候,在找到符合条件的时候`br...
Java
UTF-8
2,031
1.859375
2
[]
no_license
package com.samcm.repository.dispatchpartydetails; import java.util.List; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframewo...
PHP
UTF-8
970
2.703125
3
[ "MIT" ]
permissive
<?php /* * Copyright (c) 2016 Refinery29, Inc. * * For the full copyright and license information, please view * the LICENSE file that was distributed with this source code. */ namespace Refinery29\Sitemap\Component\News; use Assert\Assertion; final class Publication implements PublicationInterface { /** ...
JavaScript
UTF-8
365
3.453125
3
[]
no_license
let rs = require('readline-sync') for (let i = 0; i < 5; i++) { let nome = rs.question('Digite o nome do aluno: ') let notaA = rs.questionFloat('Digite o valor da nota A: ') let notaB = rs.questionFloat('Digite o valor da nota B: ') let notaFinal = (notaA*30)/100 + (notaB*70)/100 console.log(`O al...
C#
UTF-8
3,757
3.109375
3
[]
no_license
using System; using MySql.Data.MySqlClient; namespace FAS { public class AssetsModelDataValidator { Connection _connection; AssetsModel _assetModel; public AssetsModelDataValidator(AssetsModel assetModel) { _connection = new Connection(); _assetModel = assetModel...