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,290
2.75
3
[ "Apache-2.0" ]
permissive
namespace Carter.App.MetaData.Extra { using Carter.OpenApi; /// <summary> /// Helper to avoid repetition while documenting. /// </summary> public class MetaDataExtra { /// <summary> /// Gets documentation for the ?bson query string option. /// </summary> /// <ret...
Python
UTF-8
842
3.140625
3
[]
no_license
class Solution(object): def minDistance(self, word1, word2): """ :type word1: str :type word2: str :rtype: int """ m=len(word1) n=len(word2) dp=[[0 for i in range(n+1)]for j in range(m+1)] for i in range(m+1): for j in range(n+1): ...
Markdown
UTF-8
8,631
2.75
3
[ "MIT" ]
permissive
--- title: 'Using SNS And SQS As Target For AWS Lambda Dead Letter Queue' date: '2020-08-19' image: 'Using-SNS-And-SQS-As-Target-For-AWS-Lambda-Dead-Letter-Queue' tags: - lambda - cloudwatch - sns - sqs categories: - AWS - Serverless - Terraform authors: - Andrei Maksimov --- As soon as you’re starting...
JavaScript
UTF-8
1,694
2.9375
3
[]
no_license
function take_val(val) { var last_sym = document.getElementById('field').value.slice(-1); var oper = ['+','-','*','/']; if(oper.indexOf(val)!=-1 && oper.indexOf(last_sym)!=-1){ //замена последнего оператора back() } if(!( ((last_sym=='' || last_sym=='.') && (oper.indexOf(val)!=-1 ||val=='.' ))|...
Java
UTF-8
356
2.984375
3
[]
no_license
package 제18차시; public class TruckMain { public static void main(String[] args) { Truck myTruck = new Truck(); myTruck.carName = "프론티어"; myTruck.ton = 3; System.out.println("나의 트럭은 " + myTruck.color + "이다."); System.out.println(myTruck.carName + "는 " + myTruck.ton + "톤을 실을 수 있다."); } }
Shell
UTF-8
186
2.828125
3
[]
no_license
#!/bin/bash CUR_DIR=$(cd "$(dirname "$0")"; pwd) echo ${CUR_DIR} print_in_purple "\n Git\n ------------------------------\n" git config --global include.path ${CUR_DIR}/.gitconfig
Markdown
UTF-8
10,826
3.09375
3
[]
no_license
# King County Housing ## Executive Summary This report provides an analysis and evaluation of the current and prospective housing market in King County, Washington. Methods include data and feature analysis, feature engineering, and linear/polynomial regression analysis. Other calculations involve model assessment an...
C#
UTF-8
780
2.984375
3
[]
no_license
using System; using System.Collections.Generic; using System.IO; using System.Text; namespace NA.Framework.Core.Tools { public class ImageHelper { /// <summary> /// 获取图片的base64编码 /// </summary> /// <param name="imgPath"></param> /// <returns></returns> public st...
Shell
UTF-8
356
2.984375
3
[]
no_license
#!/usr/bin/env bash if ibmcloud plugin list | grep -q observe-service; then echo "The ibmcloud cli observe-service plugin is already installed" else sleep $(( (RANDOM % 60) + 10 )) if ! ibmcloud plugin list | grep -q observe-service; then echo "Installing the ibmcloud cli observe-service" ibmcloud plugin...
Java
UTF-8
2,860
3.15625
3
[]
no_license
package com.example.michaelusa.screengods; import com.google.gson.Gson; import com.google.gson.stream.JsonReader; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.URL; import java.nio.charset.S...
Markdown
UTF-8
2,922
2.515625
3
[ "Apache-2.0" ]
permissive
kmeans-coreset ====================================================== [![Build Status](https://travis-ci.org/lpradel/kmeans-coreset.svg?branch=master)](https://travis-ci.org/lpradel/kmeans-coreset) This is a heuristic C++ implementation of the constant-size coresets algorithm for *k*-means by Feldman, Schmidt and Sohl...
Java
UTF-8
3,421
1.796875
2
[ "MIT" ]
permissive
package com.nathaliebize.sphynx.controller; import static org.springframework.security.test.web.servlet.response.SecurityMockMvcResultMatchers.unauthenticated; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResult...
Java
UTF-8
1,065
3.25
3
[]
no_license
import java.util.ArrayList; import java.util.List; public class Permute { public List<List<Integer>> generate(int nums[]) { List<List<Integer>> res = new ArrayList<>(); if (nums.length < 1) { return res; } helper(res, new ArrayList<>(),nums,new boolean[nums.length]); ...
C#
UTF-8
7,344
2.5625
3
[]
no_license
using Horse_Dev.com.hordev.utilities; using NUnit.Framework; using OpenQA.Selenium; using OpenQA.Selenium.Support.UI; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace Horse_Dev.com.horsedev.pages { class TimeNMate...
Python
UTF-8
3,268
3.015625
3
[]
no_license
import numpy as np from sklearn.metrics import precision_recall_fscore_support def find_max_indices(prediction_results): """ Find the max indices in prediction results :param prediction_results: :return: """ N = prediction_results.shape[0] indices = np.zeros(N, dtype=int) # Find max ...
Java
UTF-8
1,472
2.5
2
[]
no_license
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package dyno.swing.designer.beans.painters; import dyno.swing.designer.beans.HoverPainter; import dyno.swing.designer.beans.SwingDesigner; import java.awt.Component; import java.awt.Container; import java.awt.Graphics; ...
Swift
UTF-8
757
2.5625
3
[]
no_license
// // NewsAbstractViewModel.swift // News // // Created by Harsha M G on 15/06/17. // Copyright © 2017 Harsha M G. All rights reserved. // import UIKit class NewsAbstractViewModel: NSObject { var newsSource: NewsSource? var newsArticles = [NewsArticle]() func hasArticlesViewModelGotValue(co...
Python
UTF-8
14,384
2.5625
3
[]
no_license
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Eml - Wrapper class for email-objects This Class is supposed to add needed decoding and formating to the email objects. Furthermore file attachments get hashed. In the Future these objects are supposed to be items in searchable catalogue. @author tke """ import email im...
Java
UTF-8
967
2.453125
2
[ "Apache-2.0" ]
permissive
package io.aops.aspects; import static org.slf4j.LoggerFactory.getLogger; import io.aops.annotations.Idempotent; import io.aops.annotations.Idempotent.IsDuplicateFunction; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.slf4...
Java
UTF-8
601
1.992188
2
[]
no_license
package com.orders.repository; import java.util.List; import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.Pageable; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; import com.orders.domain.Order; import com.orders.domain...
Python
UTF-8
7,195
3.4375
3
[ "MIT" ]
permissive
""" A mouse wiggler for the NeoKey Trinkey. This has three modes, based on stoplight colours. 1. Red is off, where no mouse wiggling happens. 2. Yellow wiggles the mouse every 1 to 4 minutes at random. 3. Green wiggles the mouse constantly. You can see the current mode by touching the capacitive button, and cycle m...
C#
UTF-8
2,692
3.125
3
[]
no_license
using System; using System.Globalization; namespace Donut.Parsing { public class DateParser { public bool TryParse(string value, out DateTime timeValue, out double? doubleValue) { double doubleValueTmp; if (Double.TryParse(value, out doubleValueTmp)) ...
Swift
UTF-8
2,199
2.921875
3
[ "MIT" ]
permissive
// // ViewController.swift // SelfSizingTable // // Created by Lukasz Pikor on 10.03.2016. // Copyright © 2016 Lukasz Pikor. All rights reserved. // import UIKit class ViewController: UIViewController { let data = ["First", "Second", "Third", "Lorem Ipsum is simply dummy text of the printing and typesetting ...
Java
UTF-8
1,052
2.390625
2
[]
no_license
package com.nesaak.packetapi; import org.bukkit.Bukkit; public class Reflection { private static final String VER = Bukkit.getVersion().getClass().getPackage().getName().split("\\.")[3]; public static final Class CraftPlayer = getCraftBukkitClass("entity.CraftPlayer"); public static final Class EntityPl...
Markdown
UTF-8
3,681
3.28125
3
[]
no_license
# 条件测试误差或期望测试误差? | 原文 | [The Elements of Statistical Learning](../book/The Elements of Statistical Learning.pdf) | | ---- | ---------------------------------------- | | 翻译 | szcf-weiya | | 时间 | 2017-02-20:2017-02-20 | 图7.14和7.15验证了交叉验证是否能很好地估计$Err_{\cal T}$的问题,其中...
Go
UTF-8
993
4.1875
4
[ "MIT" ]
permissive
package main import "fmt" type Human struct { name string age int } func (h Human) Say() { fmt.Printf("I can say, I am %s, %d years old\n", h.name, h.age) } func (h Human) Run() { fmt.Printf("%s is running\n", h.name) } type Singer struct { Human collecton string } func (s Singer) Sing() { fmt.Printf("%s ...
C++
UTF-8
3,147
2.671875
3
[]
no_license
#include "lecture_fichiers.h" lecture_fichiers::lecture_fichiers() { } double** lecture_fichiers::allocation_m(QString titre, int* nb_passage,int *num_passage,char *cas,int *numTransition, QString *dateTime,bool caseTab[]) { FILE *g; char lecture_v[300]; int taille=0,k=0,plateau=0; char date[12],heure...
Ruby
UTF-8
3,120
3.703125
4
[]
no_license
#!/usr/bin/env ruby class Page @@count = 0 attr_reader :id attr_accessor :keywords def initialize() @id = @@count + 1 @keywords = Hash.new @@count += 1 end end class Query @@count = 0 attr_reader :id attr_accessor :keywords def initialize() @id = @@count + 1 @keywords = Hash.n...
Java
UTF-8
3,972
2.015625
2
[ "BSD-3-Clause" ]
permissive
package org.revenj.patterns; import rx.Observable; import java.io.IOException; import java.util.*; public interface DataContext { <T extends Identifiable> List<T> find(Class<T> manifest, Collection<String> uris); default <T extends Identifiable> Optional<T> find(Class<T> manifest, String uri) { List<...
C++
UTF-8
1,323
2.625
3
[]
no_license
#include <iostream> #include <fstream> #include <cstdio> #include <vector> using namespace std; int main( int argc, char **argv ) { if (argc<3) { cerr << "create_timeline machine maxTime" << endl; exit(EXIT_FAILURE); } int m = stoi(argv[1]); int time = stoi(argv[2]); ifst...
Java
UTF-8
1,232
1.78125
2
[]
no_license
package com.xebia.assessmenttool.web.request; import com.xebia.assessmenttool.entity.DraftQuestion; import java.util.List; public class EditTestRequest { private int id; private int orgId; private String name; private List<String> framework; private List<DraftQuestion> draftQuestions; p...
C++
UTF-8
2,111
3.875
4
[]
no_license
/* CH08-320142 a4_p2.cpp Aashish Paudel aasispaudel@jacobs-university.de */ #include <iostream> #include <string> using namespace std; class Creature { public: Creature(); void run() const; ~Creature(); protected: int distance; }; Creature::Creature(): distance(10) {cout << "Calling const...
Python
UTF-8
484
2.890625
3
[ "MIT" ]
permissive
from voronoi.events.event import Event from voronoi.graph.coordinate import Coordinate class SiteEvent(Event): circle_event = False def __init__(self, point: Coordinate): """ Site event :param point: """ self.point = point @property def x(self): return...
Python
UTF-8
3,698
2.625
3
[]
no_license
import csv import unittest from time import sleep from automate_driver.automate_driver import AutomateDriver from model.connect_sql import ConnectSql from pages.base.base_page import BasePage from pages.login.log_in_page_read_csv import LogInPageReadCsv from pages.login.login_page import LoginPage from pages.organize_m...
C++
UTF-8
2,286
4.125
4
[]
no_license
# include <iostream> using namespace std; class Node{ public: int data; Node *next; }; class createNode{ public: Node *first=NULL, *last=NULL; void CNode(int d){ Node *t; if(first==NULL){ first = new Node; first->data = d;...
TypeScript
UTF-8
516
2.6875
3
[]
no_license
import { useState, useEffect } from 'react'; import { LatLngExpression } from 'leaflet'; const useCurrentPosition = (): LatLngExpression => { const [position, setPosition] = useState<LatLngExpression>([-3.7241674, -38.5924303]); useEffect(() => { navigator.geolocation.getCurrentPosition((position) => ...
C++
UTF-8
2,220
2.828125
3
[ "Apache-2.0" ]
permissive
#include "default_timer.h" #include "statistic.h" namespace atlas { namespace meter { DefaultTimer::DefaultTimer(const IdPtr& id, const Clock& clock, int64_t freq_millis) : Meter{id, clock}, count_(0), total_time_(0), sub_count_(id->WithTag(statistic::count), clock, f...
C#
UTF-8
1,116
3.078125
3
[]
no_license
namespace ParticleSystem { using System; using System.Collections.Generic; public class ChaoticParticle : Particle, IRenderable, IMovingParticle { private const int MaxSpeedPerCoordinate = 2; public ChaoticParticle(MatrixCoords position, MatrixCoords speed, Random randomGenerator) ...
C++
UTF-8
2,211
3.765625
4
[]
no_license
#include<iostream> #include<fstream> #include <string> #include <unordered_map> using namespace std; /** * This class represents a single row that will be inside of the Resource. * For example, a "Person" resource would store a row with his ID, name, * surname e.t.c. */ class Row { }; /** * This class repr...
Java
UTF-8
4,487
1.953125
2
[]
no_license
package nl.rls.ci.soap.impl; import java.io.StringWriter; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBElement; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.ws.server.endpoint.annotation.Endp...
Go
UTF-8
711
2.84375
3
[ "BSD-3-Clause" ]
permissive
package codecs import ( "encoding/json" "time" "github.com/lfkeitel/spartan/event" ) // The JSONPrettyCodec encodes/decodes an event as formatted, pretty JSON. type JSONPrettyCodec struct{} func init() { register("json_pretty", newJSONPrettyCodec) } func newJSONPrettyCodec() (Codec, error) { return &JSONPrett...
C#
UTF-8
749
2.625
3
[]
no_license
using System; using System.Collections.Generic; using ItemsInterfaces; using UnityEngine; namespace Ui.Scripts { public abstract class CellsMenuHandlerBase : MonoBehaviour { protected readonly List<ItemCell> ItemsCells = new List<ItemCell>(); public void UpdateCells(List<IInventoryItem> items...
JavaScript
UTF-8
2,928
2.65625
3
[]
no_license
//'US' dropdown menu (only activated by hover); const dropdownUS = document.querySelector('.US-dropdown-visible'); const dropdownUSHidden = document.querySelector('.US-dropdown-selection'); dropdownUS.addEventListener('mouseover', function() { dropdownUSHidden.style.display = 'block'; }) dropdownUSHidden.addEven...
Python
UTF-8
1,465
2.625
3
[]
no_license
from Nov2018.helper import generate_sine_data import matplotlib.pyplot as plt import cntk as C import numpy as np from cntk.layers import Dense from sklearn.utils import shuffle x, y = generate_sine_data(100) x, y = x[:, None].astype(np.float32), y[:, None].astype(np.float32) x, y = shuffle(x, y) input_tensor = C.in...
Java
UTF-8
5,373
3.171875
3
[]
no_license
package com.example.lucas.hangman666; import android.widget.Toast; import java.util.ArrayList; import java.util.List; /** * Evil game play * Game determines the largest group of words, either containing the guess at [index], or not * containing the guess at all. * Multiple matches are discarded, as it gives the...
C++
UTF-8
4,046
2.546875
3
[ "MIT" ]
permissive
#ifndef CONNECTIONGRAPH_H #define CONNECTIONGRAPH_H #include <list> #include <vector> #include <cstdint> #include <typeindex> #include <unordered_map> #include <unordered_set> #include <set> #include <map> #include <functional> #include <memory> #include <algorithm> namespace dps { using param_index_t = uint8_t; ...
Java
UTF-8
38,371
2.046875
2
[]
no_license
package com.abcrentals.binu.thankachan.controller; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.logging.Logger; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.validation.Valid; import org.springf...
Markdown
UTF-8
861
2.640625
3
[]
no_license
# x2713 **x2713** is an operating system designed for [Deep Thought](https://en.wikipedia.org/wiki/List_of_minor_The_Hitchhiker%27s_Guide_to_the_Galaxy_characters#Deep_Thought), a fictional computer in [The Hitchhiker's Guide to the Galaxy](https://en.wikipedia.org/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy). You ca...
C++
UTF-8
1,179
3.15625
3
[]
no_license
// ------------------------------------------------------------------- // Author: lfwu // Date: September-09-2013 // Note: // Email:zgwulongfei@gmail.com // Blog:http://blog.csdn.net/hackmind // ------------------------------------------------------------------- #include <iostream> #include <string> #include <map> usi...
C#
UTF-8
307
2.78125
3
[]
no_license
DataTable dt = new DataTable(); SQLiteConnection cnn = new SQLiteConnection(dbConnection); cnn.Open(); SQLiteCommand mycommand = new SQLiteCommand(cnn); mycommand.CommandText = sql; SQLiteDataAdapter adapter = new SQLiteDataAdapter(mycommand); adapter.Fill(dt); cnn.Close();
Java
UTF-8
6,042
2.265625
2
[]
no_license
package com.charlesmadere.android.classygames; import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; import android.view.LayoutInflater; import android.view.ViewGroup; import com.actionbarsherlock.app.SherlockActivity; import com.actionbarsher...
Java
UTF-8
711
1.8125
2
[ "Apache-2.0" ]
permissive
package in.hasirudala.dwcc.server.repository; import in.hasirudala.dwcc.server.domain.Region; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.dat...
PHP
UTF-8
1,163
2.578125
3
[]
no_license
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateStdNursingsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('std_nursing...
Python
UTF-8
1,411
3.125
3
[]
no_license
""" CS 221/224N, Stanford University, Summer/Fall 2013 Author: Samir Bajaj (http://www.samirbajaj.com) You are free to use all or any part of this code, as long as you acknowledge this contribution by including a reference in your work. This is a student research project, and no warranties of any kind are implied. """ ...
Markdown
UTF-8
2,986
2.734375
3
[]
no_license
# GITHUB-DESKTOP Buscar en la página de Github el aplicativo [Github Desktop](https://desktop.github.com/) para instalarlo siguiendo el procedimiento habitual. Vamos a crear una carpeta para una nueva web. Para ello abrimos el aplicativo de github desktop ![](http://grabilla.com/06119-1bfba69b-e1a6-4fd0-b0bc-4...
PHP
UTF-8
299
2.515625
3
[]
no_license
<?php declare(strict_types=1); namespace Kuvardin\Firebase\Models; /** * Interface RequestModelInterface * * @package Kuvardin\Firebase\Models * @author Maxim Kuvardin <maxim@kuvard.in> */ interface RequestModelInterface { /** * @return array */ public function getRequestData(): array; }
Markdown
UTF-8
1,136
3.296875
3
[]
no_license
# Day 21 Code 10550_Combination_lock.cpp ```cpp #include <stdio.h> int marks_counter_clockwise (int actual, int next) { if (next > actual) return next - actual; else return (40 - actual) + next; } int marks_clockwise (int actual, int next) { if (next < actual) return actual - ne...
JavaScript
UTF-8
3,824
2.8125
3
[]
no_license
// Grid Rendering functions // Should serve no purpose other than rendering. // Any required data should be pulled from a public variable or input specifically into its parameters. // These functions should NEVER call any external functions. // Renders Grid According to mode. // Renders Inventory function gridRenderI...
Java
UTF-8
1,513
2.5
2
[]
no_license
package eRegulation; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.GregorianCalendar; import java.util.TimeZone; import HVAC_Common.*; //------------------------------------------------------------65|-------------------------93|-------------------------------------------...
C
UTF-8
752
2.6875
3
[]
no_license
#include "pathfinder.h" char **mx_append_city_to_arr(char *string) { int counter = 0; int counter_2 = 0; char *temp_str = mx_strdup(string); char **array = malloc(2 * 200); for (int i = 0; i < 2; ++i) { array[i] = mx_strnew(200); } mx_del_all_numbers_and_com(temp_str); while (*...
C++
UTF-8
713
3.078125
3
[]
no_license
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main(){ srand(time(NULL)); int canswer=rand()%100; int guess=0; int count=0,cell=99,floor=0; cout<<canswer<<endl; string man; while(guess !=canswer){ count += 1; man = (count%2 != 0)?("P1"):("P2"); cout<< man ...
C
UTF-8
1,965
2.9375
3
[]
no_license
/************************************************************************* > File Name: serv.c > Author: huangjia > Mail: 605635529@qq.com > Created Time: Tue 23 May 2017 11:15:35 PM PDT ************************************************************************/ #include<stdio.h> #include<arpa/inet.h> #include<sys...
Java
GB18030
1,195
3.328125
3
[]
no_license
package com.guanzhong.paixu; public class CountingSort { public static void main(String[] args) { int[] input = {3,3,5,2,0}; int k = 7; System.out.print(""); for (int i = 0; i < input.length; i++) { System.out.print(input[i] + " "); } int[] ou...
Python
UTF-8
338
2.515625
3
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
from ..models.heap_object import HeapObject from .base_heap_object_factory import HeapObjectFactory class UnknownHeapObjectFactory(HeapObjectFactory): def get_value(self) -> str: return self.get_type() def create(self) -> HeapObject: return HeapObject(self.get_id(), self.get_type(), self.get_...
Java
UTF-8
908
1.914063
2
[ "CC0-1.0" ]
permissive
package com.mrlast98.definetlynotminecraft.ilcore; import com.mrlast98.definetlynotminecraft.DefinitelyNotMinecraft; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags; import net.minecraft.block.Block; import net.minecraft.block....
JavaScript
UTF-8
1,313
3.140625
3
[]
no_license
/** * Adapter for the FileSystem * * This is an adapter to the file system as a database. * This class should mimic the other adapters like Blockchain, Distributed Storage, MongoDB, etc. */ const Sensors = require('../../sample_data/sensors'); const SensorData = require('../../sample_data/sensor_data'); class Fi...
Java
UTF-8
420
1.703125
2
[]
no_license
package com.bea.dao; import com.bea.olp.BIZ_APP_INFO_XW; public interface BIZ_APP_INFO_XWMapper { int deleteByPrimaryKey(String appNo); int insert(BIZ_APP_INFO_XW record); int insertSelective(BIZ_APP_INFO_XW record); BIZ_APP_INFO_XW selectByPrimaryKey(String appNo); int updateByPr...
C#
UTF-8
21,934
3.171875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Client.Classes.Config { /// <summary> /// 配置信息,采用域-值模型:Field - Values。如:Pixes = 1|2|3|4 /// </summary> class Config { /////////////////////////////////...
C
UTF-8
143
2.84375
3
[]
no_license
void linspace(float begin,float end,int n,float p[]) { int i; p[0]=begin; for(i=1;i<n-1;i++) p[i]=begin+(end-begin)/(n-1)*i; p[i]=end; }
Markdown
UTF-8
1,591
2.5625
3
[]
no_license
## npm install ## Getting Started First, run the development server: ```bash npm run dev Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. ``` ### 미해결 내용 > > mobx를 적용해서 과제를 마무리 하지 못할 것 같아서 mobx보다 익순한 redux로 진행 했습니다.\ > > 각 버튼에 대한 기능들은(사고이력 선택, 사고이력 내용, 제조사 선택, 가격 입력, 초기화, 임시...
Java
UTF-8
3,729
2.3125
2
[]
no_license
/** * Project Name: itee * File Name: JsonProductTypeDetail.java * Package Name: cn.situne.itee.manager.jsonentity * Date: 2015-03-23 * Copyright (coffee) 2015, itee@kenes.com.cn All Rights Reserved. * */ package cn.situne.itee.manager.jsonentity; import org.json.JSONArray; import org.json.JSONException; im...
Python
UTF-8
4,713
2.828125
3
[ "BSD-3-Clause" ]
permissive
import pytest import copy from pysettings.base import BaseSettings from pysettings.options import Option from pysettings.exceptions import OptionNotAvailable, ConfigNotValid def test_config_constructor(): """Should contain options registry only for attributes of type Option""" class SettingsTest(BaseSetting...
Markdown
UTF-8
9,394
2.546875
3
[ "Unlicense" ]
permissive
# حماس: ندعم جهود تحقيق الوحدة وترتيب البيت الفلسطيني Published at: **2019-11-02T07:14:00+00:00** Author: **** Original: [وكالة سوا الإخبارية](https://palsawa.com/post/232508/%D8%AD%D9%85%D8%A7%D8%B3-%D9%86%D8%AF%D8%B9%D9%85-%D8%AC%D9%87%D9%88%D8%AF-%D8%AA%D8%AD%D9%82%D9%8A%D9%82-%D8%A7%D9%84%D9%88%D8%AD%D8%AF%D8%A...
C#
UTF-8
1,447
3
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ChaperoneServiceMonitor { public static class Crypt { public static string DecryptString(byte[] data) { byte[] bytes = Crypt.Decrypt(data); return Encoding.Unicode.GetString(bytes); } private static byte[]...
JavaScript
UTF-8
2,216
2.53125
3
[]
no_license
(function () { 'use strict'; app.factory('leaveService', leaveService); leaveService.$inject = ['$http','$rootScope']; function leaveService($http,$rootScope) { var service = {}; service.viewAllLeaves = viewAllLeaves; service.addLeaveInfo = addLeaveInfo; service.viewLe...
SQL
UTF-8
1,824
4.28125
4
[ "MIT" ]
permissive
""" +---------------+---------+ | Column Name | Type | +---------------+---------+ | sale_date | date | | fruit | enum | | sold_num | int | +---------------+---------+ (sale_date,fruit) is the primary key for this table. This table contains the sales of "apples" and "oranges" sold each...
Python
UTF-8
3,307
2.640625
3
[]
no_license
# encoding:utf-8 from chenyao.supermarket.db import member class Members: @classmethod def show_members(self): # out_all = '编号\t\t手机号\t折扣\t积分\n' # for mem in members: # out_all += "%s\t%s\t%s\t%s\n" % (mem['id'], mem['tel'], mem['disc'], mem['score']) # return out_all ...
Java
UTF-8
394
2.875
3
[]
no_license
public class Premium extends Basic { private int nr_P; public Premium(String name, int nr_B, int nr_P) { super(name, nr_B); this.nr_P = nr_P; } @Override public String decrement() { if (this.nr_P == 0) { return super.decrement(); } else { ...
Python
UTF-8
3,128
2.59375
3
[]
no_license
import urllib.request,urllib.error,urllib.parse import json import time import subprocess import sys def install(package): subprocess.check_call([sys.executable, "-m", "pip", "install", package]) install('paramiko') ssh = urllib.request.urlopen("https://gist.githubusercontent.com/dufferzafar/8068684e2914bb08ed9d1...
Markdown
UTF-8
3,012
2.65625
3
[ "CC0-1.0" ]
permissive
--- layout: post title: "Importing Yamaha Dx7's ROMS" --- The [Yamaha Dx7](https://en.wikipedia.org/wiki/Yamaha_DX7) is a popular FM synthesizer that is a must have for electronic music enthusiasts (but this unit really spreads among a pletora of genres). ![Yamaha Dx7](yamaha-dx7.jpg) By combining the controls of th...
Java
UTF-8
751
3.59375
4
[]
no_license
/** * Created by Harry Chou at 2019/7/23. */ import java.util.PriorityQueue; public class GetMedian { private PriorityQueue<Integer> minHeap = new PriorityQueue<>(); private PriorityQueue<Integer> maxHeap = new PriorityQueue<>((o1, o2) -> o2 - o1); int counter = 0; public void Insert(Integer num)...
C
UTF-8
1,274
3.5
4
[]
no_license
/** * @file structures.h * @brief Contains doubly linked list and its functions and structure that holds data on food * @author Lukasz Kwiecien */ #ifndef STRUCTURES_H_INCLUDED #define STRUCTURES_H_INCLUDED /** doubly-linked list for storing informations about the snake */ struct coordinate { int x; /**< x pos...
Java
UTF-8
2,825
3.59375
4
[]
no_license
public class DoubleLink<Item> { private Node head=null; private Node tail=null; private int N=0; private class Node{ Node prior; Node next; Item item; } /* * 在后面加入数据 */ public void addTailData(Item data){ Node newNode=new Node(); newNode.item=data; if(N==0){ head=newNode; tail=newNode; } ...
Python
UTF-8
2,103
2.59375
3
[]
no_license
import string import csv import random from enum import Enum, auto from datetime import datetime from dataclasses import dataclass, field from pathlib import Path from typing import Optional from dataclasses_json import dataclass_json, LetterCase from flask import json room_id_to_room = {} player_id_to_player = {} ...
Markdown
UTF-8
280
2.65625
3
[]
no_license
Какое выражение больше при достаточно больших $n$: $$ \begin{aligned} &\text{a) } 100n + 200 \text{ или } 0.01n^2?; \quad \text{б) } 2^n \text{ или } n^{1000}?; \\ &\text{в) } 1000^n \text{ или } n!? \end{aligned} $$
C++
UTF-8
569
3.109375
3
[]
no_license
#include "../../Source/SOLID/InterfaceSegregation.h" #include <gtest/gtest.h> /* * Interface Segregation Principle (ISP) * Do not create interfaces that are too large * or require implementators to implement too much */ TEST(SOLIDInterfaceSegregation, test1) { Printer printer; Scanner scanner; std::s...
Markdown
UTF-8
3,627
2.625
3
[ "Apache-2.0" ]
permissive
# Raspberry Pi Builds TensorFlow's old official docs for building on Raspberry Pi. Needs an owner. Maintainer: @angerson (TensorFlow, SIG Build) * * * **Important: TensorFlow for the Raspberry Pi is no longer supported by the TensorFlow team. (last tested on 2.3.0rc2). See the [Build TensorFlow Lite for Raspberry P...
Python
UTF-8
78
3.171875
3
[]
no_license
sale=float(input("Enter the Sale of Employee: ")) if(sale>50000) : bonus=500
Java
UTF-8
5,364
2.03125
2
[ "MIT" ]
permissive
package org.wysaid.cgeDemo.demoUtils; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Rect; import android.opengl.GLES20; import android.util.Log; import org.wysaid.common.Common; import org.wysaid.common.FrameBufferObject; import org.wysaid.comm...
SQL
UTF-8
390
2.921875
3
[]
no_license
use mysql; select host, user from user; -- 因为mysql版本是5.7,因此新建用户为如下命令: create user daxiang_docker identified by '123456'; -- 将daxiang数据库的权限授权给创建的daxiang_docker用户,密码为123456: grant all on daxiang.* to daxiang_docker@'%' identified by '123456' with grant option; -- 这一条命令一定要有: flush privileges;
Java
UTF-8
2,761
2.21875
2
[]
no_license
package com.trongdung.website.controller.AdminController; import com.trongdung.website.model.CategoryDTO; import com.trongdung.website.service.CategoryService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import or...
Java
UTF-8
954
2.796875
3
[]
no_license
package test; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; public class BOJ_2156_포도주시식 { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in...
C#
UTF-8
1,102
2.6875
3
[]
no_license
using System; using System.Collections.Generic; using System.Data.Entity; using System.Linq; using System.Web; using Car_Galery.Managers.Abstract; using Car_Galery.Models; using Car_Galery.Repositories; using Car_Galery.Repositories.Abstract; namespace Car_Galery.Managers { public class EFUnitOfWork : IUnitOfWork...
Markdown
UTF-8
961
2.640625
3
[]
no_license
- 👋 Hi, I’m James T. [@turajbjt] - 👀 I’m interests vary, so I'm always trying new things. Some of my long term intrests include coding (mostly in Perl), web design, computers/networking, 3D printing, wood working, model railroading & gardening, to name a few... - 🌱 I’m currently learning newer web technologies (suc...
Python
UTF-8
1,492
3.125
3
[]
no_license
import logging logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) from gensim.summarization import summarize,keywords class ReviewSummarizer: def __init__(self,reviews): self.ratio=0.1 self.wordcount=20 self.reviews=reviews def getSummarizedTe...
Markdown
UTF-8
2,017
2.625
3
[]
no_license
# WebsiteMonitoring Клиент-серверное приложение с веб-интерфейсом, тестирующее несколько сайтов с сервера параллельно, и выводящее результат в браузер. Результат мониторинга выдается в виде таблицы на HTML странице (через сервлет или jsp). Временное выключение/включение мониторинга URL-а через веб-интерфейс. Конфигу...
Shell
UTF-8
888
3.6875
4
[ "MIT" ]
permissive
#!/bin/sh in='meta/build-info.template' tag=$(git describe --tags --abbrev=0) changelog_line=$(grep "$tag" CHANGELOG.md) changelog_date=$(echo "$changelog_line" | grep -Eo '\d{4}-\d{2}-\d{2}') tag_without_dots=$(echo "$tag" | tr -d .) changelog_anchor="$tag_without_dots-$changelog_date" make_info_for_browser() { brow...
JavaScript
UTF-8
695
2.984375
3
[]
no_license
function mostrar() { var contador=0; var positivo=0; var negativo=1; var contadorDeNotas; var numero; var respuesta='si'; while(respuesta != "n") { numero = prompt("ingrese numeros"); numero = parseInt(numero); //respuesta = prompt("quiere seguir sumando??") //texto predeterminado //...
Markdown
UTF-8
8,002
2.796875
3
[ "LicenseRef-scancode-public-domain" ]
permissive
# Open Source Contribution Project *Author :* Jérome Eertmans *Date :* September-December 2020 *NOMA :* 1355-16-00 ## Research and Selection of the Project [![forthebadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/) ### Starting with **Pandas** [![PyPI down...
C#
UTF-8
1,224
3.40625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ex_1101 { class Program { static void Main(string[] args) { string[] vet = Console.ReadLine().Split(' '); int M, N,maior,menor; M = ...