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 |
|---|---|---|---|---|---|---|---|
Python | UTF-8 | 6,787 | 2.53125 | 3 | [] | no_license | import os
import csv
import platform
import re
from collections import Counter
# data set dir
if platform.system() == "Darwin":
root_dir = '/Users/lee/Desktop/大四/毕业设计/GP_data'
elif platform.system() == "Linux":
root_dir = '/home/lee/Desktop/GP/linux'
ndpi_label_filename = 'ndpi_result.txt'
single_packet_length... |
Java | UTF-8 | 10,257 | 1.9375 | 2 | [] | no_license | package com.itel.monitor.p2pview.register;
import java.util.Timer;
import java.util.TimerTask;
import android.annotation.SuppressLint;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
im... |
C# | UTF-8 | 705 | 3.3125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication6
{
class Program
{
static void Main(string[] args)
{
int[] a = new int[4] { 6, 4, 2, 1 };
Console.WriteLine("逆序前的数组:");
Console.Write(a[0].ToSt... |
PHP | UTF-8 | 2,236 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Application;
use Application\Contract\Command as CommandInterface;
use Application\Contract\EventDispatcher;
use Application\Contract\UseCase;
use Application\Contract\User;
use Application\Contract\Validator;
use Application\Event\Events;
use Application\Event\PostCommandEvent;
use Application\Event\... |
Python | UTF-8 | 632 | 2.78125 | 3 | [] | no_license | import subprocess
import json
import rl_training
from time import time
import numpy as np
trainer = rl_training.TrainAgent()
count = 0
rewards = []
while True:
count += 1
try:
now = time()
proc_output = subprocess.getoutput('run_game.bat')
stats = json.loads(proc_output[proc_output.find('{'):])['stats']['0']
... |
C++ | UTF-8 | 2,023 | 3.5625 | 4 | [] | no_license | // { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution{
public:
// arr[]: Input Array
// N : Size of the Array arr[]
// Function to count inversions in the array.
long long int inversionCount(long long arr[], long long N)
{
long lon... |
C | UTF-8 | 167 | 3.421875 | 3 | [] | no_license | #include<stdio.h>
int main()
{
int a=28;
int b=2;
//Swapping...
int temp=a;
a=b;
b=temp;
printf("After swapping , a is %d , b is %d",a,b);
return 0;
}
|
Python | UTF-8 | 793 | 3.390625 | 3 | [] | no_license | import sys
sys.path.append('/home/danielle8farias/hello-world-python3/meus_modulos')
from mensagem import ler_cabecalho
from numeros import ler_num_nat, ler_num_float
from time import sleep
def pa():
ler_cabecalho('progressão aritmética')
A1 = ler_num_float('Primeiro termo: ')
r = ler_num_float('Razão: ... |
C# | UTF-8 | 2,281 | 2.875 | 3 | [
"MIT"
] | permissive | //By Ronny Berglihn Reinertsen <ronny@reinertsen.net> 05.11.2019
using System;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
namespace FSKristiansandWebLib.Prime
{
public static class ProfileDataParser
{
/// <summary>
/// Convert from uploaded profile to object
/// </summary... |
Markdown | UTF-8 | 2,447 | 3.1875 | 3 | [
"MIT"
] | permissive | ---
title: „Ég er Jósef, bróðir ykkar“
date: 16/06/2022
---
`Lestu 1Mós 45. Hvað getum við lært um kærleika, trú og von í þessari frásögn?`
Það var einmitt þegar Júda talaði um þá „óhamingju“ sem koma mundi yfir föður sinn (1Mós 44.34) að Jósef gat „ekki lengur haft stjórn á tilfinningum sínum,“ „brast í grát“ og „... |
Markdown | UTF-8 | 4,519 | 3.796875 | 4 | [] | no_license | # Analysis
## Test Set 1
For the small test set, one can generate all possible conversions recursively and select the one with the smallest number of rule violations as the answer. Since each note can be converted to four possible notes in the alien scale, this results into 4<sup>**K**</sup> combinations to be tested... |
C# | UTF-8 | 914 | 2.640625 | 3 | [] | no_license | using log4net;
using System;
using System.IO;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
namespace Octopus.Standlone.Webapp
{
public class StreamReadingDelegatingHandler : DelegatingHandler
{
private static ILog Log = LogManager.GetLogger(System.Reflection.MethodBase.... |
Java | UTF-8 | 1,623 | 2.125 | 2 | [] | no_license | package com.jumper.bluetoothdevicelib.device.bloodpressure;
import com.jumper.bluetoothdevicelib.config.DeviceConfig;
import com.jumper.bluetoothdevicelib.core.ADBlueTooth;
import static com.jumper.bluetoothdevicelib.device.bloodpressure.BloodPressureResult.TESTING;
import static com.jumper.bluetoothdevicelib.device.... |
Python | UTF-8 | 364 | 3.609375 | 4 | [] | no_license | # def my_function(food):
# for x in food:
# print(x)
#
# livros = ['a','b']
#
# def frutas():
# fruits = ["apple", "banana", "cherry"]
# return fruits
#
# frutas()
#
# a = frutas()
#
# my_function(a)
# my_function(livros)
def criar ():
lista = []
nome = input('Digite o nome: ')
idade = int('D... |
Python | UTF-8 | 1,202 | 4.28125 | 4 | [] | no_license | # 230.py -- Kth Smallest Element in a tree
'''
Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.
Example 1:
Input: root = [3,1,4,null,2], k = 1
3
/ \
1 4
\
2
Output: 1
'''
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.va... |
JavaScript | UTF-8 | 2,520 | 2.53125 | 3 | [] | no_license | 'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var TS = require('text-statistics'... |
Shell | UTF-8 | 340 | 3 | 3 | [] | no_license | #! /bin/sh
HOME=/var/apps/up1/WEB-APP
cd $HOME
case "$1" in
start)
uwsgi -x $HOME/bin/http-config.xml
;;
stop)
uwsgi --stop /tmp/cmo-http.pid
;;
restart)
echo Stoping service
uwsgi --stop /tmp/cmo-http.pid
sleep 3
uwsgi -x $HOME/bin/http-config.xml
;;
*)
echo "Usage:$0{start|stop|status}"... |
C++ | UTF-8 | 926 | 3.09375 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <string>
#include <iterator>
#include <cmath>
#include <map>
#include <algorithm>
#include <queue>
#include <climits>
#include <fstream>
#include <iomanip>
using namespace std;
struct Student
{
string name;
string id;
int grade;
bool operator<(const Student &s) const... |
C# | UTF-8 | 698 | 2.734375 | 3 | [] | no_license | var doc = new HtmlDocument
{
OptionOutputAsXml = true,
OptionCheckSyntax = true,
OptionFixNestedTags = true,
OptionAutoCloseOnEnd = true,
OptionDefaultStreamEncoding = Encoding.UTF8
};
doc.LoadHtml(htmlContent);
var resu... |
JavaScript | UTF-8 | 1,197 | 4.09375 | 4 | [] | no_license | //[]{}() valid
//[{()}] valid
//[{]} invalid
function braces(values) {
var stack = [];
var hash = {'(' : ')', '[' : ']', '{' : '}'};
var current = null;
var stackPop = null;
var str = null;
var flag = false;
var result = [];
for(var j = 0; j < values.length; j++){
str = values[j... |
Java | UTF-8 | 1,192 | 2.125 | 2 | [] | no_license | package com.revenat.jcart.core.customers;
import com.revenat.jcart.core.entities.Customer;
import com.revenat.jcart.core.entities.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Service;
import org.spring... |
Markdown | UTF-8 | 2,608 | 2.53125 | 3 | [] | no_license | # 2018年 12月 20日
## 分享
### 这,就是飞冰物料
<daily-item
note="如果你使用过飞冰开发项目,可能已经知道飞冰是什么,但如果你是初次了解飞冰,可能还是茫然的;那这便是这篇文章存在的意义,借着这篇文章,可以带着以下三个问题去了解飞冰物料:物料是什么?解决了什么问题?未来的规划是什么?"
url="https://juejin.im/post/5c1c6237e51d454aae0046ec"/>
### GitHub GraphQL API 使用介绍
<daily-item
note="面向未来的API — 知乎"
url="https://zhuanlan.zhihu.... |
Java | UTF-8 | 81 | 1.875 | 2 | [] | no_license | package task2;
public interface InputInformation {
void makeStudentBase();
} |
Java | UTF-8 | 932 | 1.820313 | 2 | [
"Apache-2.0"
] | permissive | package com.minminaya.setting.debug;
import android.graphics.Color;
import android.os.Bundle;
import com.minminaya.aau.utils.BarsHelper;
import com.minminaya.base.componet.BaseActivity;
import com.minminaya.setting.R;
/**
* <p> </p>
* <p>
* <p>Created by LGM on 2018/4/24 20:57</p>
* <p>Email:minminaya@gmail.com<... |
C# | UTF-8 | 688 | 2.609375 | 3 | [] | no_license | //mzxrules 2017
using System;
namespace ZeldaRand
{
class Program
{
static void Main(string[] args)
{
var result = TruthSpinner.Solve();
Console.WriteLine("Results: ");
Console.WriteLine($"{result[0]}, {result[1]}, {result[2]})");
Console.ReadLi... |
Markdown | UTF-8 | 695 | 2.515625 | 3 | [] | no_license | # project Photo Bay NodeJS_Express_Mongo
https://photo-bay.herokuapp.com/
This is a small web app for reviewing pictures submitted by people.
It is written in NOdeJS/ExpressJS and as database, I used MongoDB. Its hosted for free at Heroku.Any uploaded photos heroku deletes
them next day
It has basic CRUD for adding,... |
Python | UTF-8 | 1,448 | 2.828125 | 3 | [] | no_license | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Custom wrappers for Uber API
"""
from uber_rides.session import Session
from uber_rides.client import UberRidesClient
class UberWrapper(object):
def __init__(self, token):
self.session = Session(server_token=token)
self.client = UberRidesClient(se... |
Java | UTF-8 | 850 | 2.75 | 3 | [] | no_license | package com.hand.javasamples.DesignPatterns.action.responsbility.frame.multi_function;
public class LogInterceptorThree implements Interceptor {
@Override
public boolean preDoAction(Request request, Response response) {
request.setRequest("LogInterceptorThree request");
System.out.println("LogI... |
JavaScript | UTF-8 | 1,083 | 3 | 3 | [
"MIT"
] | permissive | const {toString} = Object.prototype
export const isArray =
Array.isArray || (obj => toString.call(obj) === '[object Array]')
export const isFunction = obj => toString.call(obj) === '[object Function]'
export const mapValues = callback => obj => {
const ret = {}
for (let key in obj) {
const val = obj[key]
... |
C# | UTF-8 | 1,981 | 2.53125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Text;
namespace Preston.Media
{
[Serializable]
public class MediaAttribute
{
private string attributeName;
private bool isReadOnly;
private bool includeInBackup;
private bool includeInXl... |
Shell | UTF-8 | 307 | 3.09375 | 3 | [] | no_license | #!/bin/bash
var1="complete"
var2="partial"
if [ $var1 = "complete" ]; then
echo "var1 = complete!"
echo "$var1"
else
echo "var2 = complete!"
echo "$var2"
fi
if [ $var1 = "partial" ]; then
echo "var1 = partial!"
echo "$var1"
else
echo "var2 = partial!"
echo "$var2"
fi
|
Java | UTF-8 | 755 | 2.375 | 2 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package q4tht3;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.Registry;
/*
* @author ... |
C | UTF-8 | 2,069 | 2.5625 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_app_taille_cham_w.c :+: :+: :+: ... |
Go | UTF-8 | 932 | 3.28125 | 3 | [] | no_license | package pkcs7
import "errors"
var BadPadding = errors.New("bad padding")
func Pad(in []byte, blockSize int) []byte {
padding := blockSize - len(in)%blockSize
for i := 0; i < padding; i++ {
in = append(in, byte(padding))
}
return in
}
func Unpad(in []byte, blockSize int) ([]byte, error) {
N := len(in)
// T... |
C# | UTF-8 | 609 | 2.71875 | 3 | [
"MIT"
] | permissive | using System;
namespace Decorator.IO.Core
{
/// <summary>
/// A field for the item.
/// </summary>
public class DecoratorField
{
/// <summary>
/// The name of the field.
/// </summary>
public string Name { get; set; }
/// <summary>
/// The type of the field.
/// </summary>
public Type Type { get... |
C | UTF-8 | 5,430 | 2.953125 | 3 | [] | no_license | #include <signal.h> /* signal */
#include <stdio.h> /* perror */
#include <stdlib.h> /* exit */
#include <string.h> /* memset */
#include <unistd.h> /* read, close */
#include <sys/socket.h> /* socket, setsockopt */
#include <sys/stat.h> /* ... |
Python | UTF-8 | 1,073 | 3.375 | 3 | [] | no_license | import sys
import humansize
s = '深入 Python'
print(len(s))
print(s[0])
print(s + '3')
username = 'mark'
password = 'PapayaWhip'
print("{0}'s password is {1}".format(username, password))
si_suffixes = humansize.SUFFIXES[1000]
print(si_suffixes)
print('1000{0[0]} = 1{0[1]}'.format(si_suffixes))
print('1MB = 1000{0.mo... |
C# | UTF-8 | 11,672 | 2.53125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using System.Windows.Forms;
namespace MELM
{
class cMusteriler
{
cGenel gnl = new cGenel();
#region Fields
private int Mus... |
Python | UTF-8 | 1,291 | 2.765625 | 3 | [] | no_license | import os
import json
import glob
import sys
HIGH_FREQUENCY = 30
MEDIUM_FREQUENCY = 20
def parseData(filename):
data = {}
with open(filename, 'r') as f:
data = json.load(f)
bydate = {}
total_pushes = 0
for date in data['oranges']:
if data['oranges'][date]['testruns'] == 0:
... |
Java | UTF-8 | 1,073 | 1.742188 | 2 | [
"Apache-2.0"
] | permissive | package org.estatio.capex.dom.invoice.approval.tasks;
import org.apache.isis.applib.annotation.Mixin;
import org.estatio.capex.dom.invoice.IncomingInvoice;
import org.estatio.capex.dom.invoice.approval.IncomingInvoiceApprovalState;
import org.estatio.capex.dom.invoice.approval.IncomingInvoiceApprovalStateTransition;
... |
TypeScript | UTF-8 | 913 | 2.828125 | 3 | [] | no_license | import actionTypes from "./action-types";
import { FluxStandardAction } from "flux-standard-action";
/**
*
* @param storeKey
*/
export default function(storeKey: string) {
const { SET_STATE, SET_VALUE, RESET,VALIDATE } = actionTypes(storeKey);
/** */
const setState: (
payload: {}
) => FluxStandardAction<... |
JavaScript | UTF-8 | 599 | 2.640625 | 3 | [] | no_license | $(function () {
$('.chkDisallowed').on('click', function () {
let disallowedPages = [];
$('.pagename').each(function () {
let $this = $(this);
if ($this.find('.chkDisallowed').is(':checked'))
disallowedPages.push($this.find('label').text());
});
... |
JavaScript | UTF-8 | 1,752 | 2.515625 | 3 | [] | no_license | const express = require('express');
var router = express.Router();
var { Candidate } = require('../models/candidate');
var ObjectId = require('mongoose').Types.ObjectId;
// Get all candidates => localhost:3000/candidates
router.get('/candidates', (req,res) => {
Candidate.find((err,docs) => {
if (!err) { re... |
C++ | UTF-8 | 1,863 | 2.78125 | 3 | [] | no_license | #ifndef ASTEROIDS_UI_CLIENTTEXTUI_DISPLAYGRID_H
#define ASTEROIDS_UI_CLIENTTEXTUI_DISPLAYGRID_H
//
#include "Asteroids/ForwardDeclarations.h"
//
#include <vector>
#include <string>
#include <memory>
//
namespace Asteroids
{
//
namespace UI
{
//
namespace ClientTextUI
{
//
using std::string;
... |
TypeScript | UTF-8 | 5,821 | 2.609375 | 3 | [] | no_license | import * as util from "gulp-util";
import * as _ from "underscore";
import * as path from "path";
import * as fs from "fs";
import * as childProcess from "child_process";
import * as semver from "semver";
import {Logger} from "./Logging";
/**
* Provides context for a Gulp plugin that works with 'npm'.
*
* @typepar... |
Java | UTF-8 | 1,166 | 3.328125 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package selftestanswerscap02;
/**
*
* @author Rafael
*/
public class Ejercicio05 {
public static void main(String[] args) {
... |
Java | UTF-8 | 874 | 2.796875 | 3 | [] | no_license | package ru.bona.fileindex.model.range;
import java.nio.ByteBuffer;
/**
* ShortRange
*
* @author Kontsur Alex (bona)
* @since 23.09.14
*/
public class ShortRange extends Range<Short> {
/*===========================================[ INTERFACE METHODS ]============*/
@Override
public ByteBuffer dumpRa... |
JavaScript | UTF-8 | 1,044 | 2.703125 | 3 | [] | no_license | // Reducers
const claimsHistory = (oldListOfClaims = [], action) => {
if(action.type == 'CREATE_CLAIM') {
return [...oldListOfClaims, action.payload];
}
return oldListOfClaims;
};
const accounting = (currentBagOfMoney = 100, action) => {
if(action.type == 'CREATE_CLAIM') {
return currentBagOfM... |
Java | UTF-8 | 1,719 | 2.265625 | 2 | [] | no_license | package org.sqli.test;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.sqli.entities.Admin;
import org.sqli.entities.Collaborateur;
import org.sqli.entities.Encadrant;
import org.sqli.entities.HbSessionManager;
import org.sqli.entities.ManagerRH;
import org.sqli.entities.Projet;
public cla... |
TypeScript | UTF-8 | 1,183 | 2.796875 | 3 | [] | no_license | import { AuthorizationCheck, CredentialTypes } from '../models/types/verification';
import { User, UserType, UserRoles } from '../models/types/user';
export class AuthorizationService {
isAuthorized = (requestUser: User, identityId: string): AuthorizationCheck => {
const isAuthorizedUser = this.isAuthorizedUser(req... |
Java | UTF-8 | 1,966 | 2.25 | 2 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.aviara.bean;
import java.sql.Date;
/**
*
* @author comp2
*/
public class PaymentDetails {
private int id;
priv... |
Markdown | UTF-8 | 793 | 3.203125 | 3 | [] | no_license | # Walsh and Haar approximations
Input function samples and approximate the function as a linear
combination of Walsh or Haar functions. These are in the form of
square waves, and therefore go well with sampling.\
In the file input.txt, in the same directory as the project,
input the desired basic interval (the domain ... |
Java | UTF-8 | 4,331 | 2.46875 | 2 | [] | no_license | package com.shop.dao;
//55555666666666665
import java.sql.SQLException;
import java.util.List;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanHandler;
import org.apache.commons.dbutils.handlers.BeanListHandler;
import com.shop.db.DateSourseUtil;
import com.shop... |
JavaScript | UTF-8 | 645 | 3.5625 | 4 | [] | no_license | // getElemenyByID()
console.log(window);
// console.log(document);
// console.dir(document);
// alert('hello');
// select the element or group of elements that we want
// decide the effect that we want to apply to the selection
// getElementByID();
// assign to a variable
const h1 = document... |
JavaScript | UTF-8 | 397 | 3.3125 | 3 | [] | no_license | let largest = 127289373913828309127381263;
let largest2 = 111333321
function findProduct (input){
let bucket = []
input = input.toString().split('').sort().reverse()
// let input2 = input.sort().reverse()
// console.log(input);
for (var i = 0; i < 5; i++) {
bucket.push(input[i])
}
return bucket.reduc... |
JavaScript | UTF-8 | 291 | 3.28125 | 3 | [] | no_license | // Задача №2
export function secondTask(){
let num = []
while(num.length < 50)
{
let n = Math.round(Math.random()*100)
if (!num.includes(n)){
num.push(n)
}
}
return num.sort((a,b) => a - b)
}
|
C# | UTF-8 | 6,799 | 2.78125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using System.Net.Http;
using System.Text;
using Newtonsoft.Json;
using ElasticSearchGetAllIds.Response;
using ElasticSearchGetAllIds.Request;
na... |
C++ | UTF-8 | 1,067 | 3.28125 | 3 | [] | no_license | #include "ball.h"
Ball::~Ball()
{
SDL_FreeSurface(image);
}
Ball::Ball(SDL_Surface *field, SDL_Surface *image, int x, int y, int x_v, int y_v)
{
this->field = field;
this->image = image;
box.x = x;
box.y = y;
box.h = 16;
box.w = 16;
y_vect = y_v;
x_vect = x_v;
right = false;
down = false;
}
void Ball:... |
Python | UTF-8 | 561 | 3.328125 | 3 | [] | no_license | from collections import defaultdict
import typing as t
def create() -> t.Tuple[t.Callable[[t.List[int], int], int], int, int]:
return action, 10, 20
def action(xs: t.List[int], y: int) -> int:
n = 0
for i, x in enumerate(xs):
n += x ** i
return n
def run0() -> None:
d = defaultdict(lis... |
C# | UTF-8 | 631 | 3.671875 | 4 | [] | no_license | using System;
namespace Sum
{
class Program
{
static void Main(string[] args)
{
// - Write a function called `sum` that sum all the numbers
// until the given parameter
int number = 7;
Console.WriteLine(Sum(number));
Console.Read... |
Java | UTF-8 | 1,818 | 1.992188 | 2 | [] | no_license | package wang.ismy.shopa.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;
/**
* @author MY
* @date 2020/3/28 8:21
*/
@Data
@ApiModel(value = "用户信息")
public class UserEntity {
/**
* userid
*/
@ApiMo... |
Markdown | UTF-8 | 1,491 | 2.546875 | 3 | [
"MIT"
] | permissive | # Local and Global MOT Memory<a name="EN-US_TOPIC_0260488147"></a>
SILO manages both a local memory and a global memory, as shown in.
- **Global** memory is long-term shared memory is shared by all cores and is used primarily to store all the table data and indexes
- **Local** memory is short-term memory that i... |
TypeScript | UTF-8 | 1,501 | 2.515625 | 3 | [] | no_license | import { validationResult } from "express-validator";
import queries from "../DAL/queries";
import { Request, Response } from "express";
import { User } from "../model/User";
import { CustomRequest } from "../model/Request";
const roomsWithSpaceForPatients = async (req: Request, res: Response) => {
console.log("lleg... |
C++ | UTF-8 | 7,819 | 3.109375 | 3 | [] | no_license | #include "Orange.h"
#include <QBrush>
namespace
{
Directions m_movementDirection = Directions::Unknown;
Directions m_oldMoveDirection = Directions::Unknown;
bool m_onScatteringLoop = false;
int m_scatteringStep = 0;
int m_frightenedCounter = 0;
}
Orange::Orange(Ghost *parent): Ghost(parent)
{
... |
C# | UTF-8 | 11,566 | 3.265625 | 3 | [
"MIT"
] | permissive | /*
Copyright (c) 2017 Denis Zykov
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
License: https://opensource.org/licenses/MIT
*/
using System.Collections.Generic;
using S... |
PHP | UTF-8 | 791 | 3.25 | 3 | [] | no_license | <?php
namespace info\domain;
require_once("DomainObject.php");
class Document extends DomainObject {
private $description;
private $date;
private $src;
private $format;
function __construct($id, $title, $text, $description, $date, $src) {
parent::__construct($id, $title, $text);
$this->description = $descr... |
C# | UTF-8 | 865 | 2.859375 | 3 | [] | no_license | using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Text;
namespace ConsoleApp3
{
public class SensetiveJsonConverter : JsonConverter
{
public override bool CanConvert(Type objectType)
{
return true;
}
... |
Shell | UTF-8 | 794 | 3.578125 | 4 | [] | no_license | #!/bin/bash
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
CONF_FILE_PATH=${BASE_DIR%%/}/settings.conf
echo "Reading config from: $CONF_FILE_PATH" >&2
. $CONF_FILE_PATH
echo "Config for the proxy port: $POLIPO_PROXY_PORT" >&2
#Start the shadowsocks proxy
$SS_DAEMON -s $SS_SERVER_IP -p $SS_SERVER_PORT ... |
Java | UTF-8 | 2,023 | 2.4375 | 2 | [] | no_license | package com.app.tGolachowski.entity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Ta... |
C++ | UTF-8 | 805 | 3.234375 | 3 | [] | no_license | #include <iostream>
#include <string>
#include <assert.h>
using namespace std;
class Solution {
public:
string convert(string s, int numRows) {
const int len = s.length();
if (numRows == 1 || len == 1)
return s;
const int circle = numRows * 2 - 2; // 周期
string r = ""... |
Java | UTF-8 | 1,805 | 2.34375 | 2 | [] | no_license | package org.srinadh.exception;
import java.util.Date;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.Con... |
C++ | UTF-8 | 11,058 | 3.15625 | 3 | [] | no_license | #include <iostream>
#include <fstream>
#include <cstring>
struct book
{
int Id_b = 0;
char Name_b[25] = {};
int Flag_b = 0;
};
struct reader
{
int Id_r;
char Name_r[20];
book library[3];
char Hist_book[100][25];
int Flag_r;
};
void add_book_read ()
{
int count_b;
std::fstream count_r_... |
Shell | UTF-8 | 206 | 3.109375 | 3 | [] | no_license | #!/bin/bash
# for i in 1 2 3 4 5
#OR
# for i in {0..50..2}
# {start..end..increment}
for (( i=0; i<10; i++ ))
do
if [ $i -eq 3 ] || [ $i -eq 7 ]
then
continue
fi
echo $i
done
|
C | UTF-8 | 1,030 | 2.609375 | 3 | [] | no_license | #include <iostream>
#include <fstream>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/rmat_graph_generator.hpp>
#include <boost/random/linear_congruential.hpp>
typedef boost::adjacency_list<> Graph;
typedef boost::rmat_iterator<boost::minstd_rand, Graph> RMATGen;
int main(int argc, char* argv[])
{
... |
PHP | UTF-8 | 1,964 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Document;
use App\Repository\CsvFileRepository;
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
/**
* @MongoDB\Document(repositoryClass=CsvFileRepository::class)
*/
class CsvFile
{
public const STATUS_NEW = 'new';
public const STATUS_PARSE = 'parse';
public const STATUS_COM... |
Java | UTF-8 | 1,923 | 2.46875 | 2 | [] | no_license | package main.data;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
public class Login {
private String username;
@JsonUnwrapped
private Password password;
private String website;
private Folder folder;
private String notes;
private List<SecurityQuestio... |
Java | UTF-8 | 4,213 | 2.109375 | 2 | [] | no_license | package com.aml.propaganda.model;
import com.aml.sys.entity.Dict;
import java.util.Date;
/**
* Created by hb on 2017/10/24.
*/
public class CmsNewsAndDictModel {
/**
* 标识ID
*/
private Integer id;
/**
* 栏目ID
*/
private String channelId;
/**
* 标题
*/
private Str... |
Python | UTF-8 | 7,950 | 2.765625 | 3 | [
"MIT"
] | permissive | """Integration tests for signup template
The signup view extends uses a custom template. The tests in this file
verify that the custom templates contains all of the necessary
elements including error messages and mark-up.
Tests in this file include:
+ form elements
+ form success
+ missing first_name
+ missing last_... |
Python | UTF-8 | 2,535 | 3.8125 | 4 | [] | no_license | intento = 1
contrasena = 1234
acceso = False
diaSemanaSeleccionada = False
mSeleccionada = False
hSeleccionado = False
contrasennaAcceso = input("Ingrese la contraseña :")
def diaSemana():
return ['Lunes','Martes','Miercoles','Jueves','Viernes']
def materias():
return ['quimica','fisica','matematica','sociales']
d... |
JavaScript | UTF-8 | 809 | 2.640625 | 3 | [
"MIT"
] | permissive |
var analyzer = require('../lib/analyzer');
var cases = [
[ 'value11', 'value21', 'class1' ],
[ 'value12', 'value22', 'class1' ],
[ 'value13', 'value21', 'class2' ],
[ 'value14', 'value22', 'class2' ],
[ 'value15', 'value23', 'class3' ]
];
exports['no frequencies'] = function (test) {
... |
C++ | UTF-8 | 5,721 | 2.515625 | 3 | [] | no_license | #include "Headers.cpp"
/* 用例
#include <iostream>
signed main()
{
int n, m, s, t;
std::cin >> n >> m >> s >> t;
auto MMP = MCMF<LL>(n);
MMP.s = s;
MMP.t = t;
for (auto i : range(m))
{
int u, v;
LL flow, cost;
std::cin >> u >> v >> flow >> cost;
MMP.add(u, v,... |
JavaScript | UTF-8 | 542 | 4.1875 | 4 | [] | no_license | // 28. Implement strStr()
// Implement strStr().
// Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
/**
* @param {string} haystack
* @param {string} needle
* @return {number}
*/
var strStr = function(haystack, needle) {
if(needle == '') return 0;
f... |
Java | UTF-8 | 570 | 2.28125 | 2 | [] | no_license | package com.sda.thox.zdautpol1;
import org.junit.Before;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class My_First_JUnit_Test {
@BeforeEach
public void setUp() {
System.out.println("wykon przed kazdym test");
}
@Af... |
Java | UTF-8 | 1,210 | 3.328125 | 3 | [] | no_license | package repeticioRepte1;
import java.util.Scanner;
public class repeticioRepte1 {
public static void main (String [] args) {
/////////////////////////////////////////////////////////////
//Bloc de variables i subvariables pel tractament de dades//
//////////////////////////////////////////////////////////... |
Shell | UTF-8 | 893 | 3.671875 | 4 | [] | no_license | #!/bin/sh
GITHUB_KEY="${1:-$GITHUB_KEY}"
GITHUB_ORG="${2:-$GITHUB_ORG}"
if [[ -z "$GITHUB_KEY" || -z "$GITHUB_ORG" ]]; then
echo "GITHUB_KEY and GITHUB_ORG must be set"
exit 1
fi
curl -H "Authorization: Bearer $GITHUB_KEY" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/orgs/$GIT... |
C++ | UTF-8 | 814 | 2.734375 | 3 | [] | no_license | #include <stdio.h>
int main(){
int n;
printf("Nhap ngay: ");
scanf("%d",&n);
int k;
printf("Nhap thang: ");
scanf("%d",&k);
int a;// ngay thu .. trong nam
switch(k){
case 1: a = n;break;
case 2: a = 31+n;break;
case 3: a = 31+28+n;break;
case 4: a = 31+28+31+n;break;
case 5: a = 31+28+31... |
C++ | UTF-8 | 22,950 | 3.03125 | 3 | [] | no_license | #include <iostream>
#include <string>
#include <stdexcept>
#include <algorithm>
#include <vector>
#include "classes/headers/Sistema.h"
#include "datatypes/headers/DtUsuario.h"
using namespace std;
//Encabezados de funciones auxiliares
void DatosTesteo();
bool DeseaContinuar(string msg);
void OpcionCrearR... |
Python | UTF-8 | 1,180 | 3.484375 | 3 | [] | no_license | import string
STOP_WORDS = [
'a', 'an', 'and', 'are', 'as', 'at', 'be', 'by', 'for', 'from', 'has', 'he',
'i', 'in', 'is', 'it', 'its', 'of', 'on', 'that', 'the', 'to', 'were',
'will', 'with'
]
def print_word_freq(file):
"""Read in `file` and print out the frequency of words in that file."""
with... |
Java | UTF-8 | 511 | 2.0625 | 2 | [] | no_license | package com.study.orderproducer.controller;
import com.study.orderproducer.producer.OrderProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class ... |
Shell | UTF-8 | 653 | 2.984375 | 3 | [] | no_license | #!/bin/bash
set -exuo pipefail
MY_DIR=$(dirname "${BASH_SOURCE[0]}")
source $MY_DIR/build-common.sh
filename=$(echo "$package" | tr '-' '_')
source /io/preinstall-rust.sh
# Compile wheels
for PYBIN in /opt/python/*/bin; do
"${PYBIN}/pip" download --no-binary="$package" "$package==$version"
"${PYBIN}/pip" wh... |
C | UTF-8 | 658 | 3.84375 | 4 | [] | no_license | /* Programma per il calcolo del numero di giorni a partire da un numero di ore */
/* #define _CRT_SECURE_NO_WARNINGS */ /* Utilizzare questa direttiva se non si vuole utilizzare la scanf_s */
#include <stdio.h>
int main()
{
int oreTotali; /*Primo numero*/
int giorni; /*Secondo numero*/
int oreResidue; /*Variabile p... |
Swift | UTF-8 | 12,405 | 2.765625 | 3 | [] | no_license | //
// AppDelegate.swift
// MVVMCSample
//
// Created by Ranjeet Singh on 20/05/20.
// Copyright © 2020 Ranjeet Singh. All rights reserved.
//
import UIKit
extension String {
subscript(i: Int) -> String {
return String(self[index(startIndex, offsetBy: i)])
}
subscript(i: Range<UInt>) -> String ... |
Java | UTF-8 | 722 | 2.5 | 2 | [
"MIT"
] | permissive | package com.himank.activitiwithspring.servicetasks;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
public class SendEmailServiceTask implements JavaDelegate {
public void execute(DelegateExecution execution) {
//logic to sent email confirmation
... |
Python | UTF-8 | 2,574 | 2.609375 | 3 | [] | no_license | import wget
import os
import zipfile
import shutil
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = os.path.dirname(CURRENT_DIR)
class DataLoader:
original_ud = 'https://github.com/olexandryermilov/ukrdata/raw/master/original_embedding_original_ud.zip'
fast_text = 'https://github.com/olexa... |
Shell | UTF-8 | 151 | 2.53125 | 3 | [] | no_license | #!/bin/bash
IMG=`find /extra/Photos -iname "*jpg" -type f | shuf -n 1`
convert "$IMG" -auto-orient /tmp/bg.jpg
DISPLAY=:0 feh --bg-fill /tmp/bg.jpg
|
Java | UTF-8 | 2,700 | 2.015625 | 2 | [] | no_license | package com.mashreq.app.viewmodel;
import android.content.Context;
import android.util.Log;
import android.view.View;
import androidx.hilt.lifecycle.ViewModelInject;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import com.github.ybq.android.spinkit.SpinKitView;
import com.google.gs... |
PHP | UTF-8 | 1,776 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2020/5/21
* Time: 10:28
*/
namespace app\api\controller;
use think\Db;
/**
* 用户接口类
* Class User
* @package app\api\controller
*/
class User extends Base
{
/**
* 访问白名单
* @var array
*/
protected $actionWhite = [
];
/... |
JavaScript | UTF-8 | 1,089 | 2.703125 | 3 | [] | no_license | import Image3 from "../../img/avatarka.jpg";
import Image4 from "../../img/avatarka2.jpg";
import profileReducer from "./profile-reducer";
import {addPostActionCreator, deletePost} from "../Actions/profile-actions";
let initialState = {
posts: [
{id: 1, post: 'Hey, why nobody love me?', likesCount: 1, img:... |
PHP | UTF-8 | 3,425 | 2.703125 | 3 | [] | no_license | <?php
session_start();
//importar o banco de dados
require("../database/conexao.php");
//declarar o sql de select
$sql = " SELECT * FROM tbl_categoria ";
//executar o sql
$resultado = mysqli_query($conexao, $sql) or die(mysqli_error($conexao));
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8"... |
C++ | UTF-8 | 1,093 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | #include<iostream>
#include<fstream>
#include<string>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<set>
#include<list>
#include<algorithm>
#include<math.h>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<iomanip>
#define MAXN 50
#de... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.