language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
Markdown | UTF-8 | 1,733 | 3.171875 | 3 | [] | no_license | # chapter 3
> ### C++ 기본 데이터형
1. 정수형
2. 부동소수점
또 각각의 데이터형은 signed, unsigned로 나뉜다.
> ### wchar_t 정수형
시스템마다 다른 크기가 정해진다
> ### char형
각 시스템마다 기본 문자 세트에 속하는 어떠한 문자도 저장할 수 있을 만큼 커야 한다.
short형은 최소한 16비트이다. int형은 최소한 short만큼은 커야한다.
long은 최소한 32비트, 최소한 int형만큼은 커야한다.
--> c++ 시스템마다 다른 값을 가질 수 있다.
> ### long double형... |
PHP | UTF-8 | 555 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Actions\IAction;
/**
* Se encarga de recibir un token autenticado, validarlo
* y generar un nuevo token que no se encuentre expirado
*/
class RefreshTokenAction implements IAction
{
/**
* Recibimos el token por request, lo validamos
* y, de ser corr... |
C++ | UTF-8 | 762 | 2.6875 | 3 | [] | no_license | //macros header file
#ifndef MACROS_HEADER
#define MACROS_HEADER
//pins for emitter and receiver pointing front right
#define R1 A1
#define E1 12
//pins for emitter and receiver pointing right
#define R2 A2
#define E2 14
//pins for emitter and receiver pointing left
#define R3 A3
#define E3 23
//pins for emitter a... |
SQL | UTF-8 | 731 | 4.59375 | 5 | [] | no_license | -- Wrong Answer:
SELECT Name
FROM Candidate c
JOIN
(SELECT CandidateId, COUNT(CandidateId) AS num_votes
FROM Vote
GROUP BY CandidateId) t
ON c.id = t.CandidateId
HAVING MAX(t.num_votes)
;
-- 1. HAVING MAX(t.num_votes) is WRONG!!
-- MAX() function with Having: having max() >1000, having max() <1000... |
Markdown | UTF-8 | 586 | 3.171875 | 3 | [] | no_license | ---
title: How to generate random numbers in Verilog?
---
## How to generate random numbers in Verilog?
Verilog has a system call (`$random`) that handles this. It returns a signed 32 bit integer. It is used as follows:
```verilog
module rand();
integer mynumber;
initial begin
mynumber = $random;
end
e... |
Java | UTF-8 | 442 | 3.09375 | 3 | [] | no_license | import java.util.Scanner;
public class maxfreq {
public static void main(String[] args) {
Scanner sj=new Scanner(System.in);
String S=sj.next();
int counter=0;
int i;
char ch;
for(char j='A';j<='z';j++)
{
counter=0;
for( i=0;i<S.length();i++)
{
ch=S.charAt(i);
if(j==ch)
{
... |
Python | UTF-8 | 394 | 2.84375 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env python
import threading
class MyThread(threading.Thread):
def __init__(self, files):
threading.Thread.__init__(self)
self.files = files
def getResult(self):
return self.res
def run(self):
self.res = 0
for file in self.files:
with... |
TypeScript | UTF-8 | 10,042 | 2.921875 | 3 | [
"MIT"
] | permissive | import { schema, Typesaurus } from '..'
describe('upset', () => {
interface User {
name: string
deleted?: boolean
}
interface Post {
author: Typesaurus.Ref<User, 'users'>
text: string
date?: Typesaurus.ServerDate | undefined
tags?: (string | undefined)[]
}
interface Order {
titl... |
PHP | UTF-8 | 586 | 2.640625 | 3 | [] | no_license | <?php
$rootpath = $_SERVER['DOCUMENT_ROOT'];
include $rootpath . '/core/table.class.php';
/**
* Style class
*
*/
class Style extends table {
/**
* @var int $SID -> Style ID
*/
protected $SID;
/**
* @var string $Name -> Style Name
*/
protected $Name;
/**
* @var datet... |
C | UTF-8 | 1,232 | 3.9375 | 4 | [] | no_license |
/*
Problem statement : Accept N number from user and display all numbers which are multiple of 11
Input: N 6
Elements : 50 33 -11 25 66 2
Outpt: 33 -11 66
*/
#include<stdio.h>
#include<stdlib.h>
void DisplayMultBy11(int arr[], int iSize)
{
int i= 0;
if(arr == NULL)
{
printf("Error : Mem... |
Java | UTF-8 | 1,586 | 2.484375 | 2 | [] | no_license | package com.opentext.wf.utils;
import java.util.Arrays;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
public class Browser {
private static WebDriver driv... |
PHP | UTF-8 | 167 | 2.78125 | 3 | [] | no_license | <?php
$vehiculos = $_POST['vehiculos'];
$resultado="";
echo "Los vehículos elegidos son: <br />";
foreach ($vehiculos as $vehiculo) {
echo "$vehiculo <br />";
} |
C# | UTF-8 | 815 | 2.8125 | 3 | [
"MIT"
] | permissive | using System;
using System.Text;
namespace LuaInterface
{
public static class StringBuilderCache
{
[ThreadStatic]
private static StringBuilder _cache = new StringBuilder();
private const int MAX_BUILDER_SIZE = 512;
public static StringBuilder Acquire(int capacity = 256)
{
StringBuilder cache = StringB... |
Markdown | UTF-8 | 321 | 3.1875 | 3 | [] | no_license | # Functions
functions in rust are `snake_case`
```rust
fn a_function() {
}
```
## Return Values
You can return values from functions with a `->` like so
```rust
fn add(x: i32, y: i32) -> i32 {
x + y
}
```
note that you can use the keyword `return` but it is not necessary. Note that the function is an [[Expressions]]... |
Java | UTF-8 | 690 | 3.53125 | 4 | [] | no_license | class TriangleValidity
{
public static void main(String [] args)
{
float s1,s2,s3;
s1 = Float.parseFloat(args[0]);
s2 = Float.parseFloat(args[1]);
s3 = Float.parseFloat(args[2]);
if(s1+s2 > s3 && s1+s3 > s2 && s2+s3 > s1)
{
System.out.println("Triangle is valid");
... |
Java | UTF-8 | 5,507 | 2.328125 | 2 | [] | no_license | package com.jabava.utils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class IDCard {
private static String datePattern = "^((\\d{2... |
Java | UTF-8 | 5,761 | 2.484375 | 2 | [] | no_license | package com.datangedu.cn.controller.cart;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bi... |
C++ | UTF-8 | 890 | 2.75 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
vector<int> solve(vector<int> arr,int n){
int maxSubArr;
int maxSubSeq=0;
int max_so_far = arr[0];
int max_here = 0;
bool pos = false;
int max = INT_MIN;
for(int i=0 ; i<n; i++){
max_here += arr[i];
if(max_here > max_so_far){
max_so_far =... |
JavaScript | UTF-8 | 3,362 | 2.765625 | 3 | [
"MIT"
] | permissive | /**
* Servicio para manejar el regtistro de retos creados por los master
*/
//---------------------------------------------------------------------------------------------------
// Requerimientos
//---------------------------------------------------------------------------------------------------
var User = req... |
Python | UTF-8 | 4,812 | 2.78125 | 3 | [] | no_license | """
Created on Sun Dec 24 16:30:55 2017
@author: Neeraj Tiwari(SC16M031)
Code made for pulse thermography
"""
"""
Here the code is devided in some parts like:
1- geting the themal data for pulse thermography
2- select each pixel of frame and apply Savitzky filter
3- Apply FFt on each pixel ... |
SQL | UTF-8 | 6,867 | 3.375 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Sat Jul 14 21:45:06 2018
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TR... |
Python | UTF-8 | 867 | 2.515625 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env python3
import os
import requests
import glob
linux_instance_external_IP = ''
keys = ["name", "weight", "description"]
PATH_TXT = 'supplier-data/descriptions/'
PATH_IMG = 'supplier-data/images/'
def image_name(filename):
temp = filename.split("/")
temp = temp[-1:][0]
temp = temp.split(".")
... |
Go | UTF-8 | 1,932 | 2.890625 | 3 | [
"MIT"
] | permissive | package filedb
import (
"encoding/csv"
"encoding/json"
"errors"
"github.com/murphysean/heimdall"
"io/ioutil"
"os"
"path/filepath"
)
const (
USERS_DIRECTORY = "users"
)
func (db *FileDB) NewUser() heimdall.User {
u := new(User)
u.Id = genUUIDv4()
return u
}
func (db *FileDB) VerifyUser(username, password ... |
JavaScript | UTF-8 | 1,918 | 2.921875 | 3 | [] | no_license | /**
Description: Maintain state of application via URL. Will parse query args
to apply previoius-filter states.
*/
import { parseQueryArgs } from '../common/helpers.js';
export default class state {
constructor() {
this.getParameters();
this.setFilters();
}
/**
* Determine any q... |
Java | UTF-8 | 1,452 | 2.640625 | 3 | [] | no_license | package javabean.classes;
import java.sql.Timestamp;
public class Performance {
private int id;
private Timestamp StartTime;
private Timestamp EndTime;
private int concertID;
private int venueId;
private Concert conc = new Concert();
private Venue ven = new Venue();
public Performance() {
super();
}
... |
C# | UTF-8 | 5,959 | 3.140625 | 3 | [] | no_license | using System;
using System.IO;
using System.Collections.Generic;
namespace MyShogi.Model.Common.Utility
{
/// <summary>
/// ログを出力するときに、その出力される情報の種別
/// </summary>
public enum LogInfoType
{
SendCommandToEngine, // エンジンへのコマンドの送信
ReceiveCommandFromEngine, // エンジンからのコマンドの受信
... |
PHP | UTF-8 | 1,666 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace DOMArch\Resource\Db\Model;
class Evented extends \DOMArch\Resource\Db\Model
{
private function _validateTag($name) {
$constant = get_called_class() . '::TAG_' . $name;
if (!defined($constant)) {
throw new Exception('Invalid tag ' . $constant);
}
}
p... |
Markdown | UTF-8 | 1,362 | 2.828125 | 3 | [] | no_license | # BayesianNN
In this work we introduce you to neural network and bayesian neural network. We explain briefly how they are build and how they work, then we inspect the strengths and weaknesses comparing the two approaches on at theoretical level and secondly applying these methods to a dataset.
## Structure
On the Net... |
Java | WINDOWS-1250 | 754 | 2.9375 | 3 | [] | no_license | import java.util.ArrayList;
import java.util.List;
public class Company {
public static void main(String[] args) {
// TODO Auto-generated method stub
List<Employee> allEmployees = new ArrayList<Employee>();
//Employee[] allEmployees = new Employee()[100];
//Accountant accountant1 = new Accountant("... |
Python | UTF-8 | 1,326 | 3.6875 | 4 | [] | no_license | """
Approach is to simulate possible number of ways to attend classes without missing 4 or
more consecutive classes. This simulation follows dynamic programming (problem overlap + recursive).
Naive solution is followed below as I am not well versed with dynamic programming technique.
"""
import itertools
def ways_t... |
Java | UTF-8 | 655 | 4.09375 | 4 | [] | no_license | public class TwelveInts
{
public static void main(String[] args)
{
int[] nums = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
int length = nums.length;
System.out.println("From first to last: ");
for (int x = 0; x < length; ++x)
{
System.out.print(nums[x]);
... |
C++ | UTF-8 | 4,601 | 2.734375 | 3 | [
"MIT"
] | permissive | // #include, using, etc
#include "Flocking.h"
#include "Input.h"
#include "Entity.h"
#include "Boid.h"
#include "Vector2.h"
using namespace aie;
//--------------------------------------------------------------------------------------
// Default Constructor. Taking in a float fWeighting and A DynamicArray of boid point... |
C# | UTF-8 | 3,198 | 2.6875 | 3 | [] | no_license | using MeuLeeDiaPlayer.Common.Models;
using MeuLeeDiaPlayer.PlaylistHandler.Models;
using MeuLeeDiaPlayer.PlaylistHandler.PlayModes;
using MeuLeeDiaPlayer.PlaylistHandler.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
namespace MeuLeeDiaPlayer.PlaylistHandler.SongLists
{
public class Son... |
PHP | UTF-8 | 3,589 | 2.515625 | 3 | [] | no_license | <html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<br>
<form action="insertconsultation3.php" method="post">
<?php
$VAT_doctor = $_REQUEST['VAT_doctor'];
$date_timestamp_aux = strtotime($... |
C# | UTF-8 | 1,232 | 2.578125 | 3 | [] | no_license | using Bogus;
using Billing.Entities.Models;
using BAddress = Billing.Entities.Models.Address;
using System.Collections.Generic;
namespace Billing.Data
{
public static class ModelFakers
{
public static Faker<Client> ClientFaker = new Faker<Client>("es")
.Rules((f, c) =>
{
c.P... |
Python | UTF-8 | 1,631 | 2.8125 | 3 | [
"MIT"
] | permissive | import pytest
from nerwhal.integrated_recognizers.money_recognizer import MoneyRecognizer
@pytest.fixture(scope="module")
def de_backend(setup_backend):
recognizer = MoneyRecognizer
backend = setup_backend(recognizer.BACKEND, language="de")
backend.register_recognizer(recognizer)
return backend
@py... |
JavaScript | UTF-8 | 4,258 | 3 | 3 | [] | no_license |
class Person {
constructor(attributes) {
this.name = attributes.name
this.age = attributes.age
this.location = attributes.location
}
speak() {
console.log (`Hello my name is ${this.name}, I am from ${this.location}`)
}
}
class Instructor extends Person {
construct... |
Python | UTF-8 | 7,268 | 4.375 | 4 | [] | no_license | #1.Write a program in python to check if a Substring is Present in a Given String.
mainstr = input("enter: ")
substr = input("enter: ")
if (mainstr.find(substr) == -1):
print("NO")
else:
print("YES")
#2.Write a program in python to check if two strings are anagram or not.
str1 = input("enter: ")... |
JavaScript | UTF-8 | 1,294 | 2.578125 | 3 | [] | no_license | import _ from 'lodash';
import axios from 'axios';
class BaseRequest {
get(url, params = {}) {
return this._doRequest('GET', url, { params });
}
put(url, data = {}) {
return this._doRequest('put', url, { data });
}
post(url, data = {}) {
return this._doRequest('post', url, { data });
... |
Java | UTF-8 | 210 | 1.5625 | 2 | [] | no_license | package ru.pds.eventsapp.Models;
/**
* Created by Alexey on 21.02.2018.
*/
public class PojoEventForMap {
public Long id;
public Double latitude;
public Double longitude;
public int type;
}
|
Python | UTF-8 | 211 | 2.515625 | 3 | [] | no_license | #encoding: utf-8
from PIL import Image
from pytesseract import image_to_string
tesseract_cmd = "C:\\Tesseract-OCR\\tesseract.exe"
image = Image.open('C://test1.jpg')
text = image_to_string(image)
print(text)
|
Markdown | UTF-8 | 644 | 2.953125 | 3 | [] | no_license | # What is GILT?
## The four words have distinct meanings:
### Globalization (G11N)
is the process by which businesses or other
organizations develop international influence
or start operating on an international scale.
### Internationalization (I18N)
consists in adapting the product and its
design so that it is... |
Markdown | UTF-8 | 911 | 2.71875 | 3 | [] | no_license | 本文将为您介绍如何收藏 Dashboard。
## 操作步骤
收藏监控面板后,您可以在 [切换 Dashboard](https://intl.cloud.tencent.com/document/product/248/38469#.E5.88.87.E6.8D.A2-dashboard) 中快速切换收藏面板,方便您快速切换到其它面板进行异障排查。您还可以在 [查看 Dashboard]( https://intl.cloud.tencent.com/document/product/248/38469) 快速筛选收藏面板。
1. 登录 [云监控控制台](https://console.cloud.tencent.com/m... |
Shell | UTF-8 | 1,336 | 3.625 | 4 | [
"MIT"
] | permissive | #!/bin/bash
##############################################
# Bring up a docker container with ES + plugin
##############################################
# Ensure cleanup
rm -rf docker || true
mkdir docker || true
# Obtain the version to compose the zip file name
PLUGIN_VERSION=`grep plugin_version pom.xml | sed 's|</... |
Java | UTF-8 | 836 | 2.140625 | 2 | [] | no_license | package be.kdg.trips.model.user;
import be.kdg.trips.model.Nullable;
import org.springframework.stereotype.Component;
import java.io.Serializable;
/**
* Subversion id
* Project Application Development
* Karel de Grote-Hogeschool
* 2012-2013
*/
@Component
public class User implements Nullable, Serializable {
... |
Java | UTF-8 | 561 | 2.703125 | 3 | [] | no_license | package evo._3_consoleVsComplexPlayerTypes;
import evo._3_consoleVsComplexPlayerTypes.player.Player;
import static evo._3_consoleVsComplexPlayerTypes.player.PlayerBehaviour.consolePlayerBehaviour;
import static evo._3_consoleVsComplexPlayerTypes.player.PlayerBehaviour.grudgerPlayerBehaviour;
public class EvolutionOf... |
Ruby | SHIFT_JIS | 2,069 | 3.015625 | 3 | [] | no_license | require 'numo/narray'
require './numerical_gradient.rb'
require './layers_2.rb'
class TwoLayerNet
attr_reader :params, :layers
def initialize(input_size:, hidden_size:, output_size:, weight_init_std: 0.01)
# d݂̏ALayerԐڎQƂ邽ߖ𑝂₷
Numo::NArray.srand
@params = {
w1: weight_init_std * Numo::DFloat.new... |
Java | UTF-8 | 18,883 | 2.359375 | 2 | [] | no_license | package edu.kit.aifb.orel.kbmanager;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import org.semanticweb.owlapi.model.OWLOntology;
import edu.kit.aifb.orel.client.LogWriter;
import edu.kit.aifb.orel.inferencing.InferenceRuleDeclaration;
import edu.ki... |
Java | UTF-8 | 683 | 2.59375 | 3 | [
"MIT"
] | permissive | package cellpackage;
/**
* Agent for Sugarscape simulations
* @author Ryan Anders
*
*/
public class Agent {
private int mySugar;
private int myMetabolism;
private int myVision;
public Agent(int sugar, int metabolism, int vision) {
mySugar = sugar;
myMetabolism = metabolism;
myVision = vision;
}
... |
Java | UTF-8 | 886 | 2.53125 | 3 | [] | no_license | package edu.mum.ui;
import java.awt.Component;
import java.awt.Point;
import java.beans.PropertyVetoException;
import javax.swing.JDesktopPane;
import javax.swing.JInternalFrame;
public class MDIDesktopPane extends JDesktopPane {
private static int FRAME_OFFSET = 20;
public MDIDesktopPane() {
}
public void set... |
Java | UTF-8 | 2,334 | 2.6875 | 3 | [] | no_license | package stepDefinition;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import org.openqa.selenium.WebElement;
import common.BaseClass;
import cucumber.api.java.en.When;
import pages.HomePage;
import org.junit.Assert;
import cucumber.api.java.en.Given;
impor... |
Java | UTF-8 | 986 | 2.03125 | 2 | [] | no_license | package com.t.androidca2project.P5;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import android.graphics.Color;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import ... |
Java | UTF-8 | 958 | 2.21875 | 2 | [] | no_license | package com.tjl.credit.domain;
import java.sql.Date;
public class Notice {
private Integer id;
private String title;
private String content;
private String file;
private Date date;
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = ... |
Markdown | UTF-8 | 1,484 | 3.375 | 3 | [
"MIT"
] | permissive | # tumbler-puzzle
This is a Python program to find move sequences to help solve the Nintendo "Ten Billion Barrel" puzzle.
The code here relates to [my blog post](https://www.silicontrenches.com/post/nintendo-tumbler-puzzle).
More details about this puzzle can be found on [Wikipedia](https://en.wikipedia.org/wiki/Ninte... |
TypeScript | UTF-8 | 1,001 | 2.765625 | 3 | [] | no_license | import mongoose from "mongoose";
interface ChargesAttrs {
percentage: number;
name: string;
isApplicable: boolean;
}
interface ChargesModel extends mongoose.Model<ChargesDoc> {
build(attrs: ChargesAttrs): ChargesDoc;
}
interface ChargesDoc extends mongoose.Document {
percentage: number;
name: string;
i... |
Go | UTF-8 | 2,020 | 2.65625 | 3 | [
"MIT"
] | permissive | package storage
import (
"context"
"errors"
"fmt"
"io"
"time"
"github.com/profefe/profefe/pkg/profile"
)
var (
ErrNotFound = errors.New("not found")
ErrNoResults = errors.New("no results")
ErrNotImplemented = errors.New("method not implemented")
)
type Storage interface {
Writer
Reader
}
type... |
Java | UTF-8 | 458 | 2.265625 | 2 | [
"Apache-2.0"
] | permissive | package com.fpliu.newton.ui.image.loader;
public final class ImageLoaderManager {
private static ImageLoader imageLoader = new DefaultImageLoader();
private ImageLoaderManager() {
}
public static void setImageLoader(ImageLoader imageLoader) {
if (imageLoader != null) {
ImageLoade... |
JavaScript | UTF-8 | 1,450 | 2.8125 | 3 | [
"MIT"
] | permissive | $("#button-blue").click(function () {
if ($("#name").val() == '' || $("#email").val() == '' || $("#comments").val() == '') {
$("#button-blue").after("<h3 class='error'>Please fill in all fields before clicking 'Send'.</h3></br>");
return;
}
if ($("#email:contains(@)")) {
$("#b... |
C# | UTF-8 | 2,218 | 2.796875 | 3 | [] | no_license | using Repos.DomainModel.Interface.Attributes.DynamicAttributes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Dynamic;
using System.Linq;
namespace Repos.DomainModel.Interface.DomainComplexTypes
{
public class DomainEntityType
{
prote... |
C++ | UTF-8 | 921 | 2.546875 | 3 | [] | no_license | #ifndef LLIB_HCSR04_HPP
#define LLIB_HCSR04_HPP
#include <wait.hpp>
#include <peripheral.hpp>
namespace llib::sensors {
template<PinOut TriggerPin, PinIn EchoPin>
class hcsr04 {
public:
static uint32_t read() {
// Clear
TriggerPin::template set<false>();
llib::w... |
Python | UTF-8 | 386 | 3.5625 | 4 | [] | no_license | x = int(input('Insira sua idade: '))
y = float(input('Insira seu IMC: '))
print('Entradas:',x, 'anos e IMC',y)
if ((x<=0) or (x>130) or (y==0)):
print('Dados invalidos')
elif (x<45 and y<22):
print('Risco: Baixo')
elif (x>=45 and y<22):
print('Risco: Medio')
elif (x<45 and y>=22):
print('Risco: Medio')
elif (x>=45... |
Java | UTF-8 | 6,031 | 2.1875 | 2 | [] | no_license | package com.wfy.web.controller;
import com.wfy.web.common.ServerResponse;
import com.wfy.web.model.Supplier;
import com.wfy.web.service.ISupplierService;
import com.wfy.web.service.ISupplierTypeService;
import com.wfy.web.utils.RefCount;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resour... |
Java | UTF-8 | 2,301 | 2.71875 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package sgengine.entity;
import sgengine.inteface.SpriteRenderer;
import sgengine.model.Animation;
import sgengine.model.Audio;
import... |
C# | UTF-8 | 4,742 | 2.53125 | 3 | [] | no_license | using System.Collections.Generic;
using EIS.Inventory.Core.ViewModels;
using System;
namespace EIS.Inventory.Core.Services
{
public interface IProductTypeService : IDisposable
{
/// <summary>
/// Gets the list of all eisProduct types
/// </summary>
/// <returns></returns>
... |
Java | UTF-8 | 1,712 | 2.484375 | 2 | [] | no_license | package com.surfilter.ssm.filter;
import org.apache.commons.io.IOUtils;
import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import java.io.*;
public class MyRequestWrapper extends HttpServletReq... |
Java | UTF-8 | 1,173 | 2.25 | 2 | [] | no_license | package org.example.cardservice.user;
import org.example.cardservice.application.CardApplicationDto;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.htt... |
C++ | UTF-8 | 11,040 | 2.65625 | 3 | [] | no_license | #define STEAMWORKS_CLIENT_INTERFACES
#include "Steamworks.h"
class CSigScanner
{
public:
CSigScanner(const void* hModule);
void* FindSignature(const char* pubSignature, const char* cszMask, bool bSearchUp = false, const void* pPreviousMatch = NULL) const;
void* FindSignature(const unsigned char* pubSignature, co... |
SQL | UTF-8 | 8,306 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost:8889
-- Généré le : mer. 22 août 2018 à 12:19
-- Version du serveur : 5.6.38
-- Version de PHP : 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_... |
C# | UTF-8 | 842 | 3.125 | 3 | [] | no_license | using System;
using System.Diagnostics.Tracing;
namespace Assessment3
{
class Program
{
static void Main(string[] args)
{
Employee employee1 = new Employee(101, "John", 7000, "MindTree");
Employee employee2 = new Employee(102, "Peter", 8000, "MindTree");
... |
Markdown | UTF-8 | 2,357 | 3.296875 | 3 | [
"MIT"
] | permissive | ---
title: Rystelse af himlen og jorden
date: 15/03/2022
---
Efter beskrivelsen af festforsamlingen i himlen advarer Paulus sine læsere om, at de må lytte til Guds røst, for ”Endnu én gang vil jeg [Gud] få ikke blot jorden, men også himlen til at skælve“ (Hebr 12,26). Paulus siger, at selv om Jesus er blevet indsat ... |
C# | UTF-8 | 2,290 | 2.8125 | 3 | [] | no_license | using ConsoleTest.Collections;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleTest.Indexing
{
/// <summary>
/// Interface implemented by both 32-bit and 64-bit indexes.
/// </summary>
public... |
C# | UTF-8 | 6,483 | 3.171875 | 3 | [
"MIT"
] | permissive | using System;
using System.Reflection;
using Miracle.Arguments;
namespace Samples
{
/// <summary>
/// Sample argument class that shows examples of most of the functionality of the CommandLineParser.
/// </summary>
[ArgumentSettings(
ArgumentNameComparison = StringComparison.InvariantCultureIgn... |
Java | UTF-8 | 3,880 | 2.109375 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright (C) 2015 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
Python | UTF-8 | 888 | 3.828125 | 4 | [] | no_license | # A : 65
# a : 97 ~ z : 122
# chr : int -> char
# ord : char -> int
def rotate_word(target, offset):
return_str = ""
if offset % 26 == 0:
return target
for elem in target:
if offset > 0:
if (ord(elem) + offset > 122):
current_char = chr(96 + (ord(elem) + (offset... |
Java | UTF-8 | 799 | 1.726563 | 2 | [
"MIT"
] | permissive | /*
* Created on 27/04/2006
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package martin.mogrid.tl.asl.bagoftask;
import martin.mogrid.common.resource.ResourceQuery;
import martin.mogrid.p2pdl.api.RequestProfile;
public clas... |
PHP | UTF-8 | 1,533 | 2.9375 | 3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | <?php
/**
* Webiny Framework (http://www.webiny.com/framework)
*
* @copyright Copyright Webiny LTD
*/
namespace Webiny\Component\Logger\Driver\Webiny\Handler;
use Webiny\Component\Logger\Driver\Webiny\Formatter\FileFormatter;
use Webiny\Component\Logger\Driver\Webiny\Formatter\FormatterAbstract;
use Webiny\Compon... |
C | UTF-8 | 1,057 | 3.515625 | 4 | [] | no_license | #include<stdio.h>
#include<stdlib.h>
#include<math.h>
void um(double *A,double *B);
void dois(double *A,double *B);
void tres(double *A,double *B);
int main()
{
double A[] = {1.0, 3.0, 5.0, 7.0, 9.0, 11.0, 13.0, 15.0, 17.0, 19.0, 21.0, 23.0, 25.0, 27.0, 29.0, 31.0};
double B[] = {0.5, 0.25, 0.125, 0.0625, 0.5, 0.25, 0.... |
JavaScript | UTF-8 | 989 | 2.625 | 3 | [] | no_license | import { combineReducers } from 'redux';
let counter = (state=12,action)=>{
switch(action.type){
case 'ADD':
return state+action.value;
case 'DEC':
return state-1;
case 'AddOdd':
if(state%2==1){return state+1;}
else{return state;}
case... |
C# | UTF-8 | 1,087 | 2.625 | 3 | [] | no_license | using System;
using fd.Base.Types;
using FluentNHibernate.Automapping;
namespace fd.Base.NHibernate
{
/// <summary>The auto-mapping configuration.</summary>
public class DefaultAutoMappingConfiguration : DefaultAutomappingConfiguration, IAutoMappingAdjuster
{
/// <summary>Adjusts the auto-mappings.... |
C# | UTF-8 | 1,705 | 3.34375 | 3 | [] | no_license | using ProjectEuler.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectEuler.Files
{
class Problem15 : IProblem
{
public object Answer => throw new NotImplementedException();
const int GRID_SIZE = 100;... |
Markdown | UTF-8 | 813 | 3.578125 | 4 | [
"MIT"
] | permissive | # ininin-calculator
数字计算器
# install
npm i ininin-calculator
# github
https://github.com/yy-ininin/ininin-calculator
# usage
```javascript
import calculator from 'ininin-calculator'
/* 加 */
// calculator.add(number [,number...])
const result = calculator.add(1,2,3,4)
console.log(result)
// 10
/* 减 */
// calculator.... |
Java | UTF-8 | 5,087 | 2.25 | 2 | [] | no_license | package com.rz.action.admin;
import java.util.List;
import java.util.Set;
import javax.annotation.Resource;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.springframework.beans.BeanUtils;
import com.opensymphony.xwork2.interceptor.annotations.InputConfig;
import com.opensymphony.xwork2.valid... |
Markdown | UTF-8 | 1,376 | 2.71875 | 3 | [] | no_license | # Game-of-Life
Часть 1
Задание на C++
Представьте, что Вам поступил заказ на разработку backend части для игры "Жизнь".
Необходимо, используя подход ООП, разработать интерфейс и реализацию класса, который будет представлять собой состояние игрового поля и контролировать его изменение в соответствии с правилами.... |
C++ | UTF-8 | 891 | 2.71875 | 3 | [] | no_license | //============================================================================
// Name : DebugLog.h
// Author : Kyle Finlay
// Copyright : 2014 by Black Rain Interactive
// Description : This file is a part of Splash Engine.
//============================================================================
#... |
Java | UTF-8 | 3,668 | 2.140625 | 2 | [] | no_license | package com.example.kpchl.whiskeyworld.main;
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.v4.content.LocalBroadcastManager;
import android.view.KeyEvent;
i... |
PHP | UTF-8 | 1,795 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Dell
* Date: 9/14/2016
* Time: 6:13 PM
*/
namespace App\Backend\Terminal;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;
use App\Core\Utility;
use App\Core\ReturnMessage;
class TerminalRepository implements TerminalRepositoryInterface
{
publi... |
C++ | UTF-8 | 704 | 2.546875 | 3 | [] | no_license | /*************************************************************************
> File Name: Complex.h
> Author: wangmingwei
> E-mail: wmw823@126.com
> Created Time: 2017年05月04日 星期四 09时32分03秒
************************************************************************/
#ifndef __COMPLEX_H__
#define __COMPLEX_H__
class C... |
Python | UTF-8 | 745 | 3.328125 | 3 | [] | no_license | import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((socket.gethostname(), 1234))
s.listen(5)
print("Waiting connection from client")
while True:
clientsocket, adress = s.accept()
"""Client is connected"""
print(f"Connection from {adress} has been established")
print("Inp... |
JavaScript | UTF-8 | 2,042 | 3.5 | 4 | [] | no_license | class TicTacToe
{
constructor()
{
this.turnCounter = 0;
this.turns = new Array(3);
for (var i = 0; i < this.turns.length; i++)
{
this.turns[i] = new Array(3);
}
}
getCurrentPlayerSymbol()
{
if (this.turnCounter % 2 == 0)
{
return 'x';
}
else
{
return 'o';
}
}
... |
Shell | UTF-8 | 925 | 2.71875 | 3 | [] | no_license | #!/bin/bash
echo '********************starting the script*********************************'
echo '*******************Running the apex_limit_get.py************************'
python apex_limit_get.py > hai.txt
echo '********************written the data in to given text file hai.txt*******'
cat hai.txt
echo '***********... |
Java | UTF-8 | 889 | 4.09375 | 4 | [] | no_license |
// Tutorial 17: Constructors
// constructors allow you to initalise variables as soon as you create an object
public class Tut17constructors {
private String girlName;
// method/constructor name has to be the same as the class name with constructors
// constructor must have no explicit return type
public Tut17... |
C++ | UTF-8 | 8,813 | 2.609375 | 3 | [] | no_license | #include<GLUT/glut.h>
#include<stdlib.h>
#include<iostream>
#include<cmath>
bool DO_FLAP = false;
float FLAP[5] = {0.0, 0.0, 0.0, 0.0, 0.0};
float FSM[5] = {1,2,3,4,5};
unsigned char DIR[5] = {'u', 'u', 'u', 'u', 'u'};
float ROT = 0.0;
float VRP[3] = {0,0,10};
float VUP[3] = {0,1,0};
float VPN[3] = {0,0,-1};
float R... |
Java | UTF-8 | 2,069 | 1.664063 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2018 JDCLOUD.COM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:#www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... |
C# | UTF-8 | 1,069 | 2.8125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project_DAL
{
public class DrugDAL
{
DataBaseDataContext db;
public DrugDAL()
{
db = new DataBaseDataContext();
}
public List<... |
Markdown | UTF-8 | 373 | 3.15625 | 3 | [] | no_license | # Clock
I unfortunately have to "learn" Java for my bachelor; this is our first project- make a clock.
It shows the current time in UTC+1 American 12 hour format, as well as the current day, month and year, taking account for leap years.
This program is equivalent to:
```bash
while; do clear; date; sleep 1; done
```
... |
C# | UTF-8 | 1,721 | 2.625 | 3 | [
"MIT"
] | permissive | using System;
namespace BKEditor.Config.Export
{
public class Column
{
public int ColumnNum { get; }
public string Name { get; }
public string DefaultValue { get; }
public string ColumnTypeString { get; }
public IColumnType ColumnType { get; }
public ConfigTypes ConfigTy... |
Python | UTF-8 | 1,733 | 3.296875 | 3 | [] | no_license | def solve():
X = 1
cycles = [None]
with open('10.in') as f:
for line in f:
match line.strip().split(" "):
case ["noop"]:
cycles.append((X, X)) # (during, after) cycle
case ["addx", val]:
cycles.append((X, X)) # (du... |
Markdown | UTF-8 | 2,747 | 2.6875 | 3 | [
"MIT"
] | permissive | # SignalR
Use this command to add NuGet:
install-package Microsoft.AspNet.SignalR
Replace in ChatHub:
using System;
using System.Web;
using Microsoft.AspNet.SignalR;
namespace SignalRChat
{
public class ChatHub : Hub
{
public void Send(string name, string message)
{
// Call the broadcastMessage... |
Java | UTF-8 | 545 | 2.546875 | 3 | [] | no_license | package org.webseer.java;
/**
* This is an interface that is used to work with simple java functional objects.
*
* @author ryan
*/
public interface JavaFunction {
/**
* Initialize is called once per function before the first time it is executed. This allows you to deal with inputs
* that are expected to be ... |
Markdown | UTF-8 | 4,884 | 3.421875 | 3 | [] | no_license | Exam prologues and epilogues
============================
More times than I can remember, I've been in a discussion of teaching
with Janet or Jerod and the following happens: They suggest a really
good idea. I respond with "Wow, that's a good idea." They then reply,
"Sam, I learned that idea from you." I don't know... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.