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 | 271 | 2.53125 | 3 | [] | no_license | '''
CS3150
PythonParser
@author: Sabrina Cown
'''
from Parser import *
class Id(object):
def __init__(self, ch):
self.ch = ch
def getValue(self, ch):
return Parser.fetch(self.ch)
def getChar(self, ch):
self.var = ch
return self.var
|
Java | UTF-8 | 2,168 | 2.3125 | 2 | [] | no_license | package kz.almaty.boombrains.viewmodel.records.record_view_model;
import android.content.Context;
import android.util.Log;
import android.widget.Toast;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import org.jetbrains.annotations.NotNull;
import kz.almaty.boombrains.data.models.recor... |
Python | UTF-8 | 750 | 3.359375 | 3 | [] | no_license | d=0
maxdel=2
for i in range(84052,84131):
k=0
for a in range(1,i+1):
if i%a==0:
k+=1
if k>maxdel:
maxdel=k
d=i
print(maxdel,d)
"""
Напишите программу, которая ищет среди целых чисел, принадлежащих числовому
отрезку [84052; 84130], число, имеющ... |
TypeScript | UTF-8 | 5,879 | 2.640625 | 3 | [
"MIT"
] | permissive | import Controller, { Delete, Get, Post, Put, Route } from "@config/controller";
import Folder from "@models/folder/folder";
import FolderFolder from "@models/folder/folder_folder";
import { Request, Response } from "express";
import validate from "validate.js";
@Route("/api/folder")
export class FolderController exten... |
Markdown | UTF-8 | 1,648 | 2.5625 | 3 | [
"MIT"
] | permissive | <p align="center">
<a href="https://laravel.com" target="_blank"><img src="https://laravel.com/assets/img/components/logo-laravel.svg"></a>
<!-- <a href="https://www.granatum.com.br/financeiro/api/" target="_blank"><span style="background-color:#00579B;"><img src="https://www.granatum.com.br/financeiro/img/logo-gran... |
Java | UTF-8 | 224 | 2.15625 | 2 | [] | no_license | package uy.proitc.jaxws.server;
import javax.jws.WebService;
@WebService(targetNamespace = "http://jaxws.proitc.uy/wsdl")
public interface Calculator {
int sum(int num1, int num2);
int multiply(int num1, int num2);
}
|
Markdown | UTF-8 | 1,414 | 2.59375 | 3 | [
"LicenseRef-scancode-free-unknown",
"MIT"
] | permissive | ---
title: Global Migrant Stock Chord Diagrams
date: '2020-06-20'
linkTitle: https://guyabel.com/post/global-migrant-stocks/
source: Posts on Guy Abel
description: ' <p>Over the last few months I have been playing around with different
ways of showing changing global bilateral migrant stocks, adapting the the code
... |
Java | GB18030 | 647 | 3.5 | 4 | [] | no_license | package day03;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
/*
* ʹļַıļ
*/
public class FileCopy7 {
public static void main(String[] args) throws IOException {
/**
* ڶȡļַ
*/
FileReader reader=new FileReader("CopeFile5.java");//
/... |
Python | UTF-8 | 672 | 3.171875 | 3 | [] | no_license | from collections import defaultdict
class Solution(object):
def findJudge(self, N, trust):
"""
:type N: int
:type trust: List[List[int]]
:rtype: int
"""
if not trust:
return 1 if N == 1 else -1
be_trusted = defaultdict(list)
trusting = se... |
Python | UTF-8 | 281 | 3.75 | 4 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Tue Sep 22 29:17:00 2020
@author: James
"""
print ("This program converts from miles to kilometers")
name = input("Please enter your name: ")
#print ("Hello " + name + ". Welcome to Python!")
print (f"Hello {name}. Welcome to Python!") |
JavaScript | UTF-8 | 7,070 | 2.640625 | 3 | [] | no_license | //load iso data from local file
const data = Data;
//firebase config
const firebaseConfig = config;
firebase.initializeApp(firebaseConfig);
const messageAppReference = firebase.database();
//handlebars
let confirmed_source = $('#confirmed').html();
let confirmed_template = Handlebars.compile(confirmed_source);
let none... |
C# | UTF-8 | 2,534 | 4.125 | 4 | [] | no_license | using System;
namespace cSharpProjectEulerSolutions
{
public partial class ProjectEuler
{
/* *************************************10001st prime**************************************** */
/*By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
... |
Markdown | UTF-8 | 1,097 | 2.59375 | 3 | [] | no_license | ---
link: http://pogue.blogs.nytimes.com/2011/04/14/the-tragic-death-of-the-flip/
date: 2011-04-15 13:27 UTC
# published: false
published: true
title: David Pogue on the Curious Death of The Flip
tags: []
---
Sorry to keep flooding the channel with Flip stuff, but it utterly bums me out since the Flip was a great exam... |
PHP | UTF-8 | 1,699 | 2.75 | 3 | [] | no_license | <?php
namespace Core;
use Core\Application;
/**
* @package Core\Controller
*/
class Controller extends Application
{
/**
* @var string
*/
protected $controller;
/**
* @var string
*/
protected $action;
/**
* @var string
... |
SQL | UTF-8 | 945 | 3.234375 | 3 | [] | no_license | CREATE database yelp;
CREATE TABLE YELP_ADDRESS
(Restaurant_id BIGINT(20) NOT NULL auto_increment,
comp_name VARCHAR(30),
street VARCHAR(30),
postalcode VARCHAR(10),
city VARCHAR(20),
PRIMARY KEY(Restaurant_id),
rating VARCHAR(20),
segment VARCHAR(20),
reviews varchar(60));
CREATE TABLE YELP_REVIEWS
(Revie... |
Markdown | UTF-8 | 6,163 | 3.265625 | 3 | [] | no_license | ---
title: Rxjava学习:谈谈Rxjava的使用
date: 2016-08-25 17:27:24
categories: Rxjava学习
tags:
---

### 前言
在 [Rxjava学习:初识Rxjava](http://www.jianshu.com/p/264a1322669a) 一文中,我们对Rxjava的几个基本概念做了介绍,今天就来谈谈对Rxjava的使用。
<!-- more-->
### Rxjava的具体使用
下面还是从几个基本概念开始入手:
#### 创建Observer
作为Rxja... |
Python | UTF-8 | 325 | 3.046875 | 3 | [] | no_license | import math
import time
import copy
start = time.clock()
number = 1
while 1:
for jump in range(1, 7):
if sorted(str(number)) != sorted(str(jump*number)):
number += 1
break
elif jump == 6:
print(number)
print(time.clock() - start)
quit()
... |
Python | UTF-8 | 20,815 | 3.140625 | 3 | [
"BSD-3-Clause"
] | permissive | # This Python file uses the following encoding: utf-8
from unittest import TestCase
from galactic.context.memory import *
class MemoryContextTest(TestCase):
def test___init__(self):
context = MemoryContext(
definition={'mybool': bool, 'myint': int}
)
self.assertEqual(
... |
Java | UTF-8 | 1,815 | 2.4375 | 2 | [
"Apache-2.0"
] | permissive | package cn.mapway.ui.client.mvc;
import com.google.gwt.user.client.ui.Widget;
/**
* 系统中模块的定义接口,根据设计原则,可以将代码划分为 系统/模块/子模块/操作 四个界别
* 这个接口定义了如果要满足 模块和子模块的功能必须要实现的接口
*
* @author zhangjianshe
*/
public interface IModule {
/**
* 初始化模块.
*
* @param parentModule the parent module
* ... |
JavaScript | UTF-8 | 449 | 4.28125 | 4 | [] | no_license | // Have the function FirstFactorial(num) take the num parameter being passed and return the factorial of it.
//For example: if num = 4, then your program should return (4 * 3 * 2 * 1) = 24.
// Entry #004 05042019
'use strict'
var input = 4;
function FirstFactorial(input, output = 1) {
if (input == 0) {
retur... |
PHP | UTF-8 | 778 | 2.609375 | 3 | [] | no_license | <?php
session_start ();
require_once 'class/User.class.php';
$user = new User();
$products = $user->viewProducts();
//$name,$description, $price , $supplier_id, $category_id, $image
?>
<?php include ("header.php");?>
<h3>Products</h3><a href="productAdd.php">Add Product</a>
<table class="table">
... |
Java | UTF-8 | 3,293 | 2.03125 | 2 | [] | no_license | package com.lavector.collector.crawler.project.weibo.weiboStar.page;
import com.jayway.jsonpath.JsonPath;
import com.lavector.collector.crawler.base.PageParse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import us.codecraft.webmagic.Page;
import us.codecraft.webmagic.Request;
import us.codecraft.webmagic.... |
Java | UTF-8 | 139 | 1.703125 | 2 | [] | no_license | package dao;
import java.util.List;
import domen.Predstave;
public interface DaoPredstave {
public List<Predstave>vratiPredstave ();
}
|
Java | UTF-8 | 4,244 | 2.390625 | 2 | [] | no_license | package com.xedu.auth;
import com.xedu.framework.client.XeduServiceList;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.ServiceInstance;
import or... |
C# | UTF-8 | 1,674 | 2.9375 | 3 | [] | no_license | namespace PrezzieWithDB.Migrations
{
using PrezzieWithDB.Models;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
internal sealed class Configuration : DbMigrationsConfiguration<PrezzieWithDB.DAL.PrezzieContext... |
C | UTF-8 | 1,298 | 3.0625 | 3 | [
"BSD-2-Clause"
] | permissive | #include <libgen.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static const unsigned int max_column = 78;
static const unsigned int tab_size = 8;
size_t fsize(FILE *fd) {
fseek(fd, 0, SEEK_END);
size_t size = (size_t)ftell(fd); // warning ftell return signed long
fseek(fd, 0, SEEK_SET);
return... |
Java | UTF-8 | 4,652 | 3.296875 | 3 | [] | no_license | package chess.pieces;
import chess.Board;
import chess.Move;
public class Pawn extends Piece {
private boolean has_moved;
private boolean isFirstMove;
public Pawn(int x, int y, boolean is_white, String file_path, Board board)
{
super(x,y,is_white,file_path, board, 'p', "\u2659", "\u265F");
... |
Python | UTF-8 | 4,808 | 2.796875 | 3 | [] | no_license | import pygame
import sys
import pygame.sprite as sprite
import time
import random
pygame.init()
pygame.display.set_caption("Uni Mario")
p_x = 100
p_y = 350
width = 40
height = 60
vel = 5
left=False
right=False
walk_count = 0
walkRight = []
walkLeft = []
myfont = pygame.font.SysFont("monospace... |
C++ | UTF-8 | 410 | 2.890625 | 3 | [] | no_license | #include<cstdio>
int main(){
int x,y;
bool xt,yt,t;
scanf("%d%d",&x,&y);
(x&1)?xt=true:xt=false; // false = even
(y&1)?yt=true:yt=false;
t=false;
if(x==y){
t=true;
if((!xt)&(!yt)){
printf("%d",x+y);
}else{
printf("%d",x+y-1);
}
}else if(x-2==y){
t=true;
if((!xt)&(!yt)){
printf("%d",x+y);
... |
Java | UTF-8 | 1,156 | 2.421875 | 2 | [] | no_license | package com.li.cn;
import org.springframework.boot.web.server.ErrorPage;
import org.springframework.boot.web.server.ErrorPageRegistrar;
import org.springframework.boot.web.server.ErrorPageRegistry;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
/**
* 异常处理
* 如何去掉spring b... |
Java | UTF-8 | 431 | 1.890625 | 2 | [] | no_license | package com.functions;
import com.google.cloud.storage.Bucket;
import com.google.cloud.storage.BucketInfo;
import com.google.cloud.storage.Storage;
import com.google.cloud.storage.StorageOptions;
public class CreateBucket {
public static void main(String args[]) {
Storage storage = StorageOptions.getDefau... |
Markdown | UTF-8 | 1,644 | 3.453125 | 3 | [
"Apache-2.0"
] | permissive | #Component and props
컴포넌트를 사용하여 UI를 독립적이고 재사용 가능한 부분으로 분리하고 각 부분을 개별적으로 생각할 수 있다.
개념상 컴포넌트는 JavaScript 함수와 같다. 컴포넌트는 임의의 입력 ( "props"라고 함)을 받아들이고 무엇이 화면에 나타나야 하는지를 담고있는 React 요소를 반환한다.
##Component
컴포넌트를 정의하는 가장 쉬운 방법은 자바스크립트 함수를 정의하는 것이다.
```javascript
function Welcome(props) {
return <h1>Hello, {props.name}</h1>;
}... |
C++ | UTF-8 | 1,697 | 2.546875 | 3 | [] | no_license |
#pragma once
#include "Components/SkeletalMeshComponent.h"
#include "Puzzle/BarrierColor.h"
#include "LightningBarrierSkeletalMeshComp.generated.h"
/**
* @class ULightningBarrierSkeletalMeshComp
*
* @brief Class inherited from skeletal mesh component.
* Used to create a lightning barrier mesh and keeping track ... |
Ruby | UTF-8 | 1,146 | 3.0625 | 3 | [] | no_license | #!/usr/bin/env ruby
require_relative 'parser'
require_relative 'analyzer'
def display_results analyzer
# Get and display the conditional probabilities for each polarity
[:pos, :neg].each do |p|
probs = analyzer.cond_probs(p)
puts "P(Xi | #{p.to_s}) = [#{probs.join(" ")}]"
end
result = analyzer.accurac... |
Java | UTF-8 | 616 | 2.0625 | 2 | [] | no_license | package com.zss.pattern.aop.controller;
import com.zss.pattern.aop.manager.MarketCalcManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDateTime;
@R... |
Python | UTF-8 | 1,533 | 3.84375 | 4 | [
"MIT"
] | permissive | from ability import Ability
from weapon import Weapon
from armor import Armor
from hero import Hero
from team import Team
class Arena:
def __init__(self, team_one, team_two):
self.team_one = team_one
self.team_two = team_two
def create_ability(self):
name = input("What is the ability na... |
C++ | UTF-8 | 600 | 2.53125 | 3 | [] | no_license | //
// StockMediator.hpp
// MediatorDesignpattern
//
// Created by Lihua Xu on 5/14/21.
//
#ifndef StockMediator_hpp
#define StockMediator_hpp
#include <stdio.h>
#include <string>
#include "Colleague.hpp"
class StockMediator:public Mediator{
public:
void addColleague(Colleague *colleague){
listColl.pus... |
Java | UTF-8 | 1,110 | 2.53125 | 3 | [] | no_license | package javaapplication1;
import java.io.File;
import javax.media.*;
import javax.media.format.AudioFormat;
public class Suono{
Time time;
Player player;
public Suono(String indirizzo){
time= new Time(0);
Format mp3 = new AudioFormat(AudioFormat.MPEGLAYER3);
Format output = new AudioFormat... |
Markdown | UTF-8 | 2,333 | 3.65625 | 4 | [] | no_license | ### [Beautiful Array](https://leetcode.com/explore/challenge/card/july-leetcoding-challenge-2021/611/week-4-july-22nd-july-28th/3829/)
Given `n`, return an array which has no element that is the double of an element from the left of it + an element from
the right of it
### Thought process
#### Approach number 1:
My... |
Markdown | UTF-8 | 5,477 | 3 | 3 | [] | no_license | # DSP-Assignment1
Run program instructions:
java -jar LocalApp.jar [input_file_path] [output_file_path] N [terminate?]
input file path – path to input file (including extension)
output file path – path to output file will be written (without extension)
N – number of messages to be processed per worker
Terminate – true ... |
Markdown | UTF-8 | 5,649 | 2.9375 | 3 | [] | no_license | ---
layout: post
status: publish
published: true
title: We, in Europe, we eat many sardines
author:
display_name: luispedro
login: luispedro
email: luis@luispedro.org
url: ''
author_login: luispedro
author_email: luis@luispedro.org
wordpress_id: 764
wordpress_url: http://blog.luispedro.org/posts/we-in-europe-we... |
JavaScript | UTF-8 | 4,522 | 3.140625 | 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.
*/
document.getElementById("car-table").innerHTML = fetchAllCars();
let switchbutton = true;
let getAllCarsBtn = document.getElementBy... |
Java | UTF-8 | 1,158 | 1.96875 | 2 | [] | no_license | package com.pay.calculatorweb;
import org.modelmapper.ModelMapper;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration;
import org.springframework.boot.web.client.RestTem... |
Python | UTF-8 | 3,093 | 2.75 | 3 | [] | no_license | #!/usr/bin/env python
#
# firewarebf.py attempts to bruteforce the password on a Watchguard firewall.
import poster
import urllib2
import ssl
import re
import argparse
#-----------------------------------------------------------------------------
# Functions
#---------------------------------------------------------... |
Java | UTF-8 | 290 | 1.835938 | 2 | [] | no_license | package com.gdf.diplomamunka.gaborbeke.nova.services;
import com.gdf.diplomamunka.gaborbeke.nova.email.Mail;
import javax.mail.MessagingException;
import java.io.IOException;
public interface EmailService {
public void sendEmail(Mail mail) throws MessagingException, IOException;
}
|
JavaScript | UTF-8 | 810 | 2.96875 | 3 | [] | no_license | (function() {
var form = document.getElementById('interests'); // get form
var elements = form.elements; // get all form elements
var options = elements.genre; // get all genres from array
var all = document.getElementById('all'); // get 'all' checkbox
function updateAll() {
// loop thru checkboxes and... |
Markdown | UTF-8 | 1,419 | 2.8125 | 3 | [] | no_license | # Frontend Mentor - Loopstudios landing page

## The challenge
The challenge is to build out [this landing page](https://www.frontendmentor.io/challenges/loopstudios-landing-page-N88J5Onjw) and get it looking as close to... |
C++ | UTF-8 | 1,476 | 2.546875 | 3 | [
"PHP-3.01",
"Zend-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <glog/logging.h>
#include <folly/SocketAddress.h>
namespace proxygen {
st... |
Markdown | UTF-8 | 5,196 | 2.953125 | 3 | [] | no_license | ---
layout: post
title: Waterfall in Blazor Charts Component | Syncfusion
description: Checkout and learn here all about Waterfall Chart in Syncfusion Blazor Charts component and much more.
platform: Blazor
control: Chart
documentation: ug
---
# Waterfall in Blazor Charts Component
## Waterfall
`Waterfall Chart` hel... |
Markdown | UTF-8 | 1,059 | 2.6875 | 3 | [
"MIT"
] | permissive | # Create-Marker-Gene-Database
Scripts for creating "marker gene" reference files for use as database for sequence similarity searches
#### Overview
The `generate_annotation.sh` is taking a FASTA file with common header format as can be usually found in UniProt, NCBI, etc. and performs the following:
- Dereplicate s... |
Markdown | UTF-8 | 3,343 | 2.546875 | 3 | [
"MIT"
] | permissive | # aws_ec2_local_gateway_route_table
[back](../aws.md)
### Index
- [Example Usage](#example-usage)
- [Variables](#variables)
- [Datasource](#datasource)
- [Outputs](#outputs)
### Terraform
```terraform
terraform {
required_providers {
aws = ">= 3.35.0"
}
}
```
[top](#index)
### Example Usage
```terraform... |
Python | UTF-8 | 6,138 | 2.53125 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"BSD-2-Clause"
] | permissive | import argparse
import sys
from importlib import resources
from compass.setup import setup_cases
from compass.clean import clean_cases
def setup_suite(mpas_core, suite_name, config_file=None, machine=None,
work_dir=None, baseline_dir=None, mpas_model_path=None,
copy_executable=False):... |
Java | UTF-8 | 125 | 2.140625 | 2 | [] | no_license | package hello_world;
public class Print {
public String printing() {
return "Hello World to the standard out";
}
}
|
Python | UTF-8 | 1,032 | 2.890625 | 3 | [
"MIT"
] | permissive | # code for pulling down uniprot sequence for predictions
import urllib3
from predictKappa.kappa_exceptions import KappaError
def fetch_sequence(uniprot_id):
"""
Function that returns the amino acid sequence by polling UniProt.com
Note that right now the test for success is a bit hap-hazard (looks for the... |
C++ | UTF-8 | 461 | 4.125 | 4 | [] | no_license | //Write a function that takes a string and reverses the letters in-place.
#include <iostream>
using namespace std;
void reverse(string& str) {
if(str.empty()) return;
size_t leftIndex = 0;
size_t rightIndex = str.length() - 1;
while(leftIndex < rightIndex) {
swap(str[leftIndex], str[rightIndex]);
... |
C++ | UTF-8 | 4,878 | 3.203125 | 3 | [] | no_license | // This code was written by Ethan Haarer and Aidan Mundy. It handles
// huffman encoding for assignment 7 of cs106b at stanford.
#include "encoding.h"
#include "priorityqueue.h"
#include "strlib.h"
#include "filelib.h"
Map<char, int> buildFrequencyTable(istream& input){
Map<char, int> freqTable;
cha... |
Markdown | UTF-8 | 2,427 | 2.875 | 3 | [] | no_license | # GitLab Single-Sign-On
___
Single-Sign-On can be configured with the following services.
## GitLab
Follow these steps to configure Mattermost to use GitLab as a single-sign-on (SSO) service for team creation, account creation and sign-in.
1. Login to your GitLab account and under **Profile Settings** go to **Appl... |
C# | UTF-8 | 739 | 2.609375 | 3 | [
"AGPL-3.0-only"
] | permissive | using Microsoft.EntityFrameworkCore;
using MySQL.Data.EntityFrameworkCore.Extensions;
namespace WorldWebServer.Models {
public class WorldDbContext : DbContext {
public WorldDbContext(DbContextOptions<WorldDbContext> options)
: base(options) { }
public DbSet<Country> Country { get; set; }
... |
Java | UTF-8 | 1,374 | 2.625 | 3 | [] | no_license | package tools;
import mons.Category;
import mons.Dex;
import mons.Move;
import mons.Type;
public class MovedexXmlParser extends AbstractXmlParser {
private Move fMove = null;
public MovedexXmlParser(String filePath) {
super(filePath);
parse();
}
@Override
protected void handleElement(Stri... |
C++ | UTF-8 | 6,772 | 2.8125 | 3 | [] | no_license | #include "common/hiString.h"
#include <stdio.h>
#include <algorithm>
#include <functional>
#include <sstream>
#include <string>
using namespace std;
#define Hi_String_H_NOT_SUPPORT() \
stringstream oss;\
oss<<"function "<<__FUNCTION__<<" not support for linux";\
string text = oss.str();\
printf("function %s not s... |
Java | UTF-8 | 1,281 | 3.640625 | 4 | [] | no_license | package stacks_queues;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Stack;
public class StockSpan {
public static void display(int[] a) {
StringBuilder sb = new StringBuilder();
for (int val : a) {
sb.append(val + "\n");
}
System.ou... |
Java | UTF-8 | 2,226 | 2.390625 | 2 | [] | no_license | package com.sxdubbo.learn.utils;
import com.sxdubbo.learn.domain.TestPaperPO;
import com.sxdubbo.learn.domain.CoursePO;
import com.sxdubbo.learn.domain.UserPO;
import com.sxdubboapi.learn.domain.TestPaper;
import com.sxdubboapi.learn.domain.Course;
import com.sxdubboapi.learn.domain.User;
import org.springframework.be... |
C++ | UTF-8 | 1,182 | 2.71875 | 3 | [] | no_license | // ---------------------------------------------------------------------------
// Created by Gus Yudha on 27/05/2020
// ---------------------------------------------------------------------------
long unsigned int inputLOW;
long unsigned int jeda = 5000;
boolean tetapkanLOW = true;
boolean lamaLOW;
int pirPin ... |
Java | UTF-8 | 1,230 | 2.8125 | 3 | [] | no_license | public enum KindSkiPass {
DAY1, DAYS2, DAYS5, HOISTS10, HOISTS20, HOISTS50, HOISTS100, SUBSCRIPTION;
int toInt() {
switch (this) {
case DAY1:
return 1;
case DAYS2:
return 2;
case DAYS5:
return 5;
case HOISTS... |
JavaScript | UTF-8 | 1,138 | 2.625 | 3 | [] | no_license | 'use strict';
(() => {
const filter = document.querySelector('.filter');
const faqAccordion = document.querySelector('.faq');
if (faqAccordion) {
const faqAccordionItems = document.querySelectorAll('.faq__item dt');
const faqToggles = document.querySelectorAll('.faq__toggle');
faqAccordion.classLis... |
TypeScript | UTF-8 | 924 | 2.640625 | 3 | [
"MIT"
] | permissive | import { Injectable } from '@angular/core';
@Injectable()
export class UtilService {
// constructor(){}
public getVideo(url: string, quality?: number) {
if (quality) {
return url + '?q=' + quality;
} else {
return url;
}
}
/**
* @param mimeType
... |
PHP | UTF-8 | 1,859 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017/3/14 0014
* Time: 21:01
*/
class NewsModel extends BaseModel{
const TYPE_ARR = [
'0'=>'公告',
'1'=>'活动',
'2'=>'攻略'
];
/**
* 查询列表
* @return array|bool
* @throws Exception
*/
public function... |
Java | UTF-8 | 960 | 2.15625 | 2 | [] | no_license | package org.taxidriver.api.models.responses;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import org.taxidriver.api.models.simple.DriverDetail;
public class AuthorizationResponse {
@SerializedName("status")
@Expose
private Boolean status;
@SerializedN... |
JavaScript | UTF-8 | 1,457 | 2.625 | 3 | [] | no_license | import React, { Component } from 'react';
export default class ProductFilter extends Component {
constructor(props) {
super(props);
this.state = {
userInput: ''
};
// Handlers
this.handleUserInput = this.handleUserInput.bind(this);
this.handleUserSearch = this.handleUserSearch.bind(th... |
Markdown | UTF-8 | 2,678 | 2.921875 | 3 | [] | no_license | # Autonomous vehicle

## Dependencies
* Docker
* Ubuntu 18.04 or Ubuntu 20.04
## Goal
The goal of the project was to add the following functionalities to a simulated car in gazebo environment:
* Steering with keyboard/joystick
* First person visualisation
* Collecting visual data
* Autonomous drive
... |
Markdown | UTF-8 | 710 | 2.578125 | 3 | [] | no_license | # General instructions
Programs can be written in any language, In addition to the program,
you should have a writeup that contains the plots requested in the
homework questions, answers to any analytical or explanation
questions, and a short description of your code and how to run
it. This can be done in, e.g., La... |
Java | UTF-8 | 1,231 | 3.359375 | 3 | [] | no_license |
public class merge {
public void sort(int arr[], int left, int right) {
if(left < right)
{
int mid = (left+right)/2;
sort(arr, 0, mid);
sort(arr, mid+1, right);
merger(arr, left, right, mid);
}
}
public void merger(int arr[], int left, int right, int mid)
... |
Java | UTF-8 | 2,414 | 2.234375 | 2 | [] | no_license | package com.softsystem.backend.model;
import javax.persistence.*;
@Entity
@Table(name = "Bet")
public class Bet {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id_bet")
private Long id;
@Column(name = "amount")
private float amount;
@Column(name = "betResult")
... |
Java | UTF-8 | 550 | 1.96875 | 2 | [] | no_license | package ulas.hrmsDemo.business.abstracts;
import org.springframework.web.multipart.MultipartFile;
import ulas.hrmsDemo.core.utilities.results.DataResult;
import ulas.hrmsDemo.core.utilities.results.Result;
import ulas.hrmsDemo.entities.concretes.CurriculumViate;
import java.util.List;
public interface CurriculumViat... |
Java | UTF-8 | 2,437 | 2.21875 | 2 | [
"Apache-2.0"
] | permissive | /*
* SPDX-FileCopyrightText: 2020 DB Station&Service AG <bahnhoflive-opensource@deutschebahn.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
package de.deutschebahn.bahnhoflive.ui;
import android.view.View;
import android.widget.TextView;
import android.widget.ViewAnimator;
import androidx.annotation.Nullable;
i... |
Shell | UTF-8 | 168 | 3.3125 | 3 | [] | no_license | read -p "Enter number : " n
i=1
sum=0
echo "Digits : "
while [ $i -le $n ]
do
echo "$i"
sum=$(( $sum + $i ))
i=$(( $i + 1 ))
done
echo "Sum = $sum"
|
Shell | UTF-8 | 492 | 3.703125 | 4 | [] | no_license | #!/bin/sh
if [ x"$2" = x ]; then
echo "Usage: $0 <cidr> <owner> [<ns[/nsip]>...]" >&2; exit 255
fi
cidr="$1"
hex=$($(dirname "$0")/cidr2hex "$cidr") || exit 1
dir=db/ip/"$hex"
if [ -e "$dir" ]; then
echo "Refusing to clobber existing record" >&2; exit 1
fi
mkdir -p "$dir" || exit 1
echo "$cidr" > "$dir"/cidr
echo "... |
Python | UTF-8 | 1,015 | 2.703125 | 3 | [] | no_license | import requests
from lxml import etree
def get_text(url_start):
headers = {
'USER-AGENT': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36'
}
response =requests.get(url = url_start,headers = headers)
if response:
html = respon... |
Java | UTF-8 | 399 | 2.203125 | 2 | [] | no_license | package com.cc.cart.controller.bean;
public class CartItem {
private int itemId;
private int cartId;
public int getItemId() {
return itemId;
}
public void setItemId(final int itemId) {
this.itemId = itemId;
}
public int getCartId() {
return cartId;
}
pu... |
Python | UTF-8 | 538 | 3.296875 | 3 | [] | no_license | """
@author Lucas
@date 2019/4/3 14:07
"""
def reverseArray():
NandM = str(input())
n = int(NandM.split(" ")[0])
m = int(NandM.split(" ")[1])
# array = []
# for i in range(1, n+1):
# array.append(i)
#
# for i in range(len(array)):
# if i % (2*m) == 0:
# for j i... |
PHP | UTF-8 | 723 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\Admin\Tipo;
use Illuminate\Http\Request;
class TipoController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
/*
* Obtener todos los registros de la tabla TIPOS
*
* @return \Illuminate\Http\... |
Shell | UTF-8 | 607 | 3.03125 | 3 | [] | no_license | #!/bin/sh
printf "#################################\n### Installing MySQL\n#################################\n"
# Install MySQL Server in a Non-Interactive mode
echo "mysql-server mysql-server/root_password password $DB_PASSWORD" | debconf-set-selections
echo "mysql-server mysql-server/root_password_again password $D... |
PHP | UTF-8 | 6,411 | 3.234375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Alfie
* Date: 2016/04/14
* Time: 8:04 PM
*/
class page
{
// page title
private $title = '';
// template tags
private $tags = array();
// tags which should be processed after the page has been parsed
// reason: what if there are template tags with... |
C++ | UTF-8 | 2,292 | 3.65625 | 4 | [] | no_license | //
// List.cpp
// 52_FirstCommonNodesInLists
//
// Created by LiLe on 2020/2/28.
// Copyright © 2020 lile. All rights reserved.
//
#include "List.hpp"
#include <iostream>
using namespace std;
ListNode *CreateListNode(int value)
{
ListNode *pNode = new ListNode();
pNode->value = value;
pNode->next = n... |
Java | UTF-8 | 2,570 | 2.3125 | 2 | [] | no_license | package aas.project.tera.com.autoattendancesystem;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.androidquery.AQuery;
import com.rey.material.widget.Button;
imp... |
PHP | UTF-8 | 7,108 | 2.90625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Fwk
*
* Copyright (c) 2011-2012, Julien Ballestracci <julien@nitronet.org>.
* All rights reserved.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
... |
Python | UTF-8 | 774 | 2.9375 | 3 | [] | no_license | class Solution(object):
def multiply(self, num1, num2):
"""
:type num1: str
:type num2: str
:rtype: str
"""
n, m = len(num1), len(num2)
res = [0] * (n + m)
for i in range(n - 1, -1, -1):
for j in range(m - 1, -1, -1):
tmp =... |
JavaScript | UTF-8 | 2,840 | 2.625 | 3 | [] | no_license | const hre = require('hardhat')
const { CHAIN_ID } = require('../const')
const { PFX, NUMBER_OF_LEVELS } = require('../presaleConstants')
const PFX_CONTRACT = require('@polarfox/governance/artifacts/contracts/pfx/PFX.sol/PFX.json')
async function main() {
const [admin] = await hre.ethers.getSigners()
const cha... |
Java | UTF-8 | 1,437 | 1.734375 | 2 | [] | no_license | package com.wisrc.sys.webapp.service;
import com.wisrc.sys.webapp.vo.employee.AddEmployeeVO;
import com.wisrc.sys.webapp.vo.employee.SetEmployeeVO;
import com.wisrc.sys.webapp.entity.GatherEntity;
import com.wisrc.sys.webapp.entity.SysEmployeeInfoEntity;
import com.wisrc.sys.webapp.entity.VUserCategoryEntity;
import c... |
JavaScript | UTF-8 | 1,484 | 2.90625 | 3 | [] | no_license | //This assignment is to create transaction
//by Muhammad Irfan PIAIC1337739
//first of all install following for creating a transaction
//npm install ethereumjs-tx
//environmental variables
require('dotenv').config()
//export your private keys to safe env
const privateKey1 = Buffer.from(process.env.PRIVATE_KEY_1, 'h... |
Java | UTF-8 | 534 | 2.140625 | 2 | [] | no_license | package com.marisoft.ziba.shared.model.screens;
import java.util.Map;
import com.marisoft.ziba.shared.ModelDataEx;
public class ShippingDocsItem extends ModelDataEx{
/*
private ShippingDoc doc ;
//*/
public ShippingDocsItem(Map<String, Object> data) {
super(data);
}
public ShippingDocsIt... |
Python | UTF-8 | 134 | 4.15625 | 4 | [] | no_license |
num = 1
while num > 0:
num = int(input("Input a whole number less than 100: "))
if num > 99:
continue
print("Num = ", num)
|
Markdown | UTF-8 | 3,204 | 2.515625 | 3 | [] | no_license | # Article R*1142-1
Le ministre de la défense prépare et met en œuvre la politique de défense conformément aux directives générales du Premier
ministre. Il traduit ces directives en ordres et instructions pour les autorités subordonnées.
I.-Il est responsable de la préparation et, sous réserve des dispositions particu... |
Java | UTF-8 | 698 | 3.015625 | 3 | [] | no_license | import java.util.Scanner;
class Program {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int number = scanner.nextInt();
int p = 1;
int sum = 0;
while (number != -1) { int k = number;
while (k != 0... |
Swift | UTF-8 | 4,059 | 2.65625 | 3 | [
"MIT"
] | permissive | //
// UserDetailsTableViewCell.swift
// JSON_Parser
//
// Created by Kedar Sukerkar on 28/04/20.
// Copyright © 2020 Kedar-27. All rights reserved.
//
import UIKit
import Kingfisher
class UserDetailsTableViewCell: UITableViewCell {
// MARK: - Outlets
lazy var userImageView: UIImageView = {
... |
C | UTF-8 | 2,047 | 2.515625 | 3 | [] | no_license | #include "krigfunctions.h"
#include "random.h"
#include "clusterfunctions.h"
#include "datafunctions.h"
/*
* Kriging clustering example for random data.
*/
void print_data(Objects* data){
DWORD i;
for(i=0;i<data->size;i++){
printf("x=%lf,y=%lf,attribute=%lf,time=%lf\n",data->objects[i]->spatial_coordinates[0],da... |
Python | UTF-8 | 3,729 | 2.671875 | 3 | [] | no_license | import pandas as pd
import numpy as np
from gensim.models import KeyedVectors
#import spacy
import re
import math
from sklearn.cluster import AgglomerativeClustering
from sklearn.metrics.pairwise import cosine_similarity
import itertools
import logging
N_CLUSTERS = 256
OUTPUT_DIR = "/space/Work/adrian/output/"#"/home/... |
C# | UTF-8 | 827 | 2.71875 | 3 | [] | no_license | using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace B17.ODEV
{
public static class SanalDatabase
{
private static ArrayList db = new ArrayList();
public static void UrunEkle(BaseClass model)
... |
Shell | UTF-8 | 182 | 2.96875 | 3 | [] | no_license | #!/bin/sh
SEARCH_PREFIX=($(retrieve "prefix"))
if [[ ${#SEARCH_PREFIX[@]} -eq 0 ]]
then
exit
fi
s="($(prefix_list ${SEARCH_PREFIX[@]} ))\s*=?\s*(\\\{|\\\[)?\s*('|\\\")?"
echo $s
|
Java | UTF-8 | 12,320 | 2.0625 | 2 | [
"Apache-2.0"
] | permissive | package com.sohu.tv.cachecloud.client.jedis.stat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import jav... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.