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,793 | 2.15625 | 2 | [
"BSD-3-Clause"
] | permissive | // license-header java merge-point
/**
* This is only generated once! It will never be overwritten.
* You can (and have to!) safely modify it by hand.
*/
package com.logistics.entity.cost;
/**
* @see com.logistics.entity.cost.WlInsurance
*/
public class WlInsuranceDaoImpl
extends com.logistics.entity.cost.WlIn... |
JavaScript | UTF-8 | 1,164 | 3.3125 | 3 | [] | no_license | // 并不算常用的技术
// 待渲染函数
const data = [];
// 数据项的计算函数
const datum = x => {
return x * x * 10;
};
const newData = () => {
data.push(datum);
return data;
};
function handle_bind_function_data() {
// 定时更改数据并重新渲染
setInterval(() => {
renderData();
}, 1500);
// 初始渲染
renderData();
}
/**
* 渲染可视化数据
*/
fun... |
Python | UTF-8 | 3,973 | 3.671875 | 4 | [] | no_license | ###
# Imports
###
# Standard Python library
import random
import types
###
# Agent Class.
# Attributes :
# - id : permits the identification of every agents
# - world_name : the name of the world which contains the agent
###
class Agent():
###
# Agent constructor
# - numbe... |
C++ | UTF-8 | 2,116 | 3.859375 | 4 | [] | no_license | /*
* File: main.cpp
* Author: Branden Hitt
* Created on March 25, 2015, 10:10 AM
* Purpose: use a structure to store data
*/
//System Libraries
#include <iostream>//I/O standard
#include <iomanip>//format
using namespace std;
//User Libraries
#include "CorpData.h"
//Global Constants
//Function Prototyp... |
Python | UTF-8 | 5,851 | 2.90625 | 3 | [] | no_license | __author__="Nikhil Rayaprolu"
__version__ = "1.0.0"
__maintainer__ = "Nikhil Rayaprolu"
__email__ = "nikhil.rayaprolu@students.iiit.ac.in"
__status__ = "Development"
import pygame,random
import time
class Block(object):
"""block class for the tetris game"""
def __init__(self):
super(Block, self).__init__()
s... |
Python | UTF-8 | 5,849 | 2.640625 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# uTorrent cleanup script.
# Moves downloads to the proper dir, based on their label.
# Useful after assigning new labels to torrents.
#
# ** SHUT DOWN uTorrent BEFORE RUNNING **
#
# Original on: https://github.com/m000/cliutils
#
from __future__ import print_function
im... |
C++ | UTF-8 | 1,065 | 2.796875 | 3 | [
"MIT"
] | permissive | #include <unordered_map>
#include <map>
#include <cmath>
#include <string>
#include <array>
#include <Rcpp.h>
// Enable C++11 via this plugin (Rcpp 0.10.3 or later)
// [[Rcpp::plugins(cpp11)]]
// [[Rcpp::export]]
void hello()
{
// std::array< double , 2 > a = {{1e4,2}};
// std::array< std::array< double , 3 > ,... |
Java | UTF-8 | 2,800 | 1.976563 | 2 | [] | no_license | package com.jiudian.p2p.front.service.financing;
import java.math.BigDecimal;
import com.jiudian.framework.service.Service;
import com.jiudian.framework.service.query.Paging;
import com.jiudian.framework.service.query.PagingResult;
import com.jiudian.p2p.common.enums.IsPass;
import com.jiudian.p2p.front.servi... |
Java | UTF-8 | 2,670 | 2.40625 | 2 | [] | no_license | package com.longrise.android.compattoast;
import android.app.Activity;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
/**
* Created by godliness on 2020/10/16.
*
* @author godliness
*/
public final class Toast implements I... |
Python | UTF-8 | 2,201 | 2.71875 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 16 16:47:59 2019
@author: Sanjeev Narayanan
"""
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 21 11:37:51 2019
@author: Sanjeev Narayanan
"""
import os
import re
import string
from nltk.corpus import stopwords
from stop_words import get_stop_words
i... |
PHP | UTF-8 | 635 | 2.84375 | 3 | [] | no_license | <?php
include('db.conf.php'); //include the paremter of database
try {
$db = new PDO("mysql:host=$host_name", $db_user, $db_password); //access sql server with PDO
$db->query("SET character_set_server = 'utf8'"); //set the ecncoding type of database
$db->query("CREATE DATABASE IF NOT ... |
JavaScript | UTF-8 | 3,863 | 2.8125 | 3 | [] | no_license |
GameEngine.Classes.DeepFirstSearchFieldSolver = Class.create(GameEngine.Classes.MazeSolver.prototype, {
init: function() {
this.sup('init');
},
solve: function( cell_from, cell_to ) {
GameEngine.maze.unvisited();
$(GameEngine.maze.data).each(function() {
$(this).each(... |
Java | UTF-8 | 867 | 2.296875 | 2 | [
"Apache-2.0"
] | permissive | package com.nimbusframework.nimbusexampes.restapi;
import static org.junit.jupiter.api.Assertions.*;
import com.nimbusframework.nimbuscore.annotations.function.HttpMethod;
import com.nimbusframework.nimbuslocal.LocalNimbusDeployment;
import com.nimbusframework.nimbuslocal.deployment.http.HttpRequest;
import org.junit... |
C# | UTF-8 | 828 | 2.53125 | 3 | [
"MIT"
] | permissive | using Laurus.Spex;
using Laurus.Spex.Sample;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
RunTest<AtmSample>("AnotherOne");
//RunTest(new ... |
Go | UTF-8 | 4,614 | 2.71875 | 3 | [
"MIT"
] | permissive | package firmafon
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"reflect"
"strings"
"github.com/google/go-querystring/query"
)
const (
apiVersion = "2"
defaultBaseURL = "https://app.firmafon.dk/api/v" + apiVersion + "/"
mediaTypeJSON = "application/json"
)
// A Client... |
Java | UTF-8 | 13,286 | 1.609375 | 2 | [] | no_license | /*******************************************************************************
* Copyright (c) 2013 SCI Institute, University of Utah.
* All rights reserved.
*
* License for the specific language governing rights and limitations under Permission
* is hereby granted, free of charge, to any person obtaining a copy... |
Markdown | UTF-8 | 5,439 | 2.921875 | 3 | [
"MIT"
] | permissive | # lemon-todaq-doc
Restfull Micro-Service to support general commerce above TodaQ block-chain technology.
# Objective
- Support general commerce payment based on [TodaQ API](https://todaqfinance.com/)
- Ready to deploy in AWS Cloud in 3 minutes.
- Provide a web based admin console for payment management.
- Agent modu... |
Java | UTF-8 | 7,769 | 2.171875 | 2 | [] | no_license | package com.creditharmony.fortune.deduct.entity.ext;
import java.io.Serializable;
import com.creditharmony.core.excel.annotation.ExcelField;
/**
* 线下划扣导入结果扩展类
* @Class Name ImportDeductResult
* @author 韩龙
* @Create In 2015年12月19日
*/
public class ImportDeductResult implements Serializable {
/**
* long serial... |
JavaScript | UTF-8 | 3,163 | 2.6875 | 3 | [] | no_license | var dotenv = require("dotenv").config();
var keys = require("./keys.js");
var Spotify = require("node-spotify-api");
var Twitter = require("twitter");
var request = require("request");
var fs = require("fs");
var spotify = new Spotify(keys.spotify);
var client = new Twitter(keys.twitter);
var tweets = function() {
... |
Java | UTF-8 | 808 | 3.5625 | 4 | [] | no_license | import java.util.Scanner;
public class ex121 {
public static int[] cloneArray(int[] oldArray){
int n = oldArray.length;
int[] newArray = new int[n];
for(int i = 0; i < n; i++){
newArray[i] = oldArray[i];
}
return newArray;
}
public static void m... |
C# | UTF-8 | 788 | 2.5625 | 3 | [
"MIT"
] | permissive | namespace OpenPokeLib.PokemonTypes
{
public class Fire : IPokemonType
{
public override Types[] SuperEffective
{
get
{
return new[]
{
Types.Water,
Types.Rock,
Types.Ground
... |
C# | UTF-8 | 1,727 | 2.75 | 3 | [] | no_license | using Bolay.Elastic.QueryDSL.MinimumShouldMatch;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bolay.Elastic.QueryDSL.Queries.Terms
{
/// <summary>
/// http://www.elasticsearch.org/guide/en/elasticsearch/ref... |
Java | GB18030 | 1,973 | 2.171875 | 2 | [] | no_license | /*
* Copyright 2011 by Founder Sprint 1st, Inc. All rights reserved.
*/
package gov.nbcs.rp.queryreport.definereport.ui;
import java.util.EventObject;
import javax.swing.JFrame;
import com.foundercy.pf.reportcy.design.actions.UndoableAction;
import com.foundercy.pf.reportcy.design.gui2.core.DesignUtils;
import com... |
Markdown | UTF-8 | 773 | 2.8125 | 3 | [] | no_license | # Apache Supserset custom docker image
a custom single node apache superset docker image that is ready to use without any custom configs.
## Running from dockerhub
docker pull mujahid002/apache-superset:latest
and then run it by
docker run -d -p 8088:8088 --name superset mujahid002/apache-superset:latest
## How ... |
Java | UTF-8 | 492 | 2.359375 | 2 | [] | no_license | package br.com.whatsappandroid.cursoandroid.myeasyparking.Model;
import br.com.whatsappandroid.cursoandroid.myeasyparking.Model.Usuario;
/**
* Created by root on 08/06/17.
*/
public class UsuarioSingleton {
private static Usuario usuario = null;
public Usuario getInstance() {
if (usuario == null) ... |
Java | UTF-8 | 218 | 1.53125 | 2 | [
"LicenseRef-scancode-warranty-disclaimer",
"ANTLR-PD",
"CDDL-1.0",
"bzip2-1.0.6",
"Zlib",
"BSD-3-Clause",
"MIT",
"EPL-1.0",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-jdbm-1.00",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | package com.sequenceiq.cloudbreak.ha.service;
import java.util.Set;
public interface ServiceFlowLogComponent {
int purgeTerminatedResourceLogs();
Set<Long> findTerminatingResourcesByNodeId(String nodeId);
}
|
C++ | UTF-8 | 1,237 | 3.265625 | 3 | [] | no_license | /*
There are n pictures delivered for the new exhibition. The i-th painting has beauty ai. We know that a visitor
becomes happy every time he passes from a painting to a more beautiful one.
We are allowed to arranged pictures in any order. What is the maximum possible number of times the visitor
may become happ... |
Java | UTF-8 | 787 | 2.328125 | 2 | [
"MIT"
] | permissive | package ro.msg.learning.shop.entities;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.io.Serializable;
@Entity @Data @EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Table(name... |
Python | UTF-8 | 831 | 2.609375 | 3 | [] | no_license | import socketserver
import threading
class MyHandlerServer(socketserver.BaseRequestHandler):
def setup(self):
super().setup()
self.event = threading.Event()
def handle(self):
super().handle()
print(self.server, self.client_address, self.request)
while not self.event.is... |
Markdown | UTF-8 | 1,565 | 2.546875 | 3 | [] | no_license | # Article L331-7
En cas de cessation définitive de l'activité d'un établissement, d'un service ou d'un lieu de vie et d'accueil autorisé en
vertu de l'article L. 312-1 ou déclaré en vertu de l'article L. 321-1, les créances que peuvent détenir les mineurs sur ce
dernier sont garanties par un privilège général sur les ... |
Python | UTF-8 | 2,108 | 3.6875 | 4 | [] | no_license | #########################################################
# December 11th, 2016 #
# a. Convert the IP address validation code from #
# week4-1 into a function. Take one variable #
# 'ip_adress' and return True or False. Include #
# only validation, no pr... |
Markdown | UTF-8 | 2,503 | 2.546875 | 3 | [] | no_license | ---
layout: post
title: Installer FAQ - Role of Essential Studio in Visual Studio | Syncfusion
description: Learn here about the role of Syncfusion Essential Studio in Visual Studio and its difference from Visual Studio.
platform: common
control: Essential Studio
documentation: ug
---
# What is the role of Essential S... |
Java | UTF-8 | 115 | 1.851563 | 2 | [] | no_license | package no.hal.timers.fxui;
public interface Action<T> {
public boolean isFor(T t);
public void doFor(T t);
}
|
TypeScript | UTF-8 | 1,261 | 2.640625 | 3 | [] | no_license | import { Action, createFeatureSelector, createSelector } from '@ngrx/store'
import { Draw, equalDraw } from './../models/draw.model'
import * as DrawActions from './../actions/draw.actions'
import { DrawState, initialDrawState } from '../app.state';
var lastElement;
export function reducer(state: DrawState = initialD... |
PHP | UTF-8 | 532 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php namespace App;
use App\SemesterSubject;
use Illuminate\Database\Eloquent\Model;
class Subject extends Model {
protected $fillable = [
'name',
'school',
'department',
'description'
];
public function semesters()
{
//return $this->hasMany('SemesterSubject')->with('Semester');
return $this... |
C# | UTF-8 | 1,529 | 2.75 | 3 | [] | no_license | using System;
using System.Threading;
using System.Threading.Tasks;
using Application.Common.Interfaces;
using Domain.Entities;
using Domain.Exceptions;
using MediatR;
using Microsoft.EntityFrameworkCore;
namespace Application.Terrariums.Commands.UpdateTerrarium
{
public class UpdateTerrariumCommand : IRequest<int... |
C | UTF-8 | 1,079 | 3.859375 | 4 | [] | no_license | /*Xét bàn cờ tổng quát kích thước n × n, người ta muốn đặt k quân tượng vào k ô hoàn toàn phân biệt sao cho chúng đôi một không ăn nhau.
(Quân tượng có thể ăn quân khác nằm ở những ô cùng đường chéo với ô nó đang đứng).
Nhiệm vụ của các bạn là hãy tính xem có bao nhiêu cách đặt k quân tượng này?
*/
#include<stdio.h>
... |
Java | UTF-8 | 785 | 2.0625 | 2 | [] | no_license | package com.isoft.crm.service;
import java.util.List;
import java.util.Set;
import com.isoft.crm.bean.MenuBean;
import com.isoft.crm.bean.UserSession;
/**
*
*@Title: LoginService.java
*@Package: com.isoft.crm.service
*@Description:
* the Login factory interface.
*@author: Nina Zhao
*@date:下午11:... |
Python | UTF-8 | 2,523 | 3.78125 | 4 | [
"MIT"
] | permissive | '''
Created on 23 Oct 2013
@author: Richard and Michael
'''
import copy
from game_of_life.data_structures.states import Alive, Dead
class Calculator(object):
'''
This class represents the calculation engine for the Game of Life
simulation
'''
def __init__(self, rule_set):
'''
Co... |
Java | UTF-8 | 1,110 | 2.015625 | 2 | [] | no_license | package Com.pages;
import java.io.IOException;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import com.excelUtility.LoginInvaliddata;
public class LoginInvalid {
WebDriver driver;
public void launch() {
System.setProperty("... |
Java | UTF-8 | 2,809 | 4.0625 | 4 | [] | no_license | package bbb.Arrays;
import java.util.*;
public class LongestConsecutiveSequence {
/*
Time: O(N^2) for list, O(N^3) for array because of contains look up
Space: O(1)
*/
/* Worst Case: Array in Descending Order */
private static int longestConsecutiveSequenceApproach1(List<Integer> list... |
C | UTF-8 | 1,112 | 2.828125 | 3 | [] | no_license | #include <avr/io.h>
#include <util/delay.h>
#include "settings.h"
#include "uart.h"
#include "utils.h"
/* 2^8-1 = 3 digits + 1 for string terminator */
void uint8_to_str (uint8_t val, char* target) {
for (int i = 2; i >= 0; i--) {
target [i] = val % 10 + '0';
val /= 10;
}
target[3] = '\0';
}
/* 2^16-1... |
Markdown | UTF-8 | 3,678 | 2.75 | 3 | [] | no_license | # Hinweise zur C++-Programmierung
## Namenskonventionen
- Variablen/Instanzen sollten immer mit einem Kleinbuchstaben beginnen,
- Defines, Makros Ausschließlich aus Großbuchstaben bestehen und
- Klassen und Strukturen mit einem Großbuchstaben gefolgt von Kleinbuchstaben
Selbstverständlich sind "sprechende" Namen zu be... |
C++ | UTF-8 | 361 | 2.96875 | 3 | [] | no_license | #pragma once
class Color
{
public:
typedef unsigned char uchar;
Color();
Color(uchar r, uchar g, uchar b, uchar a);
~Color();
static Color GetRandomColor();
public:
uchar R;
uchar G;
uchar B;
uchar A;
public:
static const Color RED;
static const Color BLUE;
static const Color GREEN;
static const Col... |
C | UTF-8 | 2,066 | 2.90625 | 3 | [] | no_license | /*
* serijska proba.c
*
*
* Created: 26.5.2017. 04.18.09
* Author : Kovach
*
*/
#define F_CPU 16000000
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#include <string.h>
#define BAUD 9600 //baud-rate [bps]
#define mojUBR (F_CPU/16/BAUD-1) //broj koji se upisuje u UBR high i low r... |
C# | UTF-8 | 2,716 | 3.453125 | 3 | [] | no_license | using System;
namespace VALIDACAO_DE_DADOS
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Validação de Dados");
Console.WriteLine("--------------------");
Console.WriteLine("Digite o nome do usuario");
string ... |
Python | UTF-8 | 2,215 | 2.953125 | 3 | [] | no_license | from myList import myList
from myItem import myItem
class MB:
def __init__(self, friendship):
self.friendship = friendship
pass
def sort_people(self, sort_by_name=False, sort_by_id=False, sort_by_age=False, sort_by_book=False, reverse=False):
people_list = self.friendship.get_people_l... |
Python | UTF-8 | 2,987 | 2.734375 | 3 | [] | no_license | import timeit
from pprint import pprint
import copy
import Modules.myconstants as myconst
import Modules.magnetix as mag
import Modules.genetix as gen
import Modules.writer as writer
from Classes.populationclass import *
mainLoopFlag = True
epsilonFlag = False
def evolver(queueop, mypop, application_runtime):
... |
Java | UTF-8 | 363 | 2.09375 | 2 | [
"MIT"
] | permissive | package com.veben.optionalnstream.domain;
import lombok.Getter;
@Getter
public class DefaultAvatar extends Avatar {
public static final String DEFAULT_URL = "defaultUrl";
public static final String DEFAULT_WORDING = "defaultWording";
public DefaultAvatar() {
this.gravatarUrl = DEFAULT_URL;
... |
Markdown | UTF-8 | 2,510 | 2.59375 | 3 | [
"MIT"
] | permissive | ---
title: Waarom ’n voorhangsel?
date: 01/03/2022
---
Voorhangsels het ’n dubbeldoelige funksie. Die woord wat Hebreërs hier gebruik vir voorhangsel (katepetasma) kan verwys na die afskorting in die ingang van die voorhof
(Ex. 38:18), die afskorting vir die ingang [deur] van die buite-vertrek van die heiligdom (Ex... |
C++ | UTF-8 | 1,519 | 3.953125 | 4 | [] | no_license | #include <iostream>
class A{
private:
static int ogolem;
public:
A(){
++ogolem;
std::cout<<"Utworzono obiekt A. Ogolnie:"<<ogolem<<std::endl;
}
~A(){
std::cout<<"Usuwam obiekt A. Utworzonych:"<<ogolem<<std::endl;
};
};
class B{
private:
static int obecnie... |
Java | UTF-8 | 590 | 2.140625 | 2 | [] | no_license | package com.blocker.gameworld.domain;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
public class GameWorldTypeTest {
private RobotGameWorldType gt=new RobotGameWorldType();
@Test
public void getActionsTest() {
assert... |
Java | UTF-8 | 7,324 | 2.484375 | 2 | [] | no_license | package com.keenoor.toolkit.utils.httpclient;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.NameValuePair;
import org.apache.http.ParseException;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.clie... |
C | UTF-8 | 189 | 3.296875 | 3 | [] | no_license | #include <stdio.h>
main()
{
int x,a,b,c;
for(x=100;x<=999;x++)
{
a=x/100;
b=x%100/10;
c=x%10;
if(x==a*a*a+b*b*b+c*c*c)
printf("%d\n",x);
}
} |
C++ | UTF-8 | 2,252 | 2.84375 | 3 | [
"MIT"
] | permissive | #include <PRIZM.h>
PRIZM prizm;
void setup() {
prizm.PrizmBegin();
prizm.setMotorInvert(2,1); //the motors will go in opposite directions to move forward
prizm.setServoSpeed(1,25); //set servo speed 25%
//the code doesn't loop
}
void loop() {
//stop when something is in the way
i... |
C# | UTF-8 | 3,234 | 2.828125 | 3 | [] | no_license | using System;
using System.Configuration;
using CastleGrimtol.Project;
namespace CastleGrimtol.Project {
public class Program {
public static void Main (string[] args) {
bool gameOver = false;
string userInput = "";
bool itemDropped = false;
bool doughnutUse... |
Python | UTF-8 | 1,228 | 3.359375 | 3 | [] | no_license | #!/bin/python3
import math
import os
import random
import re
import sys
def IsLeapYear(year, category):
if category == 1:
if year % 4 == 0:
return True
if category == 2 or category == 3:
if year % 400 == 0 or year % 4 == 0 and not year % 100 == 0:
return True
retur... |
Go | UTF-8 | 4,294 | 2.859375 | 3 | [
"MIT"
] | permissive | package util
import (
"fmt"
"math/rand"
"time"
"strconv"
)
var rs = rand.New(rand.NewSource(time.Now().UnixNano()))
type RandStruct struct{
randslice []string
index int
}
func (r *RandStruct) GetNext()(string){
r.index++
if(r.index >= len(r.randslice)){
r.index = 0
}
... |
C++ | UTF-8 | 513 | 3.078125 | 3 | [] | no_license | #include<stdio.h>
using namespace std;
void swap(int& a,int &b)
{
int t=a;
a=b;
b=t;
}
void insertion_sort(int a[],int n)
{
for(int i=1; i<n; i++)
{
for(int j=i-1;j>=0;j--)
{
if(a[j+1]<a[j])swap(a[j+1],a[j]);
else break;
}
}
}
int main()
{
int ... |
JavaScript | UTF-8 | 1,049 | 2.875 | 3 | [] | no_license | var express = require('express');
var todos = require('./todos');
var bodyParser = require('body-parser');
var port = process.env.PORT || 3000;
var app = express();
app.use(bodyParser.json());
var getRandomId = function() {
return Math.random()
.toString(36)
.substr(7);
};
var addTodo = function(type, des... |
Shell | UTF-8 | 968 | 3.9375 | 4 | [] | no_license | #!/bin/bash
while getopts m: OPT
do
case $OPT in
m) message="$OPTARG" ;;
\?) echo "Usage : -m 'コミットメッセージ' パス" 1>&2
exit 1 ;;
esac
done
# オプション部分を切り捨てる。
shift `expr $OPTIND - 1`
if [ "$1" ]; then
path=$@
else
path='./'
fi
if [ "$message" ]; then
addstr=`svn st $path | g... |
Java | UTF-8 | 8,765 | 2.546875 | 3 | [] | no_license | package servlets;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;
import database.DBConnector;
public class dataSearchServlet extends HttpServlet {
///Create an ArrayList to add checked boxes to
public ... |
JavaScript | UTF-8 | 769 | 3 | 3 | [] | no_license | let restaurents=[{
name:'res1',
billAmt: 77
},{
name:'res2',
billAmt: 375
},{
name:'res3',
billAmt: 110
},{
name:'res4',
billAmt: 45
}];
let avg=0;
restaurents.map((object)=>{
switch(true){
case (object.billAmt<50):
object.tip = object.billAmt*0.20;
ob... |
Java | UTF-8 | 6,368 | 2.140625 | 2 | [] | no_license | package backup;
import java.io.FileReader;
import java.io.LineNumberReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import algorithm.Settings;
import spatialindex.rtree.RTree;
import spatialindex.spatialindex.ISpatialIndex;
import spatialindex.spatialindex.Point;
import... |
Markdown | UTF-8 | 4,310 | 2.609375 | 3 | [] | no_license | ###### Bye-bye, Bouteflika
# Algeria’s ex-president is dead, but his regime lives on
##### To the dismay of many Algerians

> Sep 25th 2021
FINALLY THE rumours are true. For years Algerians whispered about the health of Abdelaziz Bouteflika, their president from 1999 to 20... |
Python | UTF-8 | 2,415 | 2.84375 | 3 | [] | no_license |
from flask import Flask
from pprint import pprint
#データの追加や更新が上手くいっているかチェックする
class CheckDatabase():
def __init__(self):
pass
@classmethod
#参加申請データの更新が上手くいっているかチェック
def is_entry_updated_correctly(cls, db, Entry, practice_id: int, member_id: int, condition_id: int):
if practice_id is None or practice_id == 0... |
TypeScript | UTF-8 | 1,779 | 2.65625 | 3 | [] | no_license | import { Component } from "@angular/core";
import { Dice } from "../../common/dice/dice.service";
import { MagicService } from "../../common/magic/magic.service";
import { Constants } from "../../utils/constants";
import { names } from "./names.db";
@Component({
selector: "player-adventuring",
styleUrls: ["./adven... |
C | UTF-8 | 5,227 | 3.765625 | 4 | [] | no_license | #include "List1A.h"
#include "structPCB.h"
#include <stdlib.h>
#include <stdio.h>
//Documentation: If anyone wishes to use popFront(), popBack(), getFront(), or getBack(), they must first call isEmpty() and receive a boolean true
//initialize the list with the header pointing at itself
void initializeList(Lis... |
C++ | UTF-8 | 336 | 2.671875 | 3 | [] | no_license | #ifndef MUTANTSTACK_HPP
#define MUTANTSTACK_HPP
#include <stack>
template < typename T >
class MutantStack : public std::stack<T>{
public:
typedef typename std::stack<T>::container_type::iterator iterator;
iterator begin(){ return (std::stack<T>::c.begin()); };
iterator end(){ return (std::stack<T>::c.end())... |
Python | UTF-8 | 5,250 | 3.234375 | 3 | [] | no_license | from numpy import random
from colors import Colors
import pygame as pg
import numpy as np
import itertools
class Env(object):
def __init__(self, width, height, dim):
self.__screen = pg.display.set_mode((width, height))
self.__length = 30
self.__step = 75
self.__dim = dim
s... |
PHP | UTF-8 | 2,771 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Acamar-SkeletonApplication
*
* @link https://github.com/brian978/Acamar-SkeletonApplication
* @copyright Copyright (c) 2014
* @license https://github.com/brian978/Acamar-SkeletonApplication/blob/master/LICENSE New BSD License
*/
namespace Application\Model\Table\Maps;
use Acamar\Model\Mapper\MapColl... |
JavaScript | UTF-8 | 824 | 2.53125 | 3 | [] | no_license | define([
'mustache',
'text!content/talks/index.html',
'text!content/talks/mastering-javascript/prototypal-inheritance.html',
'text!content/talks/classical-inheritance-vs-modular-patterns.html'
], function(mustache, html) {
var args = [].slice.call(arguments, 2),
output = {
talks: []
},
$aux = $('<div>'),
... |
Markdown | UTF-8 | 3,229 | 3.28125 | 3 | [] | no_license | ##### Linux命令--用户、权限管理
###### whoami
- 查看当前系统当前账号的用户名。可通过 cat /etc/passwd 查看系统用户信息
###### ifconfig 查看网络状态、查看IP地址、配置网络
- windows 中使用 ipconfig
- 关闭网卡:ifconfig ens33 down
- 开启网卡:ifconfig ens33 up
- 更改IP地址:ifconfig ens33 IP地址(192.168.0.5)
###### ping
- ping 192.168.0.4 测试网络连接是否正常
###### ssh 远程登陆
- ssh ubuntu@192.168.... |
C# | UTF-8 | 905 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | using System.Linq;
using System.Collections.Generic;
using Sep.Git.Tfs.Core.TfsInterop;
namespace Sep.Git.Tfs.Core.BranchVisitors
{
public class BranchTreeContainsPathVisitor : IBranchTreeVisitor
{
private string searchPath;
private bool searchExactPath;
public BranchTreeContainsPathVi... |
Java | UTF-8 | 599 | 1.914063 | 2 | [] | no_license | package VoidMain;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import backEnd.BDD;
import backEnd.Usuario;
import frame_Principal.FramePrincipal;
import frames.FrameLogin;
import frames.FrameMovimentacao;
import frames.Frame... |
Java | UTF-8 | 143 | 1.945313 | 2 | [] | no_license | public class ObjectiveLab1{
public static void main(String[] args){
System.out.println("Andrew Conlin"); //Using println instead of print
}
}
|
Markdown | UTF-8 | 5,199 | 2.8125 | 3 | [] | no_license | # Reproducible Research: Peer Assessment 1
This report contains the analysis of activity monitoring data obtained from wearable devices. The data is obtained from https://github.com/engr3os/RepData_PeerAssessment1.
Before processing the data we will first include the R packages required for our analysis, set the work... |
PHP | UTF-8 | 976 | 2.546875 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
$database = "schooldb";
$conn = new PDO("mysql:host=$servername;dbname=$database", $username, $password);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sqlcheck = $conn->prepare('SELECT password FROM profiles ... |
C++ | UTF-8 | 586 | 2.828125 | 3 | [] | no_license | #include <iostream>
using namespace std;
int main()
{
int T, num, sum{0}, min{101}, count{0};
cin >> T;
for (int i = 1; i <= T; i++) {
for (int j = 1; j <= 7; j++) {
cin >> num;
if (num % 2 == 0) {
sum += num;
count+... |
TypeScript | UTF-8 | 2,297 | 2.59375 | 3 | [] | no_license | import { DataService } from './../data.service';
// tslint:disable: prefer-for-of
import { Component, OnInit, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';
@Component({
selector: 'app-rendering',
templateUrl: './rendering.component.html',
styleUrls: ['./rendering.component.css']
})
export clas... |
JavaScript | UTF-8 | 1,318 | 3.046875 | 3 | [] | no_license | var recent_matches = document.querySelector("#recent_matches");
var entry = document.querySelector("#entry");
var sentinel = document.querySelector("#sentinel");
const limit = 10;
let offset = 0;
function loadRecentMatches() {
fetch(`/recent_matches?limit=${limit}&offset=${offset}`)
.then((res) => res.json())
... |
JavaScript | UTF-8 | 1,265 | 2.765625 | 3 | [] | no_license | /**
* 需求:
* search并遍历所有customer下的invoice,如果存在invoice中的字段daysoverdue>=15天
* 则custentity1的值设置为true。如果所有的invoice中的字段daysoverdue全都<15天,则custentity1
* 的值设置为false。每天上午5点半更新一次,执行一次脚本。
* @param recType
* @param recId
*/
function scheduleUpdate(recType, recId) {
// 获取当前表单记录的ID和Type
var record = nlapiLoadRecord(re... |
Markdown | UTF-8 | 4,357 | 3.390625 | 3 | [] | no_license | I assure you, this is a post about programming, it'll just take a few
paragraphs to get there.
There's a biological mechanism known as _resistance_, and it plays out
in many different systems. For example, as you habitually drink more
alcohol, you gain a tolerance, which prevents you from getting drunk
as easily. This... |
Python | UTF-8 | 2,662 | 4.46875 | 4 | [] | no_license |
"""
* counter
* defaultdict
* ordereddict
* namedtuple
* deque
"""
# Counter
"""
Allows us to count things. Give it a iterable or a mapping (such as a dict) and it will turn into a counter of elements.
"""
from collections import Counter
device_temperatures = [13.5, 14.0, 14.0, 14.5, 14.5, 14.5, 15.0, 16.0]
tempera... |
PHP | UTF-8 | 380 | 2.765625 | 3 | [] | no_license | <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>VinaTAB EDU - Mon PHP</title>
</head>
<body>
<h1>Các hàm kiểm tra giá trị của biến</h1>
<?php
$a = 5;
if (isset($a)){
echo "Biến a = {$a}";
} else {
echo "Không tồ... |
Python | UTF-8 | 2,250 | 2.75 | 3 | [
"MIT"
] | permissive | #!/usr/bin/python
# -*- coding: utf-8 -*-
#author: Tianming Lu
from scipy import stats
import numpy as np
import random
def generate(D, T, I, L, N):
#generate large itemsets
correlation_level = 0.5
large_sets = []
size = 0
for i in range(L):
sz = stats.poisson.rvs(I)
if sz == 0:
... |
Python | UTF-8 | 243 | 3.015625 | 3 | [] | no_license | n=int(input())
r=[]
for _ in range(n):
s,t=map(int,input().split())
r.append([s-t,s+t])
r=sorted(r,key=lambda x: x[1])
ans=[r[0]]
for i in range(1,n):
if r[i][0]>=ans[-1][1]:
ans.append(r[i])
print(len(ans)) |
Python | UTF-8 | 4,291 | 2.953125 | 3 | [] | no_license | from gpiozero import *
from time import *
from datetime import *
import json
file = 'record_dataHL.json'
maintenance_value = 0
def open_candispencer():
global servo
servo.max()
sleep(2)
servo.min()
sleep(2)
def open_record():
'''Deze opent de Json file aan de hand van de variabele "file" bov... |
C# | UTF-8 | 1,067 | 2.734375 | 3 | [
"MIT"
] | permissive | namespace LambdaCore.Core.Factories
{
using System;
using System.Linq;
using System.Reflection;
using Interfaces.Core.Factories;
using Interfaces.Models;
public class CoreFactory : ICoreFactory
{
public ICore CreateCore(char coreName, string[] args)
{
//CreateCo... |
C | UTF-8 | 854 | 3.5 | 4 | [
"Apache-2.0"
] | permissive | /*
* Author: Jhonatan Casale (jhc)
*
* Contact : jhonatan@jhonatancasale.com
* : casale.jhon@gmail.com
* : https://github.com/jhonatancasale
* : https://twitter.com/jhonatancasale
* : http://jhonatancasale.github.io/
*
* Create date Fri 12 May 15:26:40 -03 2017
*
*/
#include ... |
C | UTF-8 | 12,136 | 3.515625 | 4 | [] | no_license | /*
Author: Jessica Barre
Email: barrej4@rpi.edu
Program name: "main.c"
Date Due: 10/3/2016
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
char* readfile(FILE *, size_t*);
char** parseExpression(char *, int *, size_t)... |
TypeScript | UTF-8 | 1,105 | 3.578125 | 4 | [] | no_license | // Importing and exporting Modules
import { Person } from './person';
export class Student{
// private firstName : string;
// public lastName : string;
// protected age : number;
readonly email : string = "abc@test.com"
// constructor(private firstName: string,
// public lastName ... |
Python | UTF-8 | 898 | 2.59375 | 3 | [] | no_license | from keras import models
from keras.models import model_from_json
from keras.preprocessing import image
import numpy as np
import os, tkinter, tkinter.filedialog, tkinter.messagebox
model = model_from_json(open('../../data/all/uni_predict.json').read())
model.load_weights('../../data/all/uni_predict.hdf5')
categories... |
C++ | UTF-8 | 821 | 3.71875 | 4 | [] | no_license | /*
Multiple left rotations of the array
Given an array of integers A and multiple values in B which represents the indices of the array A around which left rotation of the array A needs to be performed.
Find the rotated array for each value and return the result in the from of a matrix where i'th row represents the r... |
C# | UTF-8 | 2,943 | 3.109375 | 3 | [] | no_license | using System;
namespace Portal.StateBase
{
/// <summary>
/// Zusammenfassungsbeschreibung für StateMachine
/// </summary>
public class StateMachine
{
#region Membervariabeln.
/// <summary>
/// Regelwerk mit den übergängen zwischen den verfügbaren Stati.
/// </summary>
private RuleSet ru... |
C# | UTF-8 | 26,689 | 3.171875 | 3 | [] | no_license | /************************************************************************************/
/* Contact Manager System is a free application which manage two types of contacts: */
/* Faculty staffs and Students */
/* ... |
PHP | UTF-8 | 3,303 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php namespace Helpers;
/**
*This class resolves urls and returns the appropriate url string required
*
*@author Geoffrey Oliver <geoffrey.oliver2@gmail.com>
*@copyright Copyright (c) 2015 - 2020 Geoffrey Oliver
*@link http://libraries.gliver.io
*@category Core
*@package Core\Helpers\Url
*
*/
use Helpers\Ar... |
Markdown | UTF-8 | 6,379 | 3.15625 | 3 | [] | no_license | # Nama Anggota Kelompok
Nama | NIM
------------------- | -------------
Muhammad Zein I. F. | 201810370311072
Iqlima Chairunnisa | 201810370311079
Lale Wiega A. C. | 201810370311061
Sarlita Rizka A. | 201810370311075
Tanthowi Jauhari | 201810370311054
# Readme
Disini kami membuat sebuah pro... |
Python | UTF-8 | 3,429 | 2.59375 | 3 | [] | no_license | import matplotlib
import matplotlib.pyplot as plt
import pandas as pd
import re
from datetime import date
import numpy as np
def getStateLevelData(startYr, endYr):
gdp = pd.read_csv('Data/SAGDP9N__ALL_AREAS_1997_2019.csv')
gdp = gdp.iloc[:-4]
states = gdp.GeoName.unique()
states = states[:-8]
stateCodes = ['US', ... |
Markdown | UTF-8 | 948 | 3.21875 | 3 | [] | no_license | ### Chapter10 - Template - part 2
- The code in this chapter has been taken from chapter 09
- In this tutorial we will try to display the flight data in json format in a new path like **/list/json**
#### <CODE>
- First, download dependencies with `npm install`
- We added a new function to routes module:
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.