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 | 331 | 2.828125 | 3 | [
"MIT"
] | permissive | #https://inf-ege.sdamgia.ru/problem?id=10290&print=true
s = '1' + '8' * 80
while s.find('18')!= -1 or s.find('288') != -1 or s.find('3888')!= -1:
if s.find('18')!=-1:
s = s.replace('18', '2', 1)
elif s.find('288') != -1:
s = s.replace('288', '3', 1)
else:
s =s.replace('3888', '1', 1... |
Markdown | UTF-8 | 6,434 | 3.34375 | 3 | [] | no_license | ---
title: JavaScript - Depuracion
description: La utilizacion de una herramienta de depuracion es esencial para trabajar con JavaScript.
categories:
- Blog
- Javascript
comments: true
---
De vez en cuando, los desarrolladores cometen errores al codificar. Un error en un programa o un script se conoce como error... |
PHP | UTF-8 | 1,442 | 2.6875 | 3 | [] | no_license | <?php
/**
* Operand
*
* Base class for parsed operand data
*/
abstract class Operand {
public
$iKind,
$iSize,
$value,
$aBytes
;
const MAPPED = [
OperandKind::LOCAL => 'LocalOperand',
OperandKind::INDIR_0 => 'IndirectOperand',
OperandKind::IN... |
Java | UTF-8 | 620 | 2.4375 | 2 | [] | no_license | package mobi.ioio.plotter.shapes;
import java.io.Serializable;
import mobi.ioio.plotter.CurvePlotter.Curve;
import mobi.ioio.plotter.Plotter.MultiCurve;
public class SingleCurveMultiCurve implements MultiCurve, Serializable {
private static final long serialVersionUID = -8271726700104333260L;
private final float[]... |
Java | UTF-8 | 579 | 2.515625 | 3 | [] | no_license | package by.epam.webex.dao;
import by.epam.webex.dao.impl.SaxXmlDao;
public class XMLDAOFactory {
private final static XMLDAOFactory instance = new XMLDAOFactory();
public static XMLDAOFactory getInstance(){
return instance;
}
public XMLDao getDAO(DAOType type) throws XMLDaoException{
... |
C# | UTF-8 | 1,539 | 3.140625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;// this is to work with database
using System.Data;// to use the data set
namespace OOP.DL
{
public class DBHelper
{
//By making a method as static it can be call by just using the class... |
Java | UTF-8 | 1,085 | 3.375 | 3 | [] | no_license | package hackerrank.implementation;
import java.util.*;
import java.io.*;
import java.math.*;
public class BonAppetit {
public static void main(String[] args) throws IOException{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter out = new BufferedWrit... |
Markdown | UTF-8 | 7,364 | 2.609375 | 3 | [
"MIT"
] | permissive | # FunctionalStateMachine.jl
[](https://travis-ci.org/JuliaRobotics/FunctionalStateMachine.jl)
[](https://codecov.io/... |
C | UTF-8 | 255 | 3.734375 | 4 | [
"MIT"
] | permissive | #include <stdio.h>
int my_atoi( char* str )
{
int res = 0;
for (int i = 0; str[i] != '\0'; i ++)
{
res = res * 10 + str[i] - '0';
}
return res;
}
void main ()
{
char str[] = "1234";
int val = my_atoi(str);
printf("%d\n", val);
}
|
C# | UTF-8 | 930 | 3.203125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Oefening_Events
{
class Program
{
static void Main(string[] args)
{
Tankwagen wagen = new Tankwagen(200, 5000);
wagen.LooptOverEvent += Wagen_Lo... |
PHP | UTF-8 | 5,578 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace app\command;
use app\server\socketio\Simple;
use PHPSocketIO\SocketIO;
use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
use think\console\input\Option;
use think\console\Output;
use think\facade\Config;
use Workerman\Worker;
class SIO ext... |
Markdown | UTF-8 | 23,564 | 2.75 | 3 | [] | no_license | # 212.1. Configuring a router
## **212.1 Configuring a router**
**Weight:** 3
**Description:** Candidates should be able to configure a system to forward IP packet and perform network address translation \(NAT, IP masquerading\) and state its significance in protecting a network. This objective includes configuring ... |
Java | UTF-8 | 154 | 1.609375 | 2 | [] | no_license | package fr.akharroub.basededonnes.business;
import java.util.ArrayList;
public interface IAccueilBusiness {
public ArrayList<String> getvilles();
}
|
Java | UTF-8 | 765 | 2.265625 | 2 | [] | no_license | package com.example.portfolioapp;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
public class SplashActivity extends Activity implements android.view.View.OnClickListener {
ImageButton gotoMainBtn;... |
JavaScript | UTF-8 | 856 | 2.640625 | 3 | [
"MIT"
] | permissive | export default (state = [], action) => {
switch (action.type) {
case 'FETCH_CONTRACTS':
return action.allContracts
case 'USER_LOGOUT':
const allContracts = []
return allContracts
case 'CREATE_CONTRACT':
let contract = action.payload.contract
if (contract !== undefined) {
... |
C# | UTF-8 | 1,699 | 3.109375 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
using System.IO;
namespace ProjectStart
{
public class StructureTemplateManager
{
List<StructureTemplate> structureTemplates;
static string templatesPath;
public static string TemplatesPath
{
get { return templatesPath... |
Rust | UTF-8 | 3,408 | 3.625 | 4 | [
"MIT"
] | permissive | //! The `Mammoth` structure contains the general configuration for Mammoth, such as the location of
//! the modules and the log settings.
use std::path::{Path, PathBuf};
use crate::diagnostics::{Logger, PathValidator, PathValidatorKind, Validator};
use crate::error::Error;
use crate::error::severity::Severity;
/// St... |
C++ | UTF-8 | 536 | 3.328125 | 3 | [] | no_license | #ifndef AWEAPON_H
#define AWEAPON_H
#include <string>
#include <iostream>
class AWeapon
{
protected:
std::string name;
int damage;
int APCost;
public:
AWeapon();//default
AWeapon(std::string const & name, int apcost, int damage);
AWeapon(AWeapon const & src);//copy
AWeapon & operator=(AWeap... |
Python | UTF-8 | 186 | 3.0625 | 3 | [] | no_license | #!/usr/local/bin/python3.3
# -*- coding: utf-8 -*-
"""
转换并同时计算数据
"""
nums = [1, 2, 3, 4, 5]
s = sum((x * x for x in nums))
s = sum(x * x for x in nums) # 更优雅
|
Markdown | UTF-8 | 6,548 | 3.890625 | 4 | [] | no_license | # Storm the Form
Forms are handled a little bit differently in React. This is because, unlike most HTML elements, forms inputs have their own internal state stored in the DOM. Ideally we want a single-source of truth in React. We also want to be able to use the input values without having to go into the DOM and get th... |
Python | UTF-8 | 1,484 | 2.8125 | 3 | [] | no_license |
from flask import Flask, request, redirect
from pymongo import MongoClient
import logging
logs=logging.getLogger(__name__)
app = Flask(__name__)
@app.route('/test')
def test():
return "Test application"
@app.route('/')
def alpha():
# Module to Obtain the paramter from the Database.
if 'key' in request... |
Python | UTF-8 | 39,786 | 2.546875 | 3 | [] | no_license | #FUNCIONES
from maya import cmds
from maya.api import OpenMaya
def twoInfluencesConstraint(controler, constraint, reverse = False): #FUNCION QUE CONECTA LAS DOBLES INFLUENCIAS DE UN CONSTRAINT AL CONTROL QUE LO GESTIONA
name = controler.split('.')[1]
side = controler.split('_')[1]
name_reverse = '{}_... |
Java | UTF-8 | 602 | 2.515625 | 3 | [] | no_license | package spark;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.apache.spark.sql.SparkSession;
public class Example17 {
public static void main(String[] args) {
Example17 app = new Example17();
app.start();
}
privat... |
Markdown | UTF-8 | 10,195 | 3.109375 | 3 | [
"MIT"
] | permissive | ---
layout: post
author: derek
image: assets/images/blockchain.jpeg
featured: false
hidden: false
title: 10 Best Blockchain Certification, Training & Courses
date: '2018-05-31 10:00:00'
comments: true
external-url: null
categories: Blockchain
keywords: Blockchain, Training, Courses, programing, developer
excerpt: A glo... |
Markdown | UTF-8 | 959 | 3.09375 | 3 | [
"ICU",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | ---
title: " DTOJ3991雪人\t\t"
tags:
- hash
- 二分
url: 5057.html
id: 5057
categories:
- Solution
date: 2018-11-05 22:57:16
---
二哈分析。 考虑题目给出的这个性质,既然两个子串的公共差相等,我们可以将原字符串差分,那么两个子串“相等”,当且仅当两个串的差分数组相等。 由于两个重复的串对于答案的贡献不会比不重复的更优,这个答案相当于对于串长为$|l\_2-l\_1|$的子串的情况,具体画图就可以很容易的看出来。于是我们二分答案也就是子串长,那么就可以哈希然后判定了。 将所有长度为$mid$的子串hash... |
PHP | UTF-8 | 2,603 | 2.578125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"DOC"
] | permissive | <?php
/*
* Copyright (c) 2010, Josef Kufner <jk@frozen-doe.net>
*
* 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 require... |
Python | UTF-8 | 1,645 | 3.140625 | 3 | [] | no_license | import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
data= pd.read_csv('SampleSuperstore.csv')
#checking for null variables
print(data.isnull().sum()) # no null variables
print(data.shape)
#dropping columns whish dont affect
data=data.drop(['Ship Mode','Postal Code','Country'],axis=1)
print(data... |
C++ | UTF-8 | 449 | 2.5625 | 3 | [] | no_license | #include "StaticObject.h"
StaticObject::StaticObject(Texture * tex, Vector2f pos) :Object(tex, pos)
{
}
StaticObject::StaticObject(Texture * tex, Vector2f pos, std::string type_name) : Object(tex, pos)
{
this->type = type_name;
}
StaticObject::StaticObject(Texture * tex, IntRect rect, Vector2f pos) : Object(tex, ... |
Java | UTF-8 | 2,019 | 3.671875 | 4 | [] | no_license | package session4.task1;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int k = scanner.nextInt();
Car[] cars = new Car[100];
Truck[] trucks = new Truck[100];
int numberOfCars = 0;
... |
Rust | UTF-8 | 778 | 3.375 | 3 | [] | no_license | pub fn abbreviate(phrase: &str) -> String {
let mut ret = String::new();
let words = phrase.split(|c: char| !c.is_alphabetic() && c != '\'');
for word in words {
if word.is_empty() {
continue;
} else if word.ends_with(':') {
let i = word.len() - 1;
return ... |
Markdown | UTF-8 | 6,926 | 2.8125 | 3 | [] | no_license | title: Configure Okta in CITSmart
Description: Okta connects any user to any application in any device. This document explains the ideal way to connect this solution to CITSmart.
# Configure Okta in CITSmart
This authentication method allows you to use the Okta features to authenticate users of your organization in a ... |
Java | UTF-8 | 189 | 1.5 | 2 | [] | no_license | package property_objects.wrappers;
import lombok.Data;
import property_objects.AccountProperties;
@Data
public class AccountPropertiesWrapper {
AccountProperties accountProperties;
}
|
Java | UTF-8 | 1,824 | 2.890625 | 3 | [] | no_license | package com.bravo.meli.adn.negocio.interfaces;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.bravo.meli.adn.negocio.excepciones.DatosInvalidosException;
import com.bravo.meli.adn.negocio.excepciones.ErrorCode;
public interface Validable {
public static final Pattern patronBasesInvalidas... |
C# | UTF-8 | 652 | 3.09375 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Task01ExtractEmails
{
class Task01ExtractEmails
{
static void Main(string[] args)
{
Regex reg = new Regex(@"(?<=\s)[a... |
Java | UTF-8 | 3,523 | 2.28125 | 2 | [
"MIT"
] | permissive | /*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
* See License.txt in the project root for license information.
*/
package com.microsoft.azure.datalake.store.oauth2;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
/**
* Provid... |
Java | UTF-8 | 1,792 | 2.46875 | 2 | [
"MIT"
] | permissive | /*==============================================================================
Copyright (c) 2012-2013 Qualcomm Connected Experiences, Inc.
All Rights Reserved.
==============================================================================*/
package com.qualcomm.vuforia.samples.VideoPlayback.app.VideoPlayback;
p... |
Java | UTF-8 | 2,635 | 2.125 | 2 | [] | no_license | package com.java.controller;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.an... |
TypeScript | UTF-8 | 3,237 | 3.125 | 3 | [] | no_license | import { createEntityAdapter, EntityAdapter, EntityState } from '@ngrx/entity';
import { Attendance } from '../../model/member';
import { AttendanceActionsUnion, AttendanceActionTypes } from '../actions/attendance.actions';
import {
AttendanceCollectionActionsUnion,
AttendanceCollectionActionTypes,
} from '../actio... |
Java | UTF-8 | 830 | 2.34375 | 2 | [] | no_license | package com.sonihr.batis.executor.parameter;/*
@author 黄大宁Rhinos
@date 2019/6/3 - 15:38
**/
import com.sonihr.batis.session.Configuration;
import com.sonihr.batis.utils.ParametersUtil;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
public class Defaul... |
C++ | UTF-8 | 23,971 | 2.515625 | 3 | [
"MIT"
] | permissive | // This file is distributed under the MIT license.
// See the LICENSE file for details.
#pragma once
#ifndef VSNRAY_MATH_SIMD_GATHER_H
#define VSNRAY_MATH_SIMD_GATHER_H 1
#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wignored-attributes"
#endif
#include <cstddef>
#include <cstdi... |
C++ | UTF-8 | 2,598 | 3.984375 | 4 | [] | no_license | //访问和封装控制
#include <string>
#include <iostream>
class Sales_data //用class,在第一个访问说明符之前的都是private
//struct Sales_data //用struct,在第一个访问说明符之前的都是public
{
friend std::istream &read(std::istream &is, Sales_data &item); //声明为友元函数,就可以不受访问限制
friend std::ostream &print(std::ostream &os, const Sales_data &item); //类... |
Java | UTF-8 | 3,618 | 3.171875 | 3 | [] | no_license | package brus.brus_723_System_InputOutput.b782_ZipCompress;
//: io/ZipCompress.java
// Использование формата ZIP для сжатия любого
// количества файлов, указанных в командной строке.
// {Параметры. ZipCompress java}
import java.util.zip.*;
import java.io.*;
import java.util.*;
public class ZipCompress {
public stat... |
Java | UTF-8 | 2,993 | 2.421875 | 2 | [] | no_license | package com.aidankelly.projectmanager.activities;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import com.aidankelly.projectmanager.R;
import com.aidankelly.projectmanager.entities.UserProject;
import... |
Python | UTF-8 | 411 | 4.40625 | 4 | [] | no_license | # 11. Write a Python program to count the occurrences of each word in a given
# sentence
def occurance_count(str):
counts = dict()
words = str.split()
for word in words:
if word in counts:
counts[word] += 1
else:
counts[word] = 1
return counts
usr_input = inp... |
C | UTF-8 | 4,623 | 2.75 | 3 | [] | no_license | #include "localization.h"
// buffer for m_wii data
//unsigned int blobs[12] = {355,361,0,358,304,0,423,385,0,403,294,0};
unsigned int blobs[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
unsigned int *x1 = &blobs[0]; unsigned int *y1_ = &blobs[1]; unsigned int *s1 = &blobs[2];
unsigned int *x2 = &blobs[3]; unsigned int *y2 = &blobs... |
C# | UTF-8 | 4,306 | 2.625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Xml;
using System.IO;
namespace ProjectBugzilla
{
public static class Config
{
private static Dictionary<string, string> _system;
private static string _userConfigFile = "Config\\UserConfig... |
Shell | UTF-8 | 5,354 | 4.0625 | 4 | [
"MIT"
] | permissive | #!/bin/sh
# -*- coding: utf-8 -*-
#
# Dieses Skript erzeugt Differenzbilder (diff) für die
# Patgen-Eingabelisten zwischen zwei angegebenen Commits. Wird nur ein
# Commit angegeben, wird als Zielcommit "master" verwendet. Die
# Ausgabedateien werden als Dateien
#
# dehyph*-x/<Start-Commit-Hash>-<Ziel-Commit-Hash>.d... |
Shell | UTF-8 | 313 | 3.09375 | 3 | [
"BSD-3-Clause"
] | permissive | #!/bin/sh
if [ -z "$MMDAPP" ] ; then
set -e
export MMDAPP="$( cd $(dirname "$0")/../../../../../.. ; pwd )"
echo "$0: Working in: $MMDAPP" >&2
[ -d "$MMDAPP/source" ] || ( echo "expecting 'source' directory." >&2 && exit 1 )
fi
"$MMDAPP/source/myx/myx.distro-prepare/sh-scripts/RebuildSourceActions.fn.sh"
|
Java | UTF-8 | 663 | 3.921875 | 4 | [] | no_license | package Unit5.ForEach;
// Поиск в массиве с использованием расширенного цикла for
public class Search {
public static void main(String[] args) {
int[] num = {6, 8, 3, 7, 5, 6, 1, 4};
int val = 5;
boolean found = false;
// Использование цикла for-each для поиска
// переменн... |
Python | UTF-8 | 298 | 2.5625 | 3 | [] | no_license | """
Name : 4375OS_09_02_payoff2.py
Book : Python for Finance
Publisher: Packt Publishing Ltd.
Author : Yuxing Yan
Date : 12/26/2013
email : yany@canisius.edu
paulyxy@hotmail.com
"""
s = arange(10,80,5)
x=30
y=(abs(s-x)+s-x)/2
ylim(-10,50)
plot(s,y)
show()
... |
Java | UTF-8 | 443 | 3.203125 | 3 | [] | no_license | package ru.geekbrains.lesson1.homework;
public class Element<Type> {
private Type element;
public Element(Type obj) {
this.element = obj;
}
public void setElement(Type element) {
this.element = element;
}
public Type getElement() {
return element;
... |
Markdown | UTF-8 | 1,620 | 3.125 | 3 | [] | no_license | # Python-Utility-Script-for-INFO-I535
This script is used in the course to download, extract, transform and load NOAA Storm events dataset into MongoDB.
It will also create two directories - landDir and extractDir in the script path.
Commands:
1. To see its usage, you can also use the following command:
> python pro... |
Ruby | UTF-8 | 420 | 2.8125 | 3 | [] | no_license | class TurntableBot
def message user, with
pm user.id, with
end
def someone_messaged phrase, &block
on :pmmed do |message|
phrase = [phrase] if [String, Regexp].include? phrase.class
phrase.each do |listen_for|
if listen_for.match message.text
message.parts = message.text.m... |
C# | UTF-8 | 877 | 2.5625 | 3 | [
"MIT"
] | permissive | using Consul;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Adnc.Infra.Consul.Consumer
{
public class ServiceConsumer
{
public static async Task<List<string>> GetServicesAsync(string consulAddress, string serviceName)
{
var consulClient = n... |
C | UTF-8 | 22,733 | 3.34375 | 3 | [] | no_license | #include "stringv.h"
#include <assert.h>
#include <string.h>
/* block_pos is an integral quantity that uniquely determines a block in a
* stringv. It is defined in terms of a string_pos because in a one-to-one
* stringv (ie. stringv->block_used == stringv->string_count) a string_pos
* and block_pos may be used int... |
Python | UTF-8 | 378 | 3.671875 | 4 | [] | no_license | def dec2(func9):
def wrapper(a,b):
print('The first argument is'+str(a))
print('The second argument is'+str(b))
rez = func9(a,b)
return rez
return wrapper
@dec2
def func9(a,b):
x = b / a
return x
a = int(input('input a: '))
b =int(input('inpu... |
Java | UTF-8 | 890 | 2.625 | 3 | [] | no_license | package com.shizuku.mail.core.pop3;
import com.shizuku.mail.util.EmailAddress;
/**
* This is an interface to define some functions about the pop users
* who are online.
*/
public interface Pop3User {
/**
* Check user is online or not. A user can't login two times at the same
* time before logout.
... |
C++ | UTF-8 | 2,613 | 3.46875 | 3 | [] | no_license | /*
* @lc app=leetcode.cn id=299 lang=cpp
*
* [299] 猜数字游戏
* 4.20 每日一题
*/
// @lc code=start
#include<string>
#include<unordered_map>
using namespace std;
class Solution {
public:
string getHint(string secret, string guess) {
#if 0
/*方法一:hash_map --8ms
解题思路:
情况一:数字相同位置相同,比较容易统计,两... |
C# | UTF-8 | 2,684 | 3.265625 | 3 | [] | no_license | using MovieListingsApp.Contracts.Services;
using MovieListingsApp.Core.Contracts.Repositories;
using MovieListingsApp.Entities;
using MovieListingsApp.Models.MovieModels;
using System;
using System.IO;
using System.Threading.Tasks;
namespace MovieListingsApp.Services
{
public class MoviesService : IMoviesService
... |
C# | UTF-8 | 1,651 | 2.5625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"BSD-2-Clause",
"MIT"
] | permissive | using System;
using System.IO;
using System.Text;
using Newtonsoft.Json;
using Wirehome.Core.Hardware.MQTT;
namespace Wirehome.Core.MessageBus;
public sealed class MessageBusSender
{
readonly MemoryStream _buffer = new();
readonly MqttService _mqttService;
public MessageBusSender(MqttService mqttService... |
Java | UTF-8 | 1,316 | 3.828125 | 4 | [] | no_license | import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;
/**
* Escribir un programa que en el método main, solicite un nombre y muestre "Hola <nombre
* ingresado>" y debajo, la fecha y hora actual con el siguiente formato de ejemplo "viernes
* 20/04/2018 18:00". Validar que el mensaje no ... |
Java | UTF-8 | 9,254 | 1.789063 | 2 | [] | no_license | package se.kth.livetech.presentation.layout;
import java.awt.AlphaComposite;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JFrame;
import javax.swi... |
JavaScript | UTF-8 | 3,439 | 3 | 3 | [] | no_license | var bgImages=
[
'https://assets.codepen.io/t-1/maksim-larin-jZyacqaR4iI-unsplash.jpg',
'https://assets.codepen.io/t-1/daniel-storek-JM-qKEd1GMI-unsplash.jpg',
'https://assets.codepen.io/t-1/felipepelaquim-6zO5VKogoZE-unsplash.jpg',
];
var offer = document.getElementById("offer");
var offerHeader = document.... |
C++ | UTF-8 | 1,648 | 3.078125 | 3 | [] | no_license | // https://leetcode.com/problems/range-sum-query-mutable/
// segment tree
class NumArray {
public:
vector<int> tree;
int get_mid(int a, int b) {
return a + (b - a) / 2;
}
int query(int index, int s, int e, int qs, int qe) {
if (s >= qs and e <= qe) return tree[index];
... |
Go | UTF-8 | 3,195 | 2.609375 | 3 | [] | no_license | package control
import (
"net/http"
"net/http/httptest"
"testing"
"github.com/rabelais88/portfolio2020/api/constants"
"github.com/rabelais88/portfolio2020/api/app"
"github.com/gavv/httpexpect/v2"
"github.com/rabelais88/portfolio2020/api/model"
)
func TestGetArticle(t *testing.T) {
handler, db := mountTestA... |
Swift | UTF-8 | 3,853 | 2.796875 | 3 | [] | no_license | //
// ViewControllerTemp.swift
// Nutrient+
//
// Created by Huanlei Wu on 10/20/19.
// Copyright © 2019 Robert Sato. All rights reserved.
//
// Followed "iOS Text Field Tutorial - Accepting User Input" by Code Pro
// local database tutorial: https:// stackoverflow.com/questions/28628225/how-to-save-local-data-in-a... |
Java | UTF-8 | 3,687 | 2.03125 | 2 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*
* Copyright 2013-2018 Guardtime, Inc.
*
* This file is part of the Guardtime client SDK.
*
* 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/LICENS... |
PHP | ISO-8859-2 | 1,498 | 2.609375 | 3 | [] | no_license | <?php
/**
* Hunting z Stats Output als XMP-File
* @package zorg\Games\HuntingZ
*/
/**
* File includes
*/
require_once dirname(__FILE__).'/../includes/config.inc.php';
require_once INCLUDES_DIR.'mysql.inc.php';
require_once INCLUDES_DIR.'util.inc.php';
$ge = $db->query(
"SELECT g.id, if(sum(a.score)-g.z_score > g... |
Go | UTF-8 | 1,693 | 3.015625 | 3 | [] | no_license | package gojs
import (
"fmt"
"github.com/dop251/goja"
"reflect"
)
type JSObject struct {
j *JSRunner
obj *goja.Object
}
func (jo *JSObject) Call(method string, args ...interface{}) (goja.Value, error) {
met := jo.obj.Get(method)
if met == nil {
return nil, fmt.Errorf("Got nil value for %s ", method)
}
v... |
Java | UTF-8 | 1,739 | 3.859375 | 4 | [
"MIT"
] | permissive | package models.classes;
import java.util.Objects;
/**
* This represents a 2D dimension (X, Y).
*/
public class Position {
private int x, y;
/**
* Generates a {@link Position} without coordinates.
*/
public Position() {
}
/**
* Generates a {@link Position} with x and y coordina... |
SQL | UTF-8 | 582 | 3.078125 | 3 | [] | no_license | SELECT A.ORDER_ID,
A.SERIAL_NUMBER,
A.USER_ID,
A.ADD_MONTH,
A.ADD_DATE,
A.ADD_TIME,
A.ADD_WHOLE_DATE,
A.GIVE_POINT,
A.PERIOD_OF_VALIDITY,
A.ACTIVITY_ID,
A.ACTIVITY_TITLE,
A.REMARKS
FROM TL_B_WECHAT_SCORE A
WHERE A.USER_ID = :USER_ID
AND ... |
C++ | UTF-8 | 457 | 2.96875 | 3 | [] | no_license | class Solution {
public:
int searchInsert(vector<int>& A, int target) {
int size = A.size();
if( !size ) return 0;
int l,m,r;
l = 0;
r = size - 1;
while(l <= r)
{
m = (l + r) >> 1;
if( A[m] == target ) return m;
... |
Markdown | UTF-8 | 17,304 | 2.984375 | 3 | [
"MIT"
] | permissive | Описание задач, решение которых приведено в данном репозитории:
1. Создать массив 10×10, присвоить его элементам случайные значения в интервале от 0 до 10. Вывести массив на экран.
Запросить у пользователя число Х, уточнив, что его значение должно находиться в интервале от 1 до 10. Если
пользователь вводит Х... |
Python | UTF-8 | 3,709 | 3.03125 | 3 | [] | no_license | import csv
from appl.domainmodel.movie import Movie
from appl.domainmodel.genre import Genre
from appl.domainmodel.actor import Actor
from appl.domainmodel.director import Director
# noinspection DuplicatedCode
class MovieFileCSVReader:
dataset_of_movies: list
dataset_of_actors: set
dataset_of_directors: ... |
Java | UTF-8 | 3,808 | 2.6875 | 3 | [] | no_license | package com.masi4.UI.gameInventory;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.ProgressBar;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
import com.masi4.gameh... |
Python | UTF-8 | 528 | 3.78125 | 4 | [] | no_license | #filter,map,lambda
# returning only even numbers..another way using lambda
print("\n")
numbers = [1,56,234,87,4,76,24,69,90,135]
new = filter ((lambda x: x%2==0), numbers)
print (list(new))
# returning only even numbers..another way using lambda
print("\n")
numbers = [1,56,234,87,4,76,24,69,90,135]
new = map ((lambda... |
Python | UTF-8 | 3,774 | 2.6875 | 3 | [
"MIT"
] | permissive | from __future__ import print_function
import cv2
import numpy as np
import argparse
from math import sqrt
###################################
## Align equirectangular image ##
## (Get homography matrix) ##
###################################
## [load]
# left_img_file = './captured_img/3264x2448_fisheye/640x48... |
Java | UTF-8 | 4,756 | 2.34375 | 2 | [] | no_license | package payment;
import java.io.IOException;
import database.Database;
import interceptor.contextObjects.PaymentInfoContext;
import interceptor.dispatchers.ClientRequestDispatcher;
import media.GameClass;
import media.MediaItem;
import media.PlatformChoice;
import program.I_Receiver;
import userInterface.U... |
Python | UTF-8 | 80 | 3.125 | 3 | [] | no_license | a = input()
if 'H'in a or 'Q' in a or '9' in a:
print('YES')
else:
print('NO') |
Java | UTF-8 | 1,190 | 2.34375 | 2 | [] | no_license | package StepDefinitions;
import com.edgenetworks.utilities.TestBase;
import cucumber.api.java.en.Then;
public class CreateRR_ViaCSVStepdefinition extends TestBase
{
@Then("^Click on Create RR via csv option in dashboard\\.$")
public void click_on_Create_RR_via_csv_option_in_dashboard() throws Throwable {
}
... |
PHP | UTF-8 | 771 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSubscriptionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up(): void
{
Schema::create('sub... |
Shell | UTF-8 | 129 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | #!/bin/bash
# Wait for Connect to be ready before exiting
while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do
sleep .5
done |
Java | UTF-8 | 498 | 1.71875 | 2 | [
"MIT"
] | permissive | package com.bancoexterior.app.convenio.services;
import java.util.List;
import com.bancoexterior.app.convenio.dto.MonedasRequest;
import com.bancoexterior.app.convenio.model.Moneda;
public interface IMonedaService {
public List<Moneda> buscarTodas();
public Moneda findById(String codMoneda);
public void ... |
Shell | UTF-8 | 484 | 3.21875 | 3 | [] | no_license | #!/bin/bash
START=$(date +%s)
ARG1=${1:-1000}
ARG2=${2:-foo}
HOST='localhost'
PORT='8888'
x=1
while [ "$x" -lt "$ARG1" ] ; do
payload='{"from": "user", "to": "tester", "quantity": "0.0001 EOS", "memo": "m'"$ARG2""$x"'"}'
#echo $payload
cleos -H $HOST -p $PORT --wallet-host localhost --wallet-port 8000 push ... |
Java | UTF-8 | 1,989 | 2.046875 | 2 | [] | no_license | package com.example.ryan.bottomnavigation.admin.Regist;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7... |
Java | UTF-8 | 2,321 | 2.296875 | 2 | [] | no_license | package lili.tesla.lushertest.presentation.screen.table3.presenter;
import lili.tesla.lushertest.presentation.application.App;
import lili.tesla.lushertest.presentation.screen.table3.view.Table3View;
import lili.tesla.lushertest.presentation.screen.base.BasePresenter;
/**
* Created by Лилия on 02.11.2017.
*/
publi... |
C | UTF-8 | 2,970 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | /******************************************************************************
* Copyright (c) 2019 Jason T. Harris. (sirmanlypowers@gmail.com)
*
* SPDX-License-Identifier: Apache-2.0
*
* BiQuad Filter
* See: http://www.earlevel.com/main/2003/02/28/biquads/
*/
#include "ggm.h"
#include "filter/filter.h"
/****... |
Java | UTF-8 | 171 | 2.3125 | 2 | [] | no_license | package week3.day1.classroom;
public class AndriodPhone extends Mobile {
public void takeViedo() {
System.out.println("taking viedo in Andridphone");
}
}
|
Markdown | UTF-8 | 859 | 3.03125 | 3 | [] | no_license | Chitter Challenge
=================
This is the week four weekend challenge @ Makers. This weekend I am making a Twitter clone, nicely named 'Chitter', users will post messages, each is called a 'Peep'. The challenge will follow TDD, CRUD and OOD principles, and put to practice this week's learning of databases within... |
PHP | UTF-8 | 1,183 | 2.71875 | 3 | [] | no_license | <?php
/**
* ampinstant-cf Project
* @package ampinstant-cf
* User: dankerizer
* Date: 06/11/2017 / 16.44
*/
class ampinstantcf_Filter
{
var $fromEmail;
var $fromName;
function wp_mail_from ($orig) {
// This is copied from pluggable.php lines 348-354 as at revision 10150
// http://trac.wordpress.org/brows... |
SQL | UTF-8 | 3,922 | 3.140625 | 3 | [] | no_license | SELECT
SQ.SHIP_TO_CUST_ID,
SQ.SHIP_TO_CUST_NAME,
SQ.OWN_CUST_ID,
SQ.OWN_CUST_NAME,
SQ.FACILITY_ID,
SQ.FRDD,
SQ.FCDD,
SUM( SQ.ORDER_QTY ) AS ORDER_QTY,
SUM( SQ.CNFRM_QTY ) AS CNFRM_QTY,
SUM( SQ.CNFRM_QTY * SQ.UNIT_WT ) AS WT,
SUM( SQ.CNFRM_QTY * SQ.UNIT_COMPRESSED_VOL ) AS CMP... |
JavaScript | UTF-8 | 770 | 2.703125 | 3 | [] | no_license | const app = document.getElementById("app")
class Task extends React.Component {
edit(){
alert("Нажата кнопка редактировать")
}
remove(){
alert("Нажата кнопка удалить")
}
render() {
return(
<div className="box">
<div className="text">{thi... |
Shell | UTF-8 | 271 | 3.015625 | 3 | [] | no_license | #!/bin/bash
set -e
[ ! -n "$1" ] && exit 1
SERVER=$1
shift
ARGS=$*
PUPPET_TMP=/tmp/hdo-puppet-rsync
rsync -a --delete puppet "${SERVER}:${PUPPET_TMP}"
ssh -t $SERVER "sudo puppet apply --modulepath=${PUPPET_TMP}/puppet/modules/ ${PUPPET_TMP}/puppet/site.pp ${ARGS}"
|
Markdown | UTF-8 | 492 | 2.609375 | 3 | [
"MIT"
] | permissive | # Banking system
Really cheap take on something that should be a banking system.
*I used Yarn but npm is fine too.*
## Installing
1. Make sure you have `DATABASE_URL` enviromental variable that points to your local or [Mongo Atlas](https://www.mongodb.com/cloud/atlas) MongoDB.
1. `yarn install`
## Populate DB
```
y... |
Python | UTF-8 | 1,487 | 3.78125 | 4 | [] | no_license | ''' This one line outlines the module content
Here we see the detailed Discription of the Module:
Make clear how to comment and structure your code so that other can read and use it.
Have a look at the content of https://github.com/alnkpa/pycc/wiki/Coding-style
'''
# import in the beginning
import sys
class OurClass... |
Java | UTF-8 | 1,194 | 2.21875 | 2 | [] | no_license | package com.run.boot;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestM... |
Ruby | UTF-8 | 885 | 3.484375 | 3 | [] | no_license | class LinkedListNode
attr_accessor :value, :next_node
def initialize(value, next_node = nil)
@value = value
@next_node = next_node
end
end
def print_values(list_node)
print "#{list_node.value} --> "
if list_node.next_node.nil?
print "nil\n"
return
else
print_values(list_node.next_node... |
Java | UTF-8 | 2,241 | 3.84375 | 4 | [] | no_license | package fan;
import java.util.Iterator;
/**
* This is the class implementing typical FIFO Queue with that difference that
* some parameters are measured in bytes instead of packets as units.
* @see FifoQueue
*/
public class FifoQueueBytes extends FIFOQueue {
private int totalSize;
/**
* Holds the i... |
SQL | UTF-8 | 497 | 2.828125 | 3 | [
"MIT"
] | permissive | DROP TABLE IF EXISTS leagues;
CREATE TABLE leagues (
id SERIAL PRIMARY KEY,
abbreviation VARCHAR(3),
name VARCHAR(255)
);
DROP TABLE IF EXISTS divisions;
CREATE TABLE divisions (
id SERIAL PRIMARY KEY,
league_id SERIAL NOT NULL,
name VARCHAR(25)
);
DROP TABLE IF EXISTS teams;
CREATE TABLE teams (
id SER... |
Markdown | UTF-8 | 6,477 | 3.96875 | 4 | [] | no_license | # Testing
## Testing the signup form on `signup.html`:
- When the form is submitted with no username, it prompts you to fill in the username.

- When the form is submitted with a username that is too short it prompts you to change the length of the us... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.