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
Markdown
UTF-8
778
2.59375
3
[]
no_license
This repository contains a python script designed to interpret a collection of texts and create an index based on word frequency for subsequent analysis and use. To utilize this script locally, make sure line 8 contains the ip address of the machine where mongodb has been deployed. To run locally simply run as follo...
Java
UTF-8
2,389
1.695313
2
[]
no_license
package com.duokan.reader.ui.reading; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.ViewGroup.LayoutParams; import com.duokan.core.app.IFeature; import com.duokan.core.app.AppContext; import com.duokan.p024c.C0255g; import com.duokan.p024c.C0256h; impo...
JavaScript
UTF-8
487
3.359375
3
[ "MIT" ]
permissive
'use strict'; const random = (min, max) => Math.floor(min + Math.random() * (max - min + 1)); const analyse = arr => { const analysis = new Map(); for (const element of arr) { let value = analysis.get(element); if (value) {analysis.set(element, ++value);} else { analysis.set(element, 1); } } r...
Python
UTF-8
2,651
3.265625
3
[ "MIT" ]
permissive
# based on pyotp import base64 import uhashlib as hashlib import hmac class OTP(object): """ Base class for OTP handlers. """ def __init__(self, s, digits=6, digest=hashlib.sha1): """ :param s: secret in base32 format :type s: str :param digits: number of integers in th...
JavaScript
UTF-8
906
2.65625
3
[]
no_license
'use strict'; const assert = require('assert'); module.exports = function(world) { let browser = world.browser; world.when('I select no political party', function(done){ browser .click('label[for="No, I do not want to choose a political party"]') .then(() => { done(); }) .catch(done); }); wo...
Java
UTF-8
921
2.09375
2
[ "Apache-2.0" ]
permissive
/* * Copyright (c) 2020 Yasin Sinan Kayacan * * 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...
C++
UTF-8
1,729
3.890625
4
[]
no_license
//自顶向下 //状态转换方程:f(x,y) = triangle[x][y] + min{f(x+1,y) + f(x+1,y+1)} /*class Solution { public: int minimumTotal(vector<vector<int>>& triangle) { vector<vector<int>> table; for (int i = 0; i < triangle.size(); i++) {//初始化table空间复杂度为O(n+n-1+n-2+...1)n为深度 table.push_back(vector<int>(triang...
Shell
UTF-8
943
4
4
[ "MIT" ]
permissive
#!/bin/bash NAME=`cat package.json | jq '.name' | sed s.\\"."".g` echo "> found app name: $NAME" create_deploy_file() { echo -e "--- - hosts: web remote_user: george tasks: - name: Pull new image shell: docker pull registry.jorgeadolfo.com/$1:latest - name: Stop $1 shell: cd /var/docker/$1 &...
Java
UTF-8
1,321
2.96875
3
[]
no_license
import java.util.HashMap; import java.util.HashSet; public class Creator { static String[] createStrArray() { return new String[]{"get", "help", "+illness", "+disease", "-cough"}; } static HashSet<Integer> createHashSet(int addNumber) { HashSet<Integer> hashSet = new HashSet<>(); ...
Python
UTF-8
1,241
2.890625
3
[]
no_license
import sys, time from PyQt5.QtWidgets import QApplication, QDialog, QTreeWidgetItem from PyQt5 import uic from os import listdir, path, stat from mimetypes import MimeTypes class Dialogo(QDialog): def __init__(self): QDialog.__init__(self) uic.loadUi("treewidget.ui", self) self.boton.clicked.connect(self.getDir...
Swift
UTF-8
850
3.21875
3
[]
no_license
// // Card.swift // Project_1 // // Created by Thaddeus Lim on 23/12/18. // Copyright © 2018 Thaddeus Lim. All rights reserved. // import Foundation struct Card: Hashable { var hashValue: Int { return identity } static func ==(lhs: Card, rhs: Card) -> Bool{ return lhs.identit...
C#
UTF-8
6,763
3.1875
3
[]
no_license
using System; using System.Collections.Generic; using System.Text; namespace Repository { using System.Linq; using DataTransferObjects; /// <summary> /// /// </summary> /// <seealso cref="Repository.IRepository" /> public class InMemoryRepository : IRepository { private reado...
Java
ISO-8859-1
257
2.515625
3
[]
no_license
package Armas; public class ARMAS_CanhaoBehavior implements ARMAS_WeaponBehavior { int dano = 30; @Override public void useWeapon() { System.out.println("Ataque com Canho"); } @Override public double getDano() { return 0.5; } }
C++
UTF-8
6,839
3.0625
3
[ "MIT" ]
permissive
#include <cstddef> #include <cstdio> #include <cstring> #include <queue> #include "io.hpp" #include "globals.hpp" #include "fs_raw.hpp" #include "fs_fat12.hpp" #define ARGUMENT_NO_VALUE(arg) "Argument "arg" has no value specified.\n" /** Global variables */ std::queue<FileArg> g_queue; /* All the input files...
C++
UTF-8
1,693
2.765625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; /* - finds maximum of A*x+B - double check max coords for int/long long overflow - set min x query in put function - add lines with non-descending A coefficient */ const int MAXN = 100005; struct FastHull { int ...
Java
UTF-8
568
1.84375
2
[]
no_license
package com.ht.extra.dao; import com.ht.extra.pojo.outpdoct.OutpConsultationDetail; import com.ht.extra.pojo.outpdoct.OutpConsultationDetailKey; public interface OutpConsultationDetailMapper { int deleteByPrimaryKey(OutpConsultationDetailKey key); int insert(OutpConsultationDetail record); int insertSel...
PHP
UTF-8
422
3.3125
3
[]
no_license
<?php /** * Classe Value */ class Value { public $Date; public $Temperature; public $Humidite; public function __construct($Date, $Temperature, $Humidite) { $this->Date = $Date; $this->Temperature = new Temp($Temperature); $this->Humidite = new Humid($Humidite); } public function In_Time($Start_Datet...
Markdown
UTF-8
981
2.53125
3
[]
no_license
# cabal dependencies this tool extracts dependencies from Cabal files and prints them as Prolog terms for further processing. direct dependencies are labelled "1", and transitive dependencies "2". ## extraction ### using `stack` > stack build > stack exec cabal-dependencies-exe ../my-other-project/project.cabal ...
C++
UTF-8
3,591
3.796875
4
[]
no_license
#include <iostream> using namespace std; class Node { public: int key; Node* left; Node* right; Node* parent; Node() { this->left = NULL; this->right = NULL; } }; void preorder_tree_walk( Node* x ); void inorder_tree_walk( Node* x ); void postorder_tree_walk( Node* x ); Node* tree_search(Node* x, Node* k...
C++
UTF-8
2,680
2.78125
3
[]
no_license
#ifndef CANVAS_H_ #define CANVAS_H_ #include <wx/wxprec.h> #ifndef WX_PRECOMP #include <wx/wx.h> #endif #include <set> #include <vector> #include <string> class Gesture; class Canvas; //Some event. class CanvasEvent; wxDECLARE_EVENT(CANVAS_EVENT, CanvasEvent); class CanvasEvent: public wxCommandEvent { public: /...
Java
UTF-8
635
2.34375
2
[]
no_license
package entity; public interface Food { public void updateDeatail(String name,Double price_per_person,int minimum_order,Catagory catagories[]); public void updateName(String name); public void updatePrice_per_person(double pricePerPerson); public void updateMinimumOrder(int minimum); public void updateCatagories...
Java
UTF-8
3,384
2.734375
3
[]
no_license
package by.epam.naumovich.film_ordering.dao; import java.util.Set; import by.epam.naumovich.film_ordering.bean.Review; import by.epam.naumovich.film_ordering.dao.exception.DAOException; /** * Defines methods for implementing in the DAO layer for the Review entity. * * @author Dmitry Naumovich * @version 1.0 */...
JavaScript
UTF-8
3,668
2.59375
3
[ "MIT" ]
permissive
function compile() { for (pagecnt of pages) { let childrens = [], events = {}, layout = []; pagecnt.forEach((item, i) => { if(Object.keys(item)[0] == "layout") layout.push(pagecnt[i].layout); }); for (var cnt of pagecnt) { tag = Object.keys(cnt)[0]; let clss = tag.match(/^[^\.]+/)?ta...
Swift
UTF-8
610
2.875
3
[ "MIT" ]
permissive
// // BookListPresenter.swift // TheCitadel // // Created by Mateusz Popiało on 05/12/2018. // Copyright © 2018 Mateusz Popiało. All rights reserved. // import Foundation struct BookListViewConfig { var title : String } protocol BookListView : class { func configureView(using config: BookListViewCon...
Python
UTF-8
586
4.125
4
[]
no_license
import random num=[ ]#creates list for values in range(0,10):#appeds a random int between 0 and 100 to the list 10 times creating a list with 10 rand ints between 0 and 100 num.append(random.randint(0,100)) print(num)#prints list print(min(num))#prints min of list print(max(num))#prints max of list print(sum(num)/...
C#
UTF-8
1,574
3.046875
3
[]
no_license
using DataAccess.Dao.Criteria; using DataAccess.Dao.Interfaces; using DataAccess.Entities; using System.Collections.Generic; using System.Linq; namespace DataAccess.Dao { public class RoomDao : IRoomDao { public Room GetRoomByRoomId(int roomId) { using (var db = new HotelBookingDb(...
C#
UTF-8
2,031
3.546875
4
[]
no_license
using System; using System.Collections.Generic; public class GreedyTravelingSalesman { public int worstDistance(string[] thousands, string[] hundreds, string[] tens, string[] ones) { int n = thousands.Length; int[,] distance = new int[n, n]; for (int i = 0; i < n; ++i) { for (i...
Ruby
UTF-8
1,331
4.25
4
[]
no_license
#06/30/16 #Implement the Floyd's triangle.. #cannot use a ruby method that would solve it in 1 method #ask for the range: how many rows you want triangle to be. # # 1 # 2 3 # 4 5 6 # 7 8 9 10 # 11 12 13 14 15 # going up till number of rows is reached. #ask user number how wide triangle base is: puts "how many rows...
Go
UTF-8
4,399
2.859375
3
[ "MIT" ]
permissive
package integration import ( "bytes" "os" "path/filepath" "strconv" "testing" "time" "github.com/stretchr/testify/require" "gotest.tools/v3/fs" "gotest.tools/v3/icmd" ) func setupDatasourcesGitTest(t *testing.T) *fs.Dir { tmpDir := fs.NewDir(t, "gomplate-inttests", fs.WithDir("repo", fs.WithFiles(map[...
Markdown
UTF-8
14,945
2.9375
3
[ "BSD-3-Clause" ]
permissive
We will be working with a metagenome sample from an Alaskan Oil Reservoir sequenced in [this study](https://mbio.asm.org/content/7/1/e01669-15). The sample is named SB1 because it was sampled from the Schrader Bluff Formation. We will start working with this sample by downloading it. Then, we will assess its quality ...
Markdown
UTF-8
7,343
3.078125
3
[ "MIT" ]
permissive
--- layout: post title: "Application of Infrastructure Development Problem (Long Chu Style) to Indonesia’s Toll Road" categories: [blog] tags: [Economics, English] --- This article is originally appears [here on my medium blog](https://medium.com/@imedkrisna/application-of-infrastructure-development-problem-long-chu-s...
Java
UTF-8
329
1.914063
2
[]
no_license
package cn.day20.test1; public class TestClient { public static void main(String[] args) { //发送端 DemoClient6 client6 = new DemoClient6(8888); new Thread(client6).start(); //接收端 // DemoSocket6 socket6 = new DemoSocket6(8889); // new Thread(socket6).start();; } }
PHP
UTF-8
1,980
2.671875
3
[ "MIT" ]
permissive
<?php /** * This file is part of the TangoMan package. * * Copyright (c) 2020 "Matthias Morin" <mat@tangoman.io> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ declare(strict_types=1); namespace App\Entity\Traits; use App\Entity\Clip; use Ap...
C#
UTF-8
9,817
2.71875
3
[ "Apache-2.0" ]
permissive
/** * Copyright 2020 Google LLC * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
Java
UTF-8
9,984
1.84375
2
[]
no_license
package ua.com.vg.scanervg.activities; import android.content.DialogInterface; import android.content.Intent; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.DividerItemDecoration; import android.support.v7.widget.Li...
C#
UTF-8
6,030
2.5625
3
[]
no_license
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using CommunicationNetwork; using System.Net.Sockets; using System.Threading; using Components; using System.Text; using System.Collections.Generic; using System.Linq; using CommunicationXML; using System.Threading.Tasks; namespace UnitTest...
C#
UTF-8
2,015
2.671875
3
[]
no_license
using SFML.Graphics; using SFML.System; using SFML.Window; namespace Tetris { public class GameData { public RenderWindow Window { get; } public StateManager State { get; } public AssetManager Asset { get; } public InputManager Input { get; } public GameDa...
C#
UTF-8
4,020
2.765625
3
[]
no_license
using System.Collections.Generic; using System.Data.Entity; using System.Data.Entity.Infrastructure; using System.Linq; using System.Linq.Expressions; using System.Threading; using System.Threading.Tasks; using NSubstitute; namespace Homework.Business.Tests.TestingUtils { internal static class NSubstituteUtils ...
PHP
UTF-8
2,653
2.765625
3
[]
no_license
<?php // необходимые HTTP-заголовки /*header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Headers: access"); header("Access-Control-Allow-Methods: GET"); header("Access-Control-Allow-Credentials: true"); header("Content-Type: application/json");*/ // подключение файла для соединения с базой и файл с...
PHP
UTF-8
858
2.578125
3
[ "MIT" ]
permissive
<?php /** * Author: Adrian Szuszkiewicz <me@imper.info> * Github: https://github.com/imper86 * Date: 02.10.2019 * Time: 12:38 */ namespace Imper86\AllegroApiBundle\Model; use GuzzleHttp\Psr7\Response as BaseResponse; use Psr\Http\Message\ResponseInterface as BaseResponseInterface; class Response extends BaseRe...
C#
UTF-8
1,989
2.625
3
[]
no_license
using System; using System.Threading.Tasks; namespace ColorsWin.Process.NamedPipe { /// <summary> /// 进程消息操作对象 /// </summary> internal class NamedPipeMessage : IProcessMessage { /// <summary> /// 是否等待回应以后才能继续发送第二条消息 /// </summary> public static bool Wait { get; set;...
PHP
UTF-8
1,408
3.171875
3
[]
no_license
<?php namespace xes; class Metamarkdown { private $parsedown; private $separator = "\n\n=-=\n\n"; public function __construct() { $this->parsedown = new \Parsedown(); } public function text($text) { return $this->parsedown->text($text); } public function metaVal($text) { if ($text == 'true' | $text ==...
JavaScript
UTF-8
3,103
3.03125
3
[]
no_license
let overlay, popUp, popClose; let eduPort, skillPort, achivePort, popEducation, popSkills, popAchivements; let closeFlag; let portIds = ["education", "skills", "achivements"]; let dBlock = "display: block;", dNone = "display: none;"; let vVis = "visibility: visible;", vHid = "visibility: hidden;"; let height = "heig...
Markdown
UTF-8
2,333
2.546875
3
[]
no_license
# 10979F - Module 2 - [PowerShell ISE](#powershell-ise) - [PowerShell Module](#powershell-module) - [Azure 가상 머신 포털](#azure-가상-머신-포털) ---- - PowerShell은 Azure portal, Visual Studio Tools에서 관리 가능하다. - Window8.1 부터 PowerShell이 기본으로 설치되어 있다. - PowerShell은 명령프롬프트(cmd)와 다르다. - PowerShell의 명령어는 '동사-명사'로 이루어져 있다. - 예 ) ...
Markdown
UTF-8
2,110
3.90625
4
[]
no_license
# Item 55: Return optionals judiciously ### Optional sample code ```java public staic <E extends Comparable<E>> E max(Collection<E> c){ if (c.isEmpty()){ throw new IllegalArgumentException("Empty collection"); } E result = null; for(E e: c){ if (result == null || e.compareTo(resul...
Python
UTF-8
945
4.15625
4
[]
no_license
# calculate the total savings at the end of the retirement, assuming you don't invest your money anywhere """ 1. Let your starting salary as 50k at the age of 30. 2. Age of retirement is 50. 3. Every year there is a 10% salary hike. 4. Every year there is a 8% hike in living cost. """ def calculateSavings(age_start: i...
C#
UTF-8
509
2.59375
3
[]
no_license
using FluentAssertions; using HDC.PowerAnalysis.Security; using NUnit.Framework; namespace PowerAnalysis.Domains.UnitTests.Security { [TestFixture] public class CompanyTests { [Test] public void Constructor_Correctly_Initializes_Object_State() { // Arrange const string description = "companyDescription...
Python
UTF-8
5,497
2.765625
3
[]
no_license
# -*- coding: utf-8 -*- # spider_page 页面数据分析 from ..cheat.random_proxies import CheatRequests from bs4 import BeautifulSoup import re from util.common.logger import use_logger, base_info @use_logger(level="err") def page_err(msg): pass #TODO 后期请求附加参数将从cheat模块中获取 headers = { "User-Agent":"Mozilla/5.0 (X11; ...
C
UTF-8
1,015
3.203125
3
[]
no_license
//3. A client sends to the server a string. The server returns the reversed string to the client (characters from the end to begging) #include <sys/types.h> #include <sys/socket.h> #include <stdio.h> #include <netinet/in.h> #include <netinet/ip.h> #include <string.h> #include <unistd.h> #include <arpa/inet.h> int ma...
C++
UTF-8
330
2.609375
3
[]
no_license
#include <automaton.h> #include <iostream> #include <string> void automaton_by_inv_regex(std::istream& in, std::ostream& out) { std::string regexp_str; in >> regexp_str; out << Automaton(regexp_str).inversed().minimized() << std::endl; } int main() { automaton_by_inv_regex(std::cin, std::cout); re...
Java
UTF-8
993
2.671875
3
[ "Apache-2.0" ]
permissive
package com.varunest.loader.particles; import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Path; import android.view.View; public class Circle extends ParticleView { private int w; private int h; private Paint paint; public Circle(Con...
Markdown
UTF-8
2,850
2.578125
3
[]
no_license
## Wakanda Paypal Module ## Here are some new changes from a fork from github ! challenge accepted ! This is a module that implements the Paypal REST API for Wakanda, it's still very basic, but it will allow you to handle payment easily. If you want to use this module, it's highly recommended that's you don't use it...
Markdown
UTF-8
1,039
2.65625
3
[ "Apache-2.0" ]
permissive
End to End test uses Ansible playbooks to accomplish the following: * Grab and build the latest gcloud-maven-plugin code from Github * Grab and install the latest released gcloud sdk * Deploy a sample application via 'mvn gcloud:deploy' #### Prerequisites The test assumes that you have: * GCP project * gcloud SDK inst...
Java
SHIFT_JIS
2,170
2.625
3
[ "Apache-2.0" ]
permissive
package jp.co.se.android.recipe.chapter04; import android.annotation.TargetApi; import android.app.Notification; import android.app.Service; import android.content.Intent; import android.os.AsyncTask; import android.os.Build; import android.os.IBinder; import android.widget.Toast; public class Ch0409Service extends S...
Markdown
UTF-8
869
2.75
3
[]
no_license
# Create Application In this IoT solution, create the rental car company’s application that will monitor vehicle health. ## POST: CREATE APPLICATION Create an application inside IoT solution. A unique applicationId for the application is returned. SAMPLE REQUEST ``` { "name": [{ "lang": "en_us", ...
Markdown
UTF-8
2,206
2.59375
3
[ "MIT" ]
permissive
## Working Group Updates - Recurring meeting slot (poll) - Finalized to Thu 10AM-11AM CST - Tide issue triage - Initial triage on 2019-02-22 10AM - 11AM CST - Once initial triage is done, recurring triage will occur during the weekly meetings - Status updates - tide - @Aaron T submitted a ne...
Markdown
UTF-8
4,023
3.140625
3
[ "MIT" ]
permissive
# Simulation Documentation ![alt](https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white) ![alt](https://img.shields.io/badge/TensorFlow-FF6F00?style=for-the-badge&logo=TensorFlow&logoColor=white) ![alt](https://img.shields.io/badge/Keras-D00000?style=for-the-badge&logo=Keras&logo...
JavaScript
UTF-8
4,261
2.5625
3
[]
no_license
function configurations(config, models) { var config = config; var models = models; } bcrypt = config.bcrypt; function targetOBJ(passedEmail,passedFirstname,passedLastname,target) { return { email: passedEmail, firstName: passedFirstname, lastName: passedLastname, target: target }; } function checkTarg...
Java
UTF-8
402
2.359375
2
[]
no_license
package edu.ycp.cs320.lab02.model; public class ProjectsAuthors { private int authorID; private int projectID; public ProjectsAuthors() { } public void setAuthorID(int authorID) { this.authorID = authorID; } public int getAuthorID() { return authorID; } public void setProjectID(int string) { th...
Shell
UTF-8
137
2.796875
3
[]
no_license
fox_files=(*.png) demo_files=(../demo/*.png) for ((i=0;i<=${#fox_files[@]};i++)); do mv ${demo_files[i]} ../demo/${fox_files[i]} done
Markdown
UTF-8
2,340
2.546875
3
[ "MIT" ]
permissive
--- ########### ### SEO ### ########### # The title of the page, displayed by the browser on the title of the window. # Ideally this is the same as the name of the event. title: 'Blockchain Week Afterparty @Sofs bar' # Description for this event. description: Afterparty @Sofs bar by Cercle du Coin ##############...
Ruby
UTF-8
120
2.796875
3
[]
no_license
class Bank def self.exchange(amount, from, to) money = amount.to_money(from) money.exchange_to(to) end end
Markdown
UTF-8
1,312
2.984375
3
[]
no_license
## 前置 1. 配置数据库地址(resources/application.yml) 2. 创建**repositories**(与数据库操作相关)、**service**(业务代码)、**controller**(相当于视图函数) ## repository 层 1. 模块外部的类不能直接引入,所以要在 manager 模块的 build.gradle 中添加 **entity** 模块的依赖(manager/build.gradle) 2. 继承`JpaRepository`接口,拥有简单操作数据库的能力 3. 继承`JpaSpecificationExecutor`接口,拥有复杂操作数据库的能力 ...
PHP
UTF-8
4,266
2.890625
3
[]
no_license
<?php /* Create the Linear model -by Kaustubh B at March 28 2019 */ include_once ("Neuron.php"); //ini_set('memory_limit', '-1'); class Linear_Model { public $model=array(); //this mat is a 3D matrix ... function add_layer($x_json,$default_weight=0,$neuron_count=1,$activation='sigmoid'){ $layer=arr...
Markdown
UTF-8
5,857
3.09375
3
[ "MIT" ]
permissive
# Development Strategy > `Acme-Web-Design` This website will be developed for the Acme Web Design Company as a company homepage. write a short description of your project: - who would want to use it? - why would they want to use it? ## Wireframe <!-- include a wireframe for your project in this repository, and dis...
Markdown
UTF-8
3,641
2.625
3
[]
no_license
### 一名被控性骚扰的美国主教辞职 ------------------------ <div class="published"> <span class="date" title="中国时间"> <time datetime="2018-09-14T06:56:44+08:00"> 2018年9月14日 06:56 </time> </span> </div> <br/> <div class="wsw"> <span class="dateline"> 华盛顿 — </span> <p> 罗马天主教教宗方济各在即将开始与美国天主教会领袖讨论美国教会存在大范围性侵的指称之际,接受了一名被控性骚...
Java
UTF-8
798
2.375
2
[]
no_license
/* * Created on 16.02.2007 * * To change the template for this generated file go to * Window>Preferences>Java>Code Generation>Code and Comments */ package ontologizer.dotwriter; import ontologizer.go.TermID; /** * Default implementation of the interface providing attributes for dot graph. * * @author Sebastia...
Python
UTF-8
1,875
2.546875
3
[ "MIT" ]
permissive
import datetime from whoosh.fields import TEXT from whoosh.analysis import StemmingAnalyzer from sqlalchemy.engine import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm.session import Session from sqlalchemy.schema import Column from sqlalchemy.types import DateTime, Integer...
C#
UTF-8
5,140
2.53125
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Routing; using Npgsql; using Serilog; using TourService.Entities; using TourService.Extensions; namespace TourService.Repository { public class LogRepository : ILogRepository { private readonly Npg...
C
UTF-8
494
3.125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> int main() { } char *leer(nombre, espacio) { FILE *archivo; char caracter; char *ret = malloc(espacio); if(!ret) return NULL; archivo = fopen(nombre,"r"); if (archivo == NULL) { return NULL; } else { caracter ...
TypeScript
UTF-8
23,148
2.5625
3
[ "MIT", "LicenseRef-scancode-public-domain" ]
permissive
/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import { ISequencedClient, ISequencedDocumentMessage } from "@fluidframework/protocol-definitions"; import { strict as assert } from "assert"; import { Quorum } from "../quorum"; describe("Quorum",...
Ruby
UTF-8
1,301
2.828125
3
[]
no_license
class MockFirmware def initialize() @output_stream ||= [] end def self.open(file, mode) @@mock ||= self.new() end def readline @output_stream.pop end def write(command) if command =~ /^!a:/ number = get_parameter(command) if number.to_i >= 2**16 @output_stream << "A:...
C
UTF-8
576
3.765625
4
[]
no_license
#include "holberton.h" #include <stdio.h> #include <stdlib.h> /** *str_concat - concatenates two strings. *@s1 : char *@s2 : char *Return: char */ char *str_concat(char *s1, char *s2) { char *array; unsigned int i = 0, j = 0, k, l = 0, x = 0; if (s1 == NULL) s1 = ""; if (s2 == NULL) s2 = ""; while (s1[j] != '\0...
Markdown
UTF-8
1,118
2.953125
3
[]
no_license
Single Page Portfolio Website ==================== This repository is a replica of my portfolio website. My current portfolio website is based off of Wordpress, and eventually would like to have it hosted without Wordpress. This Single Page website example is something I will be considering when taking my website off ...
Java
UTF-8
1,139
2.515625
3
[]
no_license
package com.example.demo.web.api; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org....
JavaScript
UTF-8
2,483
3
3
[]
no_license
class PlayerController { constructor(x, y, spriteName, animateSprite, bullets, configs) { // Player this.positionX = x; this.positionY = y; this.sprite = Nakama.game.add.sprite(x, y, 'assets', spriteName); this.sprite.anchor.setTo(0.5, 0.5); Nakama.game.physics.enable(this.sprite, Phaser.Phy...
Java
UTF-8
858
1.960938
2
[]
no_license
package ru.yandex.tests; import org.junit.Test; import ru.yandex.core.UserInfo; import ru.yandex.pages.MainPage; import ru.yandex.qatools.allure.annotations.Title; import static ru.yandex.core.UserAssistant.getTestUser; /** * Created by kai on 07.02.2017. */ @Title("Тесты на функциональность passport.yandex") publ...
PHP
UTF-8
964
2.59375
3
[]
no_license
<?php namespace masterix21\FatturaElettronica\Models\Body\DatiBeniServizi; use masterix21\FatturaElettronica\Base\Model; /** * Class DatiRiepilogo * @property float AliquotaIVA * @property string Natura * @property float SpeseAccessorie * @property float Arrotondamento * @property float ImponibileImporto * @p...
PHP
UTF-8
718
2.875
3
[ "MIT" ]
permissive
<?php /** * Created by PhpStorm. * User: Igorut * Date: 01.10.2017 * Time: 21:47 */ namespace App\Buttons; trait ResponseButton { public function checkGetResponse(): array { /** * If the get button is pressed, will starts function getPersonal, * that will return an array of staf...
Markdown
UTF-8
2,520
2.84375
3
[]
no_license
ECE281_Lab4 =========== ##Lab4 #### ALU Simulation pictures ###### first 4 operations simulated ![alt text](https://raw.githubusercontent.com/JeremyGruszka/ECE_Lab4/master/simulationFirstHalf.PNG "First Half") ###### second 4 operations simulated ![alt text](https://raw.githubusercontent.com/JeremyGruszka/ECE_Lab...
Java
UTF-8
2,304
2.15625
2
[]
no_license
package com.psulccomsci.civilservicereviewer; import android.content.pm.ActivityInfo; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.os.Bundle; import android.widget.RadioGroup; import android.widget.TextView; import androi...
Java
WINDOWS-1252
1,187
2.34375
2
[]
no_license
package controllers; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import javax.swing.JFrame; import javax.swing.JOptionPane; import view.Loginwindow; import view.teacherwindow; public class teacherLogin { p...
PHP
UTF-8
1,027
2.640625
3
[]
no_license
<?php session_start(); class Exceptions extends Exception { public function __construct($exception) { parent::__construct($exception); } } class DB { private $connect; private $select; function __construct() { $this->con = $connect; $this->sel = $select; } function connection_databa...
C++
UTF-8
1,284
3.171875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; #define hungry 100 #define eating 200 #define thinking 300 #define wait 400 #define signal 500 enum {philosopher1,philosopher2,philosopher3,philosopher4,philosopher5}; class monitor { int state[5]; int self[5]; public: Pickup(int i) { ...
C#
UTF-8
520
3.828125
4
[]
no_license
using System; class IsPrime { static void Main() { Console.Write("Enter value for n : "); int n = int.Parse(Console.ReadLine()); bool isPrime = true; int divider = 2; int maxdivider = (int)Math.Sqrt(divider); while (isPrime && (divider <= maxdivider)) {...
Python
UTF-8
1,779
4.59375
5
[]
no_license
# -*- coding: utf-8 -*- """ Created on Tue Feb 2 13:29:01 2021 Class on Strings @author: Maxi """ # Starting with strings hi = "Hello there" greetings = "hello" name = "Eric" print(hi+" "+name) # Print string Example x = 1 print(x) x_str = str(x) print("my fav num is", x, ".", "x =", x) print...
Java
UTF-8
2,706
2.78125
3
[]
no_license
package game; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.sql.Connection; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JPasswordField; import javax.swing.JTextField; import com.DBC...
C++
UTF-8
376
2.890625
3
[]
no_license
#include "Student.h" #define FILE_OUT_NAME "out.XML" int main(int argc, char const* argv[]) { std::ofstream fileout; fileout.open(FILE_OUT_NAME); Student a, b; std::cout << "Enter Student A:\n"; a.input(); std::cout << "Enter Student B:\n"; b.input(); if (a.hasGreaterMark(b)) fileout << a; e...
Python
UTF-8
107,867
2.578125
3
[]
no_license
'''PredNet in PyTorch.''' import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable class Conv2d(nn.Module): def __init__(self, inchan, outchan, sample=False): super().__init__() self.kernel_size = 3 self.weights = nn.init.xavier_normal(torch.Te...
C++
WINDOWS-1252
337
2.71875
3
[]
no_license
#include ".h" int main() { TemplateLinkedList<char>* IntLinkedList = new TemplateLinkedList<char>; IntLinkedList->Apend('a'); IntLinkedList->Apend('b'); IntLinkedList->Apend('c'); IntLinkedList->Apend('d'); IntLinkedList->Apend('e'); IntLinkedList->Apend('f'); IntLinkedList->Apend('g'); IntLinkedList->Print...
C++
UTF-8
218
3.546875
4
[]
no_license
#include<stdio.h> int main() { int arr[] = { 1, 2, 3, 4, 5 }; int *p = arr; ++*p; //arr[]={2,2,3,4,5} printf("%d", *p); //prints 2 p += 2; //*p=arr[2]=3 printf("%d", *p); //prints 3 return 0; }
PHP
UTF-8
667
3.15625
3
[]
no_license
<?php class ContaPoupanca extends Conta { //Variável somente para contaPoupança public $Aniversario; //Construtor function __construct($Agencia, $Codigo, $DataDeCricao, $Titular, $Senha, $Saldo, $Aniversario){ //Chamada do método construtor da classe-pai parent::__construct($Agencia, $Codigo...
C#
UTF-8
3,427
2.921875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq.Expressions; namespace Nicodem.Lexer { public class RegExDfa<T> : AbstractDfa<DFAState<T>, T> where T : IComparable<T>, IEquatable<T> { private readonly uint accepting; private readonly SortedDictionary<RegEx<T>, DFAState<T>> d...
Java
UTF-8
982
2.078125
2
[]
no_license
package com.springboot.racemanage.service.serviceImpl; import com.springboot.racemanage.service.TermService; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; import com.springboot.racemanage.po.Term; import com.springboot.racemanage.dao.TermDao; import org.springf...
Shell
UTF-8
712
2.828125
3
[]
no_license
# HSTR (Ctrl+R enhancer) configuration export HH_CONFIG=hicolor # append new history items to .bash_history shopt -s histappend # leading space hides commands from history export HISTCONTROL=ignorespace # increase history file size (default is 500) export HISTFILESIZE=10000 # increase history size (default is 500) expo...
Java
UTF-8
473
2.140625
2
[]
no_license
package com.walmart.ticketservice.utils; import org.junit.Assert; import org.junit.Test; public class TicketServiceUtilsTest { @Test public void testTestUniqueID() { int holdID1 = TicketServiceUtils.getHoldID(); int holdID2 = TicketServiceUtils.getHoldID(); Assert.assertNotNull(holdI...
Python
UTF-8
1,511
3.109375
3
[]
no_license
# -*- coding: utf-8 -*- ''' Задание 7.3a Сделать копию скрипта задания 7.3. Дополнить скрипт: - Отсортировать вывод по номеру VLAN В результате должен получиться такой вывод: 10 01ab.c5d0.70d0 Gi0/8 10 0a1b.1c80.7000 Gi0/4 100 01bb.c580.7000 Gi0/1 200 0a4b.c380.7c00 ...
PHP
UTF-8
2,557
2.734375
3
[]
no_license
<?php class Post { private $user_ob; private $con; public function __construct($con, $user) { $this->con = $con; $this->user_ob = new User($con, $user); } public function submitPost($body, $user_to) { $body = strip_tags($body); $body = mysqli_real_escape_string($this->con,$body); ...
C++
UTF-8
315
2.8125
3
[]
no_license
class Solution { public: bool containsDuplicate(vector<int>& nums) { vector< set<int> > hashtable; hashtable.resize(65536); for(int i = 0; i < nums.size(); i++) if(hashtable[((nums[i]>0)?nums[i]:-nums[i]) % 65536].insert(nums[i]).second == false){ return true; } return false; } };
Java
UTF-8
13,653
2.15625
2
[]
no_license
package de.uka.ipd.sdq.beagle.core.judge; import static de.uka.ipd.sdq.beagle.core.testutil.ExceptionThrownMatcher.throwsException; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; import...