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,732
2.8125
3
[ "MIT" ]
permissive
using System.Collections.Generic; using System.Linq; using System.Xml.Linq; using TeamCityChangeNotifier.Models; namespace TeamCityChangeNotifier.XmlParsers { public class BuildListXmlParser { private readonly XDocument _buildDoc; public BuildListXmlParser(string buildXml) { _buildDoc = XDocument.Parse(b...
C++
UTF-8
1,444
3.375
3
[]
no_license
#include<iostream> #include<bits/stdc++.h> using namespace std; template<typename T> class Graph{ map<T,vector<T> >adjList; T V; public: Graph(T v){ V=v; } void addEdge(T a, T b, bool bidir = true){ adjList[a].push_back(b); if(bidir) adjList[b].push_back(a); } b...
Java
UTF-8
383
2.21875
2
[ "MIT" ]
permissive
package com.blackstone.goldenquran.models.models; /** * Created by Abdullah on 5/5/2017. */ public class ColorEvent { public void setColorOn(boolean colorOn) { isColorOn = colorOn; } public boolean isColorOn() { return isColorOn; } boolean isColorOn; public ColorEvent(bo...
Ruby
UTF-8
2,114
3.359375
3
[]
no_license
def part_1_7(input) num_TLS = 0 input.each do |code| tls = false brackets = false bracket_stack_found = false stack = [] bracket_stack = [] code = code.chars while code.length > 0 while brackets == true && !bracket_stack_found bracket_char = code.shift if bracket_c...
Python
UTF-8
331
2.96875
3
[]
no_license
""" B - K-th Common Divisor """ def solve(): A, B, K = map(int, input().split()) count = 0 for i in reversed(range(1, A + 1)): if A % i == 0 and B % i == 0: count += 1 if count == K: ans = i break print(ans) if __name__ == '__main__': ...
Shell
UTF-8
888
2.59375
3
[]
no_license
#!/bin/bash #http://redsymbol.net/articles/unofficial-bash-strict-mode/ set -euo pipefail IFS=$'\n\t' sudo dnf install -y salt-master salt-key --gen-keys-dir=pki --gen-keys=salt.vagrant.rbjorklin.com || true for i in $(seq 1 $(egrep '^\$nodes\s?=\s?[1-9]$' config.rb | egrep -o '[1-9]')) ; do salt-key --gen-keys-d...
Markdown
UTF-8
830
3.140625
3
[]
no_license
## This is a simple example about using Gmail email in express. In order to use this code: - Clone the repository - Run `npm install` - Change `RECEIVER_EMAIL` and `SENDER_EMAIL` in `index.js` - Add credentials of your gmail account on line 17 and 18 in place of `youremail@gmail.com` and `yourpassword`. ```` var tr...
Markdown
UTF-8
736
2.546875
3
[]
no_license
## Martinique's subdivision, Ducos ![](ducoserrorplot.png) ![](mapviewducos.png) ![](3dplotducos.png) ## Martinique's subdivision, Le Marin ![](lemarinerrorplot.png) ![](mapviewlemarin.png) ![](3dplotlemarin.png) ## Martinique's subdivision, Fort-de-France ![](fortdefranceerrorplot.png) ![](mapviewfortd...
Java
UTF-8
4,056
2.390625
2
[]
no_license
package com.matrangola.contentprovider; import android.Manifest; import android.content.pm.PackageManager; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.MediaStore; import android.util.Log; import androidx.annotation.NonNull; import androidx.annotation.Nullab...
C#
UTF-8
2,199
2.890625
3
[]
no_license
// This file is part of libnoise-dotnet. // // libnoise-dotnet is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // //...
JavaScript
UTF-8
1,237
2.515625
3
[]
no_license
import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import RepoStore from '../facades/repoStore'; //const match = this.props.match; export default class Repositories extends Component { constructor(props) { super(props); this.state = { repos: [] }; } /* ...
C#
UTF-8
506
2.703125
3
[]
no_license
namespace TrafficSimulation.Simulation.Engine.Environment { /// <summary> /// Manages the lifetime of vehicles /// </summary> public interface IVehicleLifetimeManager { /// <summary> /// Creates a new vehicle /// </summary> /// <returns>The newly created vehicle</returns> IVehicle CreateV...
Markdown
UTF-8
2,170
3.0625
3
[ "MIT-0", "LicenseRef-scancode-proprietary-license" ]
permissive
# Amazon EC2: Limits terminating EC2 instances to an IP address range<a name="reference_policies_examples_ec2_terminate-ip"></a> This example shows how you might create an identity\-based policy that limits EC2 instances by allowing the action, but explicitly denying access when the request comes from outside the spec...
Python
UTF-8
416
3.453125
3
[]
no_license
''' Created on 18 may. 2020 @author: Guzman Lopez Cesar Gerardo 88-8@live.com.mx ''' from random import random from cmath import sqrt aciertos,num_lanzamientos=0.0,5000000 for n in range(num_lanzamientos): #si es cierto regresara cierto que en #python si lo sumo a un real se toma como uno y 0 si es falso ...
JavaScript
UTF-8
698
2.671875
3
[]
no_license
var React = require('react'); var ListElement = require('./ListElement.js'); var data = [{"id": 1, "name": "first element"},{"id": 2, "name": "second element"},{"id": 1, "name": "third element"}]; var List = React.createClass({ render: function(){ var listElements = data.map(function(element) { ...
C++
UTF-8
1,816
2.9375
3
[]
no_license
//graph.cpp #include <limits> #include <vector> #include <iostream> #include "Graph.h" #define MASK64_32 0x00000000FFFFFFFF using namespace WPAlgos; PrimGraph::PrimGraph(): m_numNodes{0} {}; void PrimGraph::addNode(uint32_t id) { m_nodes[id] = true; m_numNodes++; } void PrimGraph::removeNode(uint32_t id) { ...
Python
UTF-8
92
2.921875
3
[]
no_license
A = input("Ingresevalor de A") B = input("Ingrese valor de B") Y = A * B M = Y + 1 print M
C#
UTF-8
3,075
2.671875
3
[]
no_license
using System; using System.IO; using System.Reflection; using System.Runtime.InteropServices; namespace NetRadio.Devices.G3XDdc { class NativeLoader:IDisposable { [DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true, CharSet = CharSet.Unicode)] private static extern IntPtr Load...
Shell
UTF-8
1,899
3.828125
4
[]
no_license
#!/bin/bash # Perferences WEBROOT=~/public_html/domain.com WORKDIR=~/shadowcopy SHOST=someftphost.com ftpuser=someftpuser ftppass=somepassword db=somedatabase dbuser=somedbuser dbpass=somedbpass sqlfile=domain.sql.bz2 datafile=domain.tar.bz2 SRCDOMAIN=src.domain.com DSTDOMAIN=dst.domain.com # ==== Let's begin ==== #...
Java
UTF-8
981
2.296875
2
[]
no_license
package org.jmythapi.protocol.response; import org.jmythapi.IVersionable; import org.jmythapi.protocol.annotation.MythProtoVersionAnnotation; import java.util.List; import static org.jmythapi.protocol.ProtocolVersion.PROTO_VERSION_87; @MythProtoVersionAnnotation(from=PROTO_VERSION_87) public interface IFreeInputIn...
Java
UTF-8
404
2.0625
2
[]
no_license
package uz.controlstudentserver.dto; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor public class DistrictDto { private Integer id; private String name; private Integer regionId; public DistrictDto(String name, Inte...
C++
WINDOWS-1250
3,500
2.890625
3
[]
no_license
/** * Mdulo: Limite * Contiene la definicin de la clase TLimite que calcula lmites de * funciones matemticas * * @author Gastn Furini * @version 1.0 * @since 14/02/2005 * @revision 22/01/2007 * 26/10/2007 */ #ifndef uLimiteH #define uLimiteH #include "uEval_Ex.h" //-----...
Markdown
UTF-8
542
2.703125
3
[]
no_license
# MkDocs Moonstone Theme This project provides a theme optimized for developer and API documentation to be used with [MkDocs](https://www.mkdocs.org/) projects. ## Installation Install the theme with pip: pip install mkdocs-moonstone After the theme is installed, edit your [mkdocs.yml] file and set the theme [...
Go
UTF-8
230
2.765625
3
[]
no_license
package stream func Map[T, U any](it func(func(T) bool) bool, f func(T) U) func(func(U) bool) bool { return func(yield func(U) bool) bool { for v := range it { if !yield(f(v)) { return false } } return true } }
JavaScript
UTF-8
3,522
2.921875
3
[]
no_license
// 可以根据 id、class、element 查找元素 // param (字符串) : #id .class tag // obj : 父元素 function $(param, obj) { // #box } // 如何解决 getElementsByClassName 兼容问题 function getByClass(className, obj) { // 支持 getElementsByClassName 方法的使用 /* 不支持 getElementsByClassName 方法的使用 */ // 保存所有查找到的元素的数组结构 // 查找出 obj 对象后代所有元素 ...
Java
UTF-8
289
1.6875
2
[ "BSD-3-Clause" ]
permissive
/** * Copyright (C) Zhang,Yuexiang (xfeep) * */ package nginx.clojure.net; public interface NginxClojureSocketRawHandler { public void onConnect(long u, long sc); public void onRead(long u, long sc); public void onWrite(long u, long sc); public void onRelease(long u, long sc); }
Java
UTF-8
2,937
2.640625
3
[ "AGPL-3.0-only", "MIT" ]
permissive
/* FRODO: a FRamework for Open/Distributed Optimization Copyright (C) 2008-2013 Thomas Leaute, Brammert Ottens & Radoslaw Szymanek FRODO is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of...
Python
UTF-8
932
2.921875
3
[]
no_license
''' Parses LoadProfiles folder. Performs calculation to determine bill befor solar. May be deleted after Genability.py is functional ''' def run(load, rates): #load profile file parsed, rates is a pd data frame of import and export rates date_time = load.getTotalHour() consumption = [] before_solar = [] ...
Markdown
UTF-8
5,249
2.96875
3
[ "MIT" ]
permissive
- [Doctype 作用?标准模式与兼容模式各有什么区别?](#doctype-%e4%bd%9c%e7%94%a8%e6%a0%87%e5%87%86%e6%a8%a1%e5%bc%8f%e4%b8%8e%e5%85%bc%e5%ae%b9%e6%a8%a1%e5%bc%8f%e5%90%84%e6%9c%89%e4%bb%80%e4%b9%88%e5%8c%ba%e5%88%ab) - [Doctype文档解析类型](#doctype%e6%96%87%e6%a1%a3%e8%a7%a3%e6%9e%90%e7%b1%bb%e5%9e%8b) - [HTML5 的 form 如何关闭自动补全功能?](#html5-%e7%9a...
C++
UTF-8
1,845
2.921875
3
[]
no_license
//============================================================================ // Name : // Author : // Version : // Copyright : 2013-4-29 // Description : 广度搜索 hash //============================================================================ #include <iostream> #include <cstring> #includ...
Markdown
UTF-8
8,913
2.984375
3
[]
no_license
![Semantic](http://semantic-ui.com/images/logo.png) # **Semantic UI React** # 【介绍】 Semantic UI React是官方对[Semantic UI](https://semantic-ui.com/)进行的React集成。 - 释放jQuery - 声明式API - Augmentation - Shorthand Props 速记的属性 - Sub Components 子组件 - Auto Controlled State 自动控制状态 安装介绍请移步[使用方法](#【使用方法】) ## **释放jQuery** jQuery是一个...
JavaScript
UTF-8
2,428
3.890625
4
[]
no_license
//create a student object const student = { name: "Abhishek Saran", sclass:"VI", rollno:12 }; const library =[ { author:"Bill Gates", title:"The Road Ahead", readingStatus:true }, { author:"Steve Jobs", title:"Walter Isaacson", readingStatus:true }, { author:"Suzanne Collins", title:"Mockingja...
C#
UTF-8
1,979
3.453125
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _07.Sentence_the_Thief { class Program { static void Main(string[] args) { string idNumeralType = Console.ReadLine(); int idCount = int.Parse(Co...
Java
UTF-8
10,073
2.1875
2
[]
no_license
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * pantalla2.java * * Created on 04-ene-2015, 0:23:39 */ package com.blogspot.rolandopalermo.sockets; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; /** * * @autho...
Java
UTF-8
6,314
2.578125
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package db; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import...
PHP
UTF-8
1,986
2.984375
3
[ "MIT" ]
permissive
<?php /** * AutocompleteAttribute * * autocomplete attribute representation Class * * * @category html5 * @author <a href="mailto:seif.salah@gmail.com">sasedev</a> * @license MIT * @copyright <a href="https://sasedev.net">sasedev</a> 2017 */ namespace Sase\Commons\Htmlmodel\Attribute\Input; use Sas...
Markdown
UTF-8
1,470
2.765625
3
[]
no_license
# 访问KafkaManager的WebUI<a name="ZH-CN_TOPIC_0173178872"></a> 用户可以通过KafkaManager的WebUI,在图形化界面监控管理Kafka集群。 ## 前提条件<a name="section3181241161011"></a> - 已安装KafkaManager服务的集群。 - 获取用户“admin”帐号密码。“admin”密码在创建MRS集群时由用户指定。 ## 访问KafkaManager的WebUI<a name="section16790101115"></a> 1. 登录集群详情页面,选择“组件管理 \> KafkaManager”。 ...
Python
UTF-8
151
3.640625
4
[]
no_license
Name = input ( 'Enter you name :' ) # taking the name of the user print(f'GOOD MORNING {Name}') # printing a greeting message using a formatted string
Ruby
UTF-8
184
3.046875
3
[]
no_license
require 'pry' # create a mathematics.factorial(5) = 120 # loop multiply togethar # get the answer class Mathematics def Mathematics.fact(n) (1..n).to_a.inject(:*) end end
TypeScript
UTF-8
11,542
2.640625
3
[]
no_license
module AgileObjects.BoardGameEngine.Pieces { var _none = new Array<IPieceInteraction>(0); export class PieceInteractionMonitor { private _currentlyChosenPiece: Piece; private _currentlyHighlightedPiece: Piece; private _pieceHighlightTimeouts: Array<ng.IPromise<any>>; private _...
Python
UTF-8
791
2.796875
3
[]
no_license
import smtplib from email.mime.text import MIMEText from email.header import Header import json #sendmal(title,content) def sendmail(title="Test Mail from Python",content="Hello Python SMTP Mail"): #load config dict from file:config.json with open('config.json','r') as f: con_dict=json.loads(f.read(...
C#
UTF-8
358
3.296875
3
[]
no_license
public static int[] SplitAsIntSafe (this string delimitedString, char splitChar) { int parsed; string[] split = delimitedString.Split(new char[1] { ',' }); List<int> numbers = new List<int>(); for (var i = 0; i < split.Length; i++) { if (int.TryParse(split[i], out parsed)) numbers.Add(parsed); ...
C++
UTF-8
1,679
2.96875
3
[]
no_license
#include <evlist.hh> evlist::evlist(void) { this->_disp=0; } evlist::evlist(const evlist &_evlist) { this->_list=_evlist._list; this->_disp=this->_disp; } evlist& evlist::operator=(const evlist &_evlist) { this->_list=_evlist._list; this->_disp=this->_disp; return(*this); } evlist::~evlist(void...
Java
UTF-8
1,433
2.4375
2
[]
no_license
package model; import java.util.Date; public class Product { private int productId; private String buyCcy; private String sellCcy; private double quantity; private double settlementAmount; private double fxRate; private Date settlementDate; private Date expiryDate; public int getProductId() {...
Java
UTF-8
5,214
2.734375
3
[]
no_license
package org.dao; import org.config.PostgresConnector; import org.model.Address; import org.model.People; import java.sql.*; import java.util.ArrayList; import java.util.List; public class UserInfoDao { public List<People> getPeopleInfo(){ List<People> peopleList = new ArrayList<>(); try (Connect...
C++
UTF-8
2,262
2.96875
3
[]
no_license
// // Created by Melodies Sim on 26/6/21. // Reference: https://www.geeksforgeeks.org/socket-programming-cc/ // #include <unistd.h> #include <stdio.h> #include <sys/socket.h> #include <stdlib.h> #include <netinet/in.h> #include <string.h> #define PORT 8080 int main(int argc, char const *argv[]) { int server_fd, ...
Swift
UTF-8
375
2.671875
3
[ "MIT" ]
permissive
public struct Lock { private let nslock: NSLock public init() { self.nslock = .init() } public func lock() { self.nslock.lock() } public func unlock() { self.nslock.unlock() } public func `do`(_ closure: () throws -> Void) rethrows { self.lock() ...
TypeScript
UTF-8
645
2.5625
3
[]
no_license
import promiseWrap from 'promise-chains'; export abstract class LazyContent { constructor(private _hasFetched: boolean) { if (!_hasFetched) { return new Proxy(this, { get (target, key) { return key in target || key === 'length' || key in Promise.prototype ? ...
C#
UTF-8
1,678
3.34375
3
[ "MIT" ]
permissive
using System; namespace AppTrab { class Matrizes { public int[,] matriz; public int n, p; public Matrizes() { n = 3; p = 3; matriz = new int[n, p]; } public Matrizes(bool isRandomic) { n = 3; p...
Go
UTF-8
764
2.84375
3
[]
no_license
package goElFinder import ( "os" "path/filepath" "io/ioutil" ) func (self *elf) size() int64 { var size int64 for _, p := range self.targets { s := _size(self.volumes[p.id].Root, p.path) size = size + s } return size } func _size(root, path string) int64 { var size int64 = 0 u, err := os.Open(filepath....
Java
UTF-8
992
2.765625
3
[]
no_license
class LFSR { public LFSR(String exp, int tap) { m_n=exp.length(); m_bits=binstr2int(exp); m_tap=tap; m_mask=(1<<m_n)-1; } public int step() { int t= (((1<<(m_n-1)) & m_bits)>>(m_n-1)) ^ (((1<<m_tap) & m_bits)>>m_tap); m_bits=(m_bits<<1) & m_mask; m_bits |= t; return t; } public int g...
SQL
UTF-8
1,617
3.46875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost:3306 -- Temps de generació: 24-04-2017 a les 10:27:34 -- Versió del servidor: 5.6.35 -- Versió de PHP: 7.1.1 CREATE DATABASE IF NOT EXISTS MakiTetris; USE MakiTetris; SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zon...
Java
UTF-8
2,711
2.484375
2
[ "MIT" ]
permissive
/* * Copyright (c) 2014, Lukas Tenbrink. * * http://ivorius.net */ package ivorius.reccomplex.utils.zip; import ivorius.reccomplex.utils.ByteArrays; import java.io.IOException; import java.io.InputStream; import java.util.HashMap; import java.util.Map; import java.util.Optional; import java.util.function.Suppli...
C#
UTF-8
2,313
3
3
[]
no_license
using System; using System.Collections.Generic; using System.Diagnostics.Eventing.Reader; using System.Linq; using System.Security.Principal; using System.Text; using System.Threading.Tasks; namespace CSP.Misc.Custom { class CustomList { private int[] _content; public int[] Content { ...
C++
UTF-8
730
3.109375
3
[]
no_license
#include <iostream> using namespace std; bool judge(long long int a,long long int b,long long int c){ if (a + b > c) return true; return false; }; int main(){ int n; long long int a,b,c; cin >> n; bool arr[n]; for(int i = 0; i < n;i++){ cin >> a >> b >> c; arr[i] = f...
C
UTF-8
1,671
3.25
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "error.h" void Write_error(char c, const char *e, char **error[]) { char i; for (i = 0; (*error)[i]; i++); if (e) { (*error)[i] = malloc(sizeof(char) * (2 + strlen(e))); sprintf((*error)[i], "%c%s", c, e); } else { (*error)[...
Java
UTF-8
404
1.820313
2
[ "MIT" ]
permissive
package com.ecommerce.api.model.commons; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Getter; import lombok.Setter; @Getter @Setter @JsonInclude(JsonInclude.Include.NON_NULL) public class FeeMonth { @JsonPrope...
Java
UTF-8
1,938
2.40625
2
[ "Apache-2.0" ]
permissive
/* * JPPF. * Copyright (C) 2005-2019 JPPF Team. * http://www.jppf.org * * 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 re...
TypeScript
UTF-8
265
2.65625
3
[]
no_license
const formatDate = (date: Date): string => { const data = new Date(); const day = data.getDate().toString(); const month = (data.getMonth() + 1).toString(); const year = data.getFullYear(); return `${day}/${month}/${year}`; }; export default formatDate;
C++
UTF-8
3,174
2.6875
3
[ "MIT" ]
permissive
/*** Appendix D: Exporting and Packaging Selected Grid Extent ***/ // This code generates the output_bin_dfile() database // function, which is used to export gridded TCP data // in the binary format required by ARSC. #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <sys/stat.h> #include <unistd....
PHP
UTF-8
775
2.578125
3
[]
no_license
<?php namespace Jaccob\AccountBundle\Security; final class Access { /** * Security level private */ const LEVEL_PRIVATE = 0; /** * Security level friends can see */ const LEVEL_FRIEND = 50; /** * Security level public */ const LEVEL_PUBLIC_HIDDEN = 100; /**...
Java
UTF-8
4,496
2.453125
2
[]
no_license
package it.unisa.microapp.editor; import it.unisa.microapp.utils.Constants; import java.util.ArrayList; import java.util.List; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Point; public class IconsGrid extends Grid { int startRows = 0; int...
Java
UTF-8
534
1.976563
2
[]
no_license
package com.hconve.findroom.ui; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentTransaction; import dagger.android.support.DaggerAppCompatActivity; public abstract class BaseActivity extends DaggerAppCompatActivity { public void replaceFragment(int layoutId, Fragment fragment) { ...
Python
UTF-8
865
3.015625
3
[]
no_license
import pandas as pd from scipy import stats from sklearn.cluster import KMeans import matplotlib.pyplot as plt import seaborn as sns df = pd.read_csv('blogdata.csv', sep=';') # df = pd.read_csv('blogdata.csv', sep="\t", quoting=csv.QUOTE_NONE)#, index_col=False) # Make a copy of DF df_tr = df # Transsform the timeOf...
C++
UTF-8
580
2.75
3
[]
no_license
#ifndef PARALLELEPIPOID_H #define PARALLELEPIPOID_H #include "../types.h" #include "Object.h" class Parallelepipoid : public Object { public: /** * @param p Position at which the object is centered * @param lx Length along the x axis (in meters) * @param ly Length along the y axis (in meters) * @param l...
Python
UTF-8
735
4
4
[]
no_license
''' xの値で級数の値の計算 級数・・・・一定の法則に従って変化する数を、一定の順に並べた数列の和 ''' from sympy import Symbol, pprint, init_printing def print_series(n, x_value): init_printing(order='rev-lex') x = Symbol('x') series = x for i in range(2, n+1): series = series + (x**i)/i pprint(series) #xで級数評価 series_value = s...
Markdown
UTF-8
1,573
3.359375
3
[ "MIT" ]
permissive
# fixing-git-mistakes ## Setup Before the workshop, do the following: ### Clone this repository. It doesn't have much in it yet, but we will be building it up during the workshop. ### Create a new repository on your own GitHub account This is the repo you will use during the workshop - just for you. This can b...
Java
UTF-8
1,120
3.3125
3
[]
no_license
package com.dudev.android.hackernews.Util; import java.util.HashSet; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Set; public class ListUtils { private ListUtils() {} @SuppressWarnings("unchecked") public static <T> void removeDuplicate(List <T> list) { Se...
Python
UTF-8
2,737
4.28125
4
[]
no_license
# Benifits of LinkedList # 1. # Complexity # Indexing O(n) #Inserting/Delete Element at Start O(1) class Node: def __init__(self,data,next): self.data = data self.next = next class LinkedList: def __init__(self): self.head = None def insert_at_beg(self,data): node = Nod...
Java
UTF-8
1,091
1.875
2
[]
no_license
package com.sxht.dao; import com.sxht.model.*; import org.apache.ibatis.annotations.Param; import java.util.List; public interface FeatureMapper { int countByExample(FeatureExample example); int deleteByExample(FeatureExample example); int deleteByPrimaryKey(String id); int insert(Feature record);...
C#
UTF-8
1,199
2.5625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ShoppingCart.Web.Mvc.Tests.Services { public class MockCartRepository : ShoppingCart.Web.Mvc.Services.ICartRepository { private Dictionary<string, Model.Cart> m_Cache; public MockCartRepository() { ...
C
UTF-8
248
3.375
3
[]
no_license
#include <stdio.h> #include <stdint.h> #include <stdlib.h> int overflow(int32_t x, int32_t y){ return (x ^ (1<<31) ) + (y ^ (1<<31)); } int main(){ printf("will %d + %d give us an overflow? %d", 2147483647 , 3, overflow(2148473647, 3)); }
Java
UTF-8
4,038
3.203125
3
[]
no_license
package br.usp.larc.tcp.protocolo; import java.text.DecimalFormat; import java.text.MessageFormat; import java.util.Hashtable; import java.util.Iterator; /** * Classe que representa as M�quinas de Conex�es que receber�o pacotes do objeto * Monitor. * * Note que essa classe estende a classe java.util.Hashtable (...
JavaScript
UTF-8
1,058
2.609375
3
[ "MIT" ]
permissive
const config = require('config') , disConfig = config.get('discord'); module.exports = { name: 'when', args: true, description: `Shows when an account was created.`, execute(client, message, logger, args) { // // FUNCTION DECLARATIONS // function getUserFromMention(mention) { if (!menti...
C++
UTF-8
536
2.9375
3
[]
no_license
#include <vector> using namespace std; class Solution { public: vector<bool> kidsWithCandies(vector<int>& candies, int extraCandies) { vector<bool> abc; int biggest = candies.at(0); for (int i = 1; i < candies.size(); ++i) { if (biggest < candies.at(i)) biggest = candies.at(i);...
PHP
UTF-8
1,124
2.53125
3
[ "MIT" ]
permissive
<?php namespace PhpOffice\PhpSpreadsheetTests\Worksheet\Table; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; use PHPUnit\Framework\TestCase; class SetupTeardown extends TestCase { /** * @var ?Spreadsheet */ private $spreadsheet; /** * @var ?Wo...
Java
UTF-8
1,025
2.078125
2
[]
no_license
package cn.edu.szu.bigdata.service.impl; import cn.edu.szu.bigdata.entity.SegmentEntity; import cn.edu.szu.bigdata.mapper.SegmentMapper; import cn.edu.szu.bigdata.service.SegmentService; import org.springframework.stereotype.Service; import java.util.List; /** * Created by longhao on 2017/9/27. * Email: longhao1@e...
Java
UTF-8
8,531
2.046875
2
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package pane; import com.jfoenix.controls.JFXDrawer; import com.jfoenix.controls.JFXHamburger; import com.jfoenix.transitions...
Java
UTF-8
752
2.65625
3
[]
no_license
package retrofit.http; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Adds headers literally(逐个的) supplied in the {@code value}. * * &#64;(@)Headers("Cache...
Markdown
UTF-8
7,283
2.765625
3
[ "MIT" ]
permissive
iptables ======== Configures the firewall using iptables. This role supports ingress and egress filtering. When egress filtering is enabled, some common protocols are automatically allowed. This includes: * DNS requests to the name servers in `/etc/resolv.conf` * Package management (Gentoo, Debian, Alpine) Requiremen...
Ruby
UTF-8
2,272
3.796875
4
[]
no_license
require_relative "00_tree_node.rb" class KnightPathFinder attr_accessor :considered_positions attr_reader :root_node def initialize(pos) @pos = pos @root_node = PolyTreeNode.new(pos) @considered_positions = [pos] self.build_move_tree end def build_move_tree #bfs s...
JavaScript
UTF-8
2,274
2.71875
3
[]
no_license
import {GoBoardBackgroundDrawable as Background} from './goboardbackgrounddrawable.js'; import {GoHorCoordinatesDrawable as HorCoordinates, GoVerCoordinatesDrawable as VerCoordinates} from './gocoordinatesdrawable.js'; import {GoHitBoxDrawable as HitBox, GoHitBoxesDrawable as HitBoxes} from './gohitboxdrawable....
Java
UTF-8
4,762
2.140625
2
[]
no_license
package org.bp.teuno.checklist.UI; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import org.bp.teuno.checklist.Modelo.A98; import org.bp.teuno.checklist.SQLite.BD; import org.bp.teuno.checklist.SQLite.BD.TABLAS; imp...
Java
UTF-8
370
1.695313
2
[]
no_license
package com.example.vladii.guiaturismocuenca; import android.app.Activity; import android.os.Bundle; /** * Created by vladii on 16/04/2017. */ public class Buscar extends Activity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout...
Python
UTF-8
3,916
2.59375
3
[]
no_license
#! /usr/bin/env python # -*- coding: utf-8 -*- from PyQt4 import QtGui, QtCore from PyQt4.QtGui import QMainWindow, QWidget, QLabel, QPixmap,QWidget,QApplication import cv2 import cv2.cv as cv import sys import pickle import socket import struct """ Area de constantes """ CHAT_PORT = 5000 IP = '127.0.0.1'...
PHP
UTF-8
4,143
3.234375
3
[]
no_license
<?php // 1,为什么需要分页显示 // 查询数据库,返回的信息数量,往往非常庞大,往往不可能一次性的全部显示出来,此时需要按照需求,输出查询内容 // //使用limit来实现此效果 // //该语句,将所有数据,按照需求,分成不同部分,每次只输出部分之内的数据 // //第一个参数是显示的第一条数据的序号,第二个参数是所显示数据的数量 $host = "127.0.0.1"; $user = "root"; $password = ""; $database = "psd1803"; $port = 3306; $link = mysqli_connect($host,$user,$password,$dat...
Markdown
UTF-8
542
2.515625
3
[]
no_license
# MakersMaker - Dashboard Dashboard for MakersMaker, a programming education platform. ## What we provide in the MakersMaker Dashboard ## - Calendar to easily checkout your course schedules (such as quizzes, assignment deadlines, etc,.) - Lectures list that you are attending now. - Lectures informations such as...
Markdown
UTF-8
4,803
3.28125
3
[]
no_license
# cocktail-party-algorithm This is an implementation of independent component analysis (ICA) that solves the cocktail party problem. The algorithm falls under the larger class of unsupervised machine learning and is, in my opinion, one of the more refined examples of it. The problem is also called "blind source separa...
Go
UTF-8
6,794
2.6875
3
[ "MIT" ]
permissive
package gosn import ( "encoding/json" "fmt" "time" ) func parseTheme(i DecryptedItem) Item { c := Theme{} c.UUID = i.UUID c.ItemsKeyID = i.ItemsKeyID c.ContentType = i.ContentType c.Deleted = i.Deleted c.UpdatedAt = i.UpdatedAt c.CreatedAt = i.CreatedAt c.ContentSize = len(i.Content) var err error if !...
PHP
UTF-8
934
2.53125
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Eloquent\SoftDeletingTrait; class Entry extends \Eloquent { use SoftDeletingTrait; /** * Which fields may be mass assigned * * @var array */ protected $fillable = [ 'owner_id', 'title', 'body', 'favorite', ]; public static $rules = [ 'title' =...
Python
UTF-8
1,523
2.875
3
[]
no_license
#--coding:utf-8-- #code by myhaspl #12-9.py from __future__ import unicode_literals from __future__ import division import nltk import sys sys.path.append("../") import jieba def cutstring(txt): #分词 cutstr = jieba.cut(txt) result=" ".join(cutstr) return result #读取文件 txtfileobject = open('nl...
JavaScript
UTF-8
782
2.75
3
[]
no_license
const fs = require('fs'); function readFileTests() { const callback = (error, data) => { console.log(data); }; const callback2 = (err, bytesRead, sth) => { console.log(bytesRead, sth); }; fs.readFile('./files', callback); fs.readFile('./files/helloworld.txt', callback); con...
Python
UTF-8
939
3.53125
4
[]
no_license
#! /usr/bin/env python #! -*- coding: utf-8 -*- from PIL import Image import face_recognition # Load the jpg file into a numpy array image = face_recognition.load_image_file('biden.jpg') # Find all the faces in the image using the default HOG-based model # This method is fairly accurate, but not as accurate as the C...
Java
GB18030
5,170
2.515625
3
[]
no_license
package com.example.baihu_calculator; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.EditText; public class three_game extends Activity{ double bh[][] = new double[6][4]; /* * baihu[0]: * baihu[1]: * baihu[2]: ...
Python
UTF-8
891
2.71875
3
[ "Apache-2.0" ]
permissive
import unittest import locust from appian_locust._locust_error_handler import log_locust_error from appian_locust.helper import ENV class TestLocustErrorHandler(unittest.TestCase): def test_obtain_correct_location(self) -> None: ENV.stats.errors.clear() def run_with_error() -> None: ...
PHP
UTF-8
488
3.046875
3
[]
no_license
<html> <head> <title>Variables </title> </head> <body> <div id = ""> <?php //This program prints hello world, a locally defined variable, and uses a special-reserved variable $_SERVER $txt = "Hello World"; $num1 = 16; echo "<div>"; echo "$txt <br />"; echo "User-defined Variable's value: $num1 <br />"; ech...
Python
UTF-8
2,534
2.671875
3
[]
no_license
from bs4 import BeautifulSoup from urllib.request import Request, urlopen from urllib.parse import urlparse import urllib.request import requests import database import re text_file = open('text.txt', 'at') database.MakeTable() def getText(soup): for script in soup(["script", "style"]): script.extract...
Java
UTF-8
3,502
2.125
2
[]
no_license
package com.shcepp.shdippsvr.business.controller; import com.shcepp.shdippsvr.business.bean.pojo.FileUploadReqPojo; import com.shcepp.shdippsvr.business.dao.ShdippSysAttachmentDao; import com.shcepp.shdippsvr.business.service.BaseService; import com.shcepp.shdippsvr.business.service.FileService; import com.shcepp.shdi...
Markdown
UTF-8
261
2.59375
3
[]
no_license
# List-of-play-school-in-Anna-Nagar We provide your child with a safe, friendly and nourishing environment, it is important to ensure that the shortlisted play schools match the requirements. https://preschoolinannanagar.com/list-of-play-school-in-annanagar/
C++
GB18030
1,112
3.21875
3
[]
no_license
#pragma once #ifndef _UF_SET_H_ #define _UF_SET_H_ #include <cstring> namespace SimSTL{ template <size_t N> class uf_set{ public: uf_set(); int Find(int index); void Union(int index1, int index2); void Clear(); private: int parent[N];//parent[i] = -n ʾڵiǸڵiΪйnڵ }; template<size_t N> uf_set<N>::uf...