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
3,220
1.828125
2
[]
no_license
package com.cpone.platform.backoffice.service.impl; import com.cpone.platform.api.domain.view.StockDeliveryReturnMainView; import com.cpone.platform.api.domain.view.StockDeliveryReturnSummaryView; import com.cpone.platform.api.repository.stock.StockDeliveryMainReturnRepository; import com.cpone.platform.api.repository...
Java
UTF-8
1,294
2.25
2
[]
no_license
package com.endeymus.planets.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; import org.springframework.jdbc.core.namedparam.Named...
PHP
UTF-8
9,146
2.953125
3
[ "Apache-2.0" ]
permissive
<?php /** * @author : Tshepo Tema * @created : 02 Nov 2015 * @description : mysqli database interface layer * */ include_once ("globals.php"); class DB { public $bConnected; //connection flag public $mysqli; public function __construct () { $this->mysqli = @new mysqli(...
Go
UTF-8
551
2.765625
3
[]
no_license
package main // Route represents an HTTP router with info and the actual request handler type Route struct { Name string Method string Pattern string HandlerFunc HandlerFunc } // Routes holds the http routers defined in this service type Routes []Route var routes = Routes{ // main endpoints Rou...
JavaScript
UTF-8
1,987
2.59375
3
[]
no_license
import api from '../api/index'; import * as type from '../actions/types'; const initialState = { likesCount: { likeCount: 0, unlikeCount: 0 }, data: [] }; const likesCount = (state = initialState.likesCount, action) => { switch (action.type) { case type.LIKE: { const likes = { likeCo...
JavaScript
UTF-8
1,900
2.8125
3
[]
no_license
/** * The class Observable. */ class Observable { /** * @param o */ addObserver(o) { if (o == null) { return; } if (o.update == null) { return; } if (this._observers == null) { this._observers = []; } if (this._hasObserver(o) == false) { this._observers.pu...
Python
UTF-8
344
2.796875
3
[]
no_license
def arrays_38_Longest(list = []): list = sorted(list) co = 0 Max = 0 for i in range(0,len(list)-1): if list[i+1]-list[i]==1: co+=1 else: if Max<co+1: Max = co+1 co = 0 print(Max) if __name__=='__main__': list = eval(input()) ...
C#
UTF-8
5,701
2.578125
3
[]
no_license
using System; using System.IO; using System.Linq; using Microsoft.ML; namespace IssueClarificationML { class Program { private static string _appPath => Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]); private static string _trainDataPath => Path.Combine(_appPath, "..", "..", "..",...
Python
UTF-8
1,025
3.15625
3
[]
no_license
# Этот код рисует для вашей черепахи лабиринт. # Не трогайте его ни в коем случае! import turtle as t t.shape('turtle') t.up() t.speed(100) t.left(180) t.forward(200) t.right(90) t.forward(100) t.down() t.right(90) t.forward(200) t.right(90) t.forward(200) t.right(90) t.forward(80) t.up() t.forward(40) t.down() t.fo...
Markdown
UTF-8
1,041
2.703125
3
[ "MIT" ]
permissive
# India-Covid-Vaccine-Notifier A Python-Django based web application that finds the available vaccine slots in real-time from Govt.'s [CoWin website](https://www.cowin.gov.in/home) with auto-refresh functionality to capture slots in every time interval and notifies with a notification sound. ![](stuff/appDemo.gif) #...
Go
UTF-8
999
3.046875
3
[]
no_license
package chapter1 import ( "reflect" "testing" ) func Test_zeroMatrix(t *testing.T) { tests := []struct { name string m [][]int want [][]int }{ { name: "2x2", m: [][]int{ {1, 0}, {1, 1}, }, want: [][]int{ {0, 0}, {1, 0}, }, }, { name: "3x3", m: [][]int{ {1, 1...
Java
UTF-8
2,843
2.4375
2
[]
no_license
package ua.nure.kn156.khorshunova.db; import java.util.Collection; import java.util.Date; import org.dbunit.DatabaseTestCase; import org.dbunit.database.DatabaseConnection; import org.dbunit.database.IDatabaseConnection; import org.dbunit.dataset.IDataSet; import org.dbunit.dataset.xml.XmlDataSet; import ua.nure.kn1...
C++
UTF-8
431
3.4375
3
[]
no_license
#include<iostream> #include<cmath> using namespace std; class distance { int d1,d2; public: void get(); void add(); void show(); }; void distance::get() { cout<<"d="; cin>>d1; cout<<"d2="; cin>>d2; } void distance::add() { int sum=d1+d2; } void distance::show() { cout<<"Sum of dis...
Java
UTF-8
1,718
3.84375
4
[]
no_license
package interfaces; import java.util.Iterator; import java.util.NoSuchElementException; import java.util.function.BinaryOperator; public class BinaryComputingIterator implements Iterator<Double> { // Instance variables private Iterator<Double> it1, it2; private Double default1, default2; private BinaryO...
C#
UTF-8
1,235
2.671875
3
[ "Apache-2.0" ]
permissive
using System; using System.Collections.Generic; using Newtonsoft.Json; using PushNotifications.Contracts; namespace PushNotifications.Delivery.Pushy.Models { public class PushyTopicSubscriptionModel { public PushyTopicSubscriptionModel(string token, Topic topic) { if (string.IsNull...
Markdown
UTF-8
768
2.59375
3
[ "MIT" ]
permissive
--- path: /press-item/online-agile-course-targets-gov-execs type: press title: 'CivicActions’ Elizabeth Raley in StateScoop: ‘Free Online Agile Development Course Targets Government Executives’' date: "2017-03-08" link_text: "StateScoop: Free Online Agile Development Course Targets Government Executives" website: "http...
PHP
UTF-8
2,520
2.515625
3
[]
no_license
<?php /** * Created by PhpStorm. * User: pc * Date: 11/12/2017 * Time: 15:28 */ namespace DL\BackofficeBundle \Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity * @ORM\Table(name="challenge") */ class Challenge { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(...
JavaScript
UTF-8
8,385
3.28125
3
[]
no_license
//@author Македон Егор Александрович //@group 521702 //@year 2018 //@subject ЛОИС //@title Лабораторная работа N1-2 /*@task B3. B: Проверить является ли строка формулой логики высказываний. 3: Проверить является ли формула невыполнимой (противоречивой).*/ //Включение строгого стандарта написания js скрипто...
Markdown
UTF-8
3,031
2.625
3
[]
no_license
## lẬP TRÌNH MẠNG ## Bài tập lớn 1 # Simple Chat Application ``` SV thực hiện: Trương Tuấn Hùng Đặng Văn Huấn Vũ Trọng Đức ``` ## Mục lục - 1 Giới thiệu ứng dụng - 2 Định nghĩa giao thức cho từng chức năng - 3 Thiết kế ứng dụng - 3.1 Công nghệ sử dụng - 3.2 Kiến trúc ứng dụng - 3.2.1 C...
Java
UTF-8
1,304
1.921875
2
[ "Apache-2.0" ]
permissive
package com.fragtest.android.pa.InputProfile; import com.fragtest.android.pa.ControlService; import com.fragtest.android.pa.Core.LogIHAB; public class InputProfile_Blank implements InputProfile { private String LOG = "InputProfile_Blank"; private ControlService mContext; public InputProfile_Blank(Contro...
Java
UTF-8
5,254
2.09375
2
[]
no_license
package com.marketour.facade; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Date; import java.util.List; import com.marketour.business.Categoria; import com.marketour.business.Ciudad; import com.marke...
JavaScript
UTF-8
2,272
3.796875
4
[]
no_license
/* Array implementation: generate (tree) traverse tree, BFS add each element to an array set this array to the new array would have array-specific implementation left () right () parent () Ideally, BinaryHeap would look like: BinaryHeap HAS A: ...
JavaScript
UTF-8
961
2.6875
3
[]
no_license
import React, { useState, useEffect } from "react"; import ProjectCard from "../components/ProjectCard/ProjectCard"; function ProjectsPage() { const [projectList, setProjectList] = useState([]); useEffect(() => { fetch(`${process.env.REACT_APP_API_URL}projects/`, { headers: { ...
Markdown
UTF-8
28,542
2.859375
3
[]
no_license
# T08D11 ![This day will help you get acquainted with matrices and their processing algorithms.](misc/rus/images/day8_door.png) ## Contents 1. [Chapter I](#chapter-i) \ 1.1. [Level 2. Room 4.](#level-2-room-4) 2. [Chapter II](#chapter-ii) \ 2.1. [Quest 1. Move like a snake.](#quest-1-move-like-a-snake) \ 2.2. [Q...
Markdown
UTF-8
19,897
2.828125
3
[]
no_license
# club-flutter #1 Stack >Stack est une Widget pouvant contenir plusieurs widgets enfants, >ils positionne ses enfants par rapport aux bords de sa boîte. >Cette classe est utile si vous souhaitez superposer plusieurs enfants de manière simple, >par exemple, avoir du texte et une image, superposés avec un dégradé et ...
C#
UTF-8
2,083
3.125
3
[]
no_license
using AoCLib; using _1._December; using System; using System.Linq; using System.Threading.Tasks; namespace _9._December { class December9Solver : ChallengeSolver { private int PreambleSize { get; set; } = 5; public override async Task Solve(string filename) { var input = (...
Python
UTF-8
113
3.296875
3
[ "MIT" ]
permissive
def area(l, w): if (l <0 or w< 0): raise ValueError("Only positive integers, please") return l*w
Python
UTF-8
1,886
2.734375
3
[]
no_license
from seal_regression.fractions_utils import FracContext, FractionalEncoderUtils, FractionalDecryptorUtils from seal_regression.encarray import EncArray from seal_regression.linear_regression import SecureLinearRegression from sklearn.datasets import make_regression import numpy as np def generate_dataset(n_samples, ...
Shell
UTF-8
760
2.65625
3
[]
no_license
#!/bin/sh strace -r -c -o searchtrace.txt ./search /etc > /dev/null strace -r -c -o findtrace.txt find /etc > /dev/null strace -r -c -o searchtrace1.txt ./search /etc -exec echo \{\} \; > /dev/null strace -r -c -o findtrace1.txt find /etc -exec echo \{\} \; > /dev/null # get numbers printf "# search /etc\n" cat searc...
JavaScript
UTF-8
370
3.21875
3
[]
no_license
function makeCards(){ var cardValues = [1, 2, 3, 4, 5, 6, 7, 'j', 'q' ]; var suits = ['kle', 'doe', 'mit']; var cards = []; var v; var s; for (s in suits) { for (v in cardValues) { var card = { value: cardValues[v], suit: suits[s] }; cards.push(card); } } return card...
C++
UTF-8
1,105
3.609375
4
[]
no_license
#include <vector> #include <iostream> #include <algorithm> int binSearch(const std::vector<int>& v){ /** * Return by how many places a vector sorted in ascending * order was shifted, e.g. the index of the pivot in the vector. */ int left = 0; int right = v.size() - 1; int middle = (right - ...
C++
UTF-8
5,352
3.34375
3
[ "MIT" ]
permissive
#include<bits/stdc++.h> using namespace std; class listp{ int n,top; int arr[1000007]; public: listp(){ n=0; top=-1; } listp(int p){ n=p; top=-1; } void printall(){ if(isEmpty()){ cout<<"List is empty! Can't print!...
Python
UTF-8
1,177
2.734375
3
[]
no_license
import cv2 import numpy as np import base64 def grayscale(img): """Convert image to grayscale""" return cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) def canny(img, low_threshold, high_threshold): """Apply Canny edge detection""" return cv2.Canny(img, low_threshold, high_threshold) def gaussian_blur(img, ...
C#
UTF-8
2,118
2.578125
3
[]
no_license
using System.Collections.Generic; using System.ComponentModel; using TestTypeApp.Client; namespace TestTypeApp { class ModelMaterial : IBaseModel<CMaterial> { MaterialRef.MaterialServiceClient service; BindingList<CMaterial> materials; List<CMaterial> toSave; List<int> toDelete...
JavaScript
UTF-8
1,463
3.125
3
[]
no_license
import React, { useState, useMemo } from 'react'; import Header from '../../components/partials/Header'; import SectionExer from '../../components/partials/SectionExer'; function sum(a, b) { const future = Date.now() + 2000 while(Date.now() < future) {} return a + b } const UseMemo = props => { const...
Java
UTF-8
1,377
2.015625
2
[ "MIT" ]
permissive
package com.adrenalinici.adrenaline.common.view; import com.adrenalinici.adrenaline.common.model.*; import com.adrenalinici.adrenaline.common.model.event.ModelEvent; import com.adrenalinici.adrenaline.common.util.Observer; import java.util.List; import java.util.Map; import java.util.Set; public interface GameView e...
TypeScript
UTF-8
948
3.515625
4
[]
no_license
// enum TaskState { // Create = 100, // Active, // Inactive, // Proccess, // Finish // } // // interface TaskInterface { // id: number; // name: string; // // state?:TaskState // state?: TaskState; // } // // // class TaskService { // tasks: TaskInterface[]; // // constructor...
Markdown
UTF-8
4,247
2.578125
3
[]
no_license
Title: Bringing "Blue Merges" Back to GitHub Date: 2014-02-15 23:57:12 Category: Blog Tags: programming, github Slug: 2014/02/15/bringing-blue-merges-back-to-github Author: Erik Johnson Summary: I <3 GitHub. I spend a lot of time there, as evidenced by my current 226-day activity streak. A few weeks ago, while I was in...
Java
UTF-8
1,141
2.296875
2
[]
no_license
package com.tongji.j2ee.sp; import java.io.IOException; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; public class ChnFilter implements Filter { protected FilterConfig filterConfig; private String targetEncoding; public ChnFilter() { targetEncoding = "utf-8";// 直接初始化utf8 }...
SQL
UTF-8
23,337
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : sam. 08 juin 2019 à 17:54 -- Version du serveur : 5.7.21 -- Version de PHP : 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET...
JavaScript
UTF-8
613
2.609375
3
[]
no_license
'use strict' const ResultSchema = (data) => { let newResult = { } newResult.resultId = String(data.resultId) // String newResult.surveyId = String(data.surveyId) // String newResult.user = String(data.user) // String newResult.date = new Date().toISOString() // String Date...
C#
UTF-8
1,268
3.5625
4
[]
no_license
using System.Collections.Generic; namespace OOP_Lab_5.Core.Memento { /// <summary> /// Represents storage of matrixes that can be used to restore and backup matrixes. /// Implements memento pattern. /// </summary> public class MatrixHistory { /// <summary> /// History of matrix...
C++
UTF-8
655
3.46875
3
[]
no_license
#include <iostream> #include <sstream> #include <string> using namespace std; class Herp { string internal; public: const Herp& operator=(const string& s) { cout<<"Standard initialize operator\n"; internal = s; return *this; } const Herp& ope...
JavaScript
UTF-8
481
2.8125
3
[ "MIT" ]
permissive
import dayJs from 'dayjs' import numeral from 'numeral' /** * 格式化时间 * @param date * @param format * @returns {string} */ export const dateFormat = (date, format = 'YYYY-MM-DD HH:mm:ss') => { if (!date) return '' return dayJs(date).format(format) } /** * 格式化数字 * @param number * @param format * @returns {s...
Ruby
UTF-8
1,324
3.53125
4
[]
no_license
require 'pry' module Players class Computer < Player def defence(board) combos = [ ['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9'], ['1', '4', '7'], ['2', '5', '8'], ['3', '6', '9'], ['1', '5', '9'], ['3', '5', '7'] ...
Java
UTF-8
1,585
1.960938
2
[]
no_license
package tn.esprit.CRmapp.presentation.mbeans; import javax.ejb.EJB; import javax.faces.application.FacesMessage; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import javax.faces.context.FacesContext; import tn.esprit.CRmapp.entities.Admin; import tn.esprit.CRmapp.services.adminS...
Java
UTF-8
2,461
3.234375
3
[]
no_license
@SuppressWarnings("unchecked") public class LinkedList<E> implements Queue<E> , List<E>{ private E[] array; private int capacity,size; public LinkedList(){ size = 0 ; capacity =1; array = (E[]) new Object[capacity]; } public ignore iterator(){ ignore<E> a = new ignore<E>(array); return a; } public ...
JavaScript
UTF-8
705
3.546875
4
[]
no_license
//Debemos lograr mostrar un mensaje al presionar el botón 'MOSTRAR'. function Mostrar() { var maximo; var minimo; var importe; var contador=0; while (contador < 7) { importe = prompt ("Ingrese importe de ventas"); importe = parseInt (importe); while (importe <= 0 || isNaN (importe)) { importe = p...
Markdown
UTF-8
965
2.796875
3
[]
no_license
--- title: "DoesNodeExist" linktitle: "DoesNodeExist" weight: 2 aliases: - /TA_Automation/Topics/abt_DoesNodeExist_17.html keywords: "doesnodeexist, abttree doesnodeexist, node exists, existence of node in tree, tree node is found" --- ## Syntax `Boolean DoesNodeExist(string nodepath)` ## Description Determin...
Shell
UTF-8
794
3.46875
3
[]
no_license
#!/bin/bash find . -iname '*.C' > filelist find . -iname '*.cc' >> filelist find . -iname '*.h' >> filelist for file in `cat filelist`;do $CMSSW_BASE/src/flashgg/Validation/scripts/astyle --options=$CMSSW_BASE/src/flashgg/Validation/scripts/indent.ast $file -q; done find . -iname '*.orig' >> orig_filelist export ch...
Java
UTF-8
332
2.3125
2
[]
no_license
package factory.edge; import java.util.List; import edge.SameMovieHyperEdge; import vertex.Vertex; public class SameMovieHyperEdgeFactory extends EdgeFactory { @Override public SameMovieHyperEdge createEdge(String label, List<Vertex> vertices, double weight) { return SameMovieHyperEdge.wrap(label, vertices, wei...
C++
GB18030
2,926
3.65625
4
[]
no_license
#include<iostream> using namespace std; // ////ռ:namespace {} //namespace Test{ // int a=10; // int b = 20; //} // //namespace Test1{ // int c = 30; // namespace Test2{ // int d = 40; // } //} ////ռʹ //using namespace Test1::Test2; //ָTest2Test1еijԱ,ᱨ //int main(){ // printf("%d ", Test::a); // cout << Test::a ; // re...
C++
UTF-8
5,345
2.9375
3
[]
no_license
#include "hashingWithChains.h" hashingWithChains::hashingWithChains(int size) { hashTableSize = size; hashTable = new LinkedHashEntry[size]; curr = hashTable; for (int i = 0; i < size; i++) { hashTable[i].setKey(i); } } hashingWithChains::~hashingWithChains() { for (int i = 0; i < hashTableSize; i++) { ...
C#
UTF-8
8,580
2.78125
3
[]
no_license
using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Web; using UniversityManagementSystem.Models; namespace UniversityManagementSystem.DAL { public class TeacherGateway:CommonGateway { //public bool IsEmailExists(string teache...
JavaScript
UTF-8
436
2.515625
3
[]
no_license
const arrow = document.querySelectorAll('.arrow'); const hamburger = document.querySelector('.hamburger'); if (window.innerWidth < 760) { arrow.forEach(e => e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7"><path fill="none" stroke="#FF7B86" stroke-width="2" d="M1 1l4 4 4-4"/></svg>') ...
Java
UTF-8
709
2.09375
2
[]
no_license
package no.systema.jservices.common.dao.services; import java.util.HashMap; import java.util.Map; import no.systema.jservices.common.dao.Cum3lmDao; public class Cum3lmDaoServiceImpl extends GenericDaoServiceImpl<Cum3lmDao> implements Cum3lmDaoService{ private String firmaColumnName = "m3firm"; @Override public...
Go
UTF-8
2,403
2.703125
3
[ "Apache-2.0" ]
permissive
// Copyright (c) 2021 Terminus, Inc. // // 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 law or agree...
Markdown
UTF-8
473
2.65625
3
[]
no_license
# plotly_deploy In this project **Plotly.js**, a **JavaScript** data visualization library, is deployed to create an interactive data visualization for the web. This data visualization consists of bar, bubble and gauge charts. **D3.json()** was used to fetch external data,and JavaScript functional programming to ma...
Java
UTF-8
592
3.46875
3
[]
no_license
package oop.abst; interface Test{ public void play(); public void run(); } class Child extends AbstractTest { // @Override // public void play() { // // } @Override public void run() { } } public abstract class AbstractTest implements Test { AbstractTest() { System.out.println("abstract ...
Markdown
UTF-8
3,933
3
3
[]
no_license
# CSS Week Five Independent Project _*Epicodus CSS Capstone Independent Project*_ _*Project Name: Kerr Calendar*_ _*Project Author: Suzi Rubino*_ ##Project’s Purpose or Goal: A small client of mine, Kerr Contractors, a local heavy civil engineering firm, is in the process of preparing to hand over leadership and/or...
JavaScript
UTF-8
5,107
4.625
5
[]
no_license
// Function // - fundamental building block in the program // - subprogram can be used multiple times // - performs a task or calculates a value // 1. Function declaration // function name(param1, param2) { body... return; } // one function == one thing 하나의 함수는 한가지 일만 하도록! // naming: doSomething, command, verb // e....
Java
UTF-8
2,598
2.734375
3
[]
no_license
package com.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRe...
C++
UTF-8
171
2.84375
3
[]
no_license
#include<iostream> using namespace std; int eo(int a) { (a%2==0)?cout<<"even":cout<<"odd"; } int main() { int a; cout<<"enter a :"<<endl; cin>>a; return eo(a); }
Java
UTF-8
3,709
2.421875
2
[]
no_license
package ca.ubc.cs.beta.aeatk.misc.model; import java.util.HashMap; import java.util.Map; import java.util.Random; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ca.ubc.cs.beta.aeatk.options.RandomForestOptions; import ca.ubc.cs.beta.models.fastrf.RegtreeBuildParams; /** * Utility class that convert...
Python
UTF-8
823
2.71875
3
[]
no_license
#!/usr/bin/python from subprocess import call import sys problemName = 'banker' if len(sys.argv) > 1: inputScripts = sys.argv[1:] else: inputScripts = ['test_safe.txt', 'test_unsafe.txt'] call("make", shell=True) for script in inputScripts: call("./%s < %s > output" % (problemName, script), shell=True) ...
Markdown
UTF-8
516
3.15625
3
[]
no_license
--- title: "Python - for in 문법" date: 2020-01-01T17:51:58+09:00 modified: 2020-01-08T16:03:00+09:00 categories: ["tech"] --- # Python - for in 문법 Reference : <https://youtu.be/0wpYyDlAEIg> - array, list, tuple, string 의 시퀀스를 출력 ```py days = ("Mon", "Tue", "Wed", "Thu", "Fri") for day in days: print(day) for day...
Shell
UTF-8
1,421
2.921875
3
[ "Apache-2.0" ]
permissive
#!/bin/bash ## Various Sawmill configuration items ## Set various Java options here JAVA_OPTS="" # heap size JAVA_OPTS="$JAVA_OPTS -Xmx1g -Xms1g" # garbage collection options JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC" # JMX settings JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremo...
Java
UTF-8
2,424
2.265625
2
[]
no_license
package com.bwei.dabian.indent.adapter; import android.content.Context; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView;...
TypeScript
UTF-8
7,999
2.796875
3
[]
no_license
/// <reference path="../../../core/StackObject.ts"/> /// <reference path="../../../core/MeException.ts"/> /// <reference path="../../../core/AutoRetireCalculatorStack.ts"/> /// <reference path="../../../core/ICalculatorStack.ts"/> /// <reference path="../../scalars/MeFloat.ts"/> /// <reference path="../../scalars/MeCom...
Python
UTF-8
891
3.4375
3
[]
no_license
from bisect import bisect_right from math import inf class Solution: # Function to find the maximum number of activities that can # be performed by a single person. def activitySelection(self, n, start, end): l = list(zip(start, end)) l.sort(key=lambda x: x[1]) dp = [(0, 0)] ...
C#
UTF-8
769
2.546875
3
[]
no_license
using UnityEngine; namespace HutongGames.PlayMaker.Actions { [ActionCategory("LD46")] public class GetDirectionOfObject : FsmStateAction { [RequiredField] [Tooltip("The GameObject to position.")] public FsmOwnerDefault gameObject; [RequiredField] [Tooltip("The target point to get the direction toward...
C
UTF-8
3,801
3.796875
4
[]
no_license
#include <stdio.h> #include <stdlib.h> typedef struct elemento * Inicio; struct elemento{ int valor; struct elemento * proximo; }; Inicio * new_list(){ Inicio * inicio = (Inicio*)malloc(sizeof(Inicio)); if(inicio != NULL){ *inicio = NULL; } return inicio; } int list_count(Inicio * inicio)...
Shell
UTF-8
1,126
4.0625
4
[]
no_license
#!/bin/bash DATE=`date '+%Y-%m-%d'` MYSQL_BACKUP=/data/backup/ampache-$DATE.sql AMPACHE_DIR=/data/ampache AMPACHE_BACKUP_DIR=/data/ampache-backup-$DATE TMP_ZIP=/tmp/ampache-$1.zip if [ -z "$1" ]; then echo "Must pass Ampache version to download as an argument"; exit 1; fi # Stopping Apache during process echo "Stopp...
C++
GB18030
1,213
3.484375
3
[]
no_license
#include<stdio.h> double findMedianSortedArrays(int* nums1, int nums1Size, int* nums2, int nums2Size) { int numsSize = nums1Size + nums2Size; int l[numsSize]; int temp1 = 0; int temp2 = 0; int size1Temp = nums1Size; int size2Temp = nums2Size; double result; for(int i=0; i <= (numsSize/2+1);i...
PHP
UTF-8
3,071
2.640625
3
[]
no_license
<? session_start(); ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- 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. Last Modified: DBoyd 10-21-17 --> <html> <head> <tit...
PHP
UTF-8
34,535
2.578125
3
[]
no_license
<?php /** * Created by PhpStorm. * User: paolo * Date: 18/07/16 * Time: 11:32 */ namespace Model\dataModel; use Model\apiFootModel; /** * Class dataModel * @package Model\dataModel * * table : * option_api_foot * competition * standing * team * match */ class dataModel { ...
Markdown
UTF-8
4,157
3.28125
3
[]
no_license
# リレーショナルデータベース(RDB) ## 初歩的なSQL 実際にSQLを書いて実行してみましょう。まずはデータベースを作成します。 ```sh $ createdb demo_20200309 ``` 次に`psql`コマンドでデータベースに接続してみましょう。対話型コンソール上ではSQLを入力することができるので、`create table`構文で実際にテーブルを作成します。 ```sh demo_20200309# create table users ( id serial primary key, name varchar(255), email varchar(255) ); ``` テーブル...
Python
UTF-8
11,086
2.515625
3
[]
no_license
import logging import ssl import bs4 import requests from requests.adapters import HTTPAdapter from requests.packages.urllib3.poolmanager import PoolManager from parser import SolusParser class SSLAdapter(HTTPAdapter): '''An HTTPS Transport Adapter that uses an arbitrary SSL version. http://lukasa.co.uk/2013...
C
UTF-8
4,042
2.984375
3
[ "BSD-3-Clause" ]
permissive
#include "p33Fxxxx.h" #include "serial.h" #include "timers.h" #define READTIMEOUT 1000 //UART1 functions //read one byte from rx register, timeout after ~1second //returns -1 if timeout int readByte1(unsigned char *byte) { //start timer timer(READTIMEOUT); while(getTimer() < READTIMEOUT){ //g...
PHP
UTF-8
3,236
2.640625
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use App\Http\Requests\RegisterAuthRequest; use App\User; use Illuminate\Http\Request; use JWTAuth; use Tymon\JWTAuth\Exceptions\JWTException; use App\imagen; use Illuminate\Support\Facades\Storage; class AuthController extends Controller { public $loginAfterSignUp = true; ...
C
UTF-8
4,731
2.671875
3
[]
no_license
/******************************* int.c ****************************/ /************************************************************************* usp 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ---------------------------------------------------------------------------- |uds|ues|udi|usi|ubp|u...
Markdown
UTF-8
682
3.671875
4
[]
no_license
(19.3.5) # 剑指offer(50)构建乘积数组 **题目描述 给定一个数组A[0,1,...,n-1],请构建一个数组B[0,1,...,n-1],其中B中的元素B[i]=A[0]*A[1]*...*A[i-1]*A[i+1]*...*A[n-1]。不能使用除法。** 思路:杨辉三角,只有自己是1 代码如下: function multiply(array) { if(array.length==0) return []; var brr = []; brr[0]=1; for(var i=1;i<array.length;i++) {...
Markdown
UTF-8
6,059
3.5625
4
[]
no_license
## MINI-FACE CS 433: Computer Networks Project, under Prof. Sameer Kulkarni Group Members: Dhruvin Patel (18110051), Harsh Patel(18110062), Viraj Shah(18110155) --- ## Table of contents - [Introduction](#introduction) - [Features](#features) - [How To Use](#how-to-use) - [Networking Paradigms](#networking-paradigm...
PHP
UTF-8
8,061
2.53125
3
[]
no_license
<?php namespace App\Http\Controllers\Api; use App\Http\Controllers\Controller; use App\BiogMain; use App\OfficeCode; use App\OfficeCodeTypeRel; use App\OfficeTypeTree; use App\Operation; use App\Repositories\BiogMainRepository; use Illuminate\Http\Request; use Illuminate\Support\Facades\App; use Illuminate\Support\Fa...
C#
UTF-8
1,525
2.5625
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Property.Entity { /// <summary> /// 市表 /// </summary> public class M_City {...
Java
UTF-8
496
1.695313
2
[]
no_license
package com.zuul; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.zuul.EnableZuulProxy; import org.springframework.context.annotation.ComponentScan; @EnableZuulProxy @SpringBootApplication @ComponentScan({...
Java
UHC
490
3.4375
3
[]
no_license
package ch01; public class VariableVsConstanceExam { public static void main(String[] args) { // TODO Auto-generated method stub // ÿ ʱȭ //Ÿ =; int x=10; // //Ÿ ; int y; // ʱȭ //=; y=20; // x ʱⰪ 20 Ͽ x=20; System.out.println(x+y); } }
Markdown
UTF-8
8,497
3.5
4
[]
no_license
# User Guide Duke is an **interactive desktop app used to keep track of tasks to be completed**. It is optimized for use through a **Command Line Interface** (CLI) while providing a minimalistic and elegant Graphical User Interface (GUI). If you can type fast and wish to keep track of tasks this way, then this might...
Java
UTF-8
234
1.648438
2
[]
no_license
package xueqiao.trade.hosting.quot.dispatcher.client; import xueqiao.quotation.QuotationItem; public interface IQuotationCallback { public void onReceivedQuotationItem(String platform, String contractSymbol, QuotationItem item); }
Java
UTF-8
298
2.75
3
[]
no_license
package com.exception; public class Excpt3 { static void one(){ try{ two(); }catch(ArithmeticException e){ System.err.println(e.getMessage()); } } static void two(){ throw new ArithmeticException("Roshan exception"); } public static void main(String[] args) { one(); } }
C++
UTF-8
423
2.59375
3
[]
no_license
#include<bits/stdc++.h> using namespace std; double dis(double,double,double,double); int main(){ double x1,x2,x3,y1,y2,y3; cin>>x1>>y1>>x2>>y2>>x3>>y3; double dis1,dis2,dis3; dis1=dis(x1,y1,x2,y2); dis2=dis(x2,y2,x3,y3); dis3=dis(x1,y1,x3,y3); double dist=dis1+dis2+dis3; printf("%.2lf",...
C
UTF-8
375
2.75
3
[]
no_license
#include <stdio.h> #include <unistd.h> #include "error_functions.h" #define BUF_SIZE 1024 char buf[BUF_SIZE]; int count = 0; int main() { if(setvbuf(stdout, buf, _IONBF, BUF_SIZE) != 0) errExit("setvbuf"); printf("123213"); while(1) { printf("123"); sleep(1); if(((...
Python
UTF-8
1,635
3.03125
3
[]
no_license
from __future__ import annotations from collections import deque from typing import Iterable from hashtable import BLANK, KT, VT, HashTable class ChainingHashTable(HashTable): """HashTable implementation which resolves collisions by chaining.""" def __init__(self, initial_capacity: int = 8, maximum_load_fa...
Shell
UTF-8
500
3.328125
3
[]
no_license
#!/usr/bin/env bash /waitforit -host ${MYSQL_PORT_3306_TCP_ADDR} -port=3306 -timeout=120 # If this is the first time we have run this container, update place holder to env vars in config files if [ ! -e /opt/semaphore/semaphore_config.json ]; then echo "Starting first run actions" sed -i s/MYSQL_IP_ADDR/mysql/ /v...
Java
UTF-8
903
3.28125
3
[]
no_license
package stack___1; import linkedList_____1.Node; public class StackUsingLL<T> { private Node<T> head; private int size; public StackUsingLL(){ head=null; size=0; } public int size() { return size; } public boolean isempty() { if(size==0) { return true; } return false; } public void push(...
Python
UTF-8
4,757
2.71875
3
[]
no_license
#Jar file stager for Empire from lib.common import helpers import subprocess class Stager: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'JAR', 'Author': ['Andrew @ch33kyf3ll0w Bonstrom'], 'Description': ('Generates a Jar file that will execute the E...
C++
GB18030
2,400
2.8125
3
[]
no_license
#include "StdAfx.h" #include "FiveCore.h" // ӷ'O' ʾAʤ ӷ'X' ʾBʤ ո' ' ʾûзֳʤ char CFiveCore::JudgeWin(CFiveArr &fiveArr, char cChessFlag) { int nRow, nCol, nCount, nTmp; //жϺ for(nRow=0; nRow<SIZE; ++nRow) { nCount = 0; for(nCol=0; nCol<SIZE; ++nCol) { if(cChessFlag == fiveArr.m_cArr[nRow][nCo...
Java
UTF-8
4,548
2.484375
2
[]
no_license
package code.maths.litteraladv; import code.maths.EquallableMathUtil; import code.maths.Rate; import code.maths.matrix.Polynom; import code.util.CustList; import code.util.core.NumberUtil; import org.junit.Test; public class MaComparePolynomTest extends EquallableMathUtil { @Test public void compare1() { ...
C++
UTF-8
807
2.828125
3
[ "MIT" ]
permissive
#include "stdafx.h" #include "ProcedureTable.h" ProcedureTable::ProcedureTable () { } Node* ProcedureTable::createProcedure(std::string procedureName) { if ( table.find(procedureName) == table.end() ) { Node* node = new Node(procedure, 0, procedureName); // magic numbers!! node->setRoot(node); table[procedure...
Python
UTF-8
5,258
3.1875
3
[]
no_license
# ГРУППИРОВКА ТЕСТОВ: SETUP # # А сейчас воспользуемся магией ООП уже для организации кода самих тест-кейсов. PyTest позволяет объединять # несколько тест-кейсов в один класс. Зачем это делать и почему удобно? # # Во-первых, мы можем логически сгруппировать тесты в один класс просто ради более стройного кода: удобно, #...