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 |
|---|---|---|---|---|---|---|---|
C | UTF-8 | 2,055 | 2.859375 | 3 | [] | no_license | #define NOTE_C4 1911 // 계이름들의 반주기
#define NOTE_D4 1702
#define NOTE_E4 1516
#define NOTE_F4 1431
#define NOTE_G4 1275
#define NOTE_A4 1136
#define NOTE_B4 1012
#define C 1911 // 계이름들의 반주기
#define D 1702
#define E 1516
#define F 1431
#define G 1275
#define A 1136
#define B 1012
int note_arr[8] = {NOTE_C4, NOTE_D4, NOT... |
C++ | UTF-8 | 5,750 | 2.859375 | 3 | [] | no_license | #include "mpi.h"
#include <iostream>
#include "math.h"
#include <time.h> // incluye "time"
#include <unistd.h> // incluye "usleep"
#include <stdlib.h> // incluye "rand" y "srand"
/*
mpicxx PROD.cpp -o prod
mpirun -np 6 INTERSINCRO
Procesos pares mejor
*/
#define Productor 0 //identificador de la etiqu... |
C++ | UTF-8 | 3,522 | 3.09375 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+... |
Shell | UTF-8 | 1,093 | 3.09375 | 3 | [] | no_license | #!/bin/bash
echo "================================================================================"
echo "============================== FT_CONTAINERS TEST =============================="
echo "================================================================================"
mkdir -p obj
mkdir -p results
clang++ -Wa... |
Java | UTF-8 | 1,721 | 1.976563 | 2 | [] | no_license | package kr.co.gugu.service;
import java.util.List;
import javax.inject.Inject;
import org.springframework.stereotype.Service;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import kr.co.gugu.dao.RoomDAO;
import kr.co.gugu.domain.RoomDTO;
... |
Java | UTF-8 | 888 | 3.0625 | 3 | [] | no_license | import java.util.Arrays;
public class Phonelist {
public static boolean checkList(String[] str) {
for(int i = 0; i < str.length-1; i++) {
int k = 0;
//try {
while ((k < str[i].length()) && (str[i].charAt(k) == str[i+1].charAt(k))) {
k++;
}
//} catch(StringIndexOutOfBoundsException exception) {... |
Java | UTF-8 | 1,125 | 2.65625 | 3 | [] | no_license | package harrisonwall.phase3;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import java.util.ArrayList;
public class SectionModAdapter extends ArrayAdapter<Sect... |
Java | UTF-8 | 415 | 1.859375 | 2 | [] | no_license | package com.jishijiyu.takeadvantage.entity.request;
import com.jishijiyu.takeadvantage.utils.Constant;
/**
* 邀请好友二维码
*
* @author sunaoyang
*/
public class InviteCodeAddressRequest {
public String c = Constant.INVITE_CODE_ADDRESS;
public Pramater p;
public InviteCodeAddressRequest() {
p = new Pramater();
}... |
Shell | UTF-8 | 397 | 3.796875 | 4 | [
"MIT"
] | permissive | #! /bin/bash
for i in $*
do
case $i in
3) Python=/opt/rh/rh-python34/root/usr/bin/python ;;
2) Python=/opt/rh/python27/root/usr/bin/python ;;
0) Python=python ;;
4) Python=python3.4 ;;
*) echo "Need a python version: 3 for python 3, 2 for python 2 or 0 to use the system default"; exit 1 ;;
esa... |
Java | UTF-8 | 597 | 2.015625 | 2 | [
"MIT"
] | permissive | package er.modern.movies.demo.components;
import com.webobjects.appserver.WOContext;
import com.webobjects.directtoweb.D2WContext;
import com.webobjects.directtoweb.D2WPage;
import er.extensions.components.ERXComponent;
public class PageWrapper extends ERXComponent {
public PageWrapper(WOContext context) {
... |
Java | UTF-8 | 1,027 | 2.28125 | 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 header1;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.util.Date;
import javax.faces.... |
SQL | UTF-8 | 3,029 | 4.125 | 4 | [] | no_license | CREATE VIEW ExtendedOrganization AS
SELECT
O.OID, O.Organization, O.Product, O.Last_Update,
O.SourceID,
F.Field, O.HasBranch, O.ParentID,
M.Description, M.Department, JP.JobPosition, A.Name
FROM Organization O
LEFT JOIN OFields Fs ON (Fs.OID = O.OID)
LEFT JOIN Field F ON (Fs.FieldID = F.Fiel... |
PHP | UTF-8 | 784 | 2.78125 | 3 | [] | no_license | <?php
namespace SergiuParaschiv\Config;
class Config {
private $cache;
public function __construct()
{
$this->cache = [];
}
public function get($name)
{
$name = $this->parseName($name);
$this->loadFile($name['file']);
return $this->ge... |
Python | UTF-8 | 3,797 | 2.765625 | 3 | [] | no_license | from __future__ import print_function
import dependency
import grpc
import grpc_iiwa_pb2
import grpc_iiwa_pb2_grpc
class lbr_grpc_client:
def __init__(self, ip="172.31.1.147", port=30009):
self.ip = ip
self.port = str(port)
self.channel = grpc.insecure_channel(self.ip + ":" + self.port)
... |
TypeScript | UTF-8 | 4,371 | 2.546875 | 3 | [
"MIT"
] | permissive | import { IHandleCommand, ICommand } from "./command-handler";
import { AzRunner } from "./az-runner";
import { Step, StepFrom } from "./command-pipeline-step";
import { injectable, inject } from "inversify";
import { Then } from "./command-pipeline-then";
import { TerraformInterfaces, ILogger } from "./terraform";... |
Java | UTF-8 | 1,859 | 3.34375 | 3 | [] | no_license | package crawley.james.stringutils;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Created by jamescrawley on 10/11/16.
*/
public class MyStringUtilsTest {
MyStringUtils utils = new MyStringUtils();
@Test
public void combineCharsTest () {
String actual = utils.combine(new char[... |
C | UTF-8 | 1,147 | 3.421875 | 3 | [] | no_license | #include <stdio.h>
#include <string.h>
#include <time.h>
// #define LOCAL
static int maxnum = 3000;
int f[maxnum];
// delete leading zero
int delzero(int x)
{
while (x>=0 && !f[x])
--x;
return x;
}
int main(void)
{
// #ifdef LOCAL
// freopen("output.txt","a+",stdout);
// #endif ... |
PHP | UTF-8 | 4,198 | 2.75 | 3 | [] | no_license | <?php
require_once '../CONTROLADOR/tipo_doc.control.php';
require_once '../MODELO/tipo_doc.model.php';
require_once '../MODELO/database.php';
//logica
$tipo_doc = new TipoDoc();
$model = new TipoDocModel();
$db = database::conectar();
if(isset($_REQUEST['action'])){
switch ($_REQUEST['action']) {
case 'actualizar':... |
Java | UTF-8 | 173 | 2.140625 | 2 | [
"MIT"
] | permissive | package app.domain.shared.exceptions;
public class SexException extends IllegalArgumentException{
public SexException(String message){
super(message);
}
}
|
Java | UTF-8 | 2,785 | 2.125 | 2 | [] | no_license | package org.webrtc;
public interface Predicate<T> {
Predicate<T> and(Predicate<? super T> predicate);
Predicate<T> negate();
Predicate<T> or(Predicate<? super T> predicate);
boolean test(T t);
/* renamed from: org.webrtc.Predicate$-CC reason: invalid class name */
public final /* synthetic... |
Markdown | UTF-8 | 1,169 | 3.3125 | 3 | [
"MIT"
] | permissive | ## Functions
### Built-in functions
* `abs`
* `all`
* `any`
* `bin`
* `bool`
* `chr`
* `dict`
* `dir`
* `divmod`
* `enumerate`
* `filter`
* `float`
* `hex`
* `int`
* `isinstance`
* `issubclass`
* `len`
* `list`
* `long`
* `map`
* `max`
* `min`
* `oct`
* `ord`
* `pow`
* `print`
* `range`
* `raw_input`
* `reduce`
* `re... |
Java | UTF-8 | 261 | 2.546875 | 3 | [] | no_license | package DecoratorPattern;
public class Client {
public static void main(String[] args){
Component component=new ConcreateComponent();
component=new ConcreteDecotator1(component);
component=new ConcreteDecorator2(component);
component.operate();
}
}
|
JavaScript | UTF-8 | 902 | 2.65625 | 3 | [] | no_license | import React, { Component } from "react";
class KeyPad extends Component {
constructor(props) {
super(props);
}
keyPress(e, value) {
e.preventDefault();
this.props.onSubmit(value);
}
render() {
let keyVals = [
[0, 1, 2],
[3, 4, 5],
[6, 7, 8],
[9, 10, 'reset']
];
... |
Java | UTF-8 | 1,435 | 1.921875 | 2 | [
"Apache-2.0"
] | permissive | /*******************************************************************************
* Copyright 2020 Intel Corporation
*
* 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.apach... |
JavaScript | UTF-8 | 1,928 | 2.625 | 3 | [] | no_license | const express = require('express')
const cors = require('cors')
const request = require('request')
const app = express()
const config = {
app: {
port: 80,
restricted: false,
whitelist: [
// if restricted is enabled will only
// allow any request with a whitelisted
// origin to use the C... |
Markdown | UTF-8 | 5,799 | 2.71875 | 3 | [] | no_license | # Article Annexe
1. SPÉCIFICATIONS TECHNIQUES
1.1. Description
La croix lumineuse est constituée d'un ensemble de feux lumineux jaunes à éclats disposés sur un support en forme de croix dite de Saint-André.
Le support des feux est constitué de deux branches de même longueur se coupant perpendiculairement en leur mi... |
Java | UTF-8 | 1,133 | 2.546875 | 3 | [
"MIT"
] | permissive | package _06FootballBettingDatabase;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
/**
* Created by IntelliJ IDEA.
* User: LAPD
* Date: 28.3.2018 г.
* Time: 21:18 ч.
*/
@Entity
@Table(name = "bets")
public class Bet {
private int id;
private BigDecimal betMoney;
pri... |
Java | UTF-8 | 439 | 2.375 | 2 | [] | no_license | package com.personal.oyl.stateMachine.handler;
import com.personal.oyl.stateMachine.AbstractStateHandler;
import com.personal.oyl.stateMachine.Event;
import com.personal.oyl.stateMachine.Order;
public class DeliverHandler extends AbstractStateHandler {
@Override
protected void doHandler(Order order) {
... |
Markdown | UTF-8 | 4,336 | 2.84375 | 3 | [
"MIT"
] | permissive | # Netplay
Networking abstraction layer for GameMaker Studio 2 which introduces formatted packets and offloaded packet handling
## Usage
Netplay uses the concept of a `session` to manage your networking. You create a `session` by calling `netplay_create_session`, and using this in all future Netplay functions. A sess... |
Shell | UTF-8 | 1,444 | 2.671875 | 3 | [] | no_license | # $Id$
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: ice-man <icemanf@gmail.com>
pkgname=sisctrl
pkgver=0.0.20051202
pkgrel=7
arch=(i686 x86_64)
pkgdesc="Display Control Panel for XFree86/X.org SiS driver"
makedepends=('pkgconfig')
depends=('gtk2' 'libxxf86vm' 'libxv')
url="http://www.winischh... |
Python | UTF-8 | 948 | 3.234375 | 3 | [] | no_license | """This module is used to measure the drones hieght with the VL53L0X.
It uses a python library called 'VL53L0X'."""
import time
import VL53L0X
class HeightMeasurer:
def __init__(self, posdata):
self.positiondata = posdata
# Create a VL53L0X object
self.tof = VL53L0X.VL53L0X()
# ... |
Shell | UTF-8 | 2,353 | 3.9375 | 4 | [] | no_license | #!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
# Copyright © 2019 ANSSI. All rights reserved.
# Safety settings: do not remove!
set -o errexit -o nounset -o pipefail
# Do not run as root
if [[ "${EUID}" == 0 ]]; then
>&2 echo "[*] Do not run as root!"
exit 1
fi
main() {
if [[ -z "$(comm... |
Java | UTF-8 | 663 | 2.078125 | 2 | [] | no_license | package com.example.android.bakingapplication.dagger.module;
import com.example.android.bakingapplication.presentation.DetailListFragmentPresenter;
import com.example.android.bakingapplication.presentation.DetailListFragmentPresenterImpl;
import com.example.android.bakingapplication.repository.RecipeRepository;
import... |
Markdown | UTF-8 | 1,246 | 2.625 | 3 | [
"MIT"
] | permissive | # whiskybook
An app to manage the documentation of your whisky tastings
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You will need the following tool installed an setted up on your computer
- Node.js 8
- git
- ssh... |
C++ | UTF-8 | 2,008 | 3.1875 | 3 | [
"Apache-2.0"
] | permissive | /**
* AddressInfo.h
*
* Utility wrapper arround "getAddressInfo()"
*
* @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
* @copyright 2015 Copernica BV
*/
#pragma once
namespace AMQP {
/**
* Class definition
*/
class AddressInfo
{
private:
/**
* The addresses
* @var struct Addre... |
Java | UTF-8 | 1,146 | 2.234375 | 2 | [
"BSD-3-Clause"
] | permissive | package com.socialmanager;
import android.os.Bundle;
import com.socialmanager.SocialManager.Action;
import com.socialmanager.SocialManager.Platform;
public interface SocialActionListener {
/**
* Callback for completion, note that this method is called in sub-thread
* @param platform Platform for the callback
... |
Python | UTF-8 | 714 | 3.21875 | 3 | [] | no_license | # Consume all memory
import os
from datetime import datetime
import psutil
memory_usage_limit_megabytes = 1000
def memory_usage_megabytes():
process = psutil.Process(pid)
mem = process.memory_info().rss / 1_048_576
return mem
print("Start eating memory...")
print("Memory limit (MB): ", memory_usage_li... |
Markdown | UTF-8 | 1,512 | 3.265625 | 3 | [] | no_license | # Personnel-Management-System
Project that uses binary search trees to arrange a list of names received from a text file, it can arrange the names in ascending or descending order.
For this project, I used past notes from my data structures class, on the logic on how
binary search trees work. I used online references... |
PHP | UTF-8 | 1,649 | 3.140625 | 3 | [] | no_license | <?php
require_once "Autoloader.php";
Autoloader :: register();
class Loger extends Etudiant{
private $batiment;
private $chambre;
public function __construct($matricule="",$nom = "", $prenom = "",$email="",
$telephone="",$dat_naissance="",$batiment="",$chambre="") {
parent::__construct(... |
Java | UTF-8 | 1,343 | 2.328125 | 2 | [
"Apache-2.0"
] | permissive | package com.phodu.tambola.ticket.manage;
import org.junit.Test;
import com.phodu.tambola.board.FullBoardException;
import com.phodu.tambola.board.InvalidGameException;
import com.phodu.tambola.board.TambolaBoard;
import com.phodu.tambola.board.manage.BoardManagementService;
import com.phodu.tambola.profile.Profile;
i... |
Java | UTF-8 | 877 | 1.96875 | 2 | [
"Apache-2.0"
] | permissive | package com.classic.clearprocesses;
import android.content.Context;
import com.classic.adapter.BaseAdapterHelper;
import com.classic.adapter.CommonRecyclerAdapter;
import org.github.yippee.notifytools.R;
import java.util.List;
import io.reactivex.Observer;
import io.reactivex.annotations.NonNull;
import io.reactiv... |
Java | UTF-8 | 628 | 3.15625 | 3 | [] | no_license | import java.applet.Applet;
import java.awt.Font;
import java.awt.Graphics;
//write a program to move banner between two borders.
public class MoveBanner extends Applet implements Runnable
{
Thread th;
Font f;
int c;
public void init()
{
th=new Thread(this);
c=1;
f=new Font("Arial",Font.... |
Python | UTF-8 | 5,665 | 2.59375 | 3 | [
"MIT"
] | permissive | import operator
from collections import namedtuple
from typing import List
import numpy as np
from mpi4py import MPI
comm = MPI.COMM_WORLD
num_workers = comm.Get_size()
rank = comm.Get_rank()
Transition = namedtuple(
"Transition",
[
"observation",
"action",
"extrinsic_return",
... |
C++ | UTF-8 | 1,029 | 2.75 | 3 | [] | no_license | #include <iostream>
using namespace std;
int n, m, cnt = 0;
char a[55][55], b[55][55];
void changeMatrix(int x, int y){
cnt++;
for(int i=x; i<x+3; i++)
for(int j=y; j<y+3; j++)
a[i][j] = (a[i][j] - '0') ? '0' : '1';
return;
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
... |
Markdown | UTF-8 | 6,587 | 2.90625 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: Machine Learning 101 - Workshops & More at NIT Warangal
---
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/post.css" />
In my final year of Undergraduate studies, I wanted to start an active machine learning group in our college where like-minded people would come together, ide... |
JavaScript | UTF-8 | 3,086 | 3.75 | 4 | [] | no_license | /**
* @author Essmaker, Jo'Anne (joannessmaker@gmail.com)
* @summary Project 4 || created: 10/15/2017
*/
"use strict";
const PROMPT = require('readline-sync');
let continueResponse;
let movieRating1, movieRating2, movieRating3, totalRatingSum, averageRating;
let movieTitle;
function main() {
process.stdou... |
Shell | UTF-8 | 2,041 | 4.09375 | 4 | [] | no_license | #!/bin/bash
##
# script simply
# - installs postgres, psql (client) and psycopg2 (client driver).
# - also adds a superuser, because permissioning was a bit awkward in python driver
#
#
# usage
#
while getopts ":h" opt; do # n.b. getopts starts at 1st argument ($1) and stops at the 1st non-option argument
case... |
Markdown | UTF-8 | 23,932 | 3.046875 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: Financial Statement Insights
date: 2020-09-25
summary:
categories: biz
---
* 主題:從財報數字看懂經營本質
* 目標:能夠從財報中,真的看出一些 insights 而不是只會算
* 緣起:上學期修完初等會計一已經會看三種財報、但還是不知道怎樣的數字才合理、怎樣的數字是有危機的
### 讀財報
1. 了解資產負債表,現金流量表,損益表的意涵
2. 了解表上面數字隱含的意思,數字落在哪個區間才健康
### 稻盛荷夫:財報的四步驟
- 財報須呈現真實經營情況... |
C# | UTF-8 | 1,339 | 3.0625 | 3 | [
"MIT"
] | permissive | using System;
namespace Duracion
{
class Duracion{
private int Hr;
private int Mi;
private int Seg;
private int mit;
public Duracion(int H, int M, int S,int mt ){
Hr = H;
Mi = M;
Seg = S;
mit =mt;
}
public void print(){
Console.WriteLine("Horas :"+Hr+" Minutos : "+Mi+" Segundos :"+S... |
Java | UTF-8 | 4,958 | 1.734375 | 2 | [] | no_license | package com.banry.pscm.persist.dao;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
impo... |
Python | UTF-8 | 439 | 3.3125 | 3 | [] | no_license | import math
def is_prime(n):
if n % 2 == 0 and n != 2 or n % 1 != 0 or n <= 1:
return False
for i in range(2, int(math.sqrt(n) + 1)):
if n % i == 0:
return False
return True
def gcd(a, b):
while (b):
(a, b) = (b, a % b)
return abs(a)
def lcm(a, b):
try:
... |
Java | UTF-8 | 4,154 | 2.40625 | 2 | [] | no_license | package mchehab.com.javafirebaseauthentication;
import android.content.Intent;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ProgressBar;... |
Python | UTF-8 | 22,343 | 2.765625 | 3 | [] | no_license | import codecs
import os
import nltk
import re
import spacy
nlp_tool = spacy.load('en')
import xml.sax
import zipfile
# all text follow word2vec and fasttext format
# lower cased
# number normalized to 0
# utf-8
pattern = re.compile(r'[-_/]+')
def my_split(s):
text = []
iter = re.finditer(pattern, s)
sta... |
PHP | UTF-8 | 395 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Models\HelloBarClick;
use App\Contracts\HelloBarClicksServiceInterface;
class HelloBarClicksService implements HelloBarClicksServiceInterface {
public function __construct(HelloBarClick $hello_bar_click) {
$this->hello_bar_click = $hello_bar_click;
}
public function addCl... |
Python | UTF-8 | 964 | 4 | 4 | [] | no_license | class Solution:
def countSubstrings(self, S: str) -> int:
N = len(S)
ans = 0
for center in range(2*N - 1):
left = int(center / 2)
right = int(left + center % 2)
while left >= 0 and right < N and S[left] == S[right]:
ans += 1
... |
C# | UTF-8 | 9,883 | 2.984375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
namespace CSharpDateConverter
{
public partial class Form1 : Form
{
pub... |
Python | UTF-8 | 1,132 | 3.96875 | 4 | [] | no_license | # ==================================================== #
# #
# Created By: Darhil Aslaliya - GitHub :- darsh-22 #
# #
# ==================================================== #
# required module
import random
... |
Java | UTF-8 | 875 | 3.171875 | 3 | [] | no_license | package layouts;
import java.awt.Frame;
import java.awt.BorderLayout;
import java.awt.Panel;
import java.awt.Button;
class S extends Frame{
Button btn1,btn2;
S(){
setLayout(new BorderLayout());
btn1=new Button("File");
btn2=new Button("Edit");
add(new M(),BorderLayout.WEST);
... |
Java | UTF-8 | 2,666 | 2.9375 | 3 | [] | no_license | package api;
public class NodeData implements node_data {
private class location implements geo_location{
private double x, y, z, dis;
public location(double x, double y, double z, double dis){
this.x = x;
this.y = y;
this.z = z;
this.d... |
C | UTF-8 | 954 | 2.65625 | 3 | [] | no_license | #include <stdio.h>
#include "advstat.h"
#include "dangerous.h"
#include "four_three.h"
enum {
DEBUG_DANGER = 0
};
/**
* returns 0 if (x,y) is not dangerous
* 1 if is four danger
* 2 if is active three danger
* 3 if is 4+3 danger
*/
int isDangerous(Configuration v, int x, int y, PEBBLE_COLOR p){
int idx=(p==BLA... |
C# | UTF-8 | 1,165 | 2.828125 | 3 | [] | no_license | //return full data
public UserFull GetUser(Guid userId)
{
using (var c = ConnectionToDataBase())
{
var user = c.Users
.Where(u => u.Id==userId)
.Select(u => new UserFull
{
Id = u.Id,
... |
Java | UTF-8 | 1,797 | 3.203125 | 3 | [] | no_license | import java.util.*;
public class Cuenta {
private double balance;
private Usuario userAccount;
private List<Gasto> expenses;
private List<Ingreso>income;
public Cuenta(Usuario usuarioCuenta) {
this.userAccount=usuarioCuenta;
this.balance=0;
this.expenses=new ArrayList<... |
Java | UTF-8 | 4,799 | 2.28125 | 2 | [] | no_license | /******************************************************************************
* Copyright (C) 2016
* ShenZhen ComTop Information Technology Co.,Ltd
* All Rights Reserved.
* 本软件为深圳康拓普开发研制。
* 未经本公司正式书面同意,其他任何个人、团体不得使用、
* 复制、修改或发布本软件.
*****************************************************************************/... |
Java | UTF-8 | 1,328 | 2.078125 | 2 | [] | no_license | package br.com.jg.loucademia.interfaces.aluno.web;
import java.io.Serializable;
import java.util.List;
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.inject.Named;
import br.com.jg.loucademia.application.service.AlunoService;
import br.com.jg.loucademia.... |
Markdown | UTF-8 | 1,918 | 2.78125 | 3 | [] | no_license | # Aufgaben
## Aufgabe 1
Formulieren Sie einen Algorithmus (in einfachen Sätzen oder Pseudocode), der es ermöglicht, in dem unten gezeigten Buchstabenarray eines der Wörter: **sein**, **tat**, **kann** oder **ist** zu finden. Die Leserichtung für die Wörter kann dabei horizontal, vertikal oder diagonal und jeweils vor... |
Markdown | UTF-8 | 1,921 | 2.515625 | 3 | [
"MIT"
] | permissive | # "The" Build
This repository contains project setup templates and reusable phing build targets for Drupal projects.
_Note: If you are starting a new a project, you may be looking for the [drupal-skeleton](https://github.com/palantirnet/drupal-skeleton)._
## Adding the-build with composer
```sh
$> composer require ... |
JavaScript | UTF-8 | 3,347 | 3.171875 | 3 | [] | no_license | var products=[] ;
// نجيب الداتا من الداتا بيز ونعرضها عند عملية الريفريش
if(localStorage.getItem("products")==null){
products=[]
}else{
products=JSON.parse(localStorage.getItem("products")) // parse convert string to object
displayData();
}
// نجيب الداتا من حقول الادخال
function getData(){
var Prod... |
Java | UTF-8 | 475 | 1.992188 | 2 | [] | no_license | package com.example.app.spring3;
import com.example.app.spring3.context.PhoneBookApplicationContext;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
/**
* Hello world!
*
*/
public class Main
{
public static void main( Stri... |
Java | UTF-8 | 129 | 2.015625 | 2 | [
"MIT"
] | permissive | package sdt;
public class SDTException extends RuntimeException {
public SDTException(String message) {
super(message);
}
}
|
C | UTF-8 | 4,544 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | #include <xc.h> /* XC8 General Include File */
#include "i2c.h"
// ---------------------------------------------------------------------------
// Init MSSP module in master mode
// ---------------------------------------------------------------------------
void I2cInitMaster(void)
{
SCL_PIN = 1; // SCL/SDA l... |
Python | UTF-8 | 19,360 | 2.671875 | 3 | [] | no_license | import serial
import textwrap
import time
import threading
import ast
'''
This protocol can operate with action codes up to 255
The first 32 is used by the protocol. The others defined by the interfaces.
First 32 code:
1 - Basic text
2 - Bundle header code
3 - Apply new time... |
C | UTF-8 | 946 | 3.78125 | 4 | [] | no_license | #include <stdio.h>
#include <string.h>
int palindrome(int num){
char str[40];
sprintf(str, "%d", num);
int len=strlen(str);
int end=len-1;
int start=0;
for (start=0; start<end; start++){
if(str[start]!=str[end])
return 0;
end--;
}
return 1;
}
int findMaxPalindrome(){
int first... |
C++ | UTF-8 | 333 | 2.84375 | 3 | [] | no_license | class Solution {
public:
int nthUglyNumber(int n) {
set<long long> s;
n--;
long long x = 1;
while(n--)
{
s.insert(x*2);
s.insert(x*3);
s.insert(x*5);
x = *(s.begin());
s.erase(s.begin());
}
return (in... |
JavaScript | UTF-8 | 1,879 | 2.578125 | 3 | [] | no_license | import React, { Component } from "react";
import { bindActionCreators } from "redux";
import { connect } from "react-redux";
import { createBoard, changeCellState, randomizeBoard } from "../../actions/index";
import "./Board.css";
class Board extends Component {
renderBoard = () => {
if (!this.props.board.cells)... |
Java | UTF-8 | 3,518 | 2.21875 | 2 | [
"Apache-2.0"
] | permissive |
package de.tfsw.accounting.io.xml;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for xmlClient complex type.
*
* <p>The following schema fr... |
C++ | UTF-8 | 445 | 3.296875 | 3 | [] | no_license | #include <iostream>
#include <string>
using namespace std;
void letras(string str){
int voc=0;
for(unsigned int i=0; i<str.length(); i++){
if(str[i]=='a' || str[i]=='A' || str[i]=='e' || str[i]=='E' || str[i]=='i' || str[i]=='I' || str[i]=='o' || str[i]=='O' || str[i]=='u' || str[i]=='U'){
voc++;
}
}
cout ... |
C# | UTF-8 | 1,263 | 3.15625 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Study
{
/// <summary>
/// 约瑟夫环[有死循环未解决]
/// </summary>
public class JosephRing : MonoBehaviour
{
private readonly List<int> people = new List<int>();
private void Start()
{
... |
C | UTF-8 | 751 | 2.625 | 3 | [
"MIT"
] | permissive | #include "stride.h"
int OutSeq(CHAIN **Chain, int NChain, COMMAND *Cmd)
{
int Cn, Res;
FILE *Seq;
if( (int)strlen(Cmd->SeqFile) == 0 )
Seq = stdout;
else
if( (Seq = fopen(Cmd->SeqFile,"a")) == NULL )
die("Error writing sequence file %s\n",Cmd->SeqFile);
for( Cn=0; Cn<NChain; Cn++ ) {
if... |
Java | UTF-8 | 1,005 | 2.078125 | 2 | [] | no_license | package com.didu.serviceImpl;
import com.didu.dao.Carouseldao;
import com.didu.dao.Navigationdao;
import com.didu.domain.Navigation;
import com.didu.service.NavigationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transa... |
Shell | UTF-8 | 179 | 2.703125 | 3 | [] | no_license | #!/bin/bash
DEPLOY_DIR=`dirname $0`/listen_deploy
echo "DEPLOYING to $DEPLOY_DIR"
ant -Ddeploy.dir=$DEPLOY_DIR test deploy
JRET=$?
if [ $JRET == "0" ]; then
ant clean rpm
fi
|
Java | UTF-8 | 1,168 | 3.078125 | 3 | [] | no_license | package withattribute;
import java.util.ArrayList;
import java.util.List;
public class Route {
private long id;
private String name;
List<BusRoute> busRouteList = new ArrayList<>();
public Route(long id, String name) {
this.id = id;
this.setName(name);
}
public void addBusRou... |
JavaScript | UTF-8 | 1,736 | 2.546875 | 3 | [] | no_license | import React from 'react';
import './Rate.css';
import Calc from '../Calc/Calc'
class Rate extends React.Component {
constructor(props) {
super(props);
this.state = {
'date': '',
'currencyRate': {}
}
this.getRate();
this.currency = ["USD", "RUB", "CAD", "PHP", "BRL"];
}
getRate... |
Markdown | UTF-8 | 3,110 | 3.25 | 3 | [
"MIT"
] | permissive |
# stripe-cohort
Create [Stripe](https://stripe.com) customer cohorts for a useful business overview.
### Overview
If you're interested in getting a cohort based overview of your Stripe customers, then this library might be of help.
It currently supports the following stats (by cohort):
- Total number of custome... |
C# | UTF-8 | 687 | 2.515625 | 3 | [] | no_license | using System;
using Xamarin.Forms;
namespace XFormsDrawer
{
public class BoxView : View
{
public static readonly BindableProperty BorderColorProperty =
BindableProperty.Create<EllipseView, Color>(p => p.Color, Color.Accent);
public static readonly BindableProperty FillColorProperty =
BindableProperty.Cre... |
Python | UTF-8 | 721 | 2.953125 | 3 | [] | no_license | #
import math
import Queue
import copy
def solve(name, n):
start = 0
i = 0
r = 0
result = 0
while i < len(name):
if name[i] not in 'aeiou':
r += 1
if r >= n:
# print i+1,n,start,(i+1-n-start+1),(len(name)-i)
result += (i+1-n-start+1)*(len(name)-i)
start = i-n+2
else:
r = 0
i += 1
... |
JavaScript | UTF-8 | 2,125 | 2.65625 | 3 | [] | no_license | /* Created by and property of: Aidan Harney
Free use provided to: Perth's Allied Costumers
Said use can by revoked by said owner at any time */
(function ($) {
// Define the AHyoutube button
$.cleditor.buttons.AHyoutube = {
name: "AHyoutube",
image: "youtube.gif",
title: "I... |
Java | UTF-8 | 4,938 | 3 | 3 | [] | no_license | package sintatico.execucao;
import sintatico.armazenamento.htmltojava;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Stack;
import lexico.conceito.armazenamento.Token;
import lexico.conceito.processamento.ErroLexico;
import lexico.conceito.processamento.Lexico;
import sintatico.arma... |
Shell | UTF-8 | 110 | 2.671875 | 3 | [] | no_license | #! /bin/bash
for i in $(seq 1 16);
do
port=$((8000 + $i))
python ../src/webapp.py --port $port&
done
|
C++ | UTF-8 | 3,410 | 3.703125 | 4 | [] | no_license | #include <iostream>
#include <math.h>
#define MAX 2
using namespace std;
struct Fraction
{
float numerator;
float denominator;
};
void InputFraction(Fraction *F)
{
do
{
cout << "Input numerator: ";
cin >> F->numerator;
cout << "Input denominator: ";
cin >> F->denominator;
} while (F->den... |
SQL | UTF-8 | 1,630 | 3.25 | 3 | [
"MIT"
] | permissive | /*
SQLyog Ultimate v12.4.1 (64 bit)
MySQL - 10.1.21-MariaDB : Database - db_parkir
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS... |
Markdown | UTF-8 | 965 | 2.515625 | 3 | [] | no_license | # Codevember
Codevember is a challenge for developers to sharpen their creativity and improve their skills. The goal is to build a creative piece of code every day of November. We give you daily hints to inspire you but you can do unrelated sketches.
* [Day 01 - Infinity](https://codepen.io/H0tFudge/full/pQzpoq/)
* [D... |
Java | UTF-8 | 3,279 | 2.359375 | 2 | [] | no_license | package com.br.smartzoo.ui.adapter;
import android.app.Activity;
import android.content.res.Resources;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget... |
Java | UTF-8 | 7,747 | 2.96875 | 3 | [] | no_license | package data.mappers;
import data.DatabaseConnector;
import data.ExceptionLogger;
import data.exceptions.UsersException;
import data.interfaces.MapperInterface;
import data.models.LoggerEnum;
import data.models.RoleEnum;
import data.models.User;
import java.sql.Connection;
import java.sql.PreparedStatement;
import jav... |
Java | UTF-8 | 323 | 2.015625 | 2 | [] | no_license | package com.lunatech.assignment.imdb.client.dao;
import java.util.List;
public interface ImdbDao {
List<String> readTopRatedMovieByGenre(String genre);
List<String> getGenresForActor(String name);
List<String> getTitlesForPerson(String name);
List<String> getCharactersByTitles(List<String> titles);... |
Go | UTF-8 | 431 | 3.0625 | 3 | [
"BSD-3-Clause"
] | permissive | package main
import (
"net"
"fmt"
"log"
"bufio"
)
func main(){
li,err:=net.Listen("tcp",":8080")
if err!=nil{
fmt.Println("error1")
}
defer li.Close()
for{
conn,err:=li.Accept()
if err!=nil{
log.Println("error")
}
go handle(conn)
}
}
func handle(conn net.Conn){
scanner:=bufio.NewScanner(conn... |
Python | UTF-8 | 7,625 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | import refMaps
import context
import match
def hasTags(node):
return "tags" in node
def matchNodes(node1, node2, conf):
#print("matching nodes", node1["tags"], "and", node2["tags"])
node1["matched"] = True
node2["matched"] = True
node1["match"] = match.Match(node2, conf)
node2["match"] = match.Match(node1, co... |
Java | UTF-8 | 334 | 1.773438 | 2 | [] | no_license | package njust.service;
import njust.model.User;
public interface UserService extends BaseService<User> {
public boolean isRegisted(String email);
public User validateLoginInfo(String email, String md5);
public void clearAuthorize(Integer userId);
public void updateAuthorize(User model, Integer[] own... |
TypeScript | UTF-8 | 1,662 | 3.140625 | 3 | [] | no_license | const solve09 = (matrix: string[][]) => {
const MINE = "x";
for (let i = 0; i < matrix.length; i++) {
for (let j = 0; j < matrix[i].length; j++) {
if (matrix[i][j] == MINE) continue;
let counter = 0;
// right
if (matrix[i][j + 1] && matrix[i][j + 1] == MINE) {
counter++;
}
... |
JavaScript | UTF-8 | 701 | 3.3125 | 3 | [] | no_license | function createBoxes(num) {
let card = document.querySelector('#root');
let acc = '';
for(let i = 0; i < num; i++){
acc += '<div></div>';
}
card.innerHTML += acc;
console.log(card.children);
let height = 30;
let width = 30;
for(let el of card.children) {
let r = Math.floor(Math.random() * (256... |
Java | UTF-8 | 1,923 | 3.40625 | 3 | [] | no_license | package Modelos;
import java.util.ArrayList;
import java.util.List;
/*
Clase Padre de personas ya que las personas pueden ser veterinarios o duenios de mascotas
*/
public class PersonaImpl{
//Constructor
protected Integer cedula;
protected String nombre;
protected String ap1;
protected Stri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.