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
614
2.734375
3
[]
no_license
#include <stdio.h> #include <bits/stdc++.h> using namespace std; using ll=long long; using ld=long double; using P=pair<ll,ll>; #define FOR(i,n,m) for(ll i=n; i<(ll)m;i++) #define cinv(v,n,m) FOR(i,n,m) cin>>v.at(i) #define coutv(v,n,m) FOR(i,n,m) cout<<v.at(i) <<" " #define cout(n) cout<<fixed<<setprecision(n) int ma...
Java
UTF-8
1,181
2.421875
2
[ "Apache-2.0" ]
permissive
package com.norwand.game.management.gamedata.environement.entities.monsters; import com.badlogic.gdx.graphics.Pixmap; import com.norwand.game.management.gamedata.GameData; import com.norwand.game.management.gamedata.environement.Floor; import com.norwand.game.management.gamedata.environement.entities.Monster; import c...
Python
UTF-8
5,466
3.0625
3
[ "MIT" ]
permissive
# # File: project1.py # ## top-level submission file ''' Note: Do not import any other modules here. To import from another file xyz.py here, type import project1_py.xyz However, do not import any modules except numpy in those files. It's ok to import modules only in files that are ...
Markdown
UTF-8
2,437
2.96875
3
[]
no_license
# Tugas-SI-Web-Sederhana E41181245 Nurlaita Afia Tri Wahyuni # CRUD CRUD adalah singkatan dari Create, Read, Update dan Delete. CRUD maksudnya membuat input data ke database, menampilkan data dari database, mengedit mengupdate data serta menghapus data. CRUD sangat penting untuk pengelolaan data pada database. Hal ini...
Shell
UTF-8
6,504
3.875
4
[]
no_license
#!/bin/bash ############################################################################### # # # # ####################################################################...
Markdown
UTF-8
6,634
3.03125
3
[ "MIT" ]
permissive
--- layout: post title: 跟我一起学Makefile 学习记录2 categories: Makefile description: 工作中用到Makefile学习 keywords: Linux, Makefile --- ### 命令执行 ``` #上一条命令的结果应用在下一条命令时,你应该使用分 号分隔这两条命令 exec: cd /home/hchen pwd #cd没有作用,pwd会打印出当前的Makefile exec: cd /home/hchen; pwd #忽略命令的出错,我们可以在Makefile的命令行前加一个减号“-” clean: -rm -f *....
Python
UTF-8
9,917
2.625
3
[]
no_license
import json import os import sys # sys нужен для передачи argv в QApplication from PyQt5 import QtWidgets from PyQt5.QtCore import QStringListModel import saver from messages.errors import ERRORS from messages.status import STATUS from py_windows.design import Ui_MainWindow DATA = {} # Загружается из json-файла пр...
Python
ISO-8859-1
235
4.15625
4
[]
no_license
## 27 print("Este programa le ayudar a calcular si el nmero ingresado es par o impar") num=int(input("Por favor ingrese un nmero ")) if num % 2 == 0: print("El nmero", num, "es par") else: print("El nmero", num, "es impar")
Java
UTF-8
4,493
2.015625
2
[ "Apache-2.0", "BSD-3-Clause", "MIT", "LicenseRef-scancode-protobuf", "CC-BY-3.0" ]
permissive
begin_unit|revision:0.9.5;language:Java;cregit-version:0.0.1 begin_comment comment|/** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF lice...
PHP
UTF-8
790
2.796875
3
[]
no_license
<?php //var_dump(get_magic_quotes_gpc()); //http://www.satya-weblog.com/2010/11/php-and-mysql-sql-injection-example.html mysql_connect('localhost', 'L1ttleJ0hnny', '') or die('DB Conn error'); mysql_select_db('J0hnnyDr0pTables'); echo $query = "select * from user where user = '$_POST[user]' AND password = '$_POST[pass...
C++
UTF-8
6,864
2.796875
3
[ "BSD-3-Clause" ]
permissive
/* ToString.cpp - String Tools * * Author : Alexander J. Yee * Date Created : 07/07/2013 * Last Modified : 08/24/2014 * */ //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// ...
Java
UTF-8
1,707
2.484375
2
[]
no_license
package celebration.Logpack; import java.sql.*; import application.Main; import application.cdb; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.scene.Scene; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.layout.AnchorPane; public class ...
C#
UTF-8
1,244
2.703125
3
[ "MIT" ]
permissive
using System.Collections.Generic; using Rhino.Geometry; namespace KangarooSolver.Goals { public class GaviVRForce : GoalObject { public Vector3d Force; public GaviVRForce() { } public GaviVRForce(int u, Vector3d v) { PIndex = new int[1] { -...
Markdown
UTF-8
1,451
2.703125
3
[]
no_license
Polymer CI Runner ================= A quick 'n dirty Node app that pulls GitHub webhook events off of a [Firebase](https://www.firebase.com/) queue and runs the appropriate set of tests for them. Configuring The Webhook ----------------------- Through the joys of Firebase, you can have GitHub webhooks publish direc...
Markdown
UTF-8
1,358
3.265625
3
[]
no_license
Evolution ========= Readme for the final project for Programming Paradigms, Spring 2014. A multiplayer networked game using the Pygame and Twisted libraries. This game is a twist on the classic "eat smaller fish to grow" theme: you must compete with an opponent who might be bigger than you! Setup ===== Evolution.py...
Rust
UTF-8
1,060
2.546875
3
[]
no_license
use amethyst::{ core::{math::Vector3, Transform}, ecs::{Join, Read, ReadStorage, System, WriteStorage}, input::InputHandler, }; use crate::components::*; pub struct MovementSystem; impl<'s> System<'s> for MovementSystem { type SystemData = ( ReadStorage<'s, Player>, WriteStorage<'s, Po...
Shell
UTF-8
2,326
4.03125
4
[]
no_license
#!/bin/bash START_POINT=1 END_POINT="" APPLY_ONLY="" SIGNED_OFF="" while getopts 's:e:a' OPT; do case $OPT in s) START_POINT="$OPTARG";; e) END_POINT="$OPTARG";; a) APPLY_ONLY="yes";; ?) echo "Usage: `$SHELL_NAME $0` [opti...
C++
UTF-8
1,087
3.125
3
[]
no_license
/** * 本代码由九章算法编辑提供。没有版权欢迎转发。 * - 九章算法致力于帮助更多中国人找到好的工作,教师团队均来自硅谷和国内的一线大公司在职工程师。 * - 现有的面试培训课程包括:九章算法班,系统设计班,九章强化班,Java入门与基础算法班 * - 更多详情请见官方网站:http://www.jiuzhang.com/ */ /** * Definition of TreeNode: * class TreeNode { * public: * int val; * TreeNode *left, *right; * TreeNode(int val) { * ...
Python
UTF-8
847
3.265625
3
[]
no_license
##nr = 33100000 ##nrs = [] ##for i in range(1, nr): ## divisors = [] ## for j in range(0, int(i/2)): ## if i % (j+1) == 0: ## divisors.append(j+1) ## divisors.append(i) ## if sum(divisors)*10 >= nr: ## print(i) ## break import math def GetDivisors(n): small_divisors = [i...
Markdown
UTF-8
11,225
3.109375
3
[]
no_license
FastSwitch ========== A Sublime Text 2/3 plugin. To switch between files A file of a given syntax will switch to a file with the same base name but with a different user defined extension. The file will be searched in a list of user defined directory. The first file found respecting the criteria will be the one Subli...
JavaScript
UTF-8
24,592
2.71875
3
[ "Apache-2.0" ]
permissive
/* * Copyright 2010-2012 Research In Motion Limited. * * 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 applicable ...
Python
UTF-8
1,987
2.78125
3
[]
no_license
from turtle import* from math import* from random import* speed(0) hideturtle() screen = getscreen() screen.tracer(True) #------------------------------------------------------------- global xhome global yhome xhome = -300 zhome = -250 home = (xhome, zhome) global xline global yline global zline xline = 400 yli...
C++
UTF-8
2,155
2.75
3
[]
no_license
inline ll hilbertOrder(ll x, ll y, ll pow, ll rotate) { if (pow == 0) { return 0; } ll hpow = 1 << (pow-1); ll seg = (x < hpow) ? ( (y < hpow) ? 0 : 3 ) : ( (y < hpow) ? 1 : 2 );...
C++
UTF-8
628
2.75
3
[]
no_license
#ifndef DESCRIPTOR_HPP #define DESCRIPTOR_HPP #include <memory> namespace tcp { class Descriptor { private: int fd_; public: Descriptor() noexcept; explicit Descriptor(int fd) noexcept; Descriptor(const Descriptor& other_fd) = delete; Descriptor& operator=(const ...
Java
UTF-8
311
2.296875
2
[]
no_license
package webchat.dao.sql.query; import java.util.List; public class PredicateToken implements Token { MySQLWhere w; @Override public void exec(TokenList tl) { List<Token> tokens = w.tokenList.tokens; for (Token t : tokens) { t.exec(tl); } } PredicateToken(MySQLWhere w) { this.w = w; } }
Java
UTF-8
4,881
2.25
2
[]
no_license
package com.lawu.eshop.mall.srv.bo; import java.math.BigDecimal; import java.util.Date; import com.lawu.eshop.mall.constants.DiscountPackageStatusEnum; /** * 优惠套餐BO * * @author Sunny * @date 2017年6月26日 */ public class DiscountPackageBO { /** * 主键 */ private Long id; /** * 商家id ...
Java
UTF-8
4,774
1.96875
2
[]
no_license
package fr.esil.wificonnector.service; import java.io.File; import java.util.LinkedList; import java.util.List; import net.esil.wificonnector.object.Form; import net.esil.wificonnector.object.Input; import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; import com.rabgs.http.browse...
Markdown
UTF-8
3,646
2.515625
3
[]
no_license
- [ ] ok [42008574](https://bj.5i5j.com/ershoufang/42008574.html) #地铁站/大井 #地铁站/郭庄子 , #地铁线/14号线(西) #单价/6-8 #总价/210-225 #面积/30-35 #区域/丰台/七里庄/小区-丰体时代 #在售 #所在楼层/低楼层 #总楼层/28层 #layout ![layout](http://image16.5i5j.com/erp/house/4200/42008574/huxing/kjcdhjjg3651eff3.jpg_P5.jpg) # 简介 210万, 6.28万/m² 小区: 丰体时代 建筑类型: 塔...
C#
UTF-8
633
2.5625
3
[]
no_license
namespace System.Runtime.InteropServices { using System; [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Enum | AttributeTargets.Struct | AttributeTargets.Class, Inherited=false), ComVisible(true)] public sealed class TypeLibTypeAttribute : Attribute { internal TypeLibTypeFlags _...
Java
UTF-8
868
1.789063
2
[]
no_license
package ee.tenman.investing.integration.yieldwatchnet.api; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; import java.math.BigDecimal; @Data @SuppressWarnings("unused") public class Currencies { @JsonProperty("BTCB") private BigDecimal btcb; @JsonProperty("EUR") private Bi...
Python
UTF-8
28,841
2.6875
3
[]
no_license
# Python 3.7 """ File: parsing.py Author: Shengyuan Wang Date: Jun 1, 2019 Last update: May 26, 2020 Purpose: Collect and parse individual protein individual chains data, including protein description, protein sequence with start/end position, associate nucleotide...
Java
UTF-8
6,709
2.015625
2
[]
no_license
package page; import static core.DriverFactory.getDriver; import org.openqa.selenium.support.PageFactory; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.junit.Assert; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui....
Shell
UTF-8
2,535
4.09375
4
[ "Apache-2.0" ]
permissive
#!/bin/sh usage="Usage: $(basename $0) [-h][-a account][-c comment][-p path] token url -h - help -w - wait for page to be cloned before returning (defaults to don't wait) -l - print long url for created bolt (defaults to short url) -a account - bo.lt account to put bolt in (defaults to first account) -c comm...
Python
UTF-8
411
3.03125
3
[]
no_license
def euclidean(a, b): c = a % b return b if c == 0 else euclidean(b, c) def extendedEuclideanAlgorithm(a, b): if a != 0: gcd, x, y = extendedEuclideanAlgorithm(b % a, a) return (gcd, y - (b // a) * x, x) else: return (b, 0, 1) def modInverse(a, n): gcd, x, _ = extendedEucli...
Python
UTF-8
2,174
2.828125
3
[ "BSD-3-Clause" ]
permissive
"""Base class for metadata wrapper classes.""" import os # Local import class _geospatial(object): """ Base class used as interface for providing file-level metadata from geospatial and temporal metadata files. """ def __init__(self): self.unimpl_base_class() def _add_checksum(self,...
C++
UTF-8
10,634
2.734375
3
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-philippe-de-muyter" ]
permissive
/* config_file.hh - This file is part of MUSIC - a code to generate multi-scale initial conditions for cosmological simulations Copyright (C) 2010 Oliver Hahn */ #ifndef __CONFIG_FILE_HH #define __CONFIG_FILE_HH #include <string> #include <sstream> #include <map> #include <fstream> #include <iostream> #...
Java
UTF-8
344
2.140625
2
[]
no_license
package com.movieflix.app.repository; import java.util.List; import com.movieflix.app.entity.Video; public interface VideoRepository { Video getVideo(String videoId); List<Video> getAllVideos(); void delete(Video video); Video create(Video video); Video getVideoByTitleYear(String title, int year); Video ...
C++
UTF-8
1,813
3.203125
3
[ "MIT" ]
permissive
/* Copyright (c) 2018 by CanftIn <wwc7033@gmail.com> contact me at https://weibo.com/5632002270/profile or http://www.canftin.com MIT licence */ #pragma once #include "Math.h" template <typename T> class Vec2 { public: T x, y; public: Vec2() {} Vec2(T x, T y) : x(x), y(y) {} Vec2(const Vec2& vec) : Vec2(vec...
C++
UTF-8
1,248
3.640625
4
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: /* 解法1:排序+双指针,排序后,对于每个nums[i]进行一次双指针遍历搜索 时间复杂度: O(nlogn) + O(n^2) = O(n^2) 空间复杂度: O(logn) 排序使用空间 可优化空间:保证每次判断不取重复的元素,如果遇到重复的元素则跳过 */ int threeSumClosest(vector<int>...
Shell
UTF-8
2,916
2.984375
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
#!/bin/bash # # script to try to automate ocserv setup on a device sudo apt-get -y install ocserv sudo apt-get -y install gnutls-bin HERE="`pwd`" cd /etc/ocserv # sudo vi ca.tmpl echo "cn = \"VPN Test CA\"" | sudo tee ca.tmpl echo "organization = \"TEST VPN SERVER\"" | sudo tee -a ca.tmpl echo "serial = 1" | sudo t...
Markdown
UTF-8
1,042
2.9375
3
[ "MIT" ]
permissive
# Recollection Effective immutable collections for Dart. [API docs](https://pub.dartlang.org/documentation/recollection/latest/) ## Examples Create immutable views around list with `ListView`. Recreate lists with `ListBuilder`. ```dart var list = [1, 2, 3]; var view = ListView.of(list); list = ListBuilder.from(l...
Java
UTF-8
1,110
2.625
3
[]
no_license
package l2n.game.instancemanager; import l2n.commons.list.GArray; import l2n.game.event.L2Event; import l2n.game.model.actor.L2Player; /** * Менеджер для управления ивентами * * @author bloodshed <a href="http://l2nextgen.ru/">L2NextGen</a> * @email rkx.bloodshed@gmail.com * @date 07.10.2011 * @time 20:00:09 ...
Python
UTF-8
346
3.5625
4
[]
no_license
average=(90+85+70+75+80)/5 print(average) if(average>90 and average<=100): print("A+") elif(average>80 and average<=90): print("A") elif(average>70 and average<=80): print("B") elif(average>60 and average<=70): print("C") elif(average>50 and average<=60): print("D") elif(average<=50): print("F")...
JavaScript
UTF-8
528
3.296875
3
[]
no_license
var canvas=document.getElementById("canvas1") ctx=canvas.getContext("2d") color="Blue" canvas.addEventListener("mousedown",draw) function draw(e){ color = document.getElementById("color").nodeValue; console.log(color); mouseX=e.clientX-canvas.offsetLeft; mouseY=e.clientY-canvas.offsetTop; console.log("X = " + m...
Python
UTF-8
3,776
3.828125
4
[ "MIT" ]
permissive
def sequence_breaker(sequence): '''Create a set of intersections, this will eliminate duplicates. ''' sequence = sequence.split(',') x_value = 0 y_value = 0 grid = set() for path in sequence: direction = path[0] distance = int(path[1:]) if direction == 'R': ...
Java
UTF-8
406
2.828125
3
[]
no_license
package com.bridgelabz.algorithmprogram; import java.io.IOException; import java.util.Arrays; import com.bridgelabz.utility.Utility; public class BubbleSort { public static void main(String[] args) throws IOException { String arr[]= Utility.readFile("WordFile.txt"); System.out.println("Enter the array"...
Markdown
UTF-8
766
2.640625
3
[]
no_license
# am023_floor_builder In questo esempio, senza usare *trick* come quelli proposti nell'originale, per creare l'oggetto `TaskDao` ci prepriamo per primo una computazione asincrona ``` dart Future<TaskDao> _getDao() async { final database = await $FloorAppDatabase .databaseBuilder('flutter_database.db') .build...
Java
UTF-8
924
2.25
2
[]
no_license
package springbasic; import static org.junit.Assert.assertEquals; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;...
Java
UTF-8
2,041
2.296875
2
[]
no_license
package co.edu.poli.dao; import co.edu.poli.util.Columna; public final class item_evaluacion{ @Columna(ClavePrimaria=true,AutoNumerico=true, Requered = true,NameForeingKey = "") private java.lang.Integer id_item_evaluacion; @Columna(ClavePrimaria=false,AutoNumerico=false, Requered = true,NameForeingKe...
Java
UTF-8
2,926
2.03125
2
[]
no_license
package pavloweather.controller; import java.util.Date; import java.util.List; import java.lang.Iterable; import org.springframework.stereotype.Controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.a...
Markdown
UTF-8
1,075
2.875
3
[ "MIT" ]
permissive
# Neural Architecture Search and AutoML ## Neural Architecture Search If you wish to dive more deeply into neural architecture search, feel free to check out these optional references. You won’t have to read these to complete this week’s practice quizzes. + [Neural Architecture Search](https://arxiv.org/pdf/1808.053...
Java
UTF-8
440
1.929688
2
[ "MIT" ]
permissive
package org.communiquons.android.comunic.client.data.enums; /** * Notifications visibility enums * * @author Pierre HUBERT * Created by pierre on 4/9/18. */ public enum NotificationVisibility { /** * When the notification is targeting only one single user */ EVENT_PRIVATE, /** * When...
Python
UTF-8
321
2.875
3
[]
no_license
from datetime import datetime class Greeting: # todo change Solomon to be the user from the user data json file. def __init__(self, name): date = datetime.today().strftime('%m-%d-%Y') self.message = "<emphasis level=\"strong\">Good morning" + name + "! Today is " + date + ".\n" + "</emphasis>"...
Java
UTF-8
5,442
2.234375
2
[]
no_license
package com.repair.zhoushan.entity; import android.os.Parcel; import android.os.Parcelable; public class EventItem implements Parcelable { public EventItem() { ID = 0; EventName = ""; EventCode = ""; EventState = ""; ReportStation = ""; DealStation = "...
C#
UTF-8
1,317
2.734375
3
[]
no_license
using System; using System.Collections.Generic; using System.IO; using System.Linq; using OrbitOne.SharePoint.Importer.Domain; namespace OrbitOne.SharePoint.Importer.SharePoint { public class FlatListDuplicateNameResolver { private readonly IList<string> m_filenames; public FlatListDuplicateN...
Python
UTF-8
689
3.046875
3
[ "MIT" ]
permissive
from utils.parser_helpers import split_standard_separators def multiple_choice_parser(msg, question): """ Takes text and a dictionary/set of words. Parses the text for the first word in the supplied dictionary, and returns the corresponding dictionary entry.""" if msg is None: return None # TODO: upda...
C#
UTF-8
2,351
3.828125
4
[]
no_license
using System; using System.Collections.Generic; using System.Text; namespace IntroducaoCS { class Tipologia { public static void inteiro() { Console.WriteLine("\n INTEIRO"); Console.WriteLine("------------------------"); int idade = 31; var ano ...
Python
UTF-8
1,652
3.03125
3
[ "BSD-2-Clause" ]
permissive
# Copyright (c) 2016, Matt Layman '''Validate aspects of MarkWiki.''' import os from markwiki import app from markwiki.exceptions import ValidationError def is_valid_section(section_path): '''Check if the section path is valid.''' return os.path.isdir(os.path.join(app.config['WIKI_PATH'], section_path)) d...
JavaScript
UTF-8
3,361
2.84375
3
[]
no_license
var notificationTemplate = undefined; var notificationContainerDOM = undefined; var buttonUpdateTemplate = undefined; var buttonDeleteTemplate = undefined; var updateButtonNumberColumn = 7; var deleteButtonNumberColumn = 8; /** * Add a notification. * @param level a string in the set {"success","warning","danger"} ...
Java
UTF-8
4,411
2.203125
2
[]
no_license
package hello; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com....
C++
UTF-8
2,497
3.0625
3
[]
no_license
#include <cstdio> #include <algorithm> #include <chrono> #include <vector> #include <streambuf> #include <clientversion.h> #include <primitives/block.h> inline int transform_hex_symbol(int c) { if (c >= '0' && c <= '9') return c - '0'; if (c >= 'a' && c <= 'f') return c - 'a' + 10; return -1; } std::vecto...
Java
UTF-8
265
1.867188
2
[]
no_license
package com.octa.iot.hub.repository; import org.springframework.data.jpa.repository.JpaRepository; import com.octa.iot.hub.model.Sensor; public interface SensorRepository extends JpaRepository<Sensor, Long> { public Sensor findByNome(String nomeSensor); }
Markdown
UTF-8
2,160
2.75
3
[]
no_license
API e FrontEnd para encontrar Universidades Brasileiras ================================= ### API e Frontend que procura por Universidades Brasileiras dado um parâmetro "name" inserido pelo usuário na página inicial. FrontEnd chama CarlotaAPI que chama outra API de Universidades do mundo. Git para a API mencionada: h...
Java
UTF-8
175
2.828125
3
[]
no_license
public class MyMath { public static int add(int a, int b) { //Thread.sleep(1000) return a+b;} public static int div(int a, int b){return a/b;} }
Markdown
UTF-8
2,828
2.625
3
[ "CC0-1.0" ]
permissive
--- layout: post title: "Plan to conserve borough's species and habitat" permalink: /archives/2019/05/lbrut-conservation-plan.html commentfile: 2019-05-11-lbrut-conservation-plan category: news image: "/assets/images/2019/lbrut-attenborough-thumb.jpg" date: 2019-05-11 07:14:16 excerpt: | A Plan to conserve the boro...
PHP
UTF-8
439
2.546875
3
[]
no_license
<?php try{ $db = new \PDO("mysql:host={$config["db_host"]}; dbname={$config["db_name"]}; port={$config["db_port"]}; charset=utf8mb4", $config["db_user"], $config["db_password"], [\PDO::ATTR_ERRMODE =...
JavaScript
UTF-8
2,322
3.375
3
[]
no_license
const livros = { 1: { "titulo": "Javascript Eloquente", "quemEscreveu": "Marijn Haverbeke", "link": "https://github.com/braziljs/eloquente-javascript" }, 2: { "titulo": "Você não sabe JS", "quemEscreveu": "Kyle Simpson", "link": "https://github.com/cezaraugust...
C++
UTF-8
295
2.546875
3
[]
no_license
#include<stdio.h> int main() { int a,b,c; int kase=0; while(scanf("%d%d%d",&a,&b,&c)==3) { kase++; int i; for(i=10;i<100;i++) { if(i%3==a&&i%5==b&&i%7==c) break; } if(i!=100) printf("Case %d: %d\n",kase,i); else printf("Case %d: No answer\n",kase); } return 0; }
Python
UTF-8
1,007
3.765625
4
[]
no_license
parrot = "Norwegian Blue" print(parrot) print(parrot[3]) print(parrot[4]) print(parrot[9]) print(parrot[3]) print(parrot[6]) print(parrot[0]) print() print(parrot[3 - 14]) print(parrot[4 - 14]) print(parrot[9 - 14]) print(parrot[3 - 14]) print(parrot[6 - 14]) print(parrot[0 - 14]) print(parrot[0:6]) print(parrot[3...
C#
UTF-8
2,522
2.96875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; using System.IO; namespace updateDataSources { class Program { static void Main(string[] args) { string xmlPath = args[0]; string filePa...
Java
UTF-8
204
1.789063
2
[]
no_license
package kotaro1116; import java.util.Scanner; public class Never_lose { public static void main(String[] args) { int a = 0; Scanner s = new Scanner(System.in); String op = s.nextLine(); } }
Python
UTF-8
2,414
3.09375
3
[]
no_license
# 17:50 start # 19:31 pass # 1시간 41분 소요,, 쉬운 문젠데 너무 오래 걸렸다. # 시뮬레이션은 몇일만 쉬어도 금방 감 떨어진다.. 쉼없이 계속 코딩하자 # 특별한 알고리즘은 없다. 주어진 대로 그대로 구현하면 됨! from sys import stdin input = stdin.readline # 8방향 dr = (0, 0, -1, -1, -1, 0, 1, 1, 1) dc = (0, -1, -1, 0, 1, 1, 1, 0, -1) # 1. 모든 구름이 d방향으로 s칸 이동한다. # 2. 각 구름에서 비가 내려 구름이 있는 칸의 바구니...
Python
UTF-8
2,252
3.71875
4
[]
no_license
import time class Call(object): def __init__(self, unique_id, name, number, call_time, reason): self.unique_id = unique_id self.name = name self.number = number try: time.strptime(call_time.replace(":", " "), "%I %M %p") self.call_time = call_time except ValueError: print "Time of call #{} formatted...
Python
UTF-8
1,178
3.5
4
[]
no_license
#PROBLEM 19b def leapYear(year): if year%4 == 0: return True else: return False def generate(): lengths = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] leaplengths = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] a = [] for bob in range(1901,2001): if leapYear(bo...
JavaScript
UTF-8
933
2.734375
3
[]
no_license
//array of maps to display on timer var map_array = ["BWheat_1949-min.png", "BWheat_1954-min.png", "BWheat_1959-min.png", "BWheat_1964-min.png", "BWheat_1969-min.png", "BWheat_1974-min.png", "BWheat_1978-min.png", "BWheat_1982-min.png", "BWheat_1987-min.png", "BWheat_1992-min.png", "BWheat_1997-min.png", "BWheat_2002-m...
PHP
UTF-8
562
2.625
3
[]
no_license
<?php declare(strict_types=1); namespace TMV\OpenIdClient\Token; use TMV\OpenIdClient\Client\ClientInterface; use TMV\OpenIdClient\Session\AuthSessionInterface; interface TokenSetVerifierInterface { /** * @return IdTokenVerifierInterface */ public function getIdTokenVerifier(): IdTokenVerifierInte...
Java
UTF-8
281
1.765625
2
[]
no_license
package irepdata.dao; import irepdata.model.Content; /** * Created by Gvozd on 27.11.2016. */ public interface ContentDao { public Content getContent(Long id); public void createContent(Content content); public boolean updateContent(Long ideaId, String content); }
PHP
UTF-8
703
3.09375
3
[]
no_license
<?php define('SECRET_IV', pack('a16', 'c0nt0s')); // senha pode ser alterada define('SECRET', pack('a16', 'f@d@s')); // senha pode ser alterada $data = [ "nome"=>"1234567890123456" ]; $openssl = openssl_encrypt( json_encode($data), 'AES-128-CBC', // metodo de cryptografia SECRET, // primeira chave 0, // pode ma...
JavaScript
UTF-8
1,043
2.625
3
[]
no_license
/* anime_scroll_relative_content_davy */ function anime_scroll_relative_content_davy(block_anime_scroll_relative_content_davy, scroll_relative_content) { var block_anime_scroll_relative_content = document.getElementsByClassName(block_anime_scroll_relative_content_davy); var scroll_relative_content_davy = (windo...
Go
UTF-8
2,995
2.796875
3
[]
no_license
package handlers import ( "net/http" "revelbus/cmd/web/utils" "revelbus/cmd/web/view" "revelbus/internal/platform/domain" "revelbus/internal/platform/domain/models" "revelbus/internal/platform/flash" "strconv" "github.com/gorilla/mux" ) func FaqForm(w http.ResponseWriter, r *http.Request) { id := r.FormValu...
Python
UTF-8
9,158
2.671875
3
[]
no_license
""" Name : run_mvo.py Author : Yinsen Miao Contact : yinsenm@gmail.com Time : 7/1/2021 Desc : run mean-variance optimization """ from util import get_mean_variance_space, plot_efficient_frontiers, get_frontier_limits import pandas as pd import numpy as np import pickle import os from tqdm import tqdm im...
PHP
UTF-8
1,911
3.09375
3
[]
no_license
<?php namespace App\Lib; use PDO; /** * <b>CLASS</b> * * Objeto responsável pelas configurações de acesso a base de dados. * * @package App\Lib * @author Original Manoel Louro <manoel.louro@redetelecom.com.br> * @date 17/06/2021 */ class ConexaoBD { /** * Conexão padrao do sistema (CRUD...
Markdown
UTF-8
2,064
2.859375
3
[ "MulanPSL-2.0", "LicenseRef-scancode-mulanpsl-2.0-en", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- --- --- title: 对于《新潮》一部分的意见[17] --- 孟真[18]先生: 来信收到了。现在对于《新潮》[19]没有别的意见:倘以后想到什么,极愿意随时通知。 《新潮》每本里面有一二篇纯粹科学文,也是好的。但我的意见,以为不要太多;而且最好是无论如何总要对于中国的老病刺他几针,譬如说天文忽然骂阴历,讲生理终于打医生之类。现在的老先生听人说“地球椭圆”,“元素七十七种”,是不反对的了。《新潮》里装满了这些文章,他们或者还暗地里高兴。(他们有许多很鼓吹少年专讲科学,不要议论,《新潮》三期通信内有史志元先生的信[20],似乎也上了他们的当。)现在偏要发议论,而且讲科学,讲科学而仍发议论,庶几乎他们依然不...
Java
UTF-8
7,773
1.84375
2
[]
no_license
package org.zzy.driver.mvp.ui.activity; import android.content.DialogInterface; import android.content.Intent; import android.net.Uri; import android.support.annotation.NonNull; import android.support.v7.app.AlertDialog; import android.view.Gravity; import android.view.View; import android.widget.ImageView; import and...
Swift
UTF-8
3,586
2.9375
3
[]
no_license
// // ImageViewerView.swift // MyCamera // // Created by Aung Ko Min on 9/3/21. // import SwiftUI import AVKit struct ImageViewerView: View { let photo: Photo @Environment(\.presentationMode) var presentationMode @State private var isFavourite = false init(photo: Photo) { self.pho...
Python
UTF-8
1,308
2.609375
3
[]
no_license
from django.conf import settings from django.shortcuts import get_object_or_404 from stock.models import Item from decimal import Decimal def cart_contents(request): ''' Creates the cart contents context to be used throughout the site not just in the cart app ''' cart_items = [] total = 0 item_c...
Python
UTF-8
114
3.65625
4
[]
no_license
for i in range(1, 31, 1): if (i % 5 == 0) : print("*\n",end="") else : print("* ",end="")
Java
UTF-8
6,865
2.109375
2
[ "MIT" ]
permissive
package com.fetchsky.RNTextDetector; import android.graphics.BitmapFactory; import android.graphics.Rect; import android.util.Log; import androidx.annotation.NonNull; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.Promise; import com.facebook.react.bridge.ReactApplicationContext; import...
Python
UTF-8
1,799
2.96875
3
[]
no_license
import numpy as np from sklearn.cluster import KMeans from HMSM.util.linalg import normalize_rows, normalized_laplacian def spectral(P, k, eig=None, return_eig=False): """ Cluster the data into k clusters using the spectral clustering algorithm. :param P: A transition probability matrix :param k: The ...
C
UTF-8
307
3.078125
3
[]
no_license
#include <stdio.h> #include <errno.h> #include <string.h> int main() { FILE *f_ptr; int i; f_ptr = fopen("nosuch.file", "r"); if (f_ptr != NULL) { printf("File opened\n"); } else { perror("Error"); } for (i = 0; i < 48; i++) { printf("Error %d : %s\n", i, strerror(i)); } return 0; }
Java
UTF-8
1,846
2.34375
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 inventorymanagement.Controllers; import java.net.URL; import java.util.ResourceBundle; //import javafx.collections.FX...
Ruby
UTF-8
171
3.0625
3
[]
no_license
def compute(string1,string2) num_of_false = 0 string1.length.times do |n| num_of_false += 1 if string1[n] != string2[n] end return num_of_false end
Markdown
UTF-8
407
2.5625
3
[]
no_license
# PASS Summit 2017 Demos used in my "Dapper: the ORM that will change your life" session @ PASS Summit 2017 Each demo shows how to use one of the feature offered by the Micro ORM "Dapper" https://github.com/StackExchange/Dapper a simple yet extremely powerful and fast MicroORM. Slides are available on SlideShare:...
Rust
UTF-8
589
3.25
3
[]
no_license
use std::io::Read; use std::io; const PARSE_ERROR: &str = "Parsing error. Please, use the follwing input format: (0-9)+, (0-9)+ (N|W|E|S) (F|L|R)+ "; fn main() { let mut buffer = String::new(); io::stdin().read_to_string(&mut buffer).unwrap(); let mut data = match htt::parse_input(&buffer) { Some(d...
Shell
UTF-8
492
2.890625
3
[]
no_license
#!/bin/bash DATE=$(date -R) GIT_RV=$(git rev-list HEAD | wc -l) INEX_VERSION=$(grep "Version=" src/i-nex/.project | cut -d "=" -f 2) DATE_Y_M_D=$(date +%Y%m%d) echo "i-nex ($INEX_VERSION-0~git$GIT_RV~$DATE_Y_M_D) unstable; urgency=low * next unstable -- eloaders <eloaders@yahoo.com> $DATE " >debian/changelog1 ...
Markdown
UTF-8
354
2.703125
3
[]
no_license
Advanced Imputation Techniques Finally, go beyond simple imputation techniques and make the most of your dataset by using advanced imputation techniques that rely on machine learning models, to be able to accurately impute and evaluate your missing data. You will be using methods such as KNN and MICE in order to get t...
TypeScript
UTF-8
3,562
3.015625
3
[]
no_license
import { operatorsAndPriority } from './static/calcOperators' export default class Modifyre { operationsStack: string[] outputStr: string[] constructor() { ;(this.operationsStack = []), (this.outputStr = []) } getPostfixExample(): string[] { return this.outputStr } closingBracketOpe...
Python
UTF-8
9,039
3.984375
4
[]
no_license
# Francisco Ariel Arenas Enciso # A01369122 # Desarrollo de Misión 9 (listas) '''Declaración de lista global''' listaGlobal = [1,2,3,2,4,60,5,8,3,22,44,55] #Esta lista se usará en todas las funciones '''Función que recibe una lista y mediante un cliclo 'for' regresa una NUEVA lista con solamente los va...
Python
UTF-8
3,779
4.125
4
[]
no_license
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Feb 12 13:03:32 2018 @author:Mandy Assignment 10 - Benchmarking Sorting Algorithms (1) Create a class with functions for three sorting algorithms - bubble sort, selection sort and insertion sort. (2) Write a program that determines the amount of time...
Java
UTF-8
1,245
1.84375
2
[]
no_license
package kulaga.michail.demolocalizations.screenshots; import android.support.test.rule.ActivityTestRule; import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import kulaga.michail.demolocalizations.MainActivity; import kulaga.mich...