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 |
|---|---|---|---|---|---|---|---|
JavaScript | UTF-8 | 1,535 | 2.640625 | 3 | [
"MIT"
] | permissive | import {config, a} from './config.js'
/** Manages the lose place sprite and related sounds */
export default class LosePlace {
constructor(width, height, scene) {
this.width = width;
this.height = height;
this.scene = scene;
const lp = config.losePlace;
scene.load.image('los... |
Java | UTF-8 | 939 | 3.109375 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Semana01.Trabajos;
import java.util.Scanner;
/**
*
* @author Ario1
*/
public class Ejercicio35 {
public static void ma... |
C | UTF-8 | 1,256 | 2.75 | 3 | [] | no_license | #include "stdh.h"
#include "smart_buf.h"
#include "profile.h"
#include "connection.h"
#include "buffer_list.h"
#include "macros.h"
#include "util.h"
BUFFER_LIST *buffer_list_free_list = 0;
long buffer_list_count = 0;
BUFFER_LIST *buffer_list_create() {
BUFFER_LIST *buffer_list;
NewObject(buffer_list_free_list, b... |
Markdown | UTF-8 | 2,425 | 2.671875 | 3 | [
"MIT"
] | permissive | # backend
baseUrl: https://water-my-plants-ptct.herokuapp.com
Auth Endpoints | Required Fields | Description
POST REQUESTS:
/api/auth/login | username, password | login user and set token [test user]: username= test, password= test
/api... |
Markdown | UTF-8 | 1,419 | 2.71875 | 3 | [] | no_license | # Flex(Flexbox)
1. ## [#01 Flex](flex01/README.md) - Flexbox 등장 배경 및 설명
2. ## [#02 Flex](flex02/README.md) - Flex 사용법(Flex-container, Flex-item)
3. ## [#03 Flex](flex03/README.md) - Flex를 사용한 레이아웃
<br><br>
> **참고**
>
> - MDN Web Docs
>
> <https://developer.mozilla.org/ko/docs/Web/CSS/CSS_Flexible_Box_Layout... |
C# | UTF-8 | 6,119 | 3.40625 | 3 | [
"MIT"
] | permissive | using System;
namespace TwistedLogik.Ultraviolet.Graphics.Graphics2D.Text
{
/// <summary>
/// Represents a layout command to print a string of text.
/// </summary>
public struct TextLayoutTextCommand
{
/// <summary>
/// Initializes a new instance of the <see cref="TextLayoutTextCom... |
TypeScript | UTF-8 | 2,144 | 4.1875 | 4 | [] | no_license | // 泛型
// 除了泛型接口,我们还可以创建泛型类,无法创建泛型枚举和泛型命名空间。
// 泛型类指的是实例部分的类型,静态属性不能使用泛型类型。
function identity1(arg: number): number {
return arg;
}
function identity2(arg: any): any {
return arg;
}
// 泛型函数
function identity<T>(arg: T): T {
return arg;
}
function loggingIdentity<T>(arg: T[]): T[] {
console.log(arg.length);
... |
Markdown | UTF-8 | 2,659 | 2.65625 | 3 | [] | no_license | ## Backing up a raspberrypi or emoncms.org account
### Backing up your emoncms.org account (or other remote server account)
**(Optional) To view your data on the backup computer install emoncms on your backup computer following the guide here:**
[http://emoncms.org/site/docs/installlinux](http://emoncms.org/site/doc... |
C++ | UTF-8 | 904 | 3.125 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <algorithm>
int knapSack(int W, int wt[], int val[], int n)
{
int i, w;
std::vector<int> row(W+1, 0);
std::vector<std::vector<int>> K(n+1, row);
//K.reserve(n + 1);
//for (std::vector<int> row : K)
// row.reserve(W + 1);
// Build table... |
Java | UTF-8 | 515 | 2.546875 | 3 | [] | no_license | package unsw.dungeon;
import javafx.beans.property.BooleanProperty;
/**
* An abstract class for an ItemEntity
*/
public abstract class ItemEntity extends Entity {
/**
* Constructor for item entity
*
* @param x coordinate position of entity
* @param y coordinate position of enti... |
C# | UTF-8 | 12,012 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Abot.Poco;
using Spider.Infrastructure;
using Spider.Interface;
using Spider.Models;
using HtmlAgilityPack;
using Spider.Models.Domain;
using Spider.Models.Result;
using S... |
C# | UTF-8 | 1,032 | 2.828125 | 3 | [
"MIT"
] | permissive | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace System
{
//
// This simple class enables one to throw a NotImplementedException using the following
// idiom:
//
// throw NotImplement... |
Java | UTF-8 | 3,691 | 3.90625 | 4 | [] | no_license | package com.algorithm.all;
import org.junit.Test;
public class Sum {
/**
* 给定两个数n,m,从1,2,3..,n中找出所有值等于m的数(所有个数)
* @param n
* @param m
*/
public void printAllSum(int n, int m) {
}
@Test
public void testJump1() {
System.out.println(jump1(1));
System.out.println(jump1(2));
System.out.println(ju... |
JavaScript | UTF-8 | 4,893 | 2.609375 | 3 | [] | no_license | import TiledInterpreter from './TiledInterpreter';
import {
collect, consume, knockDoor, knockGate
} from './interactions';
/**
* Extend this instead of Phaser.State to handle a Tiled level
* @type {Object}
*/
class TiledLevelState extends Phaser.State {
init({ mapPath }) {
this.tiledLevel = {
mapPath... |
Java | UTF-8 | 1,108 | 2.5 | 2 | [
"Apache-2.0"
] | permissive | package code.landgrey.copagent.utils;
import java.io.File;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
public class LogUtils {
public static File log_file = null;
public static File result_file = null;
public static File getLogFile() {
File log_directory = new File(PathUtils.g... |
Java | UTF-8 | 222 | 1.546875 | 2 | [] | no_license | package ixcode.platform.http.server.resource;
import ixcode.platform.http.protocol.request.Request;
public interface DataConsumer {
void consumeRequest(Request request, RedirectionParameters redirectionParameters);
} |
TypeScript | UTF-8 | 7,470 | 2.96875 | 3 | [
"MIT"
] | permissive | /**
* Abstract robot capability.
*/
/*
* AetheBot - A Discord Chatbot
*
* Created by Tyrone Trevorrow on 03/02/17.
* Copyright (c) 2017 Tyrone Trevorrow. All rights reserved.
*
* This source code is licensed under the permissive MIT license.
*/
import { Stream } from "stream"
import assert from "assert"
impo... |
C++ | WINDOWS-1250 | 884 | 3.140625 | 3 | [] | no_license | /*********************************************************************************************************************************************
Print_Numbers_without_semicolon.cpp
Created on: 03-Mar-2021
Author: Malkeet Mehra
How to print numbers from 1 to N without using any semicolon in C.
#include<stdio.h>
#defin... |
Swift | UTF-8 | 1,530 | 2.6875 | 3 | [] | no_license | //
// GXFavouritesRepository.swift
// GX-App
//
// Created by M. Barış ÇİÇEK on 19.03.2020.
// Copyright © 2020 M. Barış ÇİÇEK. All rights reserved.
//
import Foundation
protocol GXFavouritesRepositoryType {
func checkIsFavourited(id: Int, completion: @escaping (Bool) -> Void)
func fetchFavouriteList(comp... |
Java | UTF-8 | 762 | 2.5 | 2 | [
"MIT"
] | permissive | package no.nav.fo.veilarbregistrering.bruker;
public class Ident {
private String ident;
private boolean historisk;
private Gruppe gruppe;
public Ident(String ident, boolean historisk, Gruppe gruppe) {
this.ident = ident;
this.historisk = historisk;
this.gruppe = gruppe;
}... |
Java | UTF-8 | 566 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | package com.iobeam.api.resource;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* A base type for collections of resource objects.
*/
public abstract class ResourceList<T> implements Serializable {
private final ArrayList<T> list = new ArrayList<T>();
public void add(f... |
Java | UTF-8 | 15,462 | 2.46875 | 2 | [] | no_license | /*
* LumaQQ - Java QQ Client
*
* Copyright (C) 2004 luma <stubma@163.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any lat... |
C# | UTF-8 | 2,195 | 2.578125 | 3 | [
"MIT"
] | permissive | using NUnit.Framework;
using Rebilly.Core;
using Rebilly.Entities;
namespace Tests.Unit.Entities
{
[TestFixture]
public class NoteUnitTests
{
[Test]
public void TestConstructIsInstanceOfEntity()
{
var Note = new Note();
Assert.IsInstanceOf<Entity>(Note);
... |
Java | UTF-8 | 317 | 1.976563 | 2 | [] | no_license | package com.app.service;
import java.util.List;
import com.app.model.Vendor;
public interface IVendorService {
public Integer saveVendors(Vendor v);
public void updateVendors(Vendor v);
public void deleteVendors(Integer id);
public Vendor getOneVendorById(Integer id);
public List<Vendor> getAllVendors();
}
|
Java | UTF-8 | 2,818 | 3.125 | 3 | [] | no_license | import java.awt.Color;
import java.util.Set;
public class Bullet implements Viewable {
private Vector r; // Position of bullet
private double velocity = 2e4; // constant velocity of bullet
private Vector vel; // velocity of player
private double radius = 0.02e10; // Constant radius of bullet
pri... |
PHP | UTF-8 | 5,720 | 2.8125 | 3 | [] | no_license | <?php
namespace Sengin\Extractor;
use Sengin\Extractor;
use Sengin\DataSource;
use Sengin\Extraction\Result;
use Sengin\Extraction\SearchResult;
use Sengin\Extraction\SuggestedKeyword;
class GoogleSearch implements Extractor
{
/**
* @var \DOMDocument
*/
protected $_document;
/**
* @var \S... |
Markdown | UTF-8 | 1,207 | 2.875 | 3 | [] | no_license | # ansible-module-mysql-migration
Ansible module for mysql migration, Runs database migration on MySQL server. It reads a mysql SQL scripts from sources (folder) and applies them in correct order to a database.
This is preety useful module as we need to use thrid party database migration tools.
This module stores data... |
PHP | UTF-8 | 1,934 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
class PostController extends \BaseController {
/**
* Display a listing of the resource.
* GET /post
*
* @return Response
*/
public function index()
{
//$posts = Posts::all();
$posts = Posts::with('user')->get();
//$posts = Posts::where('title','like','%post%')->get();
... |
Java | UTF-8 | 100 | 1.703125 | 2 | [] | no_license | public interface OptionHandler {
public void setOptions( String[] options ) throws Exception;
}
|
TypeScript | UTF-8 | 746 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | import { fromJson } from "./utils";
import {fromArray} from "rxjs/internal/observable/fromArray";
import {toArray} from "rxjs/operators";
describe('Utils test suite', () => {
test('fromJson test', async done => {
const strings = fromArray(['[1, 2', ', 3]', '{"test1": "val1', '"}{"data":[0,1,2,{"nested', '"... |
Java | UTF-8 | 1,762 | 2.40625 | 2 | [] | no_license | package com.example.cry.user;
import lombok.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
public class UserDTO {
@Getter
@AllArgsConstructor
@NoArgsConstructor
static public class CreateAdmin {
@NotBlank
@Size(min = 1, max = 31)
... |
JavaScript | UTF-8 | 237 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | $(function () {
let html = $('#contents').html();
console.log(html);
$('#contents').html('<p id="txt">p要素を追加</p>');
let html2 = $('#contents2').html();
console.log(html2);
$('#contents2').html('<h2>h2</h2>');
}); |
C++ | UTF-8 | 1,439 | 3.03125 | 3 | [
"MIT",
"Zlib",
"Apache-2.0"
] | permissive | #pragma once
#include <string>
#include <variant>
class ConfigurationManager
{
public:
ConfigurationManager(int argc, char* commandLine[]);
enum class Mode
{
HIDE,
EXTRACT,
TEST,
HELP
};
enum class Option {
Mode,
ImagePath,
DataPath,
Encryption,
Password,
DisableCompression
};
using ... |
C++ | UTF-8 | 5,156 | 2.625 | 3 | [] | no_license | #pragma once
#ifndef nofilter
#define nofilter 0
#endif
#include <time.h>
#include <list>
#include "CCheck.h"
#include <map>
#include <string>
#include <algorithm>
#include <vector>
#include <set>
#include <stdio.h>
#include "CIntervalSeries.h"
#include "CHistoryItem.h"
#include "CSupplementMatrix.h"
#include "CAssetsS... |
Java | UTF-8 | 1,276 | 2.1875 | 2 | [] | no_license | package com.white.servlet;
import java.io.IOException;
import java.util.Date;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.white.model.Essay;... |
TypeScript | UTF-8 | 829 | 3.046875 | 3 | [
"MIT"
] | permissive | export type MemoizeExpireConfig = {
expirationInSeconds: number;
};
export const memoizeExpire = <Params extends any[], Output>(
config: MemoizeExpireConfig
) => (fn: (...params: Params) => Output) => {
const previousResults: Map<Params, [Date, Output]> = new Map();
const addNew = (key: Params, value: Output) ... |
Python | UTF-8 | 1,552 | 2.8125 | 3 | [] | no_license | from datetime import datetime
from dataclasses import dataclass
from werkzeug.security import generate_password_hash, check_password_hash
from sqlalchemy import Column, Integer, String, DateTime, Boolean
from sqlalchemy.orm import validates
from database import BaseModel
@dataclass
class User(BaseModel):
id: int... |
C | UTF-8 | 6,053 | 3.453125 | 3 | [] | no_license | /********************
* Joseph Adams
* jpadams
*
* cs341L
* cache lab part A
* due 11/11/20
*
* This program simulates a cache by creating an array of doubly linked lists.
* Each linked list is used to represent a set, with each node representing a
* line in that set.
********************/
#include <stdio.h... |
TypeScript | UTF-8 | 1,142 | 2.859375 | 3 | [
"MIT"
] | permissive | import ArrayPattern from '../nodes/ArrayPattern';
import AssignmentPattern from '../nodes/AssignmentPattern';
import Identifier from '../nodes/Identifier';
import ObjectPattern from '../nodes/ObjectPattern';
import RestElement from '../nodes/RestElement';
import { Node } from '../nodes/shared/Node';
export default fun... |
Java | UTF-8 | 3,145 | 2.421875 | 2 | [] | no_license | package com.yushilei.myapp.widget;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PointF;
import android.util.Attri... |
Markdown | UTF-8 | 5,819 | 3.1875 | 3 | [] | no_license | # 一面
这是人生第一次面试,开始之前很慌很慌。当打开视频时看到了一位女面试官,给我的感觉很和蔼可亲,内心的慌乱也减少了好多。
1. 首先做了自我介绍,当我说在ACM待过一年时间,那参加过很多比赛,她说不错呀看你这么爱编程,先出个编程题吧!
2. 编程题
* 第一道我记得是关于hashmap的,没太明白她说的啥意思(然后她就换了个题目)
* 第二道是如何通过O(1)的时间复杂度,来查看一个数组最大值,这个题目我很熟悉,只需要借助一个辅助栈就好了。很快回答出来了,当时真应该好好想想再说也显得我思考了
3. TCP和UDP的区别
4. 三次握手四次挥手和原因
5. 线程和进程的区别
对设计模式是否了解
5. 如何使... |
C# | UTF-8 | 2,342 | 2.703125 | 3 | [] | no_license | using System.Text;
using Extensions;
using RingLAN;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
namespace RingLANTests
{
/// <summary>
///This is a test class for MessageTest and is intended
///to contain all MessageTest Unit Tests
///</summary>
[TestC... |
C# | UTF-8 | 1,698 | 2.6875 | 3 | [] | no_license | using AutoMapper;
using CleanArch.Application.DTOs;
using CleanArch.Application.Interfaces;
using CleanArch.Domain.Entities;
using CleanArch.Domain.Interfaces;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace CleanArch.Application.Services
{
public class CategoryService : IC... |
TypeScript | UTF-8 | 612 | 2.75 | 3 | [] | no_license | import { ActionTypes, ActionsCategories } from '../actions/categories';
import { WpCategory } from '../../interfaces/wp-category';
export interface CategoriesState {
list: WpCategory[];
loading: Boolean;
}
const initialState: CategoriesState = {
list: [],
loading: false
};
export function categoriesReducer(s... |
Java | UTF-8 | 12,461 | 3.28125 | 3 | [] | no_license | /*
* AUTHOR: LUIS FELIPE CHAPARRO HURTADO
* DATE: 21 NOVEMBER 2019
* DESCRIPTION: Program that allows to have salary information
(random number between SMLV and SMLV * 4) of each of its N employees
for each quarter of the year
*/
package proyecto.pkgfinal;
import java.util.Scanner;
import java.io... |
Markdown | UTF-8 | 3,982 | 2.546875 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | # Översikt
## [Vad är Event Hubs?](event-hubs-what-is-event-hubs.md)
## [Event Hubs-funktioner](event-hubs-features.md)
## [Vanliga frågor och svar](event-hubs-faq.md)
# Kom igång
## [Skapa en Event Hub](event-hubs-create.md)
## Skicka händelser
### [.NET-standard](event-hubs-dotnet-standard-getstarted-send.md)
### [.... |
Java | UTF-8 | 1,009 | 1.96875 | 2 | [] | no_license | package com.sale.myweb;
import com.sale.myweb.entity.Users;
import com.sale.myweb.DAO.UserRepository;
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.test.conte... |
PHP | UTF-8 | 1,842 | 2.65625 | 3 | [] | no_license | <html xmlns="http://www.w3.org/1999/html">
<head>
<title>Test PHP Connection Script</title>
</head>
<body>
<h3>RESULTS</h3>
<table>
<tr>
<td>
<?php
$dbname = 'cs332t26';
$dbuser = 'cs332t26';
$dbpass = 'cho4Iich';
$dbhost = 'localhost';
... |
Java | UTF-8 | 262 | 1.6875 | 2 | [] | no_license | package com.terrence.iread.view.activity;
import com.terrence.iread.model.BookBean;
import com.terrence.iread.view.base.IBaseLoadView;
public interface IBookDetail extends IBaseLoadView {
void addBookCallback();
void getBookInfo(BookBean bookBean);
}
|
Java | UTF-8 | 5,478 | 2.546875 | 3 | [] | no_license | package net.tudelft.hi.e.computation;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import net.tudelft.hi.e.data.Column;
import net.tudelft.hi.e.data.DateColumn;
import net.tudelft.hi.e.dat... |
Java | UTF-8 | 1,402 | 3.671875 | 4 | [] | no_license | package org.ventry.commons.algorithm.sort;
public class InsertionSort {
public static int[] order(int[] source) {
for (int i = 1; i < source.length; i++) {
int key = source[i];
int j = i - 1;
while (j > -1 && source[j] > key) {
source[j + 1] = source[j];
j--;
}
source[j + 1] = key;
}
re... |
Markdown | UTF-8 | 5,681 | 2.921875 | 3 | [] | no_license | # lang-ko_KO
### READ THIS WHEN YOU WANT TO MAKE TRANSLATIONS TO ANOTHER LANGUAGE
There are sixteen text files included in this repository, each with their own section of translations:
- translations.txt -- these are general translations and loaded each time
- helptext.txt -- these are all help text sections and... |
PHP | UTF-8 | 1,140 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Trainee extends Model
{
// Connection
protected $connection = 'sys_training';
// Primary key
protected $primaryKey = 'trainee_code';
// Table
protected $table = 'trainees_masterfile';
// Fillable fields
protected $fillable = ['train... |
Java | UTF-8 | 293 | 1.53125 | 2 | [] | no_license | package com.kino.kino.model.dto;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@NoArgsConstructor
@AllArgsConstructor
@Getter
@Setter
public class UserPostAuthDto {
String username;
String password;
String lang;
}
|
JavaScript | UTF-8 | 801 | 3.84375 | 4 | [] | no_license | //Define a variable here called currentTurn and make it equal to the STRING "X"
var TTT = {
changeElement: function(piece) {
if (currentTurn == "X") {
$("#" + piece).html("X");
//Call the function checkWin
//Make currentTurn equal to "O"
} else {
$("#" + piece).html("O");
//Call the fun... |
Java | UTF-8 | 618 | 2.21875 | 2 | [] | no_license | package com.winwin.android.UI.Entity;
import java.util.List;
public class BaseHttpResult<T> {
private StatusBean status;
private int totalRows;
private List<T> data;
public StatusBean getStatus() {
return status;
}
public void setStatus(StatusBean status) {
this.status = stat... |
C++ | UTF-8 | 1,084 | 2.796875 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
void printing(vector< vector<int> > arr)
{
cout<<'\n';
int n = arr.size();
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
cout<<arr[i][j]<<' ';
}
cout<<'\n';
}
}
int optimalSearchTree(int keys[],int freq[],int n)
{
int i,j,k,l;
vector< vector<int> > v(n,... |
Python | UTF-8 | 311 | 2.828125 | 3 | [] | no_license | i = 0
with open('damaged.jpg', 'rb') as jpg:
with open('recover.jpg', 'wb') as new_jpg:
while True:
chunk = jpg.read(1024)
i += 1
if not chunk:
break
if i % 3 == 0:
chunk = chunk[::-1]
new_jpg.write(chunk)
|
Markdown | UTF-8 | 2,153 | 3.578125 | 4 | [] | no_license | # 为云主机分配浮动 IP
## 分配浮动 IP
* 前提:
* 云主机的状态为 "Active";
* 租户已经创建了路由,且路由连接了外网;
* 外网使用了 DHCP,DHCP 池中还有可用 IP。
* 操作:
1. 登录 OpenStack 管理界面;
1. 点击 【Project】 选项卡,点击 【Compute】 子选项卡,点击其中的 【Instances】 选项;
1. 选择要分配浮动 IP 的云主机,点击 【Actions】 中的 【Associate Floating IP】;
1. 在弹出的 【Manage Floating IP Associations】 对话框中,为云主机... |
Java | UTF-8 | 304 | 2.625 | 3 | [] | no_license | package Instrument;
public abstract class Instrument {
// declare fields
protected String name;
protected boolean hasStrings;
public Instrument(String name, boolean hasStrings) {
this.name = name;
this.hasStrings = hasStrings;
}
// declare non-abstract methods
}
|
Java | UTF-8 | 2,620 | 2.5 | 2 | [] | no_license | package com.example.medina.freeaudiobooks.Services;
import android.app.Service;
import android.content.Intent;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.IBinder;
import android.support.annotation.RestrictTo;
import android.util.Log;
impor... |
Java | UTF-8 | 2,397 | 3.390625 | 3 | [] | no_license | package step;
import java.util.Scanner;
public class Task_6 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int i = (int) (1 + Math.random()*31);
int j = (int) (1 + Math.random()*12);
if (j == 1) {
if (i != 7) System.out.println("Сегодня... |
C# | UTF-8 | 16,935 | 3.015625 | 3 | [] | no_license | using System;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using System.Text;
namespace YuanTu.YuHangArea.ISO8583
{
public class Cryptography
{
public Cryptography()
{
IV = new byte[8];
Key = new byte[8];
C... |
C | UTF-8 | 1,141 | 3.015625 | 3 | [
"MIT"
] | permissive | #include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<sys/types.h>
#include<netinet/in.h>
#include<string.h>
#include<strings.h>
#include<errno.h>
#include<unistd.h>
#include<arpa/inet.h>
#define MAX 1024
void main(int argc, char **argv)
{
int soc;
struct sockaddr_in remote_server;
int len = sizeof(... |
C# | UTF-8 | 603 | 3.609375 | 4 | [] | no_license | using System;
class BonusScore
{
static void Main(string[] args)
{
Console.Write("Enter number [0...9] = ");
int num = int.Parse(Console.ReadLine());
if (num>=1 && num<=3)
{
Console.WriteLine("result = {0}",num*10);
}
else if (num>=4 && num<=6)
... |
C++ | UTF-8 | 701 | 3.015625 | 3 | [] | no_license | ///
/// @file namespace3.cc
/// @author lemon(haohb13@gmail.com)
/// @date 2016-10-17 11:50:42
///
#include <stdio.h>
#include <stdlib.h>
//#include <cstdio>
//#include <cstdlib>
#include <iostream>
using std::cout;
using std::endl;
//之前C的标准头文件出现的实体都是在匿名的名称空间的
int num = 10;
namespace A
{
int num = 100;... |
Java | UTF-8 | 1,646 | 3.65625 | 4 | [] | no_license | package com.javarush.test.level04.lesson16.home02;
import java.io.*;
/* Среднее такое среднее
Ввести с клавиатуры три числа, вывести на экран среднее из них. Т.е. не самое большое и не самое маленькое.
*/
public class Solution
{
public static void main(String[] args) throws Exception {
//напишите тут в... |
Java | UTF-8 | 1,541 | 2.296875 | 2 | [] | no_license | package com.miles.wechat.message.model;
import javax.xml.bind.annotation.XmlElement;
/**
* 消息的基类
*
* @author miles
*/
public abstract class AbstractMessage {
/**
* 消息接收人
*/
private String toUserName;
/**
* 消息发送人
*/
private String fromUserName;
/**
* 消息的发送时间
*/
... |
Java | UTF-8 | 1,076 | 3.109375 | 3 | [] | no_license | package com.onikiychuk.xmexersize;
import java.util.stream.Stream;
/**
* Represents Knight figure.
*/
class KnightFigure {
/**
* Provide list of valid board positions that knight figure can move from current position.
*
* @param position current figure position. If there is no available moves - r... |
Markdown | UTF-8 | 2,153 | 3.203125 | 3 | [] | no_license | # Chapter 1
1. Pascal, BASIC, and C are p_____ languages, while C++ is an o_____ language.
2. A widget is to the blueprint for a widget as an object is to.
- a member function
- a class
- an operator
- data item
3. The two major components of an object are ____ and functions that ______
4. In C++, a fun... |
JavaScript | UTF-8 | 7,670 | 3.046875 | 3 | [] | no_license | //Given a ray described by an initial point P0 and a direction V both in world coordinates, check to see
//if it intersects the polygon described by "vertices," an array of vec3 values describing the location of
//the polygon vertices in its child frame.
//mvMatrix is a matrix describing how to transform "vertices" i... |
PHP | UTF-8 | 907 | 3.484375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Krt</title>
</head>
<body>
<?php
$prices = array('tires'=> 100, 'oil'=> 10, 'spark plugs'=> 4);
echo "<p>usin... |
Python | UTF-8 | 556 | 4.0625 | 4 | [] | no_license | user_dictionary = {}
while 1:
command = input("'a' to add word, 'l' to lookup a word, 'q' to quit ")
if command == "a":
word = input("Type the word: ")
definition = input("Type the definition: ")
user_dictionary[word] = definition
print("Word added!")
elif command == "l":
... |
Shell | UTF-8 | 7,102 | 3.578125 | 4 | [] | no_license | #!/usr/bin/env bash
set -e
shopt -s extglob
# makePlots.sh: make plots in a directory of scheme comparison stats output.
OUTFILE="precision.tsv"
truncate -s 0 ${OUTFILE}
for FILE in `ls truth.*`
do
# Grab the scheme
SCHEME=${FILE##*.}
cat ${FILE} | cut -f 1 | while read LINE
do
# Tag each... |
Python | UTF-8 | 94 | 2.953125 | 3 | [] | no_license |
def main():
for i in range(0,5):
print("Hello")
if __name__=='__main__':
main()
|
Python | UTF-8 | 1,203 | 3.109375 | 3 | [] | no_license | #python2 operaciones.py
import numpy as np
from math import *
import cv2
def negative(value):
return 255-value
def logarithmic(value):
const=255/np.log2(1+255)
return const*np.log2(1+value)
def logarithmic_inverse(value):
const=255*np.log2(256)
return const*(1/np.log2(1+value))
def power... |
Python | UTF-8 | 4,067 | 3.046875 | 3 | [] | no_license | import pandas as pd
import nltk as nltk
#from nltk import RegexpTokenizer
#from nltk import TweetTokenizer
from nltk import tokenize
import os
import numpy as np
import re
import string
from nltk.corpus import stopwords
from sklearn.feature_extraction.text import TfidfVectorizer
from nltk.stem import WordNetLemmatize... |
Swift | UTF-8 | 535 | 3.484375 | 3 | [] | no_license | import SwiftUI
enum PrimaryColor {
case red
case yellow
case blue
func color() -> Color {
switch self {
case .red:
return Color.red
case .yellow:
return Color.yellow
case .blue:
return Color.blue
}
}
func circle(... |
Markdown | UTF-8 | 5,928 | 3.125 | 3 | [] | no_license | ---
title: "My favorite Yoga Studios in Berlin"
description: "Looking for a great yoga studio in Berlin? These are my favorite yoga studios - great classes, awesome teacher, and relaxing atmosphere."
date: "2018-02-09T13:50:46.234Z"
categories: ["Fitness"]
keywords: ["yoga studios Berlin"]
hashtags: ["#fitness"]
banner... |
Java | UTF-8 | 2,124 | 2.359375 | 2 | [] | no_license | package com.dicoding.picodiploma.themoviedb.data.source.local;
import android.app.Application;
import androidx.lifecycle.LiveData;
import androidx.paging.DataSource;
import com.dicoding.picodiploma.themoviedb.data.source.local.entity.model.MovieEntity;
import com.dicoding.picodiploma.themoviedb.data.source.local.ent... |
JavaScript | UTF-8 | 20,359 | 2.671875 | 3 | [] | no_license | var loadC = document.getElementsByClassName("load-container")[0];
var bodyCont = document.getElementsByClassName("bodyCont")[0];
//beginning
//Note: Chrome supports ES6 syntax
let show = () => {
setTimeout(() => {
loadC.style.display = "none";
},2000)
}
for (let yer = 0; yer < document.getElementsByClassName("y... |
Java | UTF-8 | 1,737 | 3.765625 | 4 | [
"MIT"
] | permissive | import java.util.ArrayList;
import java.util.List;
public class Inorder {
static class TreeNode {
int val;
TreeNode parent;
TreeNode left;
TreeNode right;
TreeNode(int val, TreeNode left, TreeNode right) {
this.val = val;
this.left = left;
this.right = right;
if (left !=... |
Java | UTF-8 | 752 | 2.046875 | 2 | [] | no_license | package com.epsi.mediatheque.config;
import com.epsi.mediatheque.mapper.LoanMapper;
import com.epsi.mediatheque.mapper.MediaMapper;
import com.epsi.mediatheque.service.LoanService;
import com.epsi.mediatheque.service.MediaService;
import com.epsi.mediatheque.service.impl.JdbcLoanServiceImpl;
import com.epsi.mediathequ... |
Python | UTF-8 | 1,541 | 2.71875 | 3 | [
"MIT"
] | permissive | import pymunk
from manimlib.scene.scene import Scene
from manimlib.mobject.physics import PhysicMobject
from manimlib.animation.physics import Simulate
class PhysicScene(Scene):
def __init__(self, **kwargs):
self.space = pymunk.Space()
self.physic_objs = []
super().__init__(**kwargs)
... |
Java | UTF-8 | 1,778 | 1.9375 | 2 | [] | no_license | package com.dao;
import java.util.List;
import org.springframework.stereotype.Repository;
import com.bean.OldSickness;
@Repository("oldSicknessMapper")
public interface OldSicknessMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table old... |
C# | UTF-8 | 7,286 | 3.265625 | 3 | [
"Apache-2.0"
] | permissive | using System;
using System.Drawing;
using System.Numerics;
using Veldrid;
/*
This class holds (and provides dubiously mutex guarded access to) OpenGl vertex and colour data
*/
namespace rgat
{
/// <summary>
/// A colour format conversion class for dealing with colours
/// in formats that Veldrid, ImGui an... |
Java | UTF-8 | 4,064 | 2.703125 | 3 | [] | no_license | package entities;
import java.util.Date;
/**
*
* @author Adamenko Artem <adamenko.artem@gmail.com>
* Класс хранящий данные об автобусах
*/
public class BusObject {
/*идентификатор объекта*/
int obj_id_;
/*идентификатор проекта*/
int proj_id_;
/*название перевозчика*/
Str... |
Markdown | UTF-8 | 14,967 | 3.0625 | 3 | [
"GPL-1.0-or-later",
"LicenseRef-scancode-free-unknown",
"MIT",
"Unlicense",
"LicenseRef-scancode-public-domain"
] | permissive | ---
layout: post
title: Mozilla’s Open Leadership Training can work for Open Austin projects
date: 2017-04-23
type: post
published: true
thumb: mozilla-open-austin.svg
thumbalt: Mozilla and Open Austin logos
author:
first_name: Andrew
last_name: Nelson
---
When I joined the Open Austin leadership team, one of my f... |
C++ | ISO-8859-1 | 2,090 | 3.28125 | 3 | [] | no_license | #include "Config.h"
#include <fstream>
#include <iostream>
#include <sstream>
void Config::readConfigFile(Image* image, Camera* camera)
{
std::ifstream file("./config.txt");
std::string line;
while (std::getline(file, line)) { //para cada linha
if (line[0] == '#') //comentrio
continue;
if (line.empty()... |
Python | UTF-8 | 7,033 | 2.609375 | 3 | [
"MIT"
] | permissive | # -*- coding: utf-8 -*-
import collections
import functools
import inspect
import logging
from typing import Tuple, Sequence, List, NamedTuple, TYPE_CHECKING
from pydantic import BaseModel, Extra, validator, root_validator
import numpy as np
if TYPE_CHECKING: # pragma: no cover
from ._parameters import Paramete... |
Shell | UTF-8 | 976 | 3.515625 | 4 | [] | no_license | #!/bin/bash
echo "method 1:"
tr -s ' ' '\n' < words.txt | sort | uniq -c | sort -nr | awk '{print $2, $1}'
echo "method 2:"
cat words.txt | awk '{for(i=1;i<=NF;++i){count[$i]++}} END{for(i in count) {print i,count[i]}}' | sort -k2nr
echo "method 3:"
cat words.txt | tr -s '[[:space:]]' '\n' | sort | uniq -c | sort ... |
Go | UTF-8 | 839 | 2.890625 | 3 | [] | no_license | package manager
import (
"dlmm/command"
"dlmm/util"
"fmt"
"io"
"log"
"net/http"
"os"
)
type Manager struct {
*command.Command
Progress
client *http.Client
}
func (m *Manager) Init(env *command.Command) {
m.Command = env
m.client = &http.Client{}
}
func (m *Manager) assertEnvIsSet() {
if m.Command == ni... |
Java | UTF-8 | 3,901 | 2.328125 | 2 | [] | no_license | package com.xprogect.api;
import android.content.Context;
import com.xprogect.MyApplication;
import com.xprogect.api.init.ApiException;
import com.xprogect.api.init.BeanFactory;
import com.xprogect.api.init.CenterParameterInterceptor;
import com.xprogect.api.init.NetWorkInterceptor;
import com.xprogect.contests.Reque... |
PHP | UTF-8 | 1,362 | 3.25 | 3 | [] | no_license | <?php
namespace Win\Calendar;
/**
* Formata data para Humano
*/
class TimeAgo extends DateFormat {
/** @var string[] Nome das unidades de tempo */
static private $unitsName = array(
'seconds' => ['segundo', 'segundos'],
'minutes' => ['minuto', 'minutos'],
'hours' => ['hora', 'horas'],
'days' => ['dia', '... |
TypeScript | UTF-8 | 2,674 | 2.625 | 3 | [] | no_license |
import { getRepository } from '../datastore';
import { Log } from '../datastore/entities';
import { ObjectID } from 'mongodb';
import { ObjectID as ObjectIDType } from 'typeorm'
import { LogIn, LogListIn, LogListOut, LogUpdate } from '../models/log.models';
import { StatusLog } from '../sdk/constants';
export class L... |
Java | UTF-8 | 4,252 | 3.09375 | 3 | [] | no_license | package Controller;
//javafx imports
import Model.DatabaseController;
import Model.Person;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
import javafx.s... |
Markdown | UTF-8 | 3,005 | 2.734375 | 3 | [
"MIT"
] | permissive | # Protocol Basics
Protocols are instructions for Instruments like the MultispeQ on how to run a measurement. Those instructions written in the **J**ava**S**cript **O**bject **N**otation or [JSON][JSON_URL]. PhotosynQ is providing preset Protocols indicated by a <i class="fa fa-star text-warning"></i> start icon called... |
JavaScript | UTF-8 | 2,893 | 2.578125 | 3 | [] | no_license | const PathFinder = require("../shared/path-finder");
const { SetUnitTargetStateChange } = require("../shared/state-change");
// Orders the units based on movement dependencies
module.exports.movementSort = function (game, nonDeadUnits) {
const immovableUnits = [];
const noDependencyUnit = new Set();
... |
Java | UTF-8 | 308 | 1.742188 | 2 | [] | no_license | package org.yannis.ringtail.rpc.invoker;
import org.yannis.ringtail.rpc.RpcException;
import org.yannis.ringtail.rpc.RpcRequest;
import org.yannis.ringtail.rpc.RpcResponse;
/**
* Created by dell on 2016/7/1.
*/
public interface Invoker {
RpcResponse invoke(RpcRequest request) throws RpcException;
}
|
Java | UTF-8 | 1,302 | 2.46875 | 2 | [] | no_license | package com.seasky.dddtemplate.interfaces.controller.test;
import com.seasky.dddtemplate.dto.test.TestQueryQry;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
/**
* 示例Q线tc工厂
*
* @author XueYawei
* @date 2020/12/08
*/
public class TestQueryTcFactory {
public static Strea... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.