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 | MacCyrillic | 424 | 2.625 | 3 | [] | no_license | import java.util.Scanner;
public class homeTask2Ex1_22_ {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println(" x ");
double x = in.nextDouble();
double y= 7*(Math.pow(x,2))-3*x+6;
Syste... |
Ruby | UTF-8 | 961 | 3.90625 | 4 | [] | no_license | # return n! % m == 0
def factorial_div?(n, m)
return true if m < n
primes = build_primes(n)
prime_count_hash = prime_count(primes, n)
primes.each do |prime|
prime_count = 0
factor_max = Math.sqrt(m)
while prime*prime_count < factor_max
return false if prime_count > prime_count_hash[prime]
... |
JavaScript | UTF-8 | 90 | 3.1875 | 3 | [] | no_license | ๏ปฟvar age = prompt('Enter age', '');
alert('You will soon be ' + age + 1 + ' years old'); |
Rust | UTF-8 | 2,169 | 2.6875 | 3 | [] | no_license | use account;
use my_channel;
use std::fs::File;
use std::io::prelude::*;
#[cfg(test)]
mod AccountsDB {
use super::*;
#[test]
fn create_works() {
let db = account::AccountsDB::create();
println!("{:?}", db);
}
#[test]
fn import_works() {
let mut db = account::AccountsDB... |
Markdown | UTF-8 | 8,434 | 3.03125 | 3 | [] | no_license | # Circro
Circro is a Matlab based application for rendering nodes and edges as circular diagrams.
Built with a code architecture similar to [MRIcroS](http://www.nitrc.org/projects/mricros/).

##Requirements
Tested on Matlab 2014.
##Installation
1. Download
2. Add to Matla... |
C++ | UTF-8 | 2,879 | 3.203125 | 3 | [
"MIT"
] | permissive | #include <iostream>
#include <fstream>
#include <stdlib.h>
#include <vector>
#include <algorithm>
#include <map>
#include <utility>
static const int pX = 0;
static const int pY = 1;
static const int pZ = 2;
static const int vX = 3;
static const int vY = 4;
static const int vZ = 5;
static const int aX = 6;
static const... |
JavaScript | UTF-8 | 337 | 2.9375 | 3 | [] | no_license | <!-- working with number-->
var noOfSecsinaMinute=60;
var noOfMinsinaHour=60;
var noOfHoursinDays=24;
var noOfDaysinWeek=7;
var noOfDaysInYear=365;
var noOfDaysInMonth=31;
var noOfweeksInyear=52;
var secondsPerDay = noOfSecsinaMinute * noOfMinsinaHour * noOfHoursinDays;
document.write('There are '+secondsPerDay+' seco... |
Markdown | UTF-8 | 13,573 | 2.828125 | 3 | [] | no_license | Short Course of Stochastic Process
====================
## Why we study a stochastic process for machine learning?
- Machine Learning์ ๊ธฐ๋ณธ์ ์ผ๋ก ์ ์ ์ธ ๋ถํฌ๋ฅผ ๊ฐ์ง ๋ฐ์ดํฐ๋ฅผ ๋ค๋ฃฌ๋ค.
- ๊ทธ๋ฐ๋ฐ ์ค์ ์ ์ผ๋ก ๋ณด๋ฉด ์ด๋ ๋ฏธ์ ์๊ฐ์ ์ฐจ์ด๋ฅผ ๊ฐ์ง ์ํ์ ์ฆ, Continuous/Discrete Stochastic Process ์ฒ๋ผ ์ปดํจํฐ์ ์ธ๊ฐ๋๋ค.
- ๊ทธ๋ฌ๋ฏ๋ก Stochastic Process์์ ๋ค๋ฃจ๋ ์ํ์ ๊ธฐ๋ฒ๋ค์ ์ฌ์ฉํ์ฌ ๋ณด๋ค Machine Learning... |
JavaScript | UTF-8 | 3,668 | 2.703125 | 3 | [] | no_license | "use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnPrope... |
Java | UTF-8 | 29,649 | 2.21875 | 2 | [
"EPL-1.0",
"Classpath-exception-2.0",
"LicenseRef-scancode-unicode",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-protobuf",
"CDDL-1.1",
"W3C",
"APSL-1.0",
"GPL-2.0-only",
"Apache-2.0",
"LicenseRef-scancode-public-domain"... | permissive |
/*
* Copyright (c) 2000, 2023, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
*/
// ---- class: com.tangosol.coherence.component.util.collections.WrapperMap
package com.tangosol.coherence.component.util.collections;
/*
... |
JavaScript | UTF-8 | 1,691 | 4.5625 | 5 | [] | no_license | /*
P:
Take the number 735291 and rotate it by one digit to the left, getting 352917.
Next, keep the first digit fixed in place and rotate the remaining digits to get 329175.
Keep the first two digits fixed in place and rotate again to get 321759.
Keep the first three digits fixed in place and rotate again to get ... |
Python | UTF-8 | 17,759 | 2.765625 | 3 | [] | no_license | import pygame
import random
import math
import time
background_color = (0,0,255)
colorInt = 0;
forward = True
(width, height) = (1000, 700)
screen = pygame.display.set_mode((width, height))
pygame.display.set_caption('Human test')
running = True
pygame.init()
myfont = pygame.font.SysFont("monospace", 72)
state = 0
s... |
PHP | UTF-8 | 576 | 3.796875 | 4 | [] | no_license | <?php
namespace Hackathon\LevelA;
class Palindrome
{
private $str;
public function __construct($str)
{
$this->str = $str;
}
/**
* This function creates a palindrome with his $str attributes
* If $str is abc then this function return abccba
*
* @TODO
* @return str... |
Markdown | UTF-8 | 1,265 | 2.65625 | 3 | [
"MIT",
"CC-BY-3.0"
] | permissive | # Arch Update Indicator
> Creates a taskbar icon that indicates if updates are available and provides a context menu to inspect and install them.
Uses wxpython to create a taskbar icon that visually indicates if updates are available using `checkupdates` from the pacman-contrib package.
You can use `UPDATE_CMD` envir... |
C# | UTF-8 | 4,930 | 2.953125 | 3 | [] | no_license | ๏ปฟusing System;
using System.Collections;
namespace RailwayReservation
{
/// <summary>
/// This class inherits User class and implements User class
/// used to implement the functionalities of Clerk
/// </summary>
class BookingClerk : User
{
/// <summary>
/// Readonly property p... |
C# | UTF-8 | 6,759 | 3.109375 | 3 | [] | no_license | ๏ปฟusing System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
namespace Ensembler
{
public class Function
{
const float INTERVAL_TIME = 1.0f / 60; // Time of each frame in seconds
Movement movement;
Vector2 startPos = new Vector2(0,0);
Vector2 midPos = new Ve... |
Markdown | UTF-8 | 24,795 | 2.90625 | 3 | [
"MIT"
] | permissive |
<!-- README.md is generated from README.Rmd. Please edit that file -->
# pdqr: Work with Custom Distribution Functions
<!-- badges: start -->
[](https://github.com/echasnovski/pdqr/actions)
[;
const app = express();
const bcrypt = require('bcrypt');
const authRoute = express.Router();
let User = require('../models/user');
async function checkPassword(p1,p2){
return p1==p2 ? true : false;
}
async function hashPassword(password) {
const salt = await bcrypt.genSalt(10)
... |
Java | UTF-8 | 927 | 3.375 | 3 | [] | no_license | package Lesson.L03.EX02;
import Lesson.ContentOfEx;
import java.util.Arrays;
public class Exercise02 {
public int getCountPrefix() {
return countPrefix;
}
private int countPrefix;
public int prefixes(String tab[], String prefix) {
for (String s : tab) {
if (s.equals(pref... |
Java | UTF-8 | 5,978 | 1.929688 | 2 | [
"MIT"
] | permissive | /* Copyright (c) 2016 lib4j
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distrib... |
Python | UTF-8 | 730 | 3.078125 | 3 | [] | no_license | ๏ปฟ# -*- coding:utf-8 -*-
fail_rate = dict()
def solution(N, stages):
answer=[]
users = len(stages)
for i in range(1,N+2):
fail_rate[i]=[]
for s in stages:
fail_rate[s].append(1)
print(fail_rate)
for i in range(1,N+2):
temp = len(fail_rate[i... |
Java | UTF-8 | 2,563 | 3.984375 | 4 | [
"MIT"
] | permissive | package hash;
import java.util.TreeMap;
public class HashTable<K extends Comparable<K>, V> {
private TreeMap<K, V>[] table;
private int M; //ไธไธช็ด ๆฐ๏ผๅ
ถๅฎไนๆฏ buckets ็็ฎๅฝ(ๆฐ็ป้ฟๅบฆ)
private int size; //ๅ
็ด ๆปไธชๆฐ
//ๆๅฎๆฐ็ป้ฟๅบฆ็ๆ้ ๅจ
public HashTable(int M) {
this.M = M;
size = 0;
table = new TreeM... |
Java | UTF-8 | 2,591 | 2.15625 | 2 | [
"Apache-2.0"
] | permissive | package io.github.rcarlosdasilva.weixin.api.internal;
import java.util.List;
import io.github.rcarlosdasilva.weixin.model.response.user.group.bean.UserGroup;
/**
* ็จๆท็ปAPI
*
* @author <a href="mailto:rcarlosdasilva@qq.com">Dean Zhao</a>
*/
public interface UserGroupApi {
/**
* ๅๅปบ็จๆท็ป.
*
... |
C# | UTF-8 | 363 | 2.59375 | 3 | [] | no_license | ๏ปฟusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace string_formats
{
class Program
{
static void Main(string[] args)
{
//รvning1
DateTime dt = DateTime.Today;
Console.WriteLine(dt.ToSt... |
JavaScript | UTF-8 | 504 | 2.703125 | 3 | [
"MIT"
] | permissive | import capitalize from '../src/capitalize.js'
test('Stringify number', () => {
expect(capitalize(200)).toBe("200")
})
test('Return already capitalized', () => {
expect(capitalize("Capitalized")).toBe("Capitalized")
})
test('Capitalize first letter', () => {
expect(capitalize("small letters only")).toBe("Sm... |
C | UTF-8 | 1,750 | 3.078125 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* availability.c :+: :+: :+: ... |
Python | UTF-8 | 8,313 | 2.796875 | 3 | [] | no_license | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import torch
from pathlib import Path
from IPython.display import display
from sklearn.metrics import classification_report, confusion_matrix
from BaselineRemoval import BaselineRemoval
from scipy.signal import welch, find_peak... |
C++ | UTF-8 | 962 | 3.484375 | 3 | [] | no_license | /*
Almost got this one right first time. Only error was in the event that the input string started with a closed bracket.
When this happened, it would fail the first "if" and then segfault on the second one because it couldn't access
"stack.back()". To remedy this, I just added "stack.empty()" as a condition for the fi... |
Java | UTF-8 | 271 | 1.648438 | 2 | [] | no_license | package jp.co.brycen.wms.sequence.dto;
import jp.co.brycen.common.dto.response.AbstractResponse;
/**
* ๆฆ่ฆ๏ผใทใผใฑใณในๅๅพ
*/
public class SequenceResponse extends AbstractResponse {
// ใทใผใฑใณใน
public SequenceDto sequence = new SequenceDto();
}
|
Java | UTF-8 | 655 | 1.789063 | 2 | [] | no_license | package com.xy.user.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xy.model.TeamRecord;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Vector;
@Repository
public interface Team... |
C++ | UTF-8 | 827 | 2.890625 | 3 | [
"MIT"
] | permissive | // solved: 2013-12-24 18:33:42
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
string l;
cin >> l;
long long int right = 0, left = 0;
int n = l.length(), piv;
vector<int> lev(n, 0);
for (int i = 0; i < n; i++)
{
if (l[i] == '^')
{
... |
C# | UTF-8 | 1,089 | 3.53125 | 4 | [] | no_license | ๏ปฟusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Ejercicio15
{
class Calculadora
{
public static double Calcular(double numeroUno, double numeroDos, char operando)
{
double resultado = 0;
if (o... |
C# | UTF-8 | 3,006 | 2.546875 | 3 | [] | no_license | ๏ปฟusing InterprocessRPC.Common;
using InterprocessRPC.Wrappers.ClientWrappers;
using System;
using System.Windows.Forms;
namespace InterprocessRPC.TestClient
{
public partial class MainForm : Form
{
private readonly IClientWrapper clientWrapper;
public MainForm(IClientWrapper clientWrapper)
... |
C++ | UTF-8 | 260 | 2.734375 | 3 | [] | no_license | #pragma once
class VertexBuffer
{
private:
unsigned int id;
size_t size;
public:
VertexBuffer(const void* data, size_t size);
~VertexBuffer();
void Bind()const;
inline size_t GetSize()const { return size; }
void Unbind()const;
};
|
C# | UTF-8 | 1,415 | 2.78125 | 3 | [
"MIT"
] | permissive | ๏ปฟusing CrudLocalDb.Models;
using Microsoft.EntityFrameworkCore;
using System;
using System.IO;
namespace CrudLocalDb.Database
{
public class AppDbContext : DbContext
{
public DbSet<Item> Items { get; set; }
public DbSet<Tag> Tags { get; set; }
public AppDbContext()
{
... |
Ruby | UTF-8 | 1,672 | 2.765625 | 3 | [
"MIT"
] | permissive | # frozen_string_literal: true
require 'date'
require 'logger'
require 'twitter'
require_relative 'national_rail_request'
# Checks the service status and tweets (if appropriate)
class NationalRailNotifier
attr_reader :options
def self.run(options)
new(options).run
end
def initialize(options)
@options ... |
C++ | UTF-8 | 3,584 | 2.546875 | 3 | [] | no_license | #pragma once
#include "../base/include.h"
namespace Mander
{
USING_BASE_LIB
static INLINE void triangleNormalCcwScaledBySurface(float * n, const float * A, const float * B, const float * C)
{
float ab[3] = {B[0]-A[0],B[1]-A[1],B[2]-A[2]};
float ac[3] = {C[0]-A[0],C[1]-A[1],C[2]-A[2]};
n[0] = ab[1]*ac[2] - ab[2]... |
C# | UTF-8 | 504 | 3 | 3 | [] | no_license | ๏ปฟusing System;
using System.Collections.Generic;
using System.Text;
namespace Snap.Classes
{
public class Result
{
int Player1Tally = 0;
int Player2Tally = 0;
public String Output()
{
if (Player1Tally > Player2Tally)
return "Player 1 wi... |
Python | UTF-8 | 2,466 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | from __future__ import print_function
import sqlite3
from .tablenice import TableNice
class SqlNice(object):
def __init__(self, sqlite_path_db):
# Connection is automatic during the contructor
self.conn = sqlite3.connect(sqlite_path_db)
self.cursor = self.conn.cursor()
self.table_... |
C | UTF-8 | 1,215 | 3.859375 | 4 | [] | no_license | /*
============================================================================
Name : str2.c
Author :
Version :
Copyright : Your copyright notice
Description : Hello World in C, Ansi-style
============================================================================
*/
#include <stdio.h>
#in... |
Python | UTF-8 | 3,230 | 2.53125 | 3 | [
"MIT"
] | permissive | import os
import cv2
import dlib
import numpy as np
from sklearn.svm import SVC
from sklearn import svm
from sklearn.metrics import confusion_matrix
from sklearn.preprocessing import LabelBinarizer
from sklearn.model_selection import train_test_split
from sklearn.metrics import classification_report
from sklearn.prepro... |
Python | UTF-8 | 4,111 | 2.84375 | 3 | [
"BSD-3-Clause"
] | permissive | # (C) Copyright 2005-2020 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at... |
Python | UTF-8 | 442 | 2.75 | 3 | [] | no_license | #Default Imports
import numpy as np
ipl_matches_array =np.genfromtxt("data/ipl_matches_small.csv", dtype="|S50", skip_header=1, delimiter=",")
#Your Solution
def get_wicket_delivery_numbers_array(player):
sliced_delivery=ipl_matches_array[:,11:12]
sliced_batsman_wicket=ipl_matches_array[:,20:21]
data=np.h... |
Markdown | UTF-8 | 2,940 | 2.546875 | 3 | [] | no_license |
Formats: [HTML](/news/2007/10/25/ehud-barak-the-defense-minister-of-israel-approves-a-plan-to-cut-off-supplies-of-electricity-to-the-gaza-strip-which-has-been-recently-de.html) [JSON](/news/2007/10/25/ehud-barak-the-defense-minister-of-israel-approves-a-plan-to-cut-off-supplies-of-electricity-to-the-gaza-strip-which-... |
C++ | WINDOWS-1252 | 940 | 2.796875 | 3 | [] | no_license | #include<stdio.h>
#include<string.h>
#include<algorithm>
#include<sstream>
#include<iostream>
#include<math.h>
#include<stdlib.h>
typedef long long ll;
using namespace std;
struct Node
{
int deadline;
int reduce;
int use;
}node[1001];
bool cmp(Node x,Node y)
{
if( x.reduce == y.reduce ) return x.deadline < y.dead... |
Java | UTF-8 | 3,016 | 2.046875 | 2 | [] | no_license | package ru.vyukov.myappposition.utils;
import com.codeborne.selenide.Configuration;
import com.codeborne.selenide.junit.ScreenShooter;
import lombok.extern.slf4j.Slf4j;
import org.junit.Rule;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.bea... |
Swift | UTF-8 | 5,521 | 2.65625 | 3 | [] | no_license | //
// ViewController.swift
// StretchMyHeader
//
// Created by Kevin Cleathero on 2017-07-04.
// Copyright ยฉ 2017 Kevin Cleathero. All rights reserved.
//
import UIKit
class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
@IBOutlet var tableView: UITableView!
@IBOutlet... |
C# | UTF-8 | 7,872 | 2.890625 | 3 | [
"MIT"
] | permissive | ๏ปฟusing System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor; //Required for MenuItem, means that this is an Editor script, must be placed in an Editor folder, and cannot be compiled!
using System.Linq; //Used for Select
public class ColorWindow : EditorWindow
{ //Now is of type ... |
Java | UTF-8 | 785 | 2.28125 | 2 | [] | no_license | package com.client.transaction.webapi.dtos.response;
import com.client.transaction.webapi.enums.RequestStatusEnum;
public class ResponseDto {
private RequestStatusEnum requestStatusEnum;
private String notes;
public ResponseDto() {
}
public ResponseDto(RequestStatusEnum requestStatusEnum, Strin... |
Java | UTF-8 | 697 | 2.921875 | 3 | [] | no_license | package engine.entity;
import engine.model.AnimatedModel;
import engine.model.animation.Animator;
/**
* Entity which is able to run an animation
*/
public class AnimatedEntity extends Entity implements Simulated {
protected Animator animator;
public AnimatedEntity() {
super();
this.animato... |
C# | UTF-8 | 972 | 2.765625 | 3 | [] | no_license | ๏ปฟusing System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WYJK.Framework.Caching
{
/// <summary>
/// ็ผๅญ็ฎก็ๅจ
/// </summary>
public static class CacheManager
{
private static readonly ICac... |
Ruby | UTF-8 | 723 | 3.140625 | 3 | [] | no_license | def after_midnight(time)
array = time.split(":", 2).map { |number| number.to_i}
return 0 if array[0] == 24 || time == "00:00"
array[0] * 60 + array[1]
end
def before_midnight(time)
array = time.split(":", 2).map { |number| number.to_i}
return 0 if array[0] == 24 || time == "00:00"
1440 - (array[0] * 60 + a... |
Python | UTF-8 | 642 | 2.78125 | 3 | [] | no_license | import requests
from bs4 import BeautifulSoup
import html2text
url = 'http://www.composingprograms.com/'
r = requests.get(url)
raw_html = r.text
soup = BeautifulSoup(raw_html, 'lxml')
links = soup.select('a[href^="./pages/"]')
pages = []
for link in links:
pages.append(url+link.get('href')[2:])
for link in page... |
C | UTF-8 | 964 | 3.921875 | 4 | [] | no_license | #include<stdio.h>
#include<ctype.h>
int main(){
char word[50],upper; //intialization of character and words
int i=0;
printf("Enter the words:\n"); //printing input and storing it in word
scanf("%49s",&word);
printf("T... |
C# | UTF-8 | 2,635 | 3.609375 | 4 | [] | no_license | ๏ปฟusing _03.ShoppingSpree.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace _03.ShoppingSpree
{
public class Starter
{
public void Start()
{
List<Person> people = new List<Person>();
string[] peopleInput = Console.Rea... |
JavaScript | UTF-8 | 768 | 3.359375 | 3 | [] | no_license | // builds mat
function createMat(ROWS, COLS) {
var mat = []
for (var i = 0; i < ROWS; i++) {
var row = []
for (var j = 0; j < COLS; j++) {
row.push('')
}
mat.push(row)
}
return mat
}
// rnd num
function getRandomInteger(min, max) {
var minNum = Math.ceil(m... |
Java | UTF-8 | 933 | 2.109375 | 2 | [] | no_license | package com.bolsadeideias.springboot.app.modell;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import ... |
TypeScript | UTF-8 | 4,868 | 2.578125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | /// <reference path="./Pose.ts"/>
/// <reference path="./PoseEvent.ts"/>
/// <reference path="./Skeleton.ts"/>
/// <reference path="./Bone.ts"/>
/// <reference path="./SkeletonPoseLibrary.ts"/>
/// <reference path="../../queue/PovProcessor.ts"/>
/// <reference path="../../queue/MotionEvent.ts"/>
/// <reference path=".... |
Java | UTF-8 | 3,960 | 1.992188 | 2 | [] | no_license | package com.urwoo.web.controller;
import com.urwoo.framework.lang.StringUtils;
import com.urwoo.framework.web.controller.base.BaseController;
import com.urwoo.framework.web.response.UrwooResponse;
import com.urwoo.framework.web.response.UrwooResponses;
import com.urwoo.po.RightPo;
import com.urwoo.query.RightQueryPara... |
Java | UTF-8 | 18,991 | 1.820313 | 2 | [] | no_license | package com.yourong.api.service.impl;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
impor... |
JavaScript | UTF-8 | 353 | 3.3125 | 3 | [] | no_license | const input = document.querySelector("input#name-input");
const userName = document.querySelector("span#name-output");
const isEmpty = (str) => !str.trim().length;
input.addEventListener("input", function (e) {
if (isEmpty(this.value)) {
userName.textContent = "ะฝะตะทะฝะฐะบะพะผะตั";
return;
}
userName.textContent... |
Java | UTF-8 | 721 | 2.859375 | 3 | [] | no_license | package com.mvn.javafx;
import java.sql.SQLException;
import static com.mvn.javafx.Enum.operations.*;
public class Model {
public float calculation(float a, float b, String operation) throws SQLException, ClassNotFoundException {
if (PLUS.toString().equals(operation)) {
return a + b;
... |
Markdown | UTF-8 | 2,240 | 3.796875 | 4 | [] | no_license | # 5. Errors
### Error์ ์ข
๋ฅ
- Compile-time error (syntax error, type error) - ์ฌ๊ธฐ์๋ ์ ์ธ ์์ผ๋ฉด ok
- Link-time error - ์ ์ธ์ ์๋๋ฐ ๊ทธ ์ค์ฒด๊ฐ ์๋ ๊ฒฝ์ฐ
- Runtime error
- Logic error - ์ฝ๋๋ ๋์๊ฐ์ง๋ง ์๋ชป๋ ์์ํ ๋ฐ์
#### Bad Function Arguments
~~~cpp
int area(int length, int width){
return length*width;
}
int main(){
int x1=area(7... |
PHP | UTF-8 | 2,080 | 2.8125 | 3 | [] | no_license | <?php
//include('login.html');
$servername = "localhost";
$username = "root";
$password = "root";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
mysqli_select_db($conn,'an... |
Java | UTF-8 | 391 | 2.046875 | 2 | [] | no_license | package com.RestBotLambda.lambda.function;
public enum TableStatus {
INITIATED(false), PAYMENT_PENDING(false), PAYMENT_SUCCESS(false), ACCEPTED(true), CONFIRMED(true), CONFORMED(true), AVALIBLE(
true);
private Boolean showAdmin;
private TableStatus(Boolean showAdmin) {
this.showAdmin = showAdmin;... |
Java | UTF-8 | 292 | 1.703125 | 2 | [] | no_license | package com.manager.repository;
import com.manager.model.MessageForUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface MessageForUserRepository extends JpaRepository<MessageForUser, Integer> {
}
|
Java | UTF-8 | 977 | 2.359375 | 2 | [] | no_license | package com.os.details;
public class patient
{
private int patientID;
private String patientName;
private int age;
private String gender;
private String address;
private String result;
public int getPatientID() {
return patientID;
}
public void setPatientID(int patientID) {
this... |
Markdown | UTF-8 | 2,318 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | # Data identifiers and locators
Hybrid ICN makes use of data identifiers to name the data produced by an end
host. Data identifiers are encoded using a routable name prefix and a non
routable name suffix to provide the ability to index a single IP packet in an
prefix is unambigous manner. A full data name is composed ... |
TypeScript | UTF-8 | 3,095 | 2.8125 | 3 | [] | no_license | function throwStatus(response: Response) {
if (!response.ok) {
throw new Error("Failed (" + response.url + ") with status " + response.status + " " + response.statusText);
} else {
return response;
}
}
/**
* Just like a fetch but setup sensible defaults + setState({ loading }) before and after fetch
* ... |
Java | UTF-8 | 5,707 | 2.65625 | 3 | [] | no_license | package com.project.paging;
import java.util.ArrayList;
import java.util.List;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.project.dto.MemberDTO;
import com.project.dto.OrderDTO;
import com.pr... |
Python | UTF-8 | 3,649 | 2.6875 | 3 | [] | no_license | import bs4
import requests
from mongoengine import *
from bson.objectid import ObjectId
import datetime
class LineStop(EmbeddedDocument):
_id = ObjectIdField(required=True, default=ObjectId,unique=True, primary_key=True)
title = StringField(required=True)
time = StringField()
url = StringField(required... |
Swift | UTF-8 | 962 | 2.796875 | 3 | [] | no_license | //
// UIImageView.swift
// MusicPlayer
//
// Created by yang.zhang on 2018/11/8.
// Copyright ยฉ 2018 yang.zhang. All rights reserved.
//
import UIKit
extension UIImageView {
func downloaded(from src: String?, contentMode mode: UIView.ContentMode = .scaleAspectFit, useFallImage fall: UIImage? = nil ) -> V... |
SQL | WINDOWS-1251 | 17,768 | 3.125 | 3 | [] | no_license |
/* --PEKPQ*/
create or replace package body PEKPQ as
procedure PEKPQ_DELETE(acursession CHAR, aInstanceID CHAR) as
aObjType varchar2(255);
begin
select objtype into aObjType from instance where instanceid=ainstanceid;
if aObjType ='PEKPQ'
then
declare cursor child_PEKPQ_DEF is select PEKPQ_DEF.PEKPQ_DEFid ID f... |
Python | UTF-8 | 12,614 | 3.46875 | 3 | [
"Apache-2.0"
] | permissive | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: Pranay S. Yadav
"""
from collections import Counter
from itertools import compress, islice
from time import perf_counter
from ETC.NSRWS.x1D import core
from ETC.seq.recode import cast
from ETC.seq.check import arraytype
def _mask_and_count(seq, mask, orde... |
Markdown | UTF-8 | 3,252 | 2.640625 | 3 | [
"MIT"
] | permissive | ---
title: Mรกrtir
date: 2019-01-11 13:00:00
topics:
- martir
- filosofia
---
Do grego martys, mรกrtir significa "testemunha". Pode tratar-se de um testemunho no
plano histรณrico, jurรญdico ou religioso.
Um "mรกrtir" รฉ alguรฉm que รฉ morto injustamente por aquilo em que
acredita. Por extensรฃo, pessoa que sofre extremamente... |
Java | UTF-8 | 1,143 | 1.851563 | 2 | [
"MIT"
] | permissive | package com.ruoyi.activiti.mapper;
import java.util.List;
import com.ruoyi.activiti.domain.RyProduct;
/**
* ไบงๅMapperๆฅๅฃ
*
* @author xiaoguo
* @date 2020-09-25
*/
public interface RyProductMapper
{
/**
* ๆฅ่ฏขไบงๅ
*
* @param id ไบงๅID
* @return ไบงๅ
*/
public RyProduct selectRyProductByI... |
Markdown | UTF-8 | 8,279 | 2.625 | 3 | [] | no_license |
---
title: Release Notes
description:
platform: Web
updatedAt: Thu Sep 05 2019 04:01:39 GMT+0800 (CST)
---
# Release Notes
## Overview
Designed as a substitute for the legacy Agora Signaling SDK, the Agora Real-time Messaging SDK provides a more streamlined implementation and more stable messaging mechanism for you ... |
C | UTF-8 | 282 | 3.53125 | 4 | [] | no_license | #include "holberton.h"
/**
*clear_bit - funtions to sets the value to 0
*@n: pointer
*@index: given index
*Return: 1 or -1
*/
int clear_bit(unsigned long int *n, unsigned int index)
{
if (index > 64)
{
return (-1);
}
else
{
*n = *n & ~(1 << index);
return (1);
}
}
|
Java | UTF-8 | 7,616 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | package com.alex.simpleutils;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import android.app.Act... |
Markdown | UTF-8 | 7,427 | 2.828125 | 3 | [] | no_license | ---
description: "How to Prepare Homemade Classic Gizz_Dodo"
title: "How to Prepare Homemade Classic Gizz_Dodo"
slug: 395-how-to-prepare-homemade-classic-gizz-dodo
date: 2021-01-19T23:22:55.740Z
image: https://img-global.cpcdn.com/recipes/f892e9bab7a82fd1/751x532cq70/classic-gizz_dodo-recipe-main-photo.jpg
thumbnail: h... |
Java | UTF-8 | 754 | 2.1875 | 2 | [] | no_license | package org.net.api.jdk;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import org.net.api.MessageEncoderHandler;
/**
* @Description ๅฎไน็ผ็ ๅจ๏ผ
* @Author LUOBINGKAI
* @Date 2019/7/20 3:07
* @Version 1.0
**/
public class JdkEncoder extends MessageEncoderHandler {
private static J... |
Java | UTF-8 | 1,816 | 2.53125 | 3 | [] | no_license | package com.puuga.opennote.model;
import android.util.Log;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
/**
* Created by siwaweswongcharoen on 10/5/2015 AD.
*/
public class Message {
public String id;
public String message;
public d... |
PHP | UTF-8 | 687 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Services\Api\V1;
use Illuminate\Support\Facades\Hash;
use App\Repositories\Contracts\Api\V1\ClientRepositoryInterface;
class ClientService{
private $clientRepository;
public function __construct(ClientRepositoryInterface $clientRepository){
$this->clientRepository = $clientRepo... |
C++ | UTF-8 | 1,756 | 3.53125 | 4 | [] | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) {
ListNode* back=new ListNode(-1);
ListNode* front=b... |
Markdown | UTF-8 | 14,323 | 3.40625 | 3 | [
"MIT"
] | permissive | ---
title: "PythonใงJavaScriptใฎๅๅฒไปฃๅ
ฅใใฉใใพใงๅ็พใงใใใใใฃใฆใฟใ"
date: 2020-01-13T00:00:00+09:00
draft: false
tags: ["Python"]
---
# ใฏใใใซ
JavaScript ใซใฏๅๅฒไปฃๅ
ฅ๏ผDestructuring assignment๏ผใจๅผใฐใใไปฃๅ
ฅใฎๆนๆณใใใใพใใไธ่จใฏ[MDN](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment)
ใฎใตใณใใซใฎไธ้จใงใใ
```javascript... |
Python | UTF-8 | 1,980 | 2.5625 | 3 | [] | no_license | from config_data import ConfigData
from opera_methods import OperaMethods
from log.log_record import LogRecord
class RunMain:
def __init__(self):
self.con = ConfigData()
self.opera = OperaMethods()
self.log = LogRecord()
self.logger = self.log.get_log()
def run_main(self):
... |
Java | UTF-8 | 1,979 | 2.640625 | 3 | [] | no_license | package com.example.android.bakingapp.adapters;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.example.andr... |
Rust | UTF-8 | 1,044 | 3.328125 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | use crate::runtime::{RawStr, Rtti, StaticType, VariantRtti};
use std::fmt;
use std::sync::Arc;
/// Type information about a value, that can be printed for human consumption
/// through its [Display][fmt::Display] implementation.
#[derive(Debug, Clone)]
pub enum TypeInfo {
/// The static type of a value.
Static... |
C | UTF-8 | 2,928 | 2.640625 | 3 | [] | no_license | #include "rtpersrc/pd_common.hh"
#include "rtpersrc/pu_common.hh"
/***********************************************************************
*
* Routine name: pd_ConsWholeNumber64
*
* Description: This routine encompasses the rules to decode a
* constrained whole number as specified in section
*... |
Python | UTF-8 | 914 | 3.296875 | 3 | [] | no_license | import random, os, sys
from time import sleep
from typewriter import Typewriter
from attributes import Attributes
#typewriter delays the text and print it out one sign at the time.
races = ["Dwarf", "Elf","Human", "Orc"]
Typewriter("Welcome to xxx!!!")
print()
Typewriter("Important commands: !attributes, !racelist, !... |
Shell | UTF-8 | 258 | 2.671875 | 3 | [] | no_license | #!/bin/bash
file="PID.txt"
echo "Lista cu PID-ul proceselor pornite cu comenzile localizate รฎn /sbin/ : ">$file
ps aux | grep -w "/sbin/*" | awk '{ print $2;}'>>$file
exit 0;
grep -w, --word-regexp
selecteaza liniile ce contin cuvintele alese |
Java | UTF-8 | 1,197 | 2.671875 | 3 | [] | no_license | package GenerateTraj;
/**
* Created by Tom.fu on 28/11/2014.
*/
public class DescInfo {
public int nBins; // number of bins for vector quantization
public int fullOrientation; // 0: 180 degree; 1: 360 degree
public int norm; // 1: L1 normalization; 2: L2 normalization
public float threshold;... |
Markdown | UTF-8 | 5,792 | 2.84375 | 3 | [
"MIT"
] | permissive |
# Mastering Machine Learning on AWS
<a href="https://www.packtpub.com/in/big-data-and-business-intelligence/mastering-machine-learning-aws"><img src="https://www.packtpub.com/media/catalog/product/cache/ecd051e9670bd57df35c8f0b122d8aea/9/7/9781789349795_cover_0.png" alt="Mastering Machine Learning on AWS" height="2... |
Java | UTF-8 | 3,282 | 3.921875 | 4 | [
"MIT"
] | permissive | package com.zs.letcode.array_string;
/**
* ๅฎ็ฐ strStr()
* ๅฎ็ฐstrStr()ๅฝๆฐใ
* <p>
* ็ปไฝ ไธคไธชๅญ็ฌฆไธฒhaystack ๅ needle ๏ผ่ฏทไฝ ๅจ haystack ๅญ็ฌฆไธฒไธญๆพๅบ needle ๅญ็ฌฆไธฒๅบ็ฐ็็ฌฌไธไธชไฝ็ฝฎ๏ผไธๆ ไป 0 ๅผๅง๏ผใๅฆๆไธๅญๅจ๏ผๅ่ฟๅ -1 ใ
* <p>
* <p>
* ่ฏดๆ๏ผ
* <p>
* ๅฝneedleๆฏ็ฉบๅญ็ฌฆไธฒๆถ๏ผๆไปฌๅบๅฝ่ฟๅไปไนๅผๅข๏ผ่ฟๆฏไธไธชๅจ้ข่ฏไธญๅพๅฅฝ็้ฎ้ขใ
* <p>
* ๅฏนไบๆฌ้ข่่จ๏ผๅฝneedleๆฏ็ฉบๅญ็ฌฆไธฒๆถๆไปฌๅบๅฝ่ฟๅ 0 ใ่ฟไธ C ่ฏญ่จ็strstr()ไปฅๅ Java ็indexOf()ๅฎ... |
Java | UTF-8 | 400 | 1.898438 | 2 | [] | no_license | package com.linangran.openstone.context;
import com.linangran.openstone.card.ICard;
import com.linangran.openstone.card.IHeroCard;
import com.linangran.openstone.card.IMinionCard;
import java.util.List;
/**
* Created by Admin on 1/21/14.
*/
public class IGameConfig {
public List<ICard> cardList;
public List<IHer... |
Python | UTF-8 | 7,039 | 2.8125 | 3 | [] | no_license |
## PURPOSE: get unique motif for indistinguishable miRNA using IUPAC code with shifting distance starting from center
## INPUT: miRBase data miRBase21-master.tsv
## OUTPUT: table containing motifs unique_motifs.tsv
import numpy as np
import pandas as pd
import difflib
mirna_file = '/Users/chens22/Document... |
Java | UTF-8 | 1,657 | 2.328125 | 2 | [] | no_license | package harbour.SpringApp;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
import lombok.RequiredArgsConstructor;
import net.rgielen.fxweaver.core.FxWeaver;
import net.rgielen.fxweaver.core... |
C++ | UTF-8 | 2,707 | 2.5625 | 3 | [] | no_license | #include<iostream>
using namespace std;
int height,width,testcase;
int dustmap[50][50];
int dy[4]={-1,0,1,0};
int dx[4]={0,-1,0,1};
int countera;
int clocka;
void movedust(){
int tmpdustmap[50][50]={0,};
for(int i=0;i<height;i++){
for(int j=0;j<width;j++){
if(dustmap[i][j]<=0){
... |
C++ | UTF-8 | 408 | 2.65625 | 3 | [] | no_license | #include <iostream>
#include <cstring>
using namespace std;
char c[35],s[100100];
int n,m,i,nr;
bool cautare(int p)
{
for(int j=p,i=0;i<m;j++,i++)
if(s[j]!=c[i])
return 0;
return 1;
}
int main()
{
cin.getline(s,100100);
cin.getline(c,35);
n=strlen(s);
m=strlen(c);
n-=m;
for(i=0... |
Markdown | UTF-8 | 884 | 2.6875 | 3 | [] | no_license | ---
layout: post
title: ๆนๅ็ณป็ปๅฏๅจ็บงๅซ
tags: [linux, inittab , gui , tty, termianl]
author: Luhux
comment: true
---
็ผ่พ/etc/inittabๆไปถ
```
# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:
```
* id:num:initdefault:ไธญ็num่กจ็คบ้ป่ฎค่ฟ่ก็บงๅซ
ไฟฎๆนๅผๆบ้ป่ฎคๆจกๅผ่ฏทไฟฎๆนnumไธบไปฅไธๆฐๅญ:
| num | ๆ่ฟฐ |
|-----|------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.