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 | 263 | 3.796875 | 4 | [] | no_license | #desenvolva um programa que leia duas notas de um aluno, calcule e mostr a sua média
nota1 = float(input("digite a primeira nota: "))
nota2 = float(input("digite a segunda nota: "))
soma = nota1+nota2
media = soma/2
print("a sua média é: {}".format(media))
|
C | UTF-8 | 544 | 3.078125 | 3 | [] | no_license | #include <stdio.h>
int main() {
int i = 0;
int count = 1;
short goal = 0;
char verbose_bool = 0;
char tc_count = 10;
printf("어디까지 합을 구하시겠습니까? : ");
scanf("%hd", &goal);
printf("합 계산 과정을 출력하시겠습니까? (예 : 1, 아니오 : 0) : ");
scanf("%hhd", &verbose_bool);
while (count <= goal) {
while (tc_count >= 1) {
if (ve... |
C | UTF-8 | 2,667 | 3.046875 | 3 | [] | no_license | #include <stdio.h>
#include "image.h"
#define SKIP 1
#define SAMPLE 4
#define THRESHOLD 0
uint32_t findMin(image* imgS, image* imgL, point* where);
uint32_t getScore(image* imgS, image* imgL, int offX, int offY);
uint32_t difPixel(col A, col B);
//there should be 2 arguments (for now)
//1st argument: the file with a... |
Python | UTF-8 | 315 | 3.46875 | 3 | [] | no_license | '''i = 0
while(i<7):
print(i)
i +=1'''
'''i = 1
while i<6:
print(i)
if i==3:
break
i +=1'''
'''i = 0
while(i<6):
i +=1
if (i==3):
continue
print(i)'''
'''i = 1
while(i<6):
print(i)
i +=1
#print(i)
else:
print("i is no longer less than 6")'''
|
C++ | UTF-8 | 766 | 4.125 | 4 | [] | no_license | // 经典的二分查找算法,适用于递增数组
int BinarySearch(vector<int> nums, int N){
int left = 0, right = nums.size() - 1;
int mid = 0;
while(left <= right){
mid = (left + right) / 2;
if(nums[mid] < N) left = mid + 1;
else if(nums[mid] > N) right = mid - 1;
else return mid;
}
r... |
Python | UTF-8 | 706 | 3.078125 | 3 | [] | no_license | # -*- coding: utf-8 -*-
def checkio(number):
from math import sqrt
num = int(sqrt(number*2))
triangular_numbers = [int(i*(i+1)/2) for i in range(num)]
result = []
tmp = 0
for i in triangular_numbers:
tmp +=i
if i!=0: result.append(i)
if tmp == number:
break
... |
C++ | GB18030 | 1,214 | 3.515625 | 4 | [] | no_license | #include<iostream>
#include<vector>
using namespace std;
//Ŀ
//HZżЩרҵЩǼרҵͬѧ鿪,
//ַ:ڹϵһάģʽʶ, Ҫ,
//ȫΪʱ, ܺý, а, Ƿ
//Ӧðij, Աߵֲأ
// : {6, -3, -2, 7, -15, 1, 2, 2}, Ϊ8(ӵ0ʼ, 3Ϊֹ)
//ᱻס(ij1)
//һȷ ۻͱǸ Ŷдٽõ,Ǹ,Ϊкܺͣtotal
//max,¼max
class Solution {
public:
int FindGreatestSumOfSubArray(vector<int> array) {
if (a... |
C# | UTF-8 | 4,485 | 2.703125 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
namespace GlobalcachingApplication.Plugins.Browser
{
public class BrowserScriptPocketQueriesPQSeries
{
public string ID { get; set; }
public string SettingsID { get; set; }
public st... |
Markdown | UTF-8 | 3,347 | 3.4375 | 3 | [] | no_license | # What Makes a Good Flag?
## 1. Simplicity
Our city is complicated and intricate, but our flag doesn’t have to be. A good flag is made up of only a few main visual elements. You should be able to describe it accurately to someone who’s never seen it before. A child should be able to draw it freehand from memory.
## 2... |
Java | UTF-8 | 20,941 | 1.835938 | 2 | [
"Apache-2.0"
] | permissive | package com.github.hollykunge.security.admin.entity;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;
@Table(name = "BASE_USER")
public class User {
@Id
@Column(name = "ID")
private Integer id;
@Column(na... |
Java | UTF-8 | 7,789 | 1.851563 | 2 | [] | no_license | package com.km.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions;
import org.sp... |
Java | UTF-8 | 622 | 2.234375 | 2 | [] | no_license | package com.example.smartalarm;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
public class Alarm_Receiver extends BroadcastReceiver
{
@Override
public void onReceive(Context context, Intent intent) {
Log.e("the receive... |
C++ | UTF-8 | 3,851 | 3 | 3 | [] | no_license | #include "song/pattern.h"
#include "gui/song/patterngui.h"
#include <cmath>
#include <iostream>
/*typedef std::vector<SafePtr<Note> > NoteRecord;
class Pattern {
public:
Pattern() {}
~Pattern() {}
private:
std::map<float, NoteRecord> _data;
};*/
using namespace std;
Pattern::~Pattern() {
map<floa... |
Python | UTF-8 | 3,177 | 3.1875 | 3 | [] | no_license | # coding=utf-8
import os
import audioread
import shutil
def Main():
data = getData()
getDataFiles(data["directory"], data["filename"], data["destination"])
def getData():
directory = raw_input("Directory: ")
filename = raw_input("Filename: ")
destination = raw_input("destination (Esta carpeta debe estar pr... |
Java | UTF-8 | 1,726 | 2.375 | 2 | [] | no_license | package com.myfitnesspal.feature.challenges.service;
import android.content.Context;
import com.myfitnesspal.feature.challenges.model.Challenge;
import com.myfitnesspal.framework.taskrunner.EventedTaskBase;
import com.myfitnesspal.framework.taskrunner.TaskDetails;
import com.myfitnesspal.framework.taskrunner.TaskEvent... |
JavaScript | UTF-8 | 767 | 3.09375 | 3 | [] | no_license | // var login = document.getElementById("login");
var register = document.getElementById("register");
// login.onsubmit = function()
// {
// if(login.username.value == ''){
// alert("No email provided");
// return false;
// }
// else if(login.password.value == ''){
// alert("No passw... |
Shell | UTF-8 | 352 | 3.078125 | 3 | [] | no_license | #!/bin/bash
n=10
if [ $# -gt 0 ]
then
n=$1
else
echo $n "rules by default"
fi
echo "Put some rules to bf"
while [ "$n" -gt 0 ]
do
./netlink_cmd --new INPUT --srcport $(( ( RANDOM % 1500 ) + 1 )) --proto UDP
./netlink_cmd --new INPUT --srcport $(( ( RANDOM % 1500 ) + 1 )) --proto TCP
echo... |
PHP | UTF-8 | 877 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/*
* UserFrosting (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/UserFrosting
* @copyright Copyright (c) 2019 Alexander Weissman
* @license https://github.com/userfrosting/UserFrosting/blob/master/LICENSE.md (MIT License)
*/
namespace UserFrosting\Sprinkle\Core\Database\Mod... |
Java | UTF-8 | 1,724 | 1.984375 | 2 | [] | no_license | package es.proojec.domain.models;
import java.util.List;
/**
* Created by ggb191983 on 08/09/2017.
*/
public class UserDTO extends ObjectDTO {
private String email;
private String username;
private String password;
private String description;
private String accessToken;
private String faceb... |
Java | UTF-8 | 361 | 2.734375 | 3 | [] | no_license | package com.CodingBat;
import java.util.Scanner;
public class Solution5 {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
String A = sc.next();
System.out.println(startHi(A));
}
public static boolean startHi(String str) {
return str.startsWith("H") || str.st... |
Python | UTF-8 | 5,268 | 2.53125 | 3 | [] | no_license | '''
Created on 18 Mar 2016
@author: Davey
'''
import kivy
import sqlite3
import pickle
import os.path
from kivy.uix.widget import Widget
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.graphics import Color, Line, Rectangle, Ellipse
from kivy.core.window import Window
from kivy.uix.slider import Sl... |
Markdown | UTF-8 | 968 | 3.109375 | 3 | [] | no_license | # Short Rib Meatballs
Juicy meatballs with enough flavor to be the star of a dish.
## Ingredients
- **~1lb** beef short ribs
- **~1/3 cup** bread crumbs
- **~1/3 cup** cream
- **~1/3 cup** Parmesan or Pecorino, or both
- **~1 tsp** garlic powder
- **~1 tsp** onion powder
- **~1/2 tsp** cayenne pepper
- black pepper, to... |
Python | UTF-8 | 768 | 3.5 | 4 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Wed Dec 30 18:42:00 2020
@author: pedro
O objetivo de __repr__ é ser não ambíguo.
O objetivo de __str__ é ser legível.
"""
# https://www.youtube.com/watch?v=5cvM-crlDvg&list=PL-osiE80TeTt2d9bfVyTiXJA-UTHn6WwU&index=50
##################################################
global... |
Python | UTF-8 | 894 | 3 | 3 | [] | no_license | from .actions.currency import get_rate
from .action import ActionFunc, ActionText
class Command:
list_of_commands = [
ActionText(['привет, бот', 'бот, привет', 'привет бот', 'бот привет'], "Приветствую, @id{user_id}({username})"),
ActionFunc(['текущий курс'], get_rate)
]
def __init__(se... |
C++ | UTF-8 | 2,125 | 2.8125 | 3 | [] | no_license | /*
* Matriz de pontos flutuantes para um sistema gráfico interativo
* Copyright (C) 2016 <Luís Gustavo Lorgus Decker> <decker@incod.ufsc.br>
* <Cesar Smaniotto Júnior> <cesarsjb@gmail.com>
**
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Gener... |
Java | UTF-8 | 2,039 | 2.34375 | 2 | [] | no_license | package com.kodamalabs.festivalinverno.fragments;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.I... |
Java | UTF-8 | 4,985 | 2.25 | 2 | [] | no_license | package com.teamunemployment.breadcrumbs.Weather;
import android.app.IntentService;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.location.Location;
import android.location.LocationListener;
import android.os.Bundle;
import android.preference.Pref... |
Java | UTF-8 | 1,414 | 2.125 | 2 | [
"Apache-2.0"
] | permissive | package kr.co.popone.fitts.feature.identification.view;
import dagger.MembersInjector;
import javax.inject.Provider;
import kr.co.popone.fitts.feature.identification.viewmodel.IdentificationAdditionalInfoViewModel;
public final class IdentificationAdditionalInfoFragment_MembersInjector implements MembersInjecto... |
Python | UTF-8 | 495 | 2.546875 | 3 | [] | no_license | import requests
import json
from datetime import datetime
# def jprint(obj):
# text = json.dumps(obj, sort_keys= True, indent = 10)
# return text
def apod():
response = requests.get('https://api.spaceflightnewsapi.net/v3/blogs')
response_json = response.json()
T = []
U = []
I = []
info =[]
for i in response... |
Java | UTF-8 | 3,151 | 2.15625 | 2 | [] | no_license | package com.focowell.model;
import java.util.Date;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistenc... |
Python | UTF-8 | 800 | 3.34375 | 3 | [] | no_license | import matplotlib.pyplot as plt
import csv
temperature = []
temperature_smooth = []
with open("C:/Users/ilker/Documents/weather.csv") as file:
csv_reader = csv.reader(file, delimiter=',')
for row in csv_reader:
temperature.append(float(row[1]))
temperature_smooth.append(temperature[0])
for i in range(... |
Go | UTF-8 | 2,198 | 3.28125 | 3 | [] | no_license | package main
import (
"container/heap"
"fmt"
"io/ioutil"
"strconv"
"strings"
)
type LCHeap []LetterCount
func (h LCHeap) Len() int { return len(h) }
func (h LCHeap) Less(i, j int) bool {
if h[i].Count < h[j].Count {
return false
}
if h[i].Count > h[j].Count {
return true
}
if h[i].Count == h[j].Count ... |
C++ | UTF-8 | 1,970 | 2.84375 | 3 | [] | no_license |
#ifndef COMMONFUNCS_H
#define COMMONFUNCS_H
#include "include.h"
#include "data.h"
#include "cursor.cpp"
string cwd()
{
char buff[BUFF_SIZE];
if (getcwd(buff, BUFF_SIZE) == NULL)
{
cout << "Error in getcwd() : " << strerror(errno);
exit(1);
}
string path(buff);
return path;
}
void change_mode()
... |
C++ | UTF-8 | 741 | 2.6875 | 3 | [] | no_license | /******************************************
*
* @JUDGE_ID: 25719RJ 264 C++
*
* Problem 264 "Count on Cantor"
*
* David Rydh, <f99-dry@nada.kth.se>
* September 2002
*****************************************/
#include <cstdlib>
#include <cstdio>
//#include <algorithm>
#include "../../tinystl/binary_search.cpp"
... |
Java | UTF-8 | 1,194 | 2.5625 | 3 | [] | no_license | package spring.aop;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import spring.aop.entity.Exam;
public class Program {
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext("s... |
PHP | UTF-8 | 2,634 | 2.65625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Model;
use Nette\Database\Table\ActiveRow;
use Nette\Utils\ArrayHash;
class UserAddressManager extends DatabaseManager
{
const
TABLE_NAME = 'user_address',
COLUMN_ID = 'user_address_id',
COLUMN_USER_ID = 'user_id',
COLUMN_USER_STAT = '... |
C# | UTF-8 | 1,499 | 2.5625 | 3 | [
"MIT"
] | permissive | using LdapForNet;
using LdapForNet.Native;
using Xunit;
namespace LdapForNetTests
{
public sealed class AttributeCollectionTests
{
[Fact]
public void AttributeCollection_CaseInsensitivity()
{
var searchCollection = new SearchResultAttributeCollection();
var modi... |
Markdown | UTF-8 | 3,864 | 3.203125 | 3 | [] | no_license | # PHPTravels_Automation
This is a simple keyword driven framework automating the registration and login process of [phpTravels](https://www.phptravels.net/) website
## Setup
- After cloning the repo make sure to build the **pom.xml** file to get the required dependencies.</br>
- Make sure to use a java version equal t... |
Python | UTF-8 | 614 | 2.53125 | 3 | [] | no_license | from kafka import KafkaProducer
from base import AbstractPublisher
from base import BaseConfigurator
class Publisher(AbstractPublisher):
kafka_url: str
kafka_topic: str
def __init__(self, configurator: BaseConfigurator):
super(Publisher, self).__init__(configurator)
if not self.kafka_url... |
JavaScript | UTF-8 | 582 | 3.25 | 3 | [] | no_license | const body = document.querySelector('body');
body.setAttribute('class', 'body');
const xLine = document.createElement('div');
xLine.setAttribute ('class', 'x-line');
document.body.appendChild(xLine);
const yLine = document.createElement('div');
yLine.setAttribute ('class', 'y-line');
document.body.appendChild(yLine);... |
Swift | UTF-8 | 1,000 | 2.953125 | 3 | [] | no_license | //
// UserList.swift
// AppSheet
//
// Created by Lea Tsirulnikov on 05/20/2019.
// Copyright © 2019 Lea Tsirulnikov. All rights reserved.
//
import Foundation
class UserList {
private struct JSONKeys {
static let result = "result"
static let nextPageToken = "token"
}
let use... |
Java | UTF-8 | 1,468 | 3.40625 | 3 | [
"Apache-2.0"
] | permissive | /**
*
* @author 1819364
*/
import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.UnknownHostException;
class Sender implements Runnable
{
private static InetAddress address;
public static boolean sendMessage(String message) throws Exception
{
if(message.isEmpty()) retur... |
Java | ISO-8859-1 | 872 | 3.953125 | 4 | [] | no_license | package decisao;
import javax.swing.JOptionPane;
public class Lista2Exercicio3 {
public static void main(String[] args) {
int num1 = Integer.parseInt(JOptionPane.showInputDialog("Digite um nmero inteiro"));
int num2 = Integer.parseInt(JOptionPane.showInputDialog("Digite outro nmero inteiro"));
char operacao ... |
JavaScript | UTF-8 | 1,821 | 4.21875 | 4 | [] | no_license | /* Challenge 14
A cell is considered dangerous if there is a rock or a strong current in it, OR in the cells immediately above, below, left, or right of it. Write a function called isDangerous() that will take a cell in the format 'G7' and return a true or a false value. (Example: isDangerous('E4') would return true, ... |
Java | UTF-8 | 656 | 2.1875 | 2 | [] | no_license | package com.jdc.restaurant.client;
import java.util.Map;
import com.jdc.restaurant.client.api.SummaryApi;
import com.jdc.restaurant.client.dto.SummaryDTO;
import com.jdc.restaurant.client.utils.RequestUtils;
import com.jdc.restaurant.client.utils.RestaurantClientFactory;
public class SummaryClient {
private Summar... |
PHP | UTF-8 | 1,533 | 2.90625 | 3 | [] | no_license | <?php
class c_xls {
protected $out;
/**
* @return c_xls
*/
function __construct(){
$this->clean();
return $this;
}
/**
* @return c_xls
*/
function download_header($file_name='Excel.xls'){
ob_clean();
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: m... |
Python | UTF-8 | 1,622 | 2.609375 | 3 | [
"MIT"
] | permissive | class Application:
def __init__(self):
# loads commands
import command
self.reader = command.CommandReader('Keychains.txt')
try:
self.commands = self.reader.read_commands()
except:
self.commands = [command.Command('NP', 'notepad.exe', ['batata crua.txt... |
Java | UTF-8 | 10,393 | 2.015625 | 2 | [] | no_license | package com.karru.authentication.change_password;
import android.content.Context;
import com.karru.ApplicationClass;
import com.karru.api.NetworkService;
import com.heride.rider.R;
import com.karru.dagger.ActivityScoped;
import com.karru.data.source.local.shared_preference.PreferenceHelperDataSource;
import com.karru.... |
Swift | UTF-8 | 795 | 2.78125 | 3 | [] | no_license | //
// RoundedOutlineView.swift
// Touchy
//
// Created by Fabio Cipriani on 10/09/16.
// Copyright © 2016 Fabio Cipriani. All rights reserved.
//
import UIKit
@IBDesignable
class RoundedOutlineButton: UIButton {
@IBInspectable var cornerRadius: CGFloat = 0.0 {
didSet{
setupView()
... |
Python | UTF-8 | 1,376 | 2.703125 | 3 | [] | no_license | import glob
lines_seen = set()
outputfile = '/home/inct-sandeshmendan/sandesh/ML/anaDump/temp/noDup.txt'
inputfolderpath = '/home/inct-sandeshmendan/sandesh/ML/anaDump/temp/'
def mergeAllFilesWithUniqueLines(outputfile, inputfolderpath):
txt_files = glob.glob(inputfolderpath + "*.txt")
outfile = open(outpu... |
Python | UTF-8 | 1,982 | 2.828125 | 3 | [] | no_license | import PyPDF2
import sys
# with open('example/dummy.pdf','rb') as file:
# reader = PyPDF2.PdfFileReader(file)
# print(reader.numPages)
#También podemos hacer:
# with open('example/dummy.pdf','rb') as file:
# reader = PyPDF2.PdfFileReader(file)
# print(reader.getPage(0))
# with open('examp... |
Java | UTF-8 | 576 | 2.0625 | 2 | [
"Apache-2.0"
] | permissive | package com.liumapp.demo.admin.client.schedule;
import com.liumapp.qtools.date.DateTool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.Date;
@Component
public class ScheduleLogGen... |
Python | UTF-8 | 2,274 | 3.890625 | 4 | [] | no_license | print('khurram khalil')
user = input('1- dd-mm-yy\n2-mm-dd-yy\nwhich date formate you want to check: ')
'''enter 1 or 2 '''
if user=='1' or 'i' or 'one':
print('enter date in dd,mm,yy formate by using function date1(dd,mm,yy)')
def date1(dd,mm,yy):
'''enter 2 digit number of day month and year exa... |
C# | UTF-8 | 5,194 | 2.953125 | 3 | [] | no_license | using System;
using System.Collections;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Runtime.Serialization.Json;
using System.Threading.Tasks;
using System.Linq;
namespace TSystems
{
class Program
{
private static readonly HttpClient client = ne... |
Markdown | UTF-8 | 10,169 | 2.53125 | 3 | [] | no_license | ## Hey <img alt="Hi" src="./images/Hi.gif" width="30px" />, I'm Akash Rajpurohit — a Software Engineer 👨💻
[](https://linkedin.com/in/AkashRajpurohit)
[
func downloadFile(url: URL, completion: @escaping (URL?, Error?) -> Void) {
let sessi... |
C++ | UTF-8 | 2,972 | 3.109375 | 3 | [] | no_license | #include <iterator>
#include <sstream>
#include <iostream>
#include <string>
#include <map>
#include <fstream>
#include <vector>
#include <algorithm>
#include <sstream>
typedef std::map<std::string, std::vector<int> > map_t;
typedef std::map<int, std::string> map_url;
void show_pair(const map_t::value_type& p)
{
... |
JavaScript | UTF-8 | 2,520 | 3.53125 | 4 | [] | no_license | //--------------------------------------------------------------clock----------------------------------------------------------------------
function clock() {
let date = new Date();
let hour = date.getHours();
let minute = date.getMinutes();
let seconds = date.getSeconds();
hour = updateTime(hour);
minute =... |
Markdown | UTF-8 | 4,455 | 2.984375 | 3 | [] | no_license | !SLIDE center subsection
# What is Deep Learning
This section describes the fields of Artificial Intelligence, Machine Learning and Deep Learning and how they are related.
!SLIDE
# What is Deep Learning?
The relationship between Deep Learning and Machine Learning
* Machine Learning
* Data Science / Data Mining
... |
JavaScript | UTF-8 | 2,414 | 2.625 | 3 | [] | no_license | const { response } = require('express');
const express = require('express');
const cartItems = express.Router();
const pool = require ('./pg-connection-pool');
cartItems.get('/', (req, res) => {
const maxPrice = req.query.maxPrice;
const prefix = req.query.prefix;
const pageSize = req.query.pageSize;
... |
Java | UTF-8 | 253 | 2.453125 | 2 | [] | no_license | package fr.gtm.zoo;
public abstract class Animal {
private String nom;
public Animal(String nom) {
// TODO Auto-generated constructor stub
this.nom = nom;
}
public abstract void manger();
public abstract void crier();
}
|
Shell | UTF-8 | 4,115 | 3.46875 | 3 | [] | no_license | #!/bin/bash
export JAVA_HOME=/usr/local/jdk;
export LC_ALL="en_US.UTF-8";
export LANG="en_US.UTF-8";
. /home/astd/.bash_profile
game=$1
servername=$2
yx=$(echo $servername|cut -d'_' -f1)
language=$3
server_tag=${game}_$servername
download_ip=$4
download_port=$5
download_header=$6
#email_flag=$7
clear_script=truncate_... |
Markdown | UTF-8 | 3,394 | 3.296875 | 3 | [] | no_license | # 프로토타입이란
<br>
- [프로토타입이란](#프로토타입이란)
- [1 사전적 의미](#1-사전적-의미)
- [2 프로토타입의 두 가지 의미](#2-프로토타입의-두-가지-의미)
- [2-1 prototype과 \_\_proto\_\_](#2-1-prototype과-__proto__)
- [2-2 예시](#2-2-예시)
- [2-3 예시](#2-3-예시)
<br>
## 1 사전적 의미
* 프로토타입(prototype)은 원래의 형태 또는 전형적인 예, 기초 또는 표준을 의미한다.
* protos (처음) + typos (느낌) =... |
Java | UTF-8 | 245 | 2.71875 | 3 | [] | no_license | package comm.example;
public class MyDay {
public static void main(String[] args) {
MyDay1 md=new MyDay1(Day.SUN);
System.out.println("Today is: "+md.getDay().getDay()+" Day Number is: "+md.getDay().getDayNo());
}
}
|
Python | UTF-8 | 266 | 4.09375 | 4 | [] | no_license | name = input("Enter your name ")
x1 = int (input("{} enter your age".format(name)))
print(x1)
# print((age >= 18) and (age <= 31))
if 18<=x1<=31:
print("Your are eligible for holidays ")
else:
print("Your age is above 31 you are uneligible for applying holidays ") |
PHP | UTF-8 | 2,588 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php namespace Vankosoft\ApplicationInstalatorBundle\DataFixtures\Factory;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Sylius\Component\Resource\Factory\FactoryInterface;
use Vankosoft\ApplicationBundle\Model\Interfaces\SettingsInterface;
use Vankosoft\ApplicationBundle\Model\Interfaces\ApplicationInt... |
Java | UTF-8 | 1,729 | 2.015625 | 2 | [] | no_license | /*
* Copyright (c) 2021 SkillCode
*
* This file is a part of the source code of the
* AdvancedMLGRush plugin by SkillCode.
*
* This file may only be used in compliance with the
* LICENSE.txt (https://github.com/SkillC0de/AdvancedMLGRush/blob/master/LICENSE.txt).
*
* Support: http://discord.skillplugins.com
*/... |
C++ | WINDOWS-1252 | 218 | 3.140625 | 3 | [] | no_license | #include <stdio.h>
struct SHuman
{
private:
char name[12];
int age;
public:
void intro() {
printf("̸ = %s, = %d\n", name, age);
}
};
int main()
{
SHuman Kim;
//Kim.age = 286;
Kim.intro();
} |
Java | UTF-8 | 1,155 | 3.59375 | 4 | [] | no_license | /**
* Unique Paths
* A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).
*
* The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked 'Finish' in the diagram below).
*
* How many possi... |
Python | UTF-8 | 1,103 | 2.828125 | 3 | [] | no_license | def adjToCluster(adj):
n = len(adj)
mat = [[0 for i in range(n)]]
for i in range(n):
if sum(adj[i]) == 0:
mat[0][i] = 1
k = 1
while sum(mat[k-1]) != 0:
mat.append([0 for i in range(n)])
a = [i for i, x in enumerate(mat[k-1]) if x == 1]
for i in range(n):... |
Swift | UTF-8 | 1,008 | 2.875 | 3 | [] | no_license | //
// Animations.swift
// Lesson1 (Shichkin Roman)
//
// Created by Роман Шичкин on 28.04.2021.
//
import Foundation
import UIKit
extension UIView {
func pushTransition(_ duration:CFTimeInterval) {
let animation:CATransition = CATransition()
animation.timingFunction = CAMediaTimingFunction(name... |
PHP | UTF-8 | 476 | 3.359375 | 3 | [] | no_license | <?php
namespace App\Domain\FilesTreeReader;
final class WordOccurrence
{
/** @var string */
private $word;
/** @var int */
private $occurrences;
public function __construct(string $word, int $occurrences)
{
$this->word = $word;
$this->occurrences = $occurrences;
}
pub... |
Java | UTF-8 | 8,467 | 2.1875 | 2 | [
"Apache-2.0"
] | permissive | package de.samply.directory_sync.directory;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import de.samply.directory_sync.directory.model.Biobank;
import io.vavr.control.Either;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import o... |
Java | UTF-8 | 180 | 2.046875 | 2 | [] | no_license | package main.controller.comamnds;
import java.io.Serializable;
public interface Command extends Serializable{
String getName();
void execute();
boolean hasTarget();
} |
PHP | UTF-8 | 842 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace WP\Middleware;
use WP\Application;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpFoundation\Request;
class ApiVersion implements HttpKernelInterface
{
/** @var Application */
protected $app;
/**
* @param Application $app
*/
public function ... |
PHP | UTF-8 | 493 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Franzose\DomainStuff\Tests\Event\Stub;
use Franzose\DomainStuff\Event\Event;
use Franzose\DomainStuff\Event\EventListener;
final class BarListener implements EventListener
{
public function supports(Event $event): bool
{
return $event instanceof BarHappened;
... |
Java | UTF-8 | 491 | 2.40625 | 2 | [] | no_license | package trial;
import java.io.*;
public class LifeUniverseEverything {
public static void main(String args[]) throws Exception{
//BufferedReader br=new BufferedReader(new FileReader("C:/Users/Brijesh/Desktop/in.txt"));
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String input;
... |
Java | UTF-8 | 6,259 | 2.140625 | 2 | [] | no_license | package com.example.admin.quickcart;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.A... |
Python | UTF-8 | 1,407 | 2.796875 | 3 | [
"MIT"
] | permissive | from .base import Base
class Ticket(Base):
def __init__(
self, user, subject, department, priority,
message, code=None, closed=False, created_at=None, updated_at=None
):
self.user = user
self.subject = subject
self.department = department
self.priority = priori... |
Markdown | UTF-8 | 5,704 | 3.15625 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: Setting serverless environments variables in a React app
date: 2021-07-19 00:00:00
lang: en
description: In this chapter we look at how to set environment variables from your serverless app in your React.js app. By setting them automatically with the ReactStaticSite construct, you won't need to ... |
JavaScript | UTF-8 | 2,433 | 2.625 | 3 | [] | no_license |
var MongoClient = require('mongodb').MongoClient
, format = require('util').format;
var getUserId = function()
{
length=24;
chars='0123456789abcdefghijklmnopqrstuvwxyz';
var result = '';
for (var i = length; i > 0; --i) result += chars[Math.round(Math.random() * (chars.length - 1))];
return result;... |
C# | UTF-8 | 2,359 | 2.6875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Imaging;
namespace Memory_Boxes_WinForms.Game
{
[DesignerCategory("")]
... |
JavaScript | UTF-8 | 1,284 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | // @flow strict
import React, { type Node } from 'react';
import PropTable from './components/PropTable.js';
import Example from './components/Example.js';
import PageHeader from './components/PageHeader.js';
const cards: Array<Node> = [];
const card = (c) => cards.push(c);
card(
<PageHeader
name="Badge"
de... |
TypeScript | UTF-8 | 880 | 2.890625 | 3 | [] | no_license | // src > App > Commands > Generic > ping.Command.ts
import { Command } from '@/App/Structures/Command.Structure'
import { Console } from '@/Tools'
import { intergralMessageTypes } from '&types/Command'
const commandLog = Console('[Command]')
class Ping extends Command {
constructor() {
super()
this.cmds =... |
Markdown | UTF-8 | 1,545 | 2.765625 | 3 | [] | no_license | ## List of Gauntlets
- 0: Unknown (has Fire Gauntlet texture)
- 1: Fire
- 2: Ice
- 3: Poison
- 4: Shadow
- 5: Lava
- 6: Bonus
[!] For Chaos gauntlet to be visible, you need to visit the basement after beating "The Challenge" once.
- 7: Chaos
[!] Gauntlets below will have a red name, those will require you to have a... |
C# | UTF-8 | 1,383 | 2.984375 | 3 | [] | no_license | using Barbar.SymbolicMath.Policies;
using System;
namespace Barbar.Euler.Problem075
{
public class Task : ITask
{
const int LIMIT = 1500000;
public string Run()
{
int result = 0;
int[] triangles = new int[LIMIT + 1];
var maxM = (long)Math.Sqrt(LIMIT... |
C | UTF-8 | 1,254 | 3.90625 | 4 | [] | no_license | #define _CRT_SECURE_NO_WARNINGS
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
struct node {
int value;
struct node* next;
};
void show(struct node* head);
void push(struct node** head, int value);
void pop(struct node** head);
int main(void)
{
struct node* head = NULL;
int arg_menu = 0;
int valu... |
Java | UTF-8 | 929 | 2.65625 | 3 | [] | no_license | package org.example.entity;
public class SwimCompet extends Entity {
private Integer competition_id;
private Integer swimmer_id;
private Integer time;
public SwimCompet() {
}
public SwimCompet(Integer id, Integer competition_id, Integer swimmer_id, Integer time) {
this.id = id;
... |
Java | UTF-8 | 2,121 | 2.453125 | 2 | [
"Apache-2.0",
"GPL-1.0-or-later",
"LGPL-2.0-or-later"
] | permissive | /*
* This file is part of the HyperGraphDB source distribution. This is copyrighted
* software. For permitted uses, licensing options and redistribution, please see
* the LicensingInformation file at the root level of the distribution.
*
* Copyright (c) 2005-2010 Kobrix Software, Inc. All rights reserved. ... |
Java | UTF-8 | 1,012 | 2.421875 | 2 | [] | no_license | package com.sufe.idledrichfish.data;
public class CommentRepository {
private static volatile CommentRepository instance;
private CommentDataSource dataSource;
// private constructor : singleton access
private CommentRepository(CommentDataSource dataSource) {
this.dataSource = dataSource;
... |
C++ | UTF-8 | 1,382 | 3.046875 | 3 | [
"BSD-2-Clause"
] | permissive | #ifndef WORKERTHREAD_H
#define WORKERTHREAD_H
#include "util/WorkQueue.h"
#include <unordered_map>
#include <utility>
#include <thread>
class WorkerThread {
public:
WorkerThread();
~WorkerThread();
void stop();
void post(std::function<void ()> func, int priority=0) {
queue.post(std::move(func),... |
Swift | UTF-8 | 727 | 2.515625 | 3 | [
"BSD-2-Clause"
] | permissive | import Foundation
public struct SQLIndex: Equatable, Hashable {
public let columns: [String]
public let name: String
public let unique: Bool
internal init(columns: [String], name: String, unique: Bool) {
self.columns = columns
self.name = name
self.unique = unique
}
pu... |
Swift | UTF-8 | 1,443 | 2.84375 | 3 | [] | no_license | //
// JSONManager.swift
// TinkoffChat
//
// Created by Aleksander Evtuhov on 23/10/2017.
// Copyright © 2017 Aleksander Evtuhov. All rights reserved.
//
import Foundation
class jsonManager{
static func dictTojson(jsonObject: [String: Any])->Data{
do {
let jsonData = try JSONSerializ... |
Python | UTF-8 | 3,829 | 2.640625 | 3 | [] | no_license | import threading
import xmlrpclib
from threading import Lock
from time import sleep
# use BenchTurn server functions as API
# to use this code initiate new Client instance
# Based on Scorpy API
lock = Lock()
# decorator to use lock on each API call
def with_lock(func):
def func_with_args(*args, ... |
Go | UTF-8 | 913 | 3.265625 | 3 | [] | no_license | package palindromeRearranging
import (
"fmt"
"github.com/stretchr/testify/require"
"testing"
)
func TestPalindromeRearranging(t *testing.T) {
type test struct {
testString string
expectedResult bool
}
var testArray []*test
test1 := &test{"aabb", true}
test2 := &test{"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaab... |
Python | UTF-8 | 2,235 | 2.765625 | 3 | [
"MIT"
] | permissive | import os
from configparser import ConfigParser
from io import StringIO
from io import open
from concurrent.futures import ProcessPoolExecutor
from pdfminer.pdfinterp import PDFResourceManager
from pdfminer.pdfinterp import process_pdf
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
f... |
Python | UTF-8 | 1,572 | 3.328125 | 3 | [] | no_license | from itertools import count
class Node(object):
"""Class that represents an XBee series 2 wireless node."""
_ids = count(0)
node_types = {'ms': 'coordinator',
'es': 'environmental sensor',
'ls': 'light switch',
'pl': 'plug level sensor'}
def __in... |
Java | UTF-8 | 5,803 | 2.203125 | 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.verisec.realestateeth.forms;
import com.verisec.realestateeth.domain.User;
import com.verisec.realestateeth.controller.Con... |
C++ | UTF-8 | 1,691 | 3.78125 | 4 | [] | no_license | // 在一个排序的链表中,存在重复的结点,请删除该链表中重复的结点,
// 重复的结点不保留,返回链表头指针。
// 例如,链表1->2->3->3->4->4->5 处理后为 1->2->5
#include <vector>
#include <map>
#include <iostream>
using namespace std;
struct ListNode {
int val;
struct ListNode *next;
ListNode(int x) :
val(x), next(NULL) {}
};
class Solutio... |
Markdown | UTF-8 | 1,785 | 2.578125 | 3 | [
"MIT"
] | permissive | # b01lers bootcamp CTF 2020
## White Rabbit
> 100
>
> Follow the white rabbit...
>
> `nc chal.ctf.b01lers.com 1013`
>
> [whiterabbit](whiterabbit)
Tags: _x86-64_ _unsanitized-input_ _linux_ _bash_
## Summary
Fool a simple check with an unsanitized string.
## Analysis
### Checksec
```
Arch: amd64-64-l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.