language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
Java
UTF-8
185
1.609375
2
[]
no_license
package boot.system.service; import boot.system.model.SysDict; import java.util.List; /** * 字典 服务类 */ public interface ISysDictService { List<SysDict> selectAll(); }
Markdown
UTF-8
5,637
2.96875
3
[ "MIT", "Apache-2.0" ]
permissive
--- layout: post title: "第29天 - 韧性、疗愈和内在自由 | 我是谁(对觉知的正念)" subtitle: "作者:杰克·康菲尔德、塔拉·布拉赫 来自:壹心理与睿心" date: 2019-01-26 00:00:00 author: "于磊" header-img: "img/mindful/29_bg.jpg" catalog: true tags: - 正念冥想 - 壹心理 - 心理学 --- 一个重要的哲学和精神问题是:我到底是谁? 我们经常会认为自己是有独立的渴望和恐惧,成功和失败的小我所组成的 当被问及我们到底是谁? ...
C#
UTF-8
5,652
3.734375
4
[]
no_license
using System; namespace Assets.Scripts.AStar { public class Heap<T> where T : IHeapItem<T> { private readonly T[] _items; public int Count { get; private set; } /// <summary> /// Heap Constructor /// </summary> /// <param name="capacity"></param> public...
TypeScript
UTF-8
419
2.875
3
[]
no_license
export interface IVideo { id?: number; title?: string; description?: string; category?: string; link?: string; avgRating?: number; } export class Video implements IVideo { constructor( public id?: number, public title?: string, public description?: string, pu...
Python
UTF-8
1,646
2.625
3
[]
no_license
import sqlite3 conn = sqlite3.connect('nwt.sqlite') c = conn.cursor() c.execute('CREATE TABLE langs (id VARCHAR PRIMARY KEY, engname, selfname, bibleurl)') for line in filter(lambda l: len(l) > 0, file('good.txt').read().split('\n')): p = line.split(',') c.execute('INSERT INTO langs VALUES (?, ?, ?, ?)', ( ...
Shell
UTF-8
1,050
3.046875
3
[ "MIT" ]
permissive
#!/bin/bash echo "Installing Speedtest-mod and required dependencies" command -v pihole >/dev/null 2>&1 || { whiptail --title "Install Failed" --msgbox "No pihole install found. Aborting install" 8 78 >&2; exit;} if php -v | grep 'PHP 7' > /dev/null ; then sudo apt install php7.3-sqlite -y else sudo apt insta...
Python
UTF-8
258
3.640625
4
[]
no_license
import turtle turtle.fillcolor("black") turtle.begin_fill() turtle.forward(50) turtle.right(90) turtle.forward(50) turtle.right(45) turtle.forward(50) turtle.right(90) turtle.forward(50) turtle.right(45) turtle.forward(50) turtle.end_fill() turtle.mainloop()
C
UTF-8
1,241
3.421875
3
[]
no_license
/** * A simple implementation of arpa/inet functions. * * @file endian.c * @date 13 juin 2014 * @copyright PAWM International * * @author Mickael Germain * */ #include "endian.h" void* endian_copyToB16(void* dest, const void* src, const size_t n) { void* ret; uint16_t* cur; size_t i; ...
Java
UTF-8
323
2.03125
2
[]
no_license
package missionaries_cannibal_problem; public class App { public static void main(String[] args) { State startState=new State(Constants.NUM_MISSIONARIES,Constants.NUM_CANNIBALS,Constants.FIRST_BANK); StateSpace stateSpace=new StateSpace(startState); stateSpace.generateStates(); stateSpace.writeAllPaths(); ...
Java
UTF-8
5,928
1.820313
2
[ "MIT" ]
permissive
// Copyright (c) Microsoft Corporation. // All rights reserved. // // This code is licensed under the MIT License. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files(the "Software"), to deal // in the Software without restricti...
TypeScript
UTF-8
1,385
3.28125
3
[ "MIT" ]
permissive
import { User } from "./User"; export class Directory { users: User[] = []; public constructor() { // Creation of some users this.createUser(0).name = 'Administrateur'; this.createUser(123).name = 'Étudiant testeur'; this.createUser(1424134).name = 'Erwan'; } public s...
Python
UTF-8
6,624
3.46875
3
[]
no_license
import numpy as np import point import triangle import csv ''' A class to build the mesh ''' class PolygonBuilder: x_max = 0 y_max = 0 z_max = 0 points = [[], [], [], []] colours = [[], [], [], []] colour_weights = [] shape_weights = [] triangles = [] def check_...
Python
UTF-8
27,754
2.765625
3
[]
no_license
from gym_game.envs.world import World #from gym_game.envs.agents import Car, RingBuilding, CircleBuilding, Painting, Pedestrian, Sensors, getEquidistantPoints, TextAgent, CheckPointAgent from gym_game.envs.agents import * from gym_game.envs.geometry import Point, Line from gym_game.envs.graphics import GraphWin impor...
Python
UTF-8
1,062
3.328125
3
[]
no_license
from random import randint class TestDataEmptyArray(object): @staticmethod def get_array(): # complete this function return [] class TestDataUniqueValues(object): a = set() for _ in range(10): a.add(randint(0, 100)) @staticmethod def get_array(): #...
Java
UTF-8
1,967
2.296875
2
[]
no_license
package com.simplilearn.controller; import java.io.IOException; import java.sql.SQLException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.ser...
Java
UTF-8
13,563
2.09375
2
[]
no_license
package com.topscorer.testcases; import org.openqa.selenium.By; import org.testng.ITestResult; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Parameters; import org.testng.annotations.Test; import org.testng.asserts.SoftAssert; import com.topscorer...
PHP
UTF-8
1,445
2.765625
3
[ "MIT" ]
permissive
<?php namespace App\Controllers; use App\Models\LogModel; use CodeIgniter\Controller; class Log extends Controller { public function index() { $model = new \App\Models\LogModel(); $model = $model->orderBy('id','desc'); $data = [ 'title' => 'Logs', 'log' => $model->paginate(10), 'page...
JavaScript
UTF-8
3,785
2.65625
3
[ "MIT" ]
permissive
const RetryStrategyInterface = Jymfony.Component.HttpClient.Retry.RetryStrategyInterface; /** * Decides to retry the request when HTTP status codes belong to the given list of codes. * * @memberOf Jymfony.Component.HttpClient.Retry */ export default class GenericRetryStrategy extends implementationOf(RetryStrategy...
Python
UTF-8
556
2.65625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
f = FormattedString() f.fill(1, 0, 0) f.fontSize(100) f += "hello" attr = f.getNSObject() attr.addAttribute_value_range_("com.petr.pageBot.myAttribute", "this is my data", (0, 5)) f += " " f += "world" attr = f.getNSObject() attr.addAttribute_value_range_("com.petr.pageBot.myOtherAttibute", ["a", "list", "object"...
Java
UTF-8
1,349
2.234375
2
[]
no_license
package com.oocl.parkingsmart.entity; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import java.util.Objects; @Entity public class UserShopPromotions { @Id @GeneratedValue(strategy = GenerationType.AUTO) priv...
Python
UTF-8
2,994
4.125
4
[]
no_license
''' A trial implementation of Barnsley Fern (https://en.wikipedia.org/wiki/Barnsley_fern) in Python. ''' import sys import random import matplotlib.pyplot as draw # f2 as described in the Wikipage -- it maps any point inside the red triangle leaflet to # a point inside the opposite smaller blue triangle ...
Java
UTF-8
1,253
2.03125
2
[]
no_license
package com.jk.model; public class ZixunBean { private Integer id; private String title; private String content; private String releaseTime; private Integer typeId; private String typeName; private String image; public String getImage() { return image; } public void se...
JavaScript
UTF-8
407
3.265625
3
[]
no_license
while (true) { var highestIndex = 0 var highestHeight = 0 for (let i = 0; i < 8; i++) { const mountainH = parseInt(readline()); // represents the height of one mountain. if (mountainH > highestHeight) { highestHeight = mountainH highestIndex = i ...
Java
UTF-8
384
2.0625
2
[]
no_license
package com.leslie.springcloud_demo.entities; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor @AllArgsConstructor public class CommonResult<T> { private Integer code; private String message; private T object; public CommonResult(Integer ...
Java
UTF-8
2,790
1.820313
2
[]
no_license
package group.cc.occ.dao; import group.cc.core.Mapper; import group.cc.occ.model.UserWorkArrange; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; import java.util.List; public...
Java
UTF-8
669
3.890625
4
[]
no_license
class Node{ int data; Node next; Node(int data){this.data=data;} } class Stack{ Node top; public void push(int data){ Node node=new Node(data); node.next=top; top=node; } public void pop(){ if(top!=null){ top=top.next; } } public void printStack(){ Node temp=top; System.out.print("["); whil...
Java
UTF-8
1,350
2.921875
3
[]
no_license
package test; import java.sql.Timestamp; import java.util.concurrent.CountDownLatch; class Processor extends Thread { private static Integer MINUTES = 1; private static Integer ITERATION_INTERVAL_IN_SECONDS = 5; private CountDownLatch latch; private String threadName; private transient String addressTo...
Java
GB18030
443
3.0625
3
[]
no_license
public class shangjilianxi13 { public static void main(String[] args) { int a=3; switch (a) { case 1: System.out.println("ְֵͨĺ"); break; case 2: System.out.println("ͨĺ"); break; case 3: System.out.println("ͨүүĺ"); break; case 4: System.out.println("̵ͨĺ"); break; default: Syst...
C#
UTF-8
3,568
2.78125
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace ControlTEst { public partial class Form1 : Form { public Form1() { ...
C++
UTF-8
3,778
3.1875
3
[]
no_license
#include "Subtracao.h" #include <string.h> #include <stdlib.h> #include "SubtradoraUmDigito.h" Subtracao::Subtracao(int b) { base = b; tamanhoInt = 0; tamanhoFrac = 0; } Subtracao::Subtracao() { } int Subtracao::getTamanho() { return tamanhoInt + tamanhoFrac + 1; } void Subtraca...
C++
UTF-8
763
2.9375
3
[]
no_license
//SECANT METHOD #include<iostream> #include<cmath> #include<iomanip> using namespace std; inline float f(float x) { return (x*x*x-9*x*x+1); } void sec() { float eps=0.0001; float a,b,c; int count; cout<<"enter initial root interval"; cin>>a>>b; if((f(a)*f(b))<0) { count=0;...
C#
UTF-8
1,967
3.28125
3
[]
no_license
using System; using System.Collections.Generic; using System.IO; using System.Linq; namespace Bech32LockTimeStat { class Program { static void Main(string[] args) { var lines = File.ReadAllLines("locktime-data.txt"); var myDic = new Dictionary<int, int>(); f...
Python
UTF-8
900
3.296875
3
[]
no_license
class Solution: def run(self): testcase = [ ([0, 1, 0, 3, 12], [1, 3, 12, 0, 0]), ([0, 0, 0, 3, 12], [3, 12, 0, 0, 0]), ([1, 2, 3, 4, 5], [1, 2, 3, 4, 5]), ] for test in testcase: self.moveZeroes(test[0]) if str(test[0]) != str(test[1]): ...
Python
UTF-8
958
3.421875
3
[]
no_license
class Solution(object): def romanToInt(self, s): """ :type s: str :rtype: int """ # I II III IV V VI VII VIII VIIII X # I = 1, V = 5, X = 10, L = 50, C = 100, D = 500, M = 1,000 # a letter placed after another of greater value adds (thus XVI or xvi is 16), wh...
C#
UTF-8
303
2.546875
3
[]
no_license
using InterfacesLib; using System; namespace RandomPlugin { class DoubleGenerator : IGenerator { Random rnd = new Random((int)DateTime.Now.Ticks); public object Generate() { return rnd.NextDouble() + rnd.Next(); } } }
Java
UTF-8
5,738
2.265625
2
[]
no_license
package com.sylconnexity.spring18.controller; import com.sylconnexity.spring18.dbschema.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.GetMapping; import...
Markdown
UTF-8
8,806
3.09375
3
[]
no_license
The goal of this exercise is to build a containerized two tier application in the OpenShift cluster. This application will help you learn about clustered containers and distributed systems. It will teach you about Kubernetes and how it operates with the principles of "defined state" and "actual state" - it constantly m...
Markdown
UTF-8
9,786
3.203125
3
[]
no_license
# Sass # 3) Nesting, import, extend, 조건과 반복, Mixin, Function ## 1. Nesting : Nesting은 Sass의 유용한 확장 기능으로, 선언을 중첩 하는 것이다. CSS는 후손 셀렉터의 경우, 부모요소를 기술해야 한다. ```css #navbar { width: 80%; height: 23px; } #navbar ul { list-style-type : none; } // ul은 부모요소 #navbar를 기술한다. ``` Sass의 Nesting은 후손 셀렉터를 간단히 기술이 가능하다. 또한...
PHP
UTF-8
5,961
2.640625
3
[ "MIT" ]
permissive
<?php namespace TenUp\SwiftStream\v1_1_0\Pixelate; /** * Set up any required hooks in the namespace. */ function setup() { $n = function( $function ) { return __NAMESPACE__ . "\\$function"; }; // Only hook in to create intermediate images if we're _not_ on WordPress.com. if ( ! defined( 'WPCOM_IS_VIP_ENV' ) |...
C++
UTF-8
1,064
3.578125
4
[]
no_license
#pragma once #include <Image/Image.hpp> namespace Graphics { namespace Draw { /** * @brief Mix two colors * * @param c1 first color * @param c2 second color * @param p percentage of first color * @return Pixel mixed color */ inline Pixel mixColors(const Pixel &c1, const Pixel &c2, const float p) { return...
C#
UTF-8
18,363
2.703125
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Blokc { public partial class frmBlokc : Form { public static ...
Python
UTF-8
2,097
2.984375
3
[]
no_license
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # "Project Name" : "PyPostgres" # # "File Name" : "postconn" # # "Author" : "rishabhzn200" # # "Date of Creation" ...
Rust
UTF-8
2,793
2.921875
3
[]
no_license
extern crate common; extern crate intcode; use std::collections::HashMap; const COLOR_BLACK: i64 = 0; const COLOR_WHITE: i64 = 1; const TURN_LEFT: i64 = 0; const TURN_RIGHT: i64 = 1; const DIR_N: i64 = 0; const DIR_E: i64 = 1; const DIR_S: i64 = 2; const DIR_W: i64 = 3; const NUM_DIRS: i64 = 4; fn run_painter(mut ...
Java
UTF-8
11,920
1.765625
2
[]
no_license
package com.example.adityadesai.cngcustomer.Activities; import android.app.Dialog; import android.content.Intent; import android.net.Uri; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.TabLayout; import android.support.v4.view.ViewPager; import android.support.v4.widget...
Markdown
UTF-8
1,549
2.953125
3
[]
no_license
## 准备工作 1. 文本编辑器 用来写c程序的,常见文本编辑器sublime、notepad、vim。 通过编辑器创建的为源文件,C语言的源文件通常使用'.c'为扩展名 2. C编译器 为了让源文件的代码对机器可读,需要进行编译,转为机器语言。最常见的编译器有CNU的C/C++编译器。 ### 编译器安装 #### Unix/Linux 如果使用Linux或者unix,可以先使用下面命令检查系统是否已经安装GCC ```c $ gcc -v ``` 如果有GCC会显示相应版本消息,如果没有安装,可以按照<http://gcc.gnu.org/install/>上说明进行安装 #### Mac...
C++
GB18030
6,763
3.421875
3
[]
no_license
#pragma once #include <utility> #include <memory> #include <string> #include <iostream> #include <stdexcept> #include <initializer_list> #include <algorithm> class StrVec { friend std::ostream& print(std::ostream& os, StrVec& str); // 14.16 friend bool operator==(const StrVec&, const StrVec&); friend bool operato...
Swift
UTF-8
1,610
2.875
3
[]
no_license
// // MasuratoareRow.swift // Statie Meteo // // Created by Narcis Zait on 12/08/2020. // Copyright © 2020 Alex Paval. All rights reserved. // import SwiftUI struct MasuratoareRow: View { var masuratoare: Masuratoare var body: some View { VStack(alignment: .leading) { Spacer() ...
Java
UTF-8
408
2.078125
2
[]
no_license
package be.felixdeswaef.reminder; import java.sql.Time; import java.sql.Timestamp; public class task{ public int id; public String name; public Timestamp deadline; public Timestamp creationdate; public Boolean checked; public Boolean hidden; public String description; public int comple...
C#
UTF-8
768
2.65625
3
[]
no_license
namespace Shp2JSON { using System.Diagnostics; using System.IO; using System.Linq; class Program { static void Main(string[] args) { var root = args.Any() ? args.Single() : @"C:\Users\Bon\Desktop\Corine Dissolve"; var filePaths = Directory.GetFiles(root, "*....
Markdown
UTF-8
366
2.53125
3
[]
no_license
#### Elasticsearch Notes This box is special in that it sets up several VMs in tandem which form an Elasticsearch cluster. You can edit the Vagrantfile to only spin up one, or maybe 3 or 5 boxes however you like. Be careful on the hardware settings. ES requires at *least* 2GB of memory to function or you risk crashin...
JavaScript
UTF-8
848
3.078125
3
[]
no_license
function addNewComment(name, email, text, date){ var newComment = $("#comments div:eq(0)").clone(); newComment.find('.comment-title').text(name); newComment.find('.comment-email').text(email); newComment.find('.comment-text').text(text); newComment.find('.comment-date').text(date); return newComment; } funct...
TypeScript
UTF-8
293
2.609375
3
[ "MIT" ]
permissive
import {RolePermissions} from './role-permissions'; /** * Basic role class, may be extended as needed */ export class Role { /** * Identifier of the role */ id: string; /** * Permissions attached to this role */ permissions: RolePermissions; }
C
UTF-8
280
3.296875
3
[]
no_license
#include<stdio.h> int main() { int n ; printf("Enter N ?") ; scanf("%d", &n) ; int count = 1 ; // initialization while(count <= n) // condition { printf("%d\n" , count) ; count = count + 1 ; // re-initialization } return 0 ; }
C#
UTF-8
900
2.515625
3
[]
no_license
using myPT.Core.Interfaces.Model; using myPT.Core.Interfaces.View; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace myPT.Core.Implementation.Presenter.Mapper { class HomeMapper : Common.Mapper { public HomeMapper() { ...
C++
UTF-8
744
2.5625
3
[]
no_license
// // Created by swk on 2019-08-23. // #include "stringmatch.h" namespace happycoding { class BfMatch : public StringMatch{ public: int indexOf (const char* text, unsigned int textSize, const char* pattern, unsigned int patternSize) override{ for (unsigned int i = 0; i < textSize - pattern...
C#
UTF-8
944
2.625
3
[]
no_license
using System.Globalization; using BlockChain.Extensions; namespace BlockChain { public class TransactionIn { public OutPoint PreviousOutput { get; } public SignatureScript Script { get; } public uint Sequence { get; } public Transaction Transaction { get; set; } public Tr...
Python
UTF-8
4,465
2.953125
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Sun Jun 11 20:32:12 2017 @author: Daniel """ import numpy #loading our favorite library from matplotlib import pyplot #and the useful plotting library from matplotlib import animation import time t0 = time.time() height = 1 length = 1 #######################...
Java
UTF-8
1,343
1.984375
2
[ "Apache-2.0" ]
permissive
package com.shizhefei.meizhi.modle; import android.app.Application; import com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.ImageLoaderConfiguration; import com.nostra13.universalimageload...
Java
UTF-8
359
1.65625
2
[]
no_license
package com.microservices.SOAPWebserviceClient; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SoapWebserviceClientApplication { public static void main(String[] args) { SpringApplication.run(SoapWebservic...
Python
UTF-8
15,228
2.578125
3
[]
no_license
# db를 관리하는 code import psycopg2 as pg import psycopg2.extras import json import requests from apicall import hosp_list from pprint import pprint from datetime import datetime from urllib.request import urlopen from bs4 import BeautifulSoup pg_local = { 'host': "localhost", # localhost 'user': "postgres", # db...
C++
UTF-8
416
3.078125
3
[]
no_license
// https://zxi.mytechroad.com/blog/math/leetcode-1266-minimum-time-visiting-all-points/ class Solution { public: int minTimeToVisitAllPoints(vector<vector<int>>& points) { int ans = 0; for (size_t i = 1; i < points.size(); ++i) { int dx = abs(points[i - 1][0] - points[i][0]); int dy = abs(points[i...
Java
UTF-8
6,988
2
2
[]
no_license
package org.moreunit.elements; import java.util.HashSet; import java.util.List; import java.util.Set; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.jdt.core.Flags; import org.eclipse.jdt.core.ICompilat...
Java
UTF-8
3,368
2.15625
2
[]
no_license
package ac.uiu.messmanagementsystem.fragments.profile; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import an...
Python
UTF-8
653
3.984375
4
[]
no_license
import random f_r = int(input("Enter the first range:")) s_r = int(input("Enter the second range:")) attempt = int(input("Enter the number of attempts:")) rand_num = random.randint(f_r,s_r+1) print(rand_num) while attempt!=0: attempt-=1 print(attempt) ans = int(input("Enter the expected number:")...
Java
UTF-8
3,815
1.960938
2
[]
no_license
package com.sundeinfo.kd.zs.apis.restful.auth.wx; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.sundeinfo.core.authentication.dao.DaoAuthenticationProvider; import com.sundeinfo.core.permission.strategy.token.AuthenticationResponse; import com.sundeinfo.foundation.mvc.controller....
Python
UTF-8
1,093
3.109375
3
[]
no_license
# # # # # # # # Author phantomhive # # 20-07-2019 # # # # # # # # from collections import Counter, deque, defaultdict from math import ceil, floor, sqrt, log, factorial from fractions import Fraction, gcd from sys import stdin, stdout from bisect import bisect, bisect_left, bisect...
Python
UTF-8
2,495
2.546875
3
[]
no_license
import time from catapult.deploy.constants import TRANSPORT_PUSHOVER, TRANSPORT_SLACK, TRANSPORT_TELEGRAM from catapult.library.renders import render_string from catapult.library.transports import pushover, telegram, slack class Notifier: def __init__(self, notifications, request, logger): self.notificati...
Java
UTF-8
1,477
3
3
[]
no_license
package it.polito.tdp.borders.model; import java.util.ArrayList; import java.util.List; import org.jgrapht.Graph; import org.jgrapht.Graphs; import org.jgrapht.graph.DefaultEdge; import org.jgrapht.graph.SimpleGraph; public class Recursive { //CLASSE CONTENENTE L'ALGORITMO RICORSIVO private Graph<Cou...
JavaScript
UTF-8
224
2.703125
3
[]
no_license
var fs = require('fs'); var path = require('path'); fs.readdir(process.argv[2],function(err,data) { for (var i=0;i<data.length;i++) if (path.extname(data[i])=='.'+process.argv[3]) console.log(data[i]); });
PHP
UTF-8
4,985
3.421875
3
[]
no_license
<?php namespace zibo\library\network; use zibo\library\network\exception\ConnectionException; use zibo\library\Number; use zibo\library\String; use \Exception; /** * Connection with a server */ class Connection { /** * The hostname from the URL * @var string */ protected $host; /** ...
Java
UTF-8
2,352
2.1875
2
[]
no_license
package com.chengxin.adapter; import java.util.List; import com.chengxin.R; import com.chengxin.Entity.Goods; import com.chengxin.global.ImageLoader; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import ...
Markdown
UTF-8
9,024
3.328125
3
[]
no_license
[[File:Desargues_theorem.svg|350px]] '''笛沙格(Desargues)定理'''說明:在[[射影空間|射影空間]]中,有六點A,B,C,a,b,c。Aa,Bb,Cc共點若且唯若AB∩ab,BC∩bc,CA∩ca共线。 在[[射影幾何|射影幾何]]的對偶性來看,笛沙格定理是自對偶的。 ==证明== 笛沙格定理可以表述如下: :如果''A''.''a'',''B''.''b'',''C''.''c''共点,则 :(''A''.''B'')∩(''a''.''b''),(''A''.''C'')∩(''a''.''c''),(''B''.''C'')∩(''b''.''c'')共线。 利用...
PHP
UTF-8
3,615
2.578125
3
[ "MIT" ]
permissive
<?php namespace PHPSpec2\Mocker; use PHPSpec2\Mocker\MockerInterface; use PHPSpec2\Wrapper\ArgumentsUnwrapper; use PHPSpec2\Formatter\Presenter\PresenterInterface; use PHPSpec2\Exception\MockException; use ArrayAccess; class MockExpectation implements ArrayAccess { private $mock; private $method; privat...
Python
UTF-8
819
2.84375
3
[]
no_license
import csv # with open('csvexample.csv', newline='') as myFile: # reader = csv.reader(myFile) # for row in reader: # print(row) def sendmail(attribute): name = attribute[0] email = attribute[1] print("Sending email to {}".format(email)) # to = email # sender = "you.email@gmail.com...
C++
UTF-8
616
2.546875
3
[]
no_license
#include "sparkParticle.h" sparkParticle::sparkParticle(Point _position, Graphics* _gfx, float _xvel, float _yvel) { gfx = _gfx; position = _position; xVel = _xvel; yVel = _yvel; } sparkParticle::~sparkParticle() {delete image;} void sparkParticle::load() { hasGravity = true; gravity = 0.5; despawnTimer = 120...
C++
UTF-8
1,498
3.328125
3
[ "MIT" ]
permissive
#pragma once namespace osgUtil { /** @brief Helper class for vertices with discrete position */ class Vec3ui { public: Vec3ui() : _x(0) , _y(0) , _z(0) {} Vec3ui(unsigned int v) : _x(v) , _y(v) , _z(v) {} Vec3ui(unsigned int v1, unsigned int v2, unsigned int v3) : _x(v1) , _y(v2) , _z(v3) ...
Python
UTF-8
1,874
3.0625
3
[]
no_license
""" smmilutils.sysutils.fileutils utilities for manipulating files Pil Smmilut 2011-02-12 """ import os import logging import errors #============================================================================== global logger logger = logging.getLogger("fileutils") #----------------------------...
Python
UTF-8
2,400
3.015625
3
[]
no_license
#!/usr/bin/env python3 """Archive.org PDF books downloader.""" import logging import os import re import requests from time import sleep from multiprocessing.pool import ThreadPool logging.basicConfig(format='[%(asctime)s] %(levelname)s: %(message)s', level=logging.INFO, datefmt='%Y/%m/%d...
Markdown
UTF-8
3,619
2.890625
3
[]
no_license
--- published: true imdb: tt2366450 image: stories-we-tell.jpg author: christopherr stars: 4.5 excerpt: "You didn&rsquo;t live long enough to see Sarah blossom from adorable child star into important Canadian artist, but based on your own career ambitions, it&rsquo;s safe to say your little girl would have made you p...
Java
UTF-8
13,350
2.140625
2
[]
no_license
package piotrrr.thesis.bots.rlbot; import cbr.CaseBase; import cbr.Movement; import java.util.LinkedList; import java.util.Map; import java.util.Random; import java.util.TreeMap; import piotrrr.thesis.bots.rlbot.rl.Action; import piotrrr.thesis.bots.mapbotbase.MapBotBase; import piotrrr.thesis.common.combat.*; import ...
Go
UTF-8
695
2.640625
3
[]
no_license
package web import ( "fmt" "net/http" "github.com/SilverCory/PerkboxTest/config" "github.com/SilverCory/PerkboxTest/data" ) type Web struct { data *data.Handler conf config.Web } func NewWeb(conf config.Web, data *data.Handler) *Web { ret := &Web{ data: data, conf: conf, } // TODO basic userauth middl...
TypeScript
UTF-8
1,945
2.75
3
[ "Apache-2.0" ]
permissive
import { ObjectID } from 'bson' import { assert } from 'chai' import { Institution } from '../../../src/application/domain/model/institution' describe('Models: Institution', () => { const institutionJSON: any = { id: new ObjectID() } const emptyInstitutionJSON: any = {} describe('fromJSON(jso...
Shell
UTF-8
1,600
3.296875
3
[]
no_license
#June 19, 2019 #TianR. makeDonorDir(){ pdir=$1 sampleDonorTable=$2 for dir in `less $sampleDonorTable | grep SRR |cut -f2 | sort | uniq |tr "\n" " "` do echo $dir mkdir -p $pdir/$dir done } moveByDonor(){ wdir=`pwd` sampleDonorTable=$1 dir=$2 less $sampleDonorTable | grep SRR | awk '{print "[ -d...
Markdown
UTF-8
2,178
3.15625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- layout: page title: 童年 --- 夏天是什麼做的?\\ 銼冰、芋仔冰、枝仔冰\\ 巴布、巴布,賣--豆--花--喔 滾燙燙的柏油路\\ 熱烘烘的日頭 家裏沒冰箱\\ 樓上二房東家有\\ 房東家女兒用砂糖加開水\\ 注入布丁型鋁容器\\ 放入冷凍庫\\ 結成一個個小小布丁型冰棒\\ 一面舔著吃,一面不自覺炫耀著\\ 妺妺看到了,很想吃\\ 姐姐有零用錢\\ 就向房東家女兒買小小的布丁型冰棒 姐姐勤奮又聰明\\ 暑假到成衣廠踩縫紉機\\ 學期間帶橘子零食到學校賣\\ 賺的錢拿給媽媽\\ 媽媽很高興\\ 給姐姐一點零用錢\\ 姐姐用自己的零用錢\\ 買冰棒給妹妹吃 家裏沒冰箱\\ 哥哥買了個大西瓜\\...
Python
UTF-8
443
3.296875
3
[]
no_license
# Create a method that decrypts texts/encoded_zen_lines.txt def decrypt(file_name): my_file = open(file_name, "r") chars = [] s='' message = "" for line in my_file: for c in line: chars.append(c) for i in range(0, len(chars)): if chars[i] != ' ' and chars[i] != '\n': ...
Markdown
UTF-8
1,062
2.5625
3
[ "MIT" ]
permissive
USE sdz9w1lbrjjeliul; INSERT INTO Definitions (topic, definition, example, language) VALUES ('HTML', 'Hyper-Text Markup Language is the standard markup language for creating web pages.', '', 'HTML'); INSERT INTO Definitions (topic, definition, example, language) VALUES ('Tags','HTML tags label pieces of content such ...
Shell
UTF-8
4,214
3.421875
3
[ "Apache-2.0" ]
permissive
#!/bin/bash # # DART software - Copyright UCAR. This open source software is provided # by UCAR, "as is", without charge, subject to all terms of use at # http://www.image.ucar.edu/DAReS/DART/DART_download # # DART $Id$ # # split the monthly file into "daily" files which start at 12:01Z # the previous day and end at 1...
Java
UTF-8
1,292
2.484375
2
[]
no_license
package de.chusek.sessionkeeper.logic; import android.content.ContentValues; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.AdapterView; import android.widget.Toast; import java.util.List; import de.chusek.sessionkeeper.gui.PlayerActivi...
Java
UTF-8
7,052
3.234375
3
[]
no_license
/* * Copyright 2019 mon-mode - 0mon.mode@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
C++
UTF-8
15,022
2.875
3
[]
no_license
/** * * @author Carmel & Efrat & Odelia * @since 2019-03 */ #include <iostream> #include <sstream> using std::cout, std::endl, std::istringstream; #include "PhysicalNumber.h" using ariel::PhysicalNumber, ariel::Unit; #include "badkan.hpp" int main() { badkan::TestCase testcase; int grade=0; ...
JavaScript
UTF-8
820
2.59375
3
[]
no_license
import axios from 'axios'; class BlogService { constructor() { let service = axios.create({ baseURL: 'https://foodfighters-web.herokuapp.com', withCredentials: true }); this.service = service; } renderBlog = () => { return this.service.get('/foo...
Java
UTF-8
493
1.8125
2
[ "Apache-2.0" ]
permissive
package io.nsu.hire.apiusers.service; import io.nsu.hire.apiusers.model.UserApplication; import org.springframework.data.domain.Page; import java.util.List; import java.util.Optional; public interface UserApplicationService { Page<UserApplication> readUserApplications(Integer size, Integer page); List<UserApplica...
C++
UTF-8
1,785
3.390625
3
[]
no_license
#include <iostream> using namespace std; class mystring { public: mystring( char ch ); mystring ( const char *cstring = "" ); mystring( const mystring & str ); ~mystring( ) { delete [ ] buffer; } const mystring & operator=( const mystring & rhs); const mystring & operator+=( const mystring & rhs ); ...
Java
UTF-8
289
2.140625
2
[]
no_license
package com.magicalrice.adolph.kmovie.data.entities; public class BaseTvEpisodeRatingObject extends BaseRatingObject { private int show_id; public int getShow_id() { return show_id; } public void setShow_id(int show_id) { this.show_id = show_id; } }
C#
UTF-8
3,079
2.953125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Runtime.Serialization; using System.ServiceModel; using System.Text; namespace _07wcfservice { // 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码和配置文件中的类名“Service1”。 public class LoginService : ILoginService { public...
SQL
UTF-8
148
3.40625
3
[]
no_license
select t.name, avg(c.level) from Trainer t, CatchedPokemon c, Gym g where t.id=g.leader_id and c.owner_id=t.id group by g.leader_id order by t.name;
C++
UTF-8
516
3.0625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main() { priority_queue<int> p; p.push(400); p.push(200);/// in priority queue we can use push(),pop(),top() - (front) fuction p.push(100); p.push(45);/// In int it will be sorted in descending order but in string p.push(250);/// the strings will ...
Markdown
UTF-8
4,491
2.8125
3
[ "BSD-3-Clause" ]
permissive
--- description: How to setup Http Clients --- # Setup [[TOC]] ## Register Service Provider Register `HttpClientServiceProvider` inside your `config/app.php`. ```php return [ // ... previous not shown ... // /* |-------------------------------------------------------------------------- | Autoloa...
Markdown
UTF-8
761
2.65625
3
[ "MIT" ]
permissive
# Module Management The module manager provides a list of all of the modules that are currently installed in your version of the Oqtane framework. Modules are a key feature of Oqtane and allow for a variety of features to be placed on your pages. At the top of the module manager page there is a install button to ins...
Python
UTF-8
133
3.09375
3
[]
no_license
celsius = 45.5 fahrenheit = (celsius * 1.8) + 32 print('%.1f degree Celsius is equal to %.1f degree Fahrenheit'%(celsius,fahrenheit))