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
2,704
2.296875
2
[]
no_license
package freijo.castro.diego.tareapmdm07_practicafinal.pendientes; import android.content.Context; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import java.text.DecimalFormat; imp...
C#
UTF-8
6,267
2.515625
3
[]
no_license
using System; using System.Collections.Generic; using System.Net.Http; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using TriviaNation.Core.Models; namespace TriviaNation.Core.Drivers { public class WebServiceDriver : IDisposable, IWebServiceDriver { public readonly string _BaseRequestU...
Markdown
UTF-8
969
2.546875
3
[ "Apache-2.0" ]
permissive
## 0.4.0 -- 9 Feb 2018 Internally, now uses [dorothy](https://github.com/daveray/dorothy) to generate the GraphViz DOT source. A decorator option makes it possible to customize individual component node attributes in an open-ended way. ## 0.3.0 -- 2 Feb 2018 New options allow node attributes in the graph to be cont...
C++
UTF-8
4,649
3.390625
3
[ "MIT" ]
permissive
/** Given a 2D array of digits, try to find the occurrence of a given 2D pattern of digits. For example, consider the following 2D matrix: 1234567890 0987654321 1111111111 1111111111 2222222222 Assume we need to look for the following 2D pattern: 876543 111111 111111 If we scan through the original ar...
PHP
UTF-8
2,398
3.265625
3
[]
no_license
<?php class Slide { private $from; private $to; private $duration; private $id; private $position; public function fromHrs() { if ('everyday' == $this->duration['type']) { $tmp =explode(':',$this->duration['from-time-everyday']); return $tmp[0]; } ...
Java
UTF-8
902
2.5
2
[]
no_license
package com.gestion.pilotage.service; import java.util.List; import com.gestion.pilotage.model.User; /** * Service to manage user. * * @author rija.n.ramampiandra * */ public interface UserService { /** * Add user to DB. * * @param p * the user. */ public void addUser(User p); /** ...
Markdown
UTF-8
7,616
3.65625
4
[]
no_license
# 0901. 需求第二定律 我们开始讲需求第二定律。需求定律,无论是第一、第二,还是第三定律,都是对人性非常深刻的刻画。你懂了需求第二定律,你就会更懂人性。 需求第二定律有很多版本。需求第二定律是说:需求对价格的弹性,和价格变化之后流逝的时间长度成正比。也就是说,随着时间的推移,需求对价格的弹性会增加。 ## 需求的价格弹性 那么,这里面我们就遇到了一个术语,什么叫“弹性”。 我们这个专栏,几乎没有数学公式。我想这可能是咱们唯一一次,遇到数学公式的地方,不得不用数学公式。但实际上它也很简单。 需求对价格的弹性,就是需求量的变化百分比,除以价格变化的百分比。它的含义是说:每当价格变化百分之一,需求量会变化百分之几。你看看我给你...
Shell
UTF-8
228
3.203125
3
[]
no_license
#!/usr/bin/bash # Script to print currently logged in users information, and current date & time. clear echo "Hello $USER" echo -e "Today is \c ";date echo -e "Number of user login : \c" ; who | wc -l echo "Calendar" cal exit 0
C++
UTF-8
1,787
3.15625
3
[]
no_license
#include "Image.h" #include<iostream> #include<fstream> using namespace std; Image::Image(int w, int h, int channel, const char* path) { this->width = w; this->height = h; this->channel = channel; this->filename = path; this->frameSize = width * height * channel; } unsigned char* Image::imageData() { FILE *fp...
Java
UTF-8
925
1.945313
2
[]
no_license
package org.zerock.persistence; import java.util.List; import javax.inject.Inject; import org.apache.ibatis.session.SqlSession; import org.springframework.stereotype.Repository; @Repository public class BoardDAOImpl implements BoardDAO{ @Inject private SqlSession session; private static String namespace = "o...
Java
UTF-8
1,947
2.75
3
[]
no_license
package Projeto.LP2; import java.util.*; import projetop2.utils.ArquivoDeDados; public class GerenteDeCategoria { private List<CategoriaDeTransacao> categorias; private ArquivoDeDados<List<CategoriaDeTransacao>> arquivoDeCategoria; public GerenteDeCategoria(String email){ arquivoDeCategoria = new ...
Markdown
UTF-8
1,341
3.203125
3
[]
no_license
# Trove Lists Exhibition This is a AngularJS web app that retrieves lists of resources collected in Trove Lists via the Trove API, and then displays them as a simple exhibition. You can easily customise it to turn your own collection of lists into an exhibition. See the [demo](http://wragge.github.io/forecasters-dem...
Python
UTF-8
446
4.09375
4
[]
no_license
min_length = 2 name = input("Please enter your name:") while not(len(name) >= min_length and name.isprintable() and name.isalnum()): name = input("Please try again:") print("Hello, {0}".format(name)) while True: name = input("Please enter your name:") if len(name) >= min_length and name.isprintable() and ...
Python
UTF-8
1,825
3.59375
4
[]
no_license
from heapq import heapify, heappush, heappop class Solution: def rearrangeString(self, s, k) -> str: ''' at any point, we want to insert the most frequent character who's last element is at least k value away. if there are no elements that at are at least k values away,...
SQL
UTF-8
405
3.5
4
[]
no_license
Link- https://rextester.com/JVUKPF51336 CREATE TABLE Geek ( ID INT IDENTITY(1, 1), A INT, B INT, PRIMARY KEY(id)); INSERT INTO Geek (A, B) VALUES (1, 1),(1, 2), (1, 3), (2, 1), (1, 2), (1, 3), (2, 1), (2, 2); WITH CTE AS ( SELECT A, B, ROW_NUMBER() OVER ( PARTITION BY A, B ORDE...
Java
UTF-8
723
2.078125
2
[ "MIT" ]
permissive
package com.sxu.baselibrary.datasource.http.impl; /******************************************************************************* * Description: * * Author: Freeman * * Date: 2018/8/14 * * Copyright: all rights reserved by Freeman. *****************************************************************************...
Java
UTF-8
1,503
2.34375
2
[]
no_license
package com.shollmann.android.fogon.util; import android.content.Intent; import com.shollmann.android.fogon.DeFogonApplication; import com.shollmann.android.fogon.ui.activities.FavoriteSongsActivity; import com.shollmann.android.fogon.ui.activities.HomeActivity; import com.shollmann.android.fogon.ui.activities.Random...
Java
UTF-8
711
2.265625
2
[]
no_license
package bai.atm.model; import bai.atm.dto.ReturnDtoInfo; public class Log implements ReturnDtoInfo{ private String method; private String request; private String response; private Integer status = 200; public String getMethod() { return method; } public void setMethod(String method) { this.method ...
Markdown
UTF-8
3,433
2.859375
3
[ "MIT" ]
permissive
--- id: 18 title: 湯布院﹣玉の湯 date: '2009-03-15T07:41:21+00:00' author: Vito layout: post guid: 'http://vito.tw/?p=18' categories: - 名宿之旅 --- 九州的湯布院是日本OL票選最佳泡湯渡假的地方,而湯布院最有名的三家溫泉飯店則是合稱為”御三家”的無量塔、龜の井及玉の湯。這三家裏以無量塔最貴,一個人接近五萬日圓的起價和箱根的強羅花壇幾無差別。龜の井及玉の湯價位相當,但只少了一萬多日圓其實也不便宜。無量塔除了比較貴外,位置也較偏遠,因為是第一次造訪湯布院,就先不考慮了,玉の湯又比龜の井離湯布院車站近了一...
Python
UTF-8
12,433
2.59375
3
[]
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import optparse import binascii import base64 import string import Crypto from Crypto.Hash import * from Crypto.Cipher import * from Crypto.PublicKey import RSA from Crypto import * from pycipher import Foursquare # Tables for CR...
Markdown
UTF-8
4,120
2.84375
3
[]
no_license
--- description: "Recette De Courgette au four" title: "Recette De Courgette au four" slug: 3842-recette-de-courgette-au-four date: 2021-02-17T04:35:44.732Z image: https://img-global.cpcdn.com/recipes/5bdebe839e794962/751x532cq70/courgette-au-four-photo-principale-de-la-recette.jpg thumbnail: https://img-global.cpcdn.c...
Markdown
UTF-8
3,889
2.765625
3
[]
no_license
# Задание на JS Цель задания — реализовать алгоритм работы «умного дома», который будет производить расчёт стоимости потребляемой электроэнергии в день и возвращать рекомендованное расписание использования электроприборов, оптимизируя денежные затраты. На вход подаются данные о тарифах, электроприборах и их максимальн...
PHP
UTF-8
8,922
2.671875
3
[]
no_license
<?php require_once('Mpx.php'); require_once('ColorValues.php'); class ServiceOrder { public $serviceOrderHead = array(); public $salesOrderHead = array(); public $salesOrderItem = array(); public $operations = array(); public $components = array(); public $partners = array(); public $contacts = array(...
Markdown
UTF-8
1,157
2.9375
3
[]
no_license
##2.5 订单拣选 点击“订单拣选”标签,进入订单拣选的主界面。该模块可以实现订单货位的分配和订单产品的拣选、查看在拣的订单数、货位的即时添加4个功能。 - 订单货位分配。对已经拣选出库的一联集合拆分成独立订单,按照”一单一货位“的原则,通过订单的扫码进行订单货位的分配。 - 产品的订单分配。扫产品相应的条码信息,根据语音提示选择相应的货位。 - 在拣订单的查看。如果商品拣选完成后,页面提示“拣选中的订单”不为“0”,点击订单数查看货位拣选详细信息,通过“强制清空货位”、“强制完成拣选中的订单”,进行订单的强制完成和货位的强制清空。 - 货位的即时添加。即订单的货位分配和产品的分配可同时进行。 <img src="images/...
JavaScript
UTF-8
215
2.8125
3
[]
no_license
export function unique(arr) { var i, len=arr.length, out=[], obj={}; for (i=0;i<len;i++) { obj[arr[i]]=0; } for (i in obj) { out.push(i); } return out; }
Python
UTF-8
2,769
2.640625
3
[]
no_license
#!/usr/bin/python # -*- coding: utf-8 -*- import numpy as np import json import math import os from matplotlib import pyplot as plt import re def get_configuration(filename): try: f = open(filename) ret = json.loads(f.read()) f.close() return ret except: return {} de...
Markdown
UTF-8
1,895
2.59375
3
[]
no_license
## HBase特点 海量存储、列式存储、极易扩展、高并发、稀疏。 ## HBase架构 ![image-20200813151111083](D:\MarkDown\BigData\img\image-20200813151111083.png) ### client Client包含了访问Hbase的接口,另外Client还维护了对应的cache来加速Hbase的访问,比如cache的.META.元数据的信息。 ### Zookeeper Zookeeper的高可用、RegionServer的监控、元数据的入口以及集群配置的维护等工作。具体工作如下: 通过Zoopkeeper来保证集群中只有1个master在运行...
Swift
UTF-8
515
2.765625
3
[]
no_license
// // ImageHelper.swift // TabBar // // Created by Иосиф Дзеранов on 24/05/2017. // Copyright © 2017 IO Dzeranov. All rights reserved. // import Foundation import UIKit class ImageHelper { static func imageJPEGToData(image:UIImage) -> Data{ let data = UIImageJPEGRepresentation(image, 0.5) ...
Python
UTF-8
674
2.640625
3
[]
no_license
import urllib.request from datetime import datetime import time import os data=open('name_fit.txt', 'r') path=str(os.getcwd()) scroll=len(os.listdir(path=path))-2 date = datetime.now() time_b=time.monotonic() print("-----start-----: ",date) for line in data: filename=line[0:-1] ext=filename[-3:] try: ...
PHP
UTF-8
1,915
2.8125
3
[]
no_license
<?php namespace App\View\Form; use Core\HTML\Form\Form; class ArticleForm { /** * @param $post * @return Form */ static function _article($post,$keywords = [], $categories = []) { $form = new Form($post); $form->input("titre", array('label' => "titre article")) ...
PHP
UTF-8
591
2.8125
3
[]
no_license
<?php $arquivo = $_FILES["foto"]; if ($arquivo["error"] <> 0) { echo "Erro ao carregar o arquivo"; return; } $formato_permitido = "image/jpeg"; if ($arquivo["type"] != $formato_permitido) { echo "Formato não suportado. Utilize $formato_permitido."; } else { $im...
Python
UTF-8
12,932
2.625
3
[ "MIT" ]
permissive
#!/usr/bin/env python #-*- coding:utf-8 -*- import urllib.request, urllib.parse, urllib.error import gzip import io import re import time import datetime import twopy from . import utility class Thread: """ 2chのスレッドを管理するクラスです. """ __url = re.compile(r"http://(.+?)/test/read.cgi/(.+?)/(\d+)") __e...
Markdown
UTF-8
3,814
3.125
3
[]
no_license
# Sustainability report As a testament to our sustainability Minexx directly impacts 10 of the 17 Sustainable Development Goals set by the UN. The first being to end poverty. This goal is met through Minexx providing the miners with an opportunity for a fair wage, preventing them from being under paid for the mineral...
Markdown
UTF-8
19,818
2.875
3
[]
no_license
<properties pageTitle="Batch and HPC solutions in the cloud | Microsoft Azure" description="Introduces batch and high performance computing (Big Compute) scenarios and solution options in Azure" services="batch, virtual-machines, cloud-services" documentationCenter="" authors="dlepow" manager="timlt" ...
C#
UTF-8
1,714
3.921875
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; class IntegerCalculation { static int Minimum(int[] array) { int minimum = array[0]; for (int i = 1; i < array.Length; i++) { if (array[i] < minimum) { minimum = array[i]; ...
Swift
UTF-8
6,613
2.6875
3
[]
no_license
// // Transfer.swift // goridepay // // Created by Bryanza on 12/08/21. // Copyright © 2021 Apple Developer Academy. All rights reserved. // import Foundation class Transfer { func callHeroku( session: URLSession, address: String, contentType: String, parameters: [String: ...
Markdown
UTF-8
2,411
2.609375
3
[]
no_license
--- layout: post title: "Week 115: Ned Flanders opens the Leftorium" date: 2020-11-14 category: weaknotes --- * I have started putting some knitting on [Ravelry](https://www.ravelry.com/people/littlecabaret). I don't know how Ravelry works, but you can see me there. I only have two friends, so if you're on Ravelry do a...
JavaScript
UTF-8
3,267
2.84375
3
[ "MIT" ]
permissive
const dataCacheName = 'swDemoData-v1'; const cacheName = 'sw-demo-1'; const filesToCache = [ 'index.html', 'styles.css', 'assets/big_image_10mb.jpg', 'assets/big_image_2mb.jpg' ]; const bigImageUrl = '/assets/big_image_10mb.jpg'; /* У serviceWorker waitUntil () сообщает браузеру, что работа продолжается до тех...
Go
UTF-8
1,012
2.875
3
[]
no_license
package csbalancing import "fmt" // Complete the csRush function below. func csRush(n int32, m int32, css [][]int32, customers [][]int32, vacant_css []int32) int32 { // Creating map for customers mapCss := make(map[int32]int32) for _, cs := range css { mapCss[cs[0]] = cs[1] } // Remove customers on vacation ...
C
UTF-8
506
3.46875
3
[ "MIT" ]
permissive
#include <stdio.h> #include <stdlib.h> #include <math.h> int main(void) { int n, i, j; int *tab; scanf("%d", &n); if(n > 100000) return 0; tab = malloc(sizeof(int) * n); for(i=0; i<n; i++) { scanf("%d", &tab[i]); if(tab[i] < 1 || tab[i] > 10000) return 0; for(j=2; j<=sqrt(tab[i]); j++) { if((...
Java
UTF-8
7,036
2.21875
2
[]
no_license
package paypaldemo.controller; import org.springframework.http.HttpHeaders; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.a...
Ruby
UTF-8
2,601
3.8125
4
[]
no_license
class Movie REGULAR = 0 NEW_RELEASE = 1 CHILDRENS = 2 attr_reader :title attr_reader :price_code attr_writer :price def initialize(title, the_price_code) @title, @price = title, the_price_code end def charge(days_rented) @price.charge(days_rented) end def frequent_renter_points(days_re...
Java
UTF-8
366
2.640625
3
[]
no_license
package strategy_pattern; public class Imbiss { public static void main(String[] args) { Mitarbeiter caaaarl = new Mitarbeiter(new HofFegen()); Mitarbeiter alfredo = new Mitarbeiter(new PizzaBacken()); Mitarbeiter charles = new Mitarbeiter(new PommesFritieren()); caaaarl.arbeiten(); alfredo.arbeiten(); c...
Markdown
UTF-8
1,978
2.625
3
[]
no_license
--- title: 最近对Java服务框架的思考 date: 2017-10-11T14:19:12+08:00 tags: - Netty - Spring Boot - Play - Vert.X image: mokou_kaguya.png --- 简单说几句,关于最近对Java服务框架的思考。 最早我是用`springMVC + Spring`的,因为太臃肿,配置麻烦,很快切换到`SpringBoot`。 用上`SpringBoot`后,觉得内置`Tomcat/Jetty`性能可能不够好,于是自己写了个[基于Netty的内置Servlet容器](https://github.com/Leibnizhu/sprin...
C++
UTF-8
919
2.578125
3
[ "MIT", "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
#include "ShaderFactory.h" namespace vanadium { const bgfx::Memory* ShaderFactory::readFromVfs(const std::string& path) { vfs::FileStream stream(path, vfs::OpenMode::Input); if (!stream) { return nullptr; } auto fileSize = stream.length(); const bgfx::Memory* memory = bgfx::alloc(fileSize + 1); stre...
Java
UTF-8
2,796
2.234375
2
[]
no_license
package practicalities.book.gui; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; import org.lwjgl.opengl.GL11; import practicalities.book.GuideStateManager; import practicalities.helpers.GuiHelper; import practicalities.helpers.ItemHelpers; import practicalities.lib.client.gui.GuiElemen...
Python
UTF-8
1,817
4.21875
4
[ "MIT" ]
permissive
# https://repl.it/@thakopian/day-4-2-exercise#main.py # write a program which will select a random name from a list of names # name selected will pay for everyone's bill # cannot use choice() function # inputs for the names - Angela, Ben, Jenny, Michael, Chloe # import modules import random # set varialbles for in...
C
UTF-8
3,096
2.765625
3
[ "MIT" ]
permissive
#include <stdlib.h> #include <stdio.h> #include "jiggle.h" static jgVector2 jgSpringCalculateForce(jgVector2 posA, jgVector2 velA, jgVector2 posB, jgVector2 velB, ...
C++
SHIFT_JIS
3,484
2.921875
3
[]
no_license
#include <string> #include "pch.h" #include "Card.h" #ifdef _DEBUG #define CV_EXT "d.lib" #else #define CV_EXT ".lib" #endif #pragma comment(lib, "opencv_world411" CV_EXT) // OpenCV4.1.1Ȃ̂ class CardDummy : public Card { public: void set_name(char* _name) { name = _name; } void set_ability(char* _ability_text...
C#
UTF-8
4,200
2.671875
3
[ "Apache-2.0" ]
permissive
using IronText.Framework; using IronText.Reflection; namespace CSharpParser { [Vocabulary] public class CsScanner { [Match(@"'//' ~('\r' | '\n' | u0085 | u2028 | u2029)*")] public void LineComment() { } [Match("'/*' (~'*'* | '*' ~'/')* '*/'")] public void MultiLineComment(...
Markdown
UTF-8
2,262
2.65625
3
[ "MIT" ]
permissive
--- name: 🔄 Update existing site about: Request that an existing listed site be updated with new information. title: Update [site name] labels: update site assignees: '' --- <!-- Before submitting this issue, please update the title to include the name of the site to be updated. Submit a single issue for each site t...
Java
UTF-8
1,556
3.046875
3
[]
no_license
package com.vlfom.utils; import java.util.Random; /** * Created by @vlfom. */ public class VectorMath { public static Vector2D exp(Vector2D x) { for (int i = 0; i < x.getL1(); ++i) { for (int j = 0; j < x.getL2(); ++j) { x.setVal(i, j, Math.exp(x.getVal(i, j))); }...
Markdown
UTF-8
3,508
3.109375
3
[ "MIT" ]
permissive
# templated-secrets A Kubernetes operator to template secrets dynamically. ## Introduction This Kubernetes operator allows you to create secrets dynamically from templates. Secrets can be used as environment variables for Pods, using `envFrom` or `valueFrom`. Sometimes it is desired to create an environemnt variable ...
Java
GB18030
10,613
2.65625
3
[]
no_license
package Ex5; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import javax.swing.JLabel; import javax.swing.JOptionPane; import java.awt.Font; import javax.swing.JTextField; import javax.swing.JButton; import java.util.GregorianCalendar; import javax.swing.JComboBox; impor...
PHP
UTF-8
2,578
2.796875
3
[]
no_license
<?php $mysqli = new mysqli("localhost","root","","demo"); if ($mysqli -> connect_errno) { echo "Failed to connect to MySQL: " . $mysqli -> connect_error; exit(); } if ($_SERVER["REQUEST_METHOD"] == "POST") { $uname=$_POST['username']; $password=$_POST['password']; $Firstname=$_POST['Firstname'...
C++
UTF-8
5,809
2.5625
3
[ "MIT" ]
permissive
#include <string.h> #include <unistd.h> #include <iostream> #include <stdlib.h> #include <SDL.h> #define WIDTH 1000 #define HEIGHT 500 #define WINDOWSIZE_X 1000 #define WINDOWSIZE_Y 500 #define RANGE 1 #define STATEWIDTH RANGE*2 + 1 using namespace std; // Give rule as first parameter. Default is rule 30. SDL_Surfa...
C++
UTF-8
1,941
3.421875
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode* mergeTwoLists(ListNode* l1, ListNode* l2) { ListNode* tail = new ListNode(0); ListNode* ans = tail; while...
Python
UTF-8
4,206
2.515625
3
[]
no_license
from datetime import datetime import logging import math from typing import Dict, Optional, List, Union import backtrader as bt import pandas as pd import itertools _logger = logging.getLogger(__name__) def paramval2str(name, value): if value is None: # catch None value early here! return str(value) ...
C#
UTF-8
1,877
2.671875
3
[]
no_license
using AutoMapper; using ExercisesAPI.Data.Models; using ExercisesAPI.Data.Repositories.Interfaces; using ExercisesAPI.ViewModels; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; namespace ExercisesAPI.Controllers { [Produces("application/json")] [Route("api/ExerciseTips")] public class E...
Java
UTF-8
2,434
2.5
2
[]
no_license
/** * */ package fatworm.expr; import java.util.List; import fatworm.db.Schema; import fatworm.db.Transaction; import fatworm.scan.Scan; import fatworm.stmt.Select; import fatworm.value.Bool; import fatworm.value.Null; import fatworm.value.Value; /** * @author mrain * */ public class Quantifier extends Expr { ...
Python
UTF-8
11,283
2.53125
3
[ "MIT" ]
permissive
''' mc3426 a/d converter''' import smbus2 # I2C address of the device DEFAULT_ADDRESS = 0x68 REFERENCE_VOLTAGE = 2.048 # MCP3425/6/7/8 Configuration Command Set CMD_CONVERSION_MASK = 0x80 CMD_CONVERSION_READY = 0x00 # Conversion Complete: 0=data ready, 1=not_finished. CMD_CONVERSION_INITIATE = 0x80 # Initiate a new ...
PHP
UTF-8
709
2.5625
3
[ "MIT" ]
permissive
<?php namespace TSK\UserBundle\Twig\Extension; class FormattingExtension extends \Twig_Extension { private $baseDir; public function __construct($baseDir='') { $this->baseDir = $baseDir; } public function getFunctions() { return array( 'format_money' => new \Twig_F...
C
UTF-8
4,044
2.84375
3
[]
no_license
#include <stdlib.h> #include <stdio.h> #include <stdbool.h> #include <string.h> #include <dirent.h> #include <sys/stat.h> #include <unistd.h> #include <sys/wait.h> #include<string.h> bool vOption = false; bool wOption = false; bool exitFromProgram = false; bool cmp(char *firstString, char *secondString){ int firstL...
C#
UTF-8
3,349
2.515625
3
[]
no_license
using System; namespace Lucid { public delegate void WatchHandler(object source, OSHandle handle, WatchEventKind events); public delegate void TimeoutHandler(object source); public interface IEventLoop { object AddWatch(OSHandle handle, WatchEventKind events, WatchHandler handler); ...
C++
UTF-8
898
3.140625
3
[]
no_license
#include<iostream> #include "maze_search.h" #include "check_if_produces.h" #include<fstream> #include<sstream> #include<string> #include<set> using namespace std; int main(){ /* int height; string eol; vector<vector<bool>> bitmap; cin >> height; getline(cin, eol); for(int i = 0; i < height; i++){ string line;...
Java
UTF-8
2,001
3.25
3
[]
no_license
package academy.kovalevskyi.algorithms.week0.day2; import academy.kovalevskyi.algorithms.week0.day0.Sort; import java.util.Arrays; import java.util.Comparator; public class MergeSort1 implements Sort { @Override public <T> void sort(T[] target, Comparator<T> comparator) { if (comparator == null) { retu...
Markdown
UTF-8
2,623
2.5625
3
[]
no_license
SBIR Phase I: Aerial Weed Scout with Robust Adaptive Control for Site-Specific Weed Control =========================================================================================== # Abstract The broader impact/commercial potential of this Small Business Innovation Research (SBIR) project is to provide the farme...
C
UTF-8
264
3
3
[]
no_license
#include <stdio.h> #include "heap.h" int main(int argc, char **args) { int h[] = {12, 43, 44, 129,100, 323, 321, 9, 18, 6, 21}; int a = 10, b = 20; int size = sizeof(h) / sizeof(int); sort_heap(h, size); swap_value(&a, &b); printf("hello\n"); return 0; }
Java
UTF-8
696
2.171875
2
[]
no_license
package com.yhtos.test; import com.yhtos.tcs.util.Car; import com.yhtos.tcs.util.JsonUtil; import org.junit.Test; public class JsonTest { @Test public void testj(){ String str = "{\n" + " \"name\":\"车辆名称\",\n" + " \"energ\":\"能量\",\n" + " \"location\...
Java
UTF-8
404
2.828125
3
[]
no_license
package cn.lingjian_2; import cn.lingjian_1.Jump; /** * @author lingjian * @date 2019-07-23 - 10:04 */ public class Dog extends Animal implements Jump { @Override public void eat() { System.out.println("Dog eat"); } @Override public void sleep() { System.out.println("Dog slee...
Java
UTF-8
1,482
2.203125
2
[]
no_license
package br.com.codenation.spring.controler; import java.util.List; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.anno...
Python
UTF-8
114
3.59375
4
[]
no_license
d = {"Name": "John", "Surname": "Smith"} print(d["Smith"]) # produce error since "Smith" is not a key but a value.
Markdown
UTF-8
481
2.640625
3
[]
no_license
# Projects Tracker App As the title suggests the goal is to keep track all my (side) projects. ## Stack This project was built with: - [ReactJS](https://reactjs.org/) - [Bulma CSS](https://bulma.io/) - [React Hook Form](https://react-hook-form.com/) - [JSONPlaceholder](https://jsonplaceholder.typicode.com/) ## How...
SQL
UTF-8
747
3.90625
4
[]
no_license
#1 CREATE TABLE Employee ( code CHAR(6) PRIMARY KEY, name VARCHAR(80), dob date, designation VARCHAR(100), salary FLOAT ); #2 INSERT INTO Employee (code, name, dob, designation, salary) VALUES ('STP','Musafir','1989-09-15','Senior Technical Professional',75000.00), ('DIR','Laxma...
Java
UTF-8
316
1.601563
2
[ "Apache-2.0" ]
permissive
package com.github.chengpan.taskd; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class TaskdApplication { public static void main(String[] args) { SpringApplication.run(TaskdApplication.class, args); } }
Python
UTF-8
178
3.453125
3
[]
no_license
people = int(input()) time = list(map(int, input().split())) time.sort() answer = 0 for i in range(people): answer = answer + time[i]*(people-i) print(answer)
Markdown
UTF-8
6,950
2.609375
3
[]
no_license
  当敌人远远出现在视野里时,凡纳看到了那些全副武装的骑士,他们骑着高头大马,身穿亮闪闪的盔甲,缓缓向小镇靠近。平时镇里一名骑士老爷都是高高在上的存在,现在一下出来近百人,这景象让他倒吸了一口冷气。   凡纳感到自己手心又出汗了,如同站在城墙上初次面对邪兽时一样,不过这一次,他面对的是同类长歌要塞的贵族联军。   不对,他吐了口唾沫,将自己的想法甩到一边,同类?那些贵族什么时候把你当过同类?他自嘲地想。他们此行是为了抢夺边陲镇,把北坡矿区重新纳入要塞的掌控。更重要的是,他们竟然打算把王子殿下赶出西境,这是第一军全体成员根本无法接受的事情。   昨天殿下在战前训话时说得很清楚了,提费科.温布顿,也就是殿下的哥哥,使用阴谋诡...
Markdown
UTF-8
3,054
2.578125
3
[ "CC-BY-4.0", "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Here we collect some information on how to set up your editor to properly input and output the unicode characters used throughout Iris. ## General: Unicode Fonts Most editors will just use system fonts for rendering unicode characters and do not need furhter configuration once the fonts are installed. Here are some ...
JavaScript
UTF-8
850
3.296875
3
[]
no_license
let yearA=1896; let yearB = 1900; let yearC = 2000; let yearD=2100; let concatenacion=""; //Ejercicio de clase del 3 de octubre let ex1=1996; let ex2=2020; let ex3=2076; let ex4=3000; function bisiesto(year){ return ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) ? true : false; } console...
SQL
UTF-8
101,506
3.53125
4
[]
no_license
DROP TABLE IF EXISTS Colors; CREATE TABLE IF NOT EXISTS Colors ( id BIGINT NOT NULL AUTO_INCREMENT , updated_by BIGINT DEFAULT NULL , updated_at DATETIME DEFAULT NULL , status VARCHAR(32) DEFAULT 'Active' , color_code VARCHAR(32) DEFAULT NULL , color_type VARCHAR(32) DEFAULT NULL , color_n...
Markdown
UTF-8
1,449
2.609375
3
[ "MIT" ]
permissive
### Psalm 21 > To the chief Musician, A Psalm of David. 1 The king shall joy in thy strength, O LORD; and in thy salvation how greatly shall he rejoice! 2 Thou hast given him his heart's desire, and hast not withholden the request of his lips. Selah. 3 For thou preventest him with the blessings of goodness: thou ...
Shell
UTF-8
244
2.625
3
[]
no_license
alias gem="docker-compose run --rm jekyll gem" alias bundle="docker-compose run --rm jekyll bundle" alias jekyll="docker-compose run --rm jekyll jekyll" clean_shell() { unalias gem unalias bundle unalias jekyll unset -f clean_shell }
PHP
UTF-8
903
3.21875
3
[]
no_license
<?php require_once 'data.movies.php'; include 'search.php'; function searchMovies($movies, $titre, $date, $genre, $cast) { $results = array(); //tableau dans lequel on mettra les films qu'on veut renvoyer //si au moins un champs est rempli if($titre != null || $date != null || $genre != null || $cast != null) {...
Markdown
UTF-8
2,315
2.875
3
[]
no_license
# stw300cem-final-project-bishesu stw300cem-final-project-bishesu created by GitHub Classroom Title Photography Application Promoting Local Photographers Introdution The application that I developed is named as Photo Genie. This is an android application that is made in conjunction with a website of the same funct...
C++
UTF-8
606
2.53125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(int argc, char **argv) { int t; scanf("%d", &t); while (t-- != 0) { int n; scanf("%d", &n); ll len = -1; ll E = sqrt(2 * n) + 1; for (ll r = 2; r <= E && len == -1; ++r) { ll x = 2 * n - r * r + r; if (x > 0 && x % (2 * r)...
Java
UTF-8
10,983
3.0625
3
[]
no_license
package geometry; /* * 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. */ import geometry.Line; import geometry.Point; import org.junit.After; import org.junit.AfterClass; import org.junit.B...
TypeScript
UTF-8
1,397
2.765625
3
[]
no_license
'use strict' import BN from 'bn.js' // Geth compatible DB keys const headsKey = 'heads' /** * Current canonical head for light sync */ const headHeaderKey = 'LastHeader' /** * Current canonical head for full sync */ const headBlockKey = 'LastBlock' /** * headerPrefix + number + hash -> header */ const headerPr...
JavaScript
UTF-8
2,245
2.75
3
[]
no_license
/** * [测试分页查询] * @param {[type]} app [description] * @return {[type]} [description] */ import _ from 'lodash'; import pingData from '../testData/paging.js' module.exports = function (app) { app.post('/paging', function (req, res) { console.log('paging body data', req.body); let start = par...
Java
UTF-8
1,334
3.5
4
[]
no_license
package String; import java.util.Scanner; public class SubstringPractice{ public static void main(String[] args){ String comComponent="keyboard"; System.out.println(comComponent.substring( 3 )); System.out.println(comComponent.substring( 3,5 )); System.out.println(comComponent.subs...
Java
UTF-8
2,246
2.265625
2
[]
no_license
package jpashop.jpabook.controller; import jpashop.jpabook.domain.item.Book; import jpashop.jpabook.domain.item.Item; import jpashop.jpabook.service.ItemService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web....
Java
GB18030
1,870
3.71875
4
[]
no_license
package org.leo.thread.timer; import java.util.Timer; import java.util.TimerTask; /** * TimerһڣTimerTask׳δ쳣Timer޷ԤϵΪ * Timer̲߳쳣 TimerTask׳δ쳣ֹtimer̡߳ * £TimerҲ»̵ִָ߳;ΪTimerȡˡ * ʱѾŵδִеTimerTaskԶִˣµҲܱˡ * * иóTimer׳һRumtimeExceptionjava.lang.IllegalStateException:Timer already cancelled. * ԵǻУ...
Markdown
UTF-8
2,234
2.625
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: 使用 Synapse SQL 指派變數 description: 在本文中,您將找到使用 Synapse SQL 指派 T-sql 變數的秘訣。 services: synapse-analytics author: azaricstefan ms.service: synapse-analytics ms.topic: conceptual ms.subservice: sql ms.date: 04/15/2020 ms.author: stefanazaric ms.reviewer: jrasnick ms.openlocfilehash: 4ec59b7cc124a87b3939d095d03ee4a...
JavaScript
UTF-8
1,063
3.03125
3
[]
no_license
// export const Hamburger = (data) => { // const state = { // // this state to check if the hamburger is clicked // isMenuOpen: false, // }; // const openMenu = () => { // state.isMenuOpen = !state.isMenuOpen; // let navContainer = document.querySelector(".nav-container"); ...
PHP
UTF-8
2,203
2.53125
3
[]
no_license
<?php /** * @description * This exports the acknowledged contributions to a mail merge file. * * @author Chezre Fredericks * @date_created 21/01/2014 * @Changes * */ # BOOTSTRAP include("inc/globals.php"); $filename = preg_replace('/ /','_',$_POST['filename']); if (file_exists('acklists/'.$filename))...
Ruby
UTF-8
357
2.625
3
[]
no_license
class ProspectoPaquete < ActiveRecord::Base def self.paquetes_de(servicio) self.find(:all, :conditions => "servicio = '#{servicio}'") end def self.paquetes_con_nombre_de(producto) @paquetes_raw = paquetes_de(producto) @nombres = Array.new for paquete_raw in @paquetes_raw @nombres << paquete_raw.paquet...
Java
UTF-8
1,150
2.3125
2
[ "Apache-2.0" ]
permissive
package com.philemonworks.critter.condition; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.philemonworks.critter.action.RuleIngredient; import com.philemonworks.critter.rule.RuleContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Path extends RuleIngredient imp...
Java
UTF-8
649
2.265625
2
[]
no_license
package com.urservices.domain; import static org.assertj.core.api.Assertions.assertThat; import com.urservices.web.rest.TestUtil; import org.junit.jupiter.api.Test; class ExamenTest { @Test void equalsVerifier() throws Exception { TestUtil.equalsVerifier(Examen.class); Examen examen1 = new E...
C++
UTF-8
2,246
2.5625
3
[]
no_license
// This file defines utility macros for working with C++. #pragma once #include "phd/private/macros_impl.h" #include <stdio.h> #include <execinfo.h> #include <signal.h> #include <stdlib.h> #include <unistd.h> #ifdef DEBUG #error "C preprocessor macro DEBUG() already defined!" #endif #ifdef INFO #error "C preprocess...
C++
UTF-8
315
3.984375
4
[]
no_license
#include<iostream> #include<vector> using namespace std; /* Task: 1. implement a vector in c++ 2. initialize the vector with values 3. iterate over the vector using the auto keyword */ int main(){ vector<int> v = {1, 2, 3, 4, 5}; for (auto &it : v) { cout << it << ' '; } return 0; }
C++
UTF-8
1,256
2.765625
3
[]
no_license
#include <iostream> #include <cstdio> #include <cstdlib> using namespace std; int main() { int T; cin >> T; for(int i = 1; i <= T; ++i) { int N; int nrSenators[30]; cin >> N; int total = 0; for(int j = 0; j < N; ++j) { cin >> nrSenators[j]; total += nrSenators[j];...