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 |
|---|---|---|---|---|---|---|---|
Java | UTF-8 | 381 | 1.726563 | 2 | [
"Apache-2.0"
] | permissive | package com.ithxh.xhh.service;
import java.util.List;
import com.ithxh.baseCore.baseInterface.BaseService;
import com.ithxh.xhh.entity.BookDic;
import com.ithxh.xhh.vo.formbean.BookDicVo;
public interface BookDicService extends BaseService<BookDic, BookDicVo>{
public List<BookDicVo> getListByType(String type);
... |
Python | UTF-8 | 12,383 | 3.046875 | 3 | [] | no_license |
# coding: utf-8
# In[2]:
# Project
# CS6375 Machine Learning
# Created by: Xinyang Zhu, Ye Yao
# Time: November 2018
####################################################################
# 0 Start
# import libraries
import numpy as np
import pandas as pd
############################################################... |
Java | UTF-8 | 365 | 1.554688 | 2 | [] | no_license | package com.xhh.myDecorate.dao;
import lombok.Data;
/**
* @author xuhaihong
* @create 2018-01-31 18:08
**/
@Data
public class ProjectInstance {
private Long id;
private String title;
private String content;
private String url;
private Long createTime;
private Long updateTime;
private I... |
Shell | UTF-8 | 2,489 | 3.234375 | 3 | [] | no_license | #!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RETEVAL=0
# DB where data will be stored
DATABASE="zarcillo"
TABLE="nil_grants"
DB_HOST="db1215.eqiad.wmnet"
DB_USER="root"
# DB from where to get the list of live hosts
SOURCE_DB_HOST="db1215.eqiad.wmnet"
SOURCE_DB="zarcillo"
SOURCE_DB_TABL... |
JavaScript | UTF-8 | 4,144 | 2.578125 | 3 | [
"MIT"
] | permissive | // ---------------------------------------------------------------------------
//
// Datepicker
//
// ---------------------------------------------------------------------------
define([ "jquery", "picker", "pickerDate", "pickerLegacy" ], function($) {
"use strict";
var defaults = {
callbacks: {},
dateFo... |
C++ | UTF-8 | 589 | 3.0625 | 3 | [] | no_license | class Solution {
public:
vector<int> twoSum(vector<int> &numbers, int target) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
vector<int> ans;
for (int i = 0; i < numbers.size() - 1; i ++) {
for (int j = i + 1; j < numbers... |
Python | UTF-8 | 581 | 3.78125 | 4 | [] | no_license | # Program to convert the decimal number to binary
def dectobin(n):
split_num = str(n).split('.')
int_part = int(split_num[0])
decimal_part = '0.'+split_num[1]
decimal_part=float(decimal_part)
val1=''
val2=''
while(int_part!=0):
rem=int_part%2
val1=str(rem)+val1
int_p... |
Java | UTF-8 | 358 | 2.609375 | 3 | [] | no_license | package tests;
import static org.junit.Assert.*;
import org.junit.Test;
import model.HorseshoeCrab;
public class HorseshoeCrabTest {
@Test
public void moveTest() {
HorseshoeCrab tester = new HorseshoeCrab(0, 0);
int oldX = tester.getX();
int oldY = tester.getY();
tester.move();
assertTrue(tester.getX()!... |
PHP | UTF-8 | 3,350 | 2.71875 | 3 | [] | no_license | <?php
#doc
# classname: Googlestorage
# scope: PUBLIC
#
#/doc
class GoogleStorage extends RestfulService
{
# internal variables
/**
* @static
* @var int $project_id
*/
static $project_id;
/**
* Set the type of Auth class the client should use.
* @param int $projectid
*/
public functi... |
JavaScript | UTF-8 | 1,140 | 2.546875 | 3 | [] | no_license | import React, { Component } from 'react';
import api from '../../services/api';
import Menu from '../Menu/index';
import Promotions from '../Promotions/index';
class Wrapper extends Component {
constructor(props){
super(props);
this.state= {
promotions: [],
}
}
compo... |
C | UTF-8 | 1,015 | 2.71875 | 3 | [] | no_license | void game() {
int** fieldCurrent, ** fieldNext;
int* arr;
int len, flag;
fieldCurrent = fieldNext = NULL;
setup_terminal();
init(&fieldCurrent, &fieldNext, &flag, &arr, &len);
if (flag) {
gameCycle(fieldCurrent, fieldNext, arr, len);
}
reset_terminal();
free(arr);
}
void gameCycle(int** field... |
C# | UTF-8 | 815 | 3.71875 | 4 | [] | no_license | using System;
namespace Exercise2
{
class Exercise2
{
public void Execute()
{
var calculator = new Calculator();
// 演算方法を登録
calculator.AddOperator(Operator.Add, add);
calculator.AddOperator(Operator.Sub, subtract);
calculator.AddOperator(Operator.Mul, multiply);
calculato... |
C++ | UTF-8 | 4,644 | 3.21875 | 3 | [] | no_license | /*
*William Dunston
*Michael De Long
*COMP 350: Section 1
*November 15, 2020
*Final checkpoint: Commands can now be executed from batch files
*This feature is determined at the execution time
*/
#include <bits/stdc++.h>
#include<iostream>
#include<unistd.h>
#include<string.h>
#include<fstream>
#include<stdlib.h... |
Java | UTF-8 | 1,186 | 2.109375 | 2 | [] | no_license | package com.wetic.jersey.mapper;
import com.wetic.jersey.domain.Facture;
import com.wetic.jersey.service.dto.FactureDTO;
import javax.annotation.Generated;
import org.springframework.stereotype.Component;
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2019-08-23T14:55:31+0200",
... |
Java | UTF-8 | 826 | 2.9375 | 3 | [] | no_license | package weeklytest;
import java.math.BigDecimal;
import java.math.BigInteger;
/**
* @author 彭康
* @create 2021-08-15 11:17
**/
public class No5844 {
public int minNonZeroProduct(int p) {
if (p == 1) {
return 1;
}
// 注意bigInteger的用法
return BigInteger.valueOf((1L << p)... |
Swift | UTF-8 | 655 | 2.765625 | 3 | [
"MIT"
] | permissive | //
// Pipe.swift
// ManualLayoutUtility
//
// Created by Hoon H. on 2016/07/23.
// Copyright © 2016 Eonil. All rights reserved.
//
import CoreGraphics
func | <T>(a: T, b: T -> T) -> T {
return b(a)
}
func atLeast(k: CGFloat) -> (CGFloat) -> (CGFloat) {
return { Swift.max(k, $0) }
}
func atMost(k: CGFloat)... |
JavaScript | UTF-8 | 1,408 | 2.734375 | 3 | [] | no_license | /**
* Created by yonghan on 2018/6/24.
*/
import * as THREE from 'three';
class Cube{
constructor (width, height, depth, color, x, y, z){
this.width = width;
this.height = height;
this.depth = depth;
this.color = color;
this.x = x;
this.y = y;
this.z = z;
... |
C++ | UTF-8 | 2,198 | 3.359375 | 3 | [] | no_license | /*
Design a logger system that receives a stream of messages along with their timestamps. Each unique message should only be printed at most every 10 seconds (i.e. a message printed at timestamp t will prevent other identical messages from being printed until timestamp t + 10).
All messages will come in chronological ... |
Markdown | UTF-8 | 1,321 | 2.546875 | 3 | [] | no_license | To run:
1) Clone repository from github
2) Create tomcat server as data source
3) Run resources/openhouse_exercise.sql
4) Connect to end points to alter or view data:
Display all logs: GET /logs
Display a single log: GET /logs/{id}
Add log... |
Java | UTF-8 | 645 | 2.109375 | 2 | [] | no_license | package org.dayatang.security.domain;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
/**
* Created by yyang on 15/7/27.
*/
@Entity
@DiscriminatorValue("GLOBAL")
public class GlobalAuthorityScope extends AuthorityScope {
protected GlobalAuthorityScope() {
super("GLOBAL");
... |
Java | UTF-8 | 2,667 | 2.3125 | 2 | [] | no_license | package com.cypay.common.shiro;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
import org.apache.shiro.mgt.SecurityManager;
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.apache.shiro.web.filter.mgt.FilterChainManager;
import org.apache.shiro.web.filt... |
Ruby | UTF-8 | 1,662 | 2.90625 | 3 | [] | no_license | require "frozen_synapse/lazy_attributes"
require "open-uri"
require "json"
module FrozenSynapse
# @attr_reader [String] username
# @attr_reader [Number] wins
# @attr_reader [Number] losses
# @attr_reader [Number] level
# @attr_reader [Time] registered_at
# @attr_reader [Float] rating The user's rating a... |
Java | UTF-8 | 3,371 | 2.953125 | 3 | [] | no_license | package dao;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
public class AvatarDAO {
private static final String TBLNAME = "avatar";
/* public static void main(String[] args)... |
Python | UTF-8 | 3,575 | 3.71875 | 4 | [
"MIT",
"Python-2.0"
] | permissive | # Opetetaan kilpikonna piirtämään tähtiä!
import turtle
t = turtle.Turtle()
##### INFO #####
#
# Tutustuimme tähden piirtämiseen jo aikaisemmassa
# tehtävässä. Komennot ovat alla muistin virkistykseksi.
#
# Tähden piirtäminen vaatii monta vaihetta. Entä jos haluamme
# piirtää monta tähteä? Tarvitseeko kaikki vaiheet ... |
C | UTF-8 | 2,938 | 3.515625 | 4 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#define STRSIZE 10000
#define DEBUG if(0)
typedef struct{
char item;
struct node* tail;
struct node* next;
}node;
node* createList(){
return NULL;
}
int isEmpty(node *head){
return (head==NULL);
}
node* clearList(node *head){
node* aux = NULL;
while (head->next != NULL... |
JavaScript | UTF-8 | 438 | 2.640625 | 3 | [
"MIT"
] | permissive | const Command = require("../../core/Command");
const jokes = require("jokeslol");
class dadjoke extends Command {
constructor(rice) {
super(rice, {
name: "dadjoke",
category: "Fun",
botPerms: ["sendMessages"],
description: "Gets a funny Dad Joke",
});
}
async run(message, args) {
... |
C++ | UTF-8 | 518 | 2.765625 | 3 | [] | no_license | /**
* @file Variant.hpp
* @author Gonzalo Perez Chamarro (Gonzalo1810 Github)
* @brief Clase Variant, para el uso de variables no tipadas
* @version 0.1
* @date 2019-05-24
*
* @copyright Copyright (c) 2019
*
*/
#include "OpenGL.hpp"
namespace example
{
struct Variant
{
enum Type
{
INT,
FLOAT,
... |
Java | UTF-8 | 132 | 1.859375 | 2 | [] | no_license | package randomgenerators;
public interface Generator {
public double generate();
public int generateS();
}
|
Markdown | UTF-8 | 1,818 | 3.1875 | 3 | [] | no_license | # Javascript
Embedding a JavaScript Service enables to use both the JavaScript language and Java methods by importing their classes.
Let us rewrite the [_twice_ service example](https://github.com/jolie/docs/tree/f2682237d6cab2ca909d857f22b3e964ae8d11d8/technology-integration/getting-started/set_execution_modality/RE... |
JavaScript | UTF-8 | 5,609 | 2.90625 | 3 | [] | no_license | function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.k... |
Markdown | UTF-8 | 723 | 3.09375 | 3 | [] | no_license | # Lynx 
Shorten share links with Bit.ly
This addon creates a modifier to shorten urls using the Bit.ly API
## Installation
1. Copy over the files into the `site` folder.
2. Add your [Bit.ly API key](http://dev.bitly.com/) in the `se... |
Java | UTF-8 | 4,086 | 2.40625 | 2 | [] | no_license | package com.service;
import java.util.List;
import javax.naming.NameNotFoundException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.advice.IDNotFoundException;
import com.advice.LogInNotFoundException;
import com.model.Category;
... |
Python | UTF-8 | 1,005 | 2.640625 | 3 | [] | no_license | from google.cloud import language
from google.cloud.language import enums
from google.cloud.language import types
# gcs_uri = 'gs://cloud-samples-data/language/president.txt'
gcs_uri = 'gs://nlp-text-1/president.txt'
client = language.LanguageServiceClient()
# Instantiates a plain text document.
document = types.Docu... |
C# | UTF-8 | 586 | 2.5625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ByBothS
{
class ListItems
{
private int valueData;
private string displayData;
public ListItems(int valueData, string displayData)
{
this.va... |
Python | UTF-8 | 745 | 2.75 | 3 | [] | no_license | import cv2
import numpy as np
filename = 'C:\\Users\\kaka\\Documents\\Programing\\Python\\OpenCV-Study\\lena.jpg'
img = cv2.imread(filename, 1)
hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
# 取得する色の範囲を指定する [B,G,R]
lower_color = np.array([20, 50, 50])
upper_color = np.array([255, 255, 255])
# 指定した色にも続いたマスク画像の生成
img_mask... |
JavaScript | UTF-8 | 1,517 | 2.8125 | 3 | [] | no_license | import Models from "../models";
class ExampleRepository {
table = "";
constructor(table) {
this.table = table;
}
/**
* Example Get Custom Data
* @returns MySQL rows
*/
async exampleGetData() {
return new Promise(async (resolve, reject) => {
try {
// const get = await Models.... |
C++ | UTF-8 | 1,528 | 2.890625 | 3 | [] | no_license | #include "stdafx.h"
#include "ProgressBar.h"
ProgressBar::ProgressBar()
{
}
ProgressBar::~ProgressBar()
{
}
HRESULT ProgressBar::Init(char * frontImage, char * backImage, float x, float y, int width, int height)
{
_x = x;
_y = y;
rectProgress = RectMake(x, y, width, height);
progressBarFront = new Image;
prog... |
Java | UTF-8 | 1,459 | 4.09375 | 4 | [] | no_license | public class PalindromeNumber {
/**
* 判断是否回文数:如121, 1221,1223221是回文数,-121就不是
* 解题的思路是根据数字翻转的思路,判断最后翻转后的数字是否和输入的数字相等即可(不是最优解)
* @param n
* @return
*/
public static boolean isPalindromeNumber(int n){
if(n < 0) {
return false;
}
int rev = 0;
int... |
Markdown | UTF-8 | 634 | 2.71875 | 3 | [
"MIT"
] | permissive | # how to solve conflict in git
## 提交时的错误信息
error: Your local changes to the following files would be overwritten by merge:
readme.md
Please, commit your changes or stash them before you can merge.
## 如果需要保留自己的修改,操作如下:
```bash
git stash
git pull
git stash pop
```
### 查看并修改差异
```bash
git diff -w +文件名
```
##... |
Shell | UTF-8 | 197 | 2.609375 | 3 | [] | no_license | #!/bin/sh
TMPFILE="${2}.tmp"
grep -n 'in <a' $1 | sort -k 2 -t ':' | uniq -f 1 > "$TMPFILE"
grep -nv 'in <a' $1 >> "$TMPFILE"
sort -n -k 1 -t ':' "$TMPFILE" | cut -f2- -d ':' >> "$2"
rm "$TMPFILE"
|
Python | UTF-8 | 662 | 4.0625 | 4 | [] | no_license | class Solution:
# @param nums: The integer array
# @param target: Target number to find
# @return the first å of target in nums, position start from 0
# @author Egbert Li
def binarySearch(self, nums, target):
if len(nums) == 0:
return -1
start = 0
end = len(nums) ... |
Markdown | UTF-8 | 472 | 2.640625 | 3 | [] | no_license | # CZ1115-Mini-Project
Mini Project for CZ1115 Introduction to Data Science and Artificial Intelligence
Dataset being used: https://www.kaggle.com/olistbr/brazilian-ecommerce
# Setup
Before starting, please download the Brazilian map [here](https://www.ibge.gov.br/#) and place it within `data`
Ideas:
- Sentiment an... |
Java | UTF-8 | 5,416 | 2.46875 | 2 | [] | no_license | package hhh.com.okhttpdemo;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import java.io.IOException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.FormB... |
Swift | UTF-8 | 3,025 | 2.9375 | 3 | [
"MIT"
] | permissive | //
// UserDefaultsStore.swift
// RYKit
//
// Created by Marc Steven on 2020/6/1.
// Copyright © 2020 Rich and Young. All rights reserved.
//
import Foundation
/// UseDefaults存储类,使用UserDefaults
final public class UserDefaultsStore<T:Codable> {
/// 存储时候所用的defaults
private let storage:UserDefaults
... |
Markdown | UTF-8 | 1,615 | 2.84375 | 3 | [] | no_license | # Git
## Instalación
Para instalar Git tenemos que entrar en [Git](https://git-scm.com/) e instalarlo para nuestro SO.
Normalmente en Ubuntu y OSX ya viene instalado de serie. Podemos comprobar si lo tenemos instalado ejecutando:
```
git --version
```
## Introducción a git
### Ramas
Un repositorio de git se divid... |
Java | UTF-8 | 3,065 | 3.125 | 3 | [] | no_license | package com.nio.again;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
impor... |
Java | UTF-8 | 3,101 | 2.265625 | 2 | [] | no_license | package com.bradley.gwt.user.client.ui;
import com.bradley.gwt.user.client.resource.DialogClientBundle;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.user.client.Element;
import com.google.gwt.user... |
Java | UTF-8 | 2,431 | 2.078125 | 2 | [] | no_license | package com.yn.yntp.module.equipment.entity;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.yn.yntp.common.entity.BaseImageLibraryEntity;
/**
*
* @Title: EquipmentEntity.java
* @Package com.yn.yntp.module.equipment.entity
* @Description: TODO(用一句话描述该文件做什么)
*
* @author liucc ... |
Python | UTF-8 | 1,283 | 3.03125 | 3 | [] | no_license | import sys
if __name__ == '__main__':
file = sys.argv[1]
memory = [0 for i in range(30000)]
with open(file) as f:
pointer = 0
index = 0
begin_index = None
end_index = None
code = f.read().replace('\n', '')
while index < len(code):
if code[inde... |
JavaScript | UTF-8 | 2,019 | 2.671875 | 3 | [
"MIT"
] | permissive | const mocha = require('mocha');
const should = require('should');
const fs = require('fs');
const selectProp = require('../lib/');
describe('Selects a property from various objects', () => {
it('Selects a prop', () => {
const obj = {
a: {
b: {
c: 'd'
... |
PHP | UTF-8 | 2,562 | 2.640625 | 3 | [] | no_license | <?php
session_start();
$host = "localhost";
$username = "root";
$user_pass = "";
$database_in_use = "isp";
$mysqli = new mysqli($host, $username, $user_pass, $database_in_use);
if(isset($_POST['login'])){
$username = $_POST['username'];
$userpass = $_POST... |
Java | UTF-8 | 1,404 | 1.632813 | 2 | [] | no_license | package co.moviired.register.properties;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import java.io.Serializable;
@Data
@ConfigurationProperties(prefix = "providers.mahindra")
public final class MahindraProperties implements Serializable {
// Service web
p... |
C++ | UTF-8 | 1,081 | 2.5625 | 3 | [
"MIT"
] | permissive | #pragma once
#include "iPlayer.h"
class cPlayer : public iPlayer
{
public:
cPlayer(iUser* user, char playerID);
virtual ~cPlayer();
virtual iUser* User();
virtual char PlayerID();
virtual bool IsReadyToPlay();
virtual bool IsBankrupty();
virtual bool CanBuy(int price);
virtual int GetMoneyVariation();
vi... |
C# | UTF-8 | 1,809 | 3.265625 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace b
{
class Program
{
static void Main(string[] args)
{
string[] str = Console.ReadLine().Split(' ');
int n = int.Parse(str[0]);
int q = int.Parse(str[1]);
... |
Python | UTF-8 | 4,506 | 2.546875 | 3 | [] | no_license | import facebook
import operator
from collections import Counter
import time
import datetime
from operator import itemgetter
import requests
#activity fun ====================================================================================================
def fbdata(tok):
graph = facebook.GraphAPI(access_token=to... |
PHP | UTF-8 | 216 | 2.59375 | 3 | [] | no_license | <?php
error_reporting(0);
//flag{1919810}
if(md5($flag) === "25437c054698767f203c40ef1e058ea5"){ //爆破flag哦
echo "this is the true flag";
}
else{
echo("You found me, but can you get the flag ???");
}
?>
|
Java | UTF-8 | 7,466 | 2.359375 | 2 | [] | no_license | package com.example.cansis20;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.... |
Java | UTF-8 | 491 | 3.28125 | 3 | [] | no_license | static boolean isAnagram(String a, String b) {
a=a.toLowerCase();
b=b.toLowerCase();
int stringA = a.length();
int stringB = b.length();
if ( stringA != stringB )
{return false;}
else {
char[] s1array=a.toCharArray();
char[] s2array=b.toCharArr... |
Java | UTF-8 | 5,778 | 2.359375 | 2 | [] | no_license | package kkellum.quizapp;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
p... |
Java | UTF-8 | 1,380 | 3.0625 | 3 | [] | no_license | package com.example.differential_equation_grapher.function;
public class SquareRoot extends PredefinedFunction{
public static final String NAME = "sqrt";
private static final RealNumber powerValue = new RealNumber(0.5);
public SquareRoot(Expression expression) {
super(new ArgumentSingle(expre... |
Markdown | UTF-8 | 5,044 | 2.5625 | 3 | [
"MIT"
] | permissive | # Portfolio for developers
** forked from @smakosh
[](https://vercel.com/import/settings?s=https%3A%2F%2Fgithub.com%2FRajesh-Royal%2Fgatsby-developer-portfolio&c=1&env=GATSBY_PORTFOLIO_GITHUB_TOKEN%2CGATSBY_PORTFOLIO_FORMIK_ENDPOINT%2CGATSBY_PORTFOLIO_RECAPTCHA_KEY&envDe... |
Python | UTF-8 | 228 | 2.8125 | 3 | [] | no_license | from sys import stdin
def main():
linea = stdin.readline().strip().split()
while(linea):
print((int(linea[0])*int(linea[1]))-1)
linea = stdin.readline().strip().split()
main()
|
Java | UTF-8 | 6,891 | 2.03125 | 2 | [] | no_license | package com.moe.x4jdm.model;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import java.io.IOException;
import com.alibaba.fastjson.JSONObject;
import org.jsoup.select.Elements;
import com.alibaba.fastjson.JSONArray;
import java.util.Iterator;
import org.jsoup.nodes.Element;
import java.util.regex.Pattern;
im... |
PHP | UTF-8 | 6,344 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\ad\controller;
use think\Controller;
// use app\base\model\User as Us;
// use app\base\model\Record;
// use app\base\model\Member;
// use app\base\model\Conference;
// use app\base\model\Config as Con;
// use app\base\controller\Base as Bas;
class Base extends Controller
{
/*前台基类默认执行方法*/
public... |
JavaScript | UTF-8 | 861 | 4.34375 | 4 | [] | no_license | /*
Given two non-negative integers low and high.
Return the count of odd numbers between low and high (inclusive).
Input: low = 3, high = 7
Output: 3
Explanation: The odd numbers between 3 and 7 are [3,5,7].
Input: low = 8, high = 10
Output: 1
Explanation: The odd numbers between 8 and 10 are... |
C# | UTF-8 | 1,593 | 2.6875 | 3 | [] | no_license | namespace GameOfLife
{
internal class SimkinGliderGun : Patterns
{
public override void Add(IGameOfLife game)
{
if (game.Width >= 36 && game.Height >= 22)
{
game.AddCell(3, 1);
game.AddCell(3, 2);
game.AddCell(4, 1);
... |
Python | UTF-8 | 1,616 | 2.625 | 3 | [] | no_license | # https://gist.github.com/Gerzer/347941cc813c1edc528b
# coding utf-8
# A simple blog post auto-upload script for Pythonista Tools
from stash import stash
import os
import console
import sys
import datetime
console.show_activity('Initializing StaSh...')
shell = stash.StaSh()
console.hide_activity()
console.show_activ... |
Java | UTF-8 | 1,691 | 2.34375 | 2 | [
"Apache-2.0"
] | permissive | /**
*
* Copyright (c) 2015 Chutong Technologies All rights reserved.
*
*/
/**
* Version Control
*
* | version | date | author | description
* 0.0.1 2015.11.30 TwoBirds 整理代码
*
*/
package com.twobirds.sdk.component.util;
import android.util.SparseArray;
import android.view.View;
i... |
Markdown | UTF-8 | 7,769 | 3.265625 | 3 | [] | no_license | # Verkefni 4
Verkefni 4 snýst um að útfæra vefþjónustu fyrir verkefnalista.
Verkefnið er tvíþætt, að útfæra virkni fyrir vefþjónustlista og að útbúa vefþjónustuskil ofan á þá virkni.
## Verkefnið keyrandi á vefnum
Hér er hægt að skoða verkefnið mitt, það tekur smá stund fyrir verkefnið að byrja að keyra eftir að þið... |
TypeScript | UTF-8 | 4,174 | 2.515625 | 3 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | import resolveFrom from 'resolve-from';
const debug = require('debug')('expo:metro:import');
// These resolvers enable us to test the CLI in older projects.
// We may be able to get rid of this in the future.
// TODO: Maybe combine with AsyncResolver?
class MetroImportError extends Error {
constructor(projectRoot: ... |
Java | UTF-8 | 208 | 1.59375 | 2 | [] | no_license | package com.mytest.dao;
import com.mytest.domain.Student;
import org.springframework.data.mongodb.repository.MongoRepository;
public interface StudentRepository extends MongoRepository<Student, String> {
}
|
Markdown | UTF-8 | 2,371 | 2.671875 | 3 | [] | no_license | # HTML 17-02-19
Wifi: 2182299978
#### HTML
Es un lenguaje de etiqueta de hipertexto(Maquetar y etiquetar) 'No tiene nada de programacion'
El navegador necesita cierta estructura:
- header, body, footer.
- El atributo lang indica el idioma
Visual estudio es mas rápido, estable, cuenta con diversos pluggins y es fá... |
Python | UTF-8 | 4,733 | 2.65625 | 3 | [] | no_license | import numpy as np
import pandas as pd
from sklearn.model_selection import KFold
from sklearn.metrics import log_loss, r2_score
from sklearn.base import BaseEstimator, TransformerMixin
class BlendingClassifier():
def __init__(self, clfs, n_class, folds=5, verbose=0):
self.clfs = clfs
self.kfold = ... |
C++ | UTF-8 | 2,614 | 2.734375 | 3 | [
"MIT"
] | permissive | #pragma once
// class wrappong a memmapped object
#include <sys/mman.h>
#include <stdio.h>
#include <unistd.h>
#include <stdint.h>
#include <algorithm>
#ifdef __ANDROID_API__
extern "C" void* __mmap2(void*, size_t, int, int, int, size_t);
#define mymmap __mmap2
#define mmapoffset(x) (x>>12)
#else
#define mymmap mmap... |
Java | UTF-8 | 746 | 3.703125 | 4 | [] | no_license | package com.windknew.unit2;
/*
* (驾驶费用)编写一个程序,提示用户输入驾驶的距离、以每加仑多少英里的汽车燃油性能,以及每加仑的价格,然后显示旅程的费用。
*
* */
import java.util.Scanner;
public class Exercise2_23 {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
System.out.print("Enter the driving distance : ");
doubl... |
Ruby | UTF-8 | 180 | 3.328125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive |
def prime?(number)
if number > 1
for divider in 2..(number - 1)
if (number % divider) == 0
return false
end
end
true
else
false
end
end
|
C | UTF-8 | 1,739 | 2.921875 | 3 | [] | no_license | //
// pass2.h
// Assembler
//
// Created by Giancarlo Anemone and Caitlin Braun on 5/12/13.
// Copyright (c) 2013 Giancarlo Anemone and Caitlin Braun. All rights reserved.
//
#ifndef Assembler_pass2_h
#define Assembler_pass2_h
/*getBinary function determines the unsigned binary value of a particular decimal numbe... |
Markdown | UTF-8 | 2,420 | 2.9375 | 3 | [] | no_license | # Youtube Watchmen
## Overview
An app to get the latest videos on predefined search query. This app provides an API for the latest videos sorted in reverse chronological order of their publishing date-time from YouTube for a given tag/search query in a paginated response.
### Features
- Paginated API response
- Async... |
JavaScript | UTF-8 | 3,352 | 3.015625 | 3 | [
"ISC"
] | permissive | import regeneratorRuntime from 'regenerator-runtime';
import { join } from 'path';
import { asyncMap } from './async';
import { lStat, readDir, stat } from './fs';
/**
* File
*/
export default class File {
/**
* Create an instance of File
*
* @param {string} path Path to a file, directory, or symlink
*... |
Go | UTF-8 | 10,707 | 2.71875 | 3 | [] | no_license | package server
import (
"encoding/json"
"io/ioutil"
"net/http"
"github.com/bavaz1/go-pubg/database"
"github.com/go-chi/chi"
"github.com/gorilla/mux"
)
type Server struct {
Client *http.Client
Address string
Storage database.Storage
}
func (s *Server) Listen() {
r := chi.NewRouter()
r.Route("/api/v1", f... |
C++ | UTF-8 | 2,164 | 3.125 | 3 | [
"MIT"
] | permissive | #include "problemes.h"
#include "arithmetique.h"
#include "racine.h"
typedef unsigned long long nombre;
typedef std::vector<nombre> vecteur;
namespace {
struct Point {
long double x;
long double y;
Point(long double _x, long double _y) : x(_x), y(_y) {}
bool operator<(const Point... |
Java | UTF-8 | 4,552 | 2.171875 | 2 | [] | no_license | package com.example.codelabs.moviestage;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
import com.example.codelabs.moviestage.Utils.MovieUtils;
import java.util.List;
/**
* Created by varshaa on 23-11-2017.
*/
public class Movie implements Parcelable {
//Parcel creator
... |
TypeScript | UTF-8 | 821 | 2.78125 | 3 | [] | no_license | import { tz } from 'moment-timezone'
import { BRAZIL_TIMEZONE } from './constants'
import * as moment from 'moment'
export const endOfDayInBrazil = (date?: Date | string): string => {
const dateInBrazil = tz(date || new Date(), BRAZIL_TIMEZONE)
return dateInBrazil.endOf('day').format()
}
export const startOfDayIn... |
Java | UTF-8 | 487 | 2.171875 | 2 | [] | no_license | package com.test.projects.subscriber.exception;
import lombok.Builder;
import lombok.Data;
/**
* Сообщение об ошибке, отправляемое в ответе сервису
*/
@Builder
@Data
public class ErrorMessage {
/* Статус ответа в виде числа */
private Integer status;
/* Ошибка */
private String error;
/* Сооб... |
C++ | UTF-8 | 264 | 2.90625 | 3 | [] | no_license | void setup() {
Serial.begin(9600);
while(!Serial){
;
}
}
void loop() {
if (Serial.available() >0){
byte incomingByte = Serial.read();
if (incomingByte != -1){
Serial.print("I received: ");
Serial.println(incomingByte);
}
}
}
|
Rust | UTF-8 | 5,498 | 2.65625 | 3 | [
"MIT"
] | permissive | use web_sys::{DragEvent, HtmlInputElement, MouseEvent, MouseEventInit};
use crate::fabric::prelude::*;
use crate::fabric::services::reader::File;
pub struct FileUpload {
props: Props,
link: ComponentLink<Self>,
input_ref: NodeRef,
file_name: String,
}
pub enum Msg {
Files(Vec<File>),
Click,
... |
TypeScript | UTF-8 | 417 | 2.859375 | 3 | [
"MIT",
"GPL-1.0-or-later"
] | permissive | import {LoggerInterface} from "./logger";
export class StandardLogger implements LoggerInterface {
public error(...err: Array<string | Error>): void {
console.error(...err);
}
public warn(...msg: Array<string>): void {
console.warn(...msg);
}
public info(...msg: Array<string>): void {
console.i... |
Python | UTF-8 | 806 | 2.71875 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env python3
"""
Compute the timeseries data as a CSV file.
"""
import os
import sys
import pandas as pd
import numpy as np
import matplotlib
if __name__ == "__main__":
sys.path.insert(1, os.path.join(sys.path[0], '..', ".."))
from analyze import util
def timeseries_file(data_directory):
times... |
C++ | UTF-8 | 277 | 2.921875 | 3 | [] | no_license | #include <iostream>
#include <vector>
const static int ASIZE=2;
constexpr int withPad(int _pad) {return ASIZE+_pad;}
int main()
{
std::cout <<"enter pad";
int pad;
std::cin >> pad;
int v[withPad(pad) ];
for(auto &i: v)
i=0;
for(auto i: v)
std::cout<<i<<"\n";
}
|
PHP | UTF-8 | 1,020 | 2.765625 | 3 | [] | no_license | <?PHP
class livreur
{
private $Nom_societe;
private $Num_Tel;
private $Adresse_mail;
private $Adresse;
private $Gouvernorat;
function __construct($Nom_societe,$Num_Tel,$Adresse_mail,$Adresse,$Gouvernorat){
$this->Nom_societe=$Nom_societe;
$this->Num_Tel=$Num_Tel;
$this->Adresse_mail=$Adresse_mail;
$this->... |
PHP | UTF-8 | 830 | 2.671875 | 3 | [] | no_license | <?php
set_time_limit(720);
$link = pg_connect("host=localhost port=5432 dbname=user10 user=user10 password=user10v");
$sql = "CREATE TABLE \"task2\" (
\"id\" integer NOT NULL,
\"name\" varchar(255) NOT NULL,
\"desc\" TEXT NOT NULL
) WITH (
OIDS=FALSE)";... |
Python | UTF-8 | 927 | 4.15625 | 4 | [] | no_license | from math import sqrt
# Title: 'Finding all Prime Numbers in a specified range' in Python
# Author: Michał Kotecki
# Date: 4/19/2020
def FindAllPrimeNumbersInRange(rangeStart, rangeEnd):
primes = list(range(2, int(sqrt(rangeEnd)) + 1))
for prime in primes:
number = prime * 2
while number in... |
JavaScript | UTF-8 | 299 | 2.625 | 3 | [] | no_license | import moment from 'moment-timezone'
export const timeToDisplay = (time) => {
let timeZone = moment.tz.guess()
let london = 'Atlantic/Azores'
var londonTime = moment.tz(time, london);
var myTime = londonTime.clone().tz(timeZone)
return myTime.format('MMM DD YYYY hh:mm:ss A')
} |
Python | UTF-8 | 201 | 3.40625 | 3 | [] | no_license | import math
print("PI is :",math.pi)
print("E is :",math.e)
print(math.ceil(12.7))
print(math.floor(12.3))
print(math.copysign(-12, 7))
print(math.exp(5))
print(math.log10(100))
print(math.sin(105)) |
PHP | UTF-8 | 2,915 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace BronyRadioGermany\Meetup\Routes\Api;
use BronyRadioGermany\Meetup\Exception\InfoException;
use BronyRadioGermany\Meetup\Model\Booking;
use BronyRadioGermany\Meetup\Model\Manager\BookingModelManager;
use BronyRadioGermany\Meetup\Model\Setting;
use Psr\Container\ContainerInterface;
use Slim\Http\Request... |
Python | UTF-8 | 4,684 | 3 | 3 | [] | no_license | import numpy as np
import scipy as sp
import matplotlib.pyplot as plt
def f(n):
x = np.linspace(0,7,1000)
theta = 1
dtheta = 0
ddtheta = -1
dx = x[1]-x[0]
theta_list = [1]
for i in range(len(x)-1):
i += 1
ddtheta = - (theta**n + ((2.0/x[i]) * dtheta))
d... |
Java | UTF-8 | 5,303 | 1.96875 | 2 | [] | no_license | package com.example.maask.amrwallet;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.provider.MediaStore;
import android.support.v7.app.AppCompatActivit... |
C++ | UTF-8 | 1,182 | 3.0625 | 3 | [] | no_license | //
// Created by maxam on 04/05/2020.
//
#include <iostream>
#include "Commands.h"
namespace fuzzy {
const int STRSIZE = 256;
Commands::Commands() {}
void Commands::running() const {
while (true) {
// lire chaine
char tabInput[STRSIZE];
std::cin.getline(tabInpu... |
Java | UTF-8 | 320 | 1.960938 | 2 | [] | no_license | package cc.exception;
import lombok.extern.slf4j.Slf4j;
/**
* @author everforcc
* @data 2021/9/3 0003
*/
@Slf4j
public class CodeException extends RuntimeException {
//
public CodeException(String msg){
super(msg);
log.error(msg);
}
public void toException(String msg){
}
}
|
Markdown | UTF-8 | 1,438 | 3.125 | 3 | [] | no_license | # Criando uma calculadora 🖩
Nesse projeto da aula de Linguagem de Programação 2 da FATEC, foi desenvoldido uma calculadora através de Windows Forms (.NET Framework) em C#
## 📷 Screenshots

# Peso Ideal ⚖... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.