language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
Python | UTF-8 | 7,214 | 2.890625 | 3 | [] | permissive | """
Components/Chip
===============
.. seealso::
`Material Design spec, Chips <https://material.io/components/chips>`_
.. rubric:: Chips are compact elements that represent an input, attribute, or action.
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/chips.png
:align: cen... |
SQL | UTF-8 | 2,211 | 3.09375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64)
--
-- Host: localhost Database: dbescola
-- ------------------------------------------------------
-- Server version 8.0.16
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*... |
Shell | UTF-8 | 249 | 2.8125 | 3 | [] | no_license | #!/bin/bash
echo "Enter the title:"
read title
sed -i -e "s/^\# Papar Template/# ${title}/" ./README.md
NOW_DATE=`date "+%F"`
sed -i -e "s/YYYY-MM-DD/${NOW_DATE}/" ./README.md
git init
mkdir figs
mkdir out
mkdir release
rm README.md-e
rm init.sh
|
PHP | UTF-8 | 3,092 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace CaptJM\Bundle\StorytellerBundle\Entity;
use CaptJM\Bundle\StorytellerBundle\Repository\FontRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: FontRepository::class)]
class Font
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\... |
C | UTF-8 | 3,646 | 3.046875 | 3 | [] | no_license | // Klaudia Nowak
// 297936
#include "sliding_window.h"
FILE *fp;
int WINDOW_SIZE = 1500;
int all_packets;
int not_all_received(window_object_t *window)
{
for (int i = 0; i < WINDOW_SIZE; i++)
{
if (window[i].status != SAVED)
{
return 1;
}
}
return 0;
}
int print_to... |
SQL | UTF-8 | 660 | 2.890625 | 3 | [
"MIT"
] | permissive |
CREATE TABLE `user_site_image_library_version_meta` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`site_id` int(11) unsigned NOT NULL,
`library_id` int(11) unsigned NOT NULL,
`version_id` int(11) unsigned NOT NULL,
`extension` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '.jpg',
`type` varchar(15) COL... |
PHP | UTF-8 | 1,233 | 2.609375 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\SoftDeletes;
class User extends Authenticatable
{
use Notifiable;
use SoftDeletes;
/**
* The attribut... |
Python | UTF-8 | 397 | 4.09375 | 4 | [] | no_license | # N킬로그램 배달. 최대한 적은 봉지. 봉지는 3킬로그램, 5킬로그램 있음.
sugar = int(input())
bag = 0
while sugar >= 0:
if sugar % 5 == 0: # 입력받은 수가 5의 배수이면
bag += (sugar // 5)
print(bag)
break
sugar -= 3 # 입력받은 수가 5의 배수가 아니면 3킬로그램을 빼주고 봉지+1
bag += 1
else:
print(-1) |
C# | UTF-8 | 15,707 | 2.578125 | 3 | [] | no_license | namespace nManager.Helpful.Forms.UserControls
{
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Text;
public class XmlStateMachine
{
private string _cujahegijaXawaebi = string.Empty;
private string _qi... |
Java | UTF-8 | 4,694 | 2.859375 | 3 | [] | no_license | package com.ntu.api.controller.additional;
import javafx.fxml.FXML;
import javafx.scene.control.TextArea;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
public class AboutController {
@FXML
AnchorPane aboutDlg;
@FXML
private TextArea aboutTextArea;
private static boolean bool... |
Markdown | UTF-8 | 5,315 | 2.578125 | 3 | [] | no_license | # Determining Available Restriction Enzyme Recognition Sites for Molecular Cloning:
## Introduction
This pipeline is written Python3. When two DNA sequences are input as fasta files (or optionally as sequence strings) the output is a print of three lists: one list is the restriction enzymes which do not cut in either ... |
Markdown | UTF-8 | 2,071 | 2.875 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: Business and Technical Decision Makers learning catalog
description: Find all the training options for Power Automation
author: loreleishannonmsft
ms.topic: article
ms.date: 03/21/2020
ms.author: v-lshann
---
# Business and Technical Decision Makers Learning Catalog
Do you decide whether to invest in new t... |
Python | UTF-8 | 4,889 | 2.875 | 3 | [] | no_license | import copy
import numpy as np
import matplotlib.pyplot as plt
import time
class Environment:
cliff = -3;
road = -1;
sink = -2;
goal = 2
goal_position = [2, 3]
reward_list = [[road, road, road, road], [road, road, sink, road], [road, road, road, goal]]
reward_list1 = [['road', 'road', 'road... |
JavaScript | UTF-8 | 2,504 | 2.5625 | 3 | [] | no_license | const browser = require('webextension-polyfill')
import {
OneTimeSecretApi
} from 'onetimesecret-api'
import {
Storage
} from '../modules/storage'
function processSecret(secret) {
var myStorage = Storage()
myStorage.init().then(function() {
if (!secret.length) {
browser.tabs.create({
url: my... |
JavaScript | UTF-8 | 1,320 | 3.453125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | /**
* @fileOverview Contains collection of primitive operations under graph.
*
* @author Andrei Kashcha (aka anvaka) / https://github.com/anvaka
*/
module.exports = operations;
function operations() {
return {
/**
* Gets graph density, which is a ratio of actual number of edges to ... |
C# | UTF-8 | 1,266 | 2.578125 | 3 | [] | no_license | try
{
int packetsize, requestid, serverdata;
string string1, string2;
List<byte> str = new List<byte>();
using (BinaryReader reader = new BinaryReader(clientStream))
{
packetsize = reader.ReadInt32();
requestid = reader.ReadInt32();
serverdata = reader.ReadInt32();
Console.WriteLine("Packet Siz... |
C | IBM852 | 532 | 2.921875 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include "macros.h"
#include "syst_jeu.h"
/*
test exist() teste si un lement existe dans un tableau ou pas
*/
int testexist(int nb, int *tab, int cmp){
//printf("nb dans texExist= %d \n", nb);
int trouve =FALSE;
int *p1;
p1=tab;
int i=0... |
Java | UTF-8 | 2,531 | 1.921875 | 2 | [
"Apache-2.0"
] | permissive | package ru.tcsbank.mb.ui.activities.cashback;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView.v;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.CheckBox;
import androi... |
Java | UTF-8 | 1,457 | 3.234375 | 3 | [] | no_license | package com.company;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Main {
public static void main(String[] args) {
JFrame window = new JFrame("Zamiana temperatury");
window.setDefaultCloseOperation(WindowConstants.EXIT_ON... |
Python | UTF-8 | 573 | 4.78125 | 5 | [] | no_license | # Exercise 055: Highest and Lowest of the sequence
# Make a program that reads the weight of five people.
# At the end, show which was the highest and the lowest weight inputted.
highest = 0
lowest = 0
for person in range(1, 6):
weight = float(input(f'{person}º person\'s weight: '))
if person == 1:
hig... |
Java | UTF-8 | 1,368 | 2.46875 | 2 | [] | no_license | package edu.stevens.cs.cs548.clinic.rest.server;
import java.io.IOException;
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
import javax.ws.rs.core.UriBuilder;
import org.glassfish.grizzly.http.server.HttpServer;
import com.sun.jersey.api.container.grizzly2.GrizzlyWebContainerFactory;
public c... |
C++ | UTF-8 | 2,585 | 2.640625 | 3 | [
"WTFPL"
] | permissive | #include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include "SDL.h"
#include "Syndicate/Data/Palette.h"
#include "Animation.h"
SDL_Surface *screen = 0;
Syndicate::Data::Palette *palette = 0;
Animation *anim = 0;
unsigned anim_index = 69;
Uint32 anim_callback(Uint32 interval, void *param)
{
static uns... |
Python | UTF-8 | 160 | 3.28125 | 3 | [] | no_license | age=int(input())
balance=9000
if 7<=age<=12:
balance-=650
elif 13<=age<=18:
balance-=1050
elif 19<=age:
balance-=1250
else:
pass
print(balance)
|
Python | UTF-8 | 5,154 | 3.796875 | 4 | [] | no_license | #Player Name
player=input("Enter your name:")
print("Hello",player,"\nWelcome to Tometri's 'Meme War'!")
#Start Menu
while True:
start=input("Type 'Start' to begin your adventure\nFor any Yes/No questions please type 'Yes' or 'No'\nFor any numerical questions please input the number e.g. choice one=1")
if... |
PHP | UTF-8 | 2,404 | 3.140625 | 3 | [] | no_license | <?php namespace Assign3;
/**
* MySQL implementation of WorkflowDB methods.
*/
class SQLWorkflow implements WorkflowDB
{
/**
* Get an array of all workflows.
*/
public function getWorkflows() {
$conn = Conn::getDbConnection();
$sql = "SELECT w.id, w.name, w.description ";
$sq... |
JavaScript | UTF-8 | 1,327 | 2.78125 | 3 | [] | no_license | import * as PIXI from 'pixi.js';
export default class Button {
constructor(onStartGame, position) {
this.container = new PIXI.Container();
this.position = position;
this.isActive = true;
this.onStartGame = onStartGame;
this.initialize();
}
initialize() {
con... |
C++ | UTF-8 | 3,071 | 3.265625 | 3 | [] | no_license | #pragma once
#include <functional>
#include <vector>
#include "BangCore/Containers.h"
namespace Bang
{
template <class T>
class Array
{
public:
using Ref = typename std::vector<T>::reference;
using ConstRef = typename std::vector<T>::const_reference;
using Iterator = typename std::vector<T>::iterator;
... |
Java | UTF-8 | 4,384 | 2.546875 | 3 | [] | no_license | package de.tud.jenkins;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Singleton class reading and providing the properties
* defined in resources/jenkinsJobConfig/jobConfig.properties.
*
* @author svensee... |
Python | UTF-8 | 287 | 3.359375 | 3 | [] | no_license | '''
for item in 'Python':
print (item)
for item in ['vishal','Tushar','Subhash']:
print (item)
for item1 in [1,2,3,4,5]:
print(item1)
for item2 in range(10):
print (item2)
for item3 in range(5,10):
print (item3)
'''
for item4 in range(5,10,2):
print (item4) |
Java | UTF-8 | 1,249 | 2.78125 | 3 | [] | no_license | package com.example.demo.entity;
import javax.persistence.Entity;
/**
* @Author: 余锡鸿
* @Description:
* @Date: Create in 8:17 PM 7/27/2018
* @Modified By:
*/
public class Company {
public Long id;
public String name;
public int employeeNumber;
public Company(){}
public Company(Long id, Str... |
C | UTF-8 | 6,166 | 3.5625 | 4 | [] | no_license | /**
* @author Roy Ackerman
*/
#include <stdbool.h>
#include <stdio.h>
#include <math.h>
#include "calculator.h"
typedef enum Neighbours
{
RIGHT,
LEFT,
UP,
BOTTOM
} Neighbour;
int gIs_cyclic;
size_t gRows;
size_t gColumns;
source_point *gSources;
size_t gNumOfSources;
double **gGrid;
/**
* calculat... |
Java | UTF-8 | 568 | 3.640625 | 4 | [] | no_license | // check number is prime or not
import java.util.Scanner;
public class Test8 {
public static void main(String[] args) {
// TODO Auto-generated method stub
int num;
System.out.println("Enter the number:");
Scanner sc=new Scanner(System.in);
num=sc.nextInt();
boolean check=true;
f... |
Java | UTF-8 | 3,773 | 3.234375 | 3 | [] | no_license | package CreatingObservable;
import rx.Observable;
import rx.Scheduler;
import rx.Subscriber;
import rx.Subscription;
import rx.observers.Subscribers;
import rx.schedulers.Schedulers;
import java.awt.*;
/*
RxJava is a library that allows us to represent any operation as
an asynchronous data stream that can be created... |
C++ | UTF-8 | 2,047 | 3 | 3 | [] | no_license | #include <cstdio>
#include <cstring>
#define Parent(i) ((i - 1) >> 1)
#define LChild(i) ((i << 1) + 1)
#define RChild(i) ((i + 1) << 1)
struct Task {
long long priority;
char name[9];
};
long long LIMIT = 0x100000000LL;
int n, m;
Task *tasks;
class ComplHeap {
public:
ComplHeap(Task *tasks, int size) {
... |
JavaScript | UTF-8 | 1,838 | 2.609375 | 3 | [] | no_license | 'use strict';
const request = require('request');
/**
* Use this command to launch the handler from console:
*
* node_modules/.bin/serverless invoke local -f lambda -d '{"httpMethod":"GET","queryStringParameters":{"url":"http://github.com"}}'
*
* or from browser
*
* http://localhost:3000/?url=https://github.c... |
JavaScript | UTF-8 | 362 | 2.71875 | 3 | [
"MIT"
] | permissive | var Emoji = /** @class */ (function () {
function Emoji(icon) {
this.icon = icon;
}
return Emoji;
}());
var unicorn = new Emoji("🦄");
unicorn.icon = "💩";
console.log(unicorn); // check the precomiple version on class.js
// if you want to use typescript via cli do following
// npm install typescrip... |
JavaScript | UTF-8 | 519 | 3.078125 | 3 | [] | no_license | let screen = document.querySelector(".screen");
let equal = document.querySelector(".btn-equal");
let clear = document.querySelector(".btn-clear");
let buttons = document.querySelectorAll(".btn");
buttons.forEach((button) => {
button.addEventListener("click", (e) => {
let value = e.target.dataset.num;
screen... |
Java | UTF-8 | 3,906 | 3.109375 | 3 | [] | no_license | package de.fh.aachen.dental.imagej.processor;
import ij.ImagePlus;
import ij.process.ImageProcessor;
/**
*
* @author Daniel Wirtz
*
*/
public class ReflectionFilter implements Preprocessor {
private static final int STEPWIDTH = 10;
private static final int STEPHEIGHT = 10;
private static final int UPPERBOUND... |
C# | UTF-8 | 2,118 | 2.984375 | 3 | [
"MIT"
] | permissive | using Jotunn.Managers;
namespace Jotunn.Entities
{
/// <summary>
/// Main interface for adding custom status effects to the game.<br />
/// All custom status effects have to be wrapped inside this class to add it to Jötunns <see cref="ItemManager"/>.
/// </summary>
public class CustomStatu... |
Markdown | UTF-8 | 10,748 | 2.59375 | 3 | [
"MIT"
] | permissive | serverless-dynamodb-local
=================================
[](https://gitter.im/99xt/serverless-dynamodb-local?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![... |
Markdown | UTF-8 | 3,043 | 2.828125 | 3 | [] | no_license |
# Characters.CharProps Property (Visio)
Sets a character property of a **Characters** object to a new value. Write-only.
## Syntax
_expression_ . **CharProps**( **_CellIndex_** )
_expression_ An expression that returns a **Characters** object.
### Parameters
|**Name**|**Required/Optional**|**Data Type**|*... |
Markdown | UTF-8 | 794 | 2.890625 | 3 | [] | no_license | # send_email_or_text
Send an e-mail or text message from Python
Use this function to send an e-mail or text from Python.
You must fill in:
EMAIL_LIST - a list of recipients
EMAIL_SENDER - address of email sending message from
EMAIL_PASSWORD - the password for the sender address
SMTP_SERVER - currently configured f... |
JavaScript | UTF-8 | 858 | 2.875 | 3 | [] | no_license | const express = require('express')
const app = express()
const port = process.env.PORT || 3000
const articals = [{title: 'artical1'}, {title: 'artical2'}, {title: 'artical3'}]
// 响应静态文件请求,通过express.static将文件注册到适当地位置。
app.use(
'/css/bootstrap.css',
express.static('node_modules/bootstrap/dist/css/bootstrap.css... |
C# | UTF-8 | 5,075 | 2.75 | 3 | [
"MIT"
] | permissive | /*
Name: Tabs.cs
Purpose: Contains the Page Object Model for the tabs page on www.demoqa.com.
Author: Matthew Comeaux. Github: https://www.github.com/matt-comeaux Linkedin: https://www.linkedin.com/in/matthew-comeaux
Created On: 5/3/2021
First Uploaded To Github On: 5/4/2021
MIT License
Copyright (c) [2021... |
Java | UTF-8 | 11,263 | 1.984375 | 2 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package propertyViewer;
import Database.areaManager;
import Database.connectionDB;
import Database.landlord;
import com.jfoenix.contro... |
C# | UTF-8 | 13,687 | 2.71875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.IO;
using PopulateDatabaseFromRescueGroupAPI.Services.Interfaces;
using PopulateDatabaseFromRescueGroupAPI.Models;
namespace PopulateDatabaseFromR... |
Java | UTF-8 | 4,617 | 2.625 | 3 | [
"MIT"
] | permissive | package org.habv.automation.commons;
import org.habv.automation.pageobjects.AddUserPage;
import org.habv.automation.pageobjects.AuthUserPage;
import org.habv.automation.pageobjects.ChangePasswordPage;
import org.habv.automation.pageobjects.ChangeUserPage;
import org.habv.automation.pageobjects.DashBoardPage;
import or... |
C++ | UTF-8 | 5,620 | 3.4375 | 3 | [] | no_license | // -------------------------------- Customer.cpp ---------------------------------
//
// Author Name: Tim Lawton
//
// Creation Date: 07/16/2019
//
// Date of Last Modification: 8/19/2019
//
// Description: a Customer Class implementation file.
// This file is the interface for the Customer class. Each object of this c... |
Shell | UTF-8 | 632 | 3.734375 | 4 | [
"MIT"
] | permissive | if [ -z "$1" ]; then
echo "Usage:"
echo " npm run link -- <relative_path_to_project>"
fi
PROJECT_PATH="$1"
PACKAGE_PATH="$PWD"
BUILT_PACKAGE_PATH="$PACKAGE_PATH/pkg"
PROJECT_REACT_PATH="../$PROJECT_PATH/node_modules/react"
if [ ! -d $PROJECT_PATH ]; then
echo "Looks like no project exists under `$PROJECT_PATH`... |
Python | UTF-8 | 1,750 | 3.1875 | 3 | [] | no_license | '''
ID: cruzan1
LANG: PYTHON3
TASK: marathon
'''
def inPut():
f = open('marathon.in', 'r')
numCheckpoints = int(f.readline().strip())
overalLst = []
for i in range(numCheckpoints):
coordinateLst = []
coordinatePair = f.readline().strip().split()
coordinateLst.append(int(coordinatePair[0]))
coor... |
Markdown | UTF-8 | 2,580 | 3.28125 | 3 | [] | no_license | # ORF-Finder
This is a Python programming project completed as part of my Bioinformatics MSc at the University of Manchester. The command line tool searches an input genetic sequence for Open Reading Frames (potential protein-coding sequences).
## Motivation
DNA sequencing outputs a list of As, Ts, Cs and Gs that ma... |
Java | UTF-8 | 636 | 3.125 | 3 | [
"MIT"
] | permissive | package bg.uni.sofia.fmi.mjt.dungeon.treasure;
import bg.uni.sofia.fmi.mjt.dungeon.actor.Hero;
public class HealthPotion implements Treasure {
private int healingPoints;
public HealthPotion(int healingPoints) {
this.healingPoints = healingPoints;
}
public HealthPotion(HealthPotion other) {
... |
C# | UTF-8 | 5,194 | 2.671875 | 3 | [] | no_license | using System;
using System.Runtime.InteropServices;
namespace JuggleServerCore
{
/// <summary>
/// Rock Crypto Class
/// </summary>
class RockCrypto
{
private byte[] _Data = new byte[120];
[DllImport("RockBaseML.dll", EntryPoint = "??0CRockCrypto@Ro... |
Markdown | UTF-8 | 789 | 3.1875 | 3 | [
"MIT"
] | permissive | ## MOTIVATION
When I develop for the mobile or web frontend, I usually get some RGB values on zepline from our designers, which I need to transform them into the hex code. Sounds like just trivial, right? But it does become painful when you need to do a lot of them. And I feel that the worst part is that I have to copy... |
C++ | UTF-8 | 714 | 2.78125 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <stack>
#include <vector>
#include <string>
using namespace std;
#define print(x) cout << x << endl
#define input(x) cin >> x
int main() {
string s;
input(s);
stack<int> q;
const int n = s.s... |
Ruby | UTF-8 | 1,357 | 2.640625 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env ruby
unless system('git --version > /dev/null')
STDERR.puts 'Git does not appear to be installed.'
exit 2
end
unless system('git rev-parse --is-inside-work-tree > /dev/null')
STDERR.puts 'The current working directory must be a Git repo.'
exit 3
end
$LOAD_PATH << File.join(File.dirname(__FILE_... |
Java | UTF-8 | 6,418 | 1.867188 | 2 | [] | no_license | package com.imall.iportal.core.weshop.service.impl;
import com.imall.commons.base.interceptor.BusinessException;
import com.imall.commons.base.service.impl.AbstractBaseService;
import com.imall.commons.dicts.BoolCodeEnum;
import com.imall.commons.dicts.FansSourceCodeEnum;
import com.imall.iportal.core.main.commons.Se... |
Shell | UTF-8 | 5,975 | 4.03125 | 4 | [] | no_license | #!/bin/sh
# Flags:
# -r = Resolution. Options: hd, fhd, sd (default hq)
# -p = Preview.
# VIDEO DEVICE
VIDEO_DEVICE=/dev/video0
if [ ! -e /dev/video0 ]; then
zenity --error \
--title="Video capture device not found" \
--text="No video capture device could be found.\nPlease connect a webcam and try again."
exit... |
PHP | UTF-8 | 228 | 2.65625 | 3 | [] | no_license | <?php
include('db-conn.php');
$q = "SELECT * FROM tblUsers";
$result = mysqli_query($conn, $q);
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
echo $row['username'] . "<br>";
}
}
?> |
Java | UTF-8 | 807 | 3.25 | 3 | [] | no_license | package com.asiainfo.chapter15;
/**
* 通用的Generator
*
* @author zhiwangzhang
* @date 2016年7月3日 下午4:02:26
*/
public class Test33 {
public void m1() {
System.out.println("m1");
}
public static void main(String[] args) {
Test33 t = BasicGenerator.create(Test33.class).next();
t.m1();
}
}
class BasicGenerat... |
Java | UTF-8 | 1,073 | 2.203125 | 2 | [
"Apache-2.0"
] | permissive | package com.jota.udacity.project2.app;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import com.jota.udacity.project2.ui.features.BasePresenter;
import com.jota.udacity.project2.ui.features.View;
public abstract class BaseActivity extends AppCom... |
Java | UTF-8 | 489 | 3.015625 | 3 | [] | no_license | class Solution {
public int[] sortArrayByParityII(int[] A) {
int i = 0, j = 1;
while (i<A.length && j<A.length){
while (i<A.length && A[i]%2 == 0)
i += 2;
while (j<A.length && A[j]%2 == 1)
j += 2;
if (i<A.length && j<A.length){
... |
C | UTF-8 | 4,624 | 2.59375 | 3 | [] | no_license | #include "common.h"
sNodeTree* gNodes;
int gSizeNodes = 0;
int gUsedNodes = 0;
void init_nodes()
{
const int node_size = 32;
if(gUsedNodes == 0) {
gNodes = (sNodeTree*)xcalloc(1, sizeof(sNodeTree)*node_size);
gSizeNodes = node_size;
gUsedNodes = 1; // 0 of index means null
}
}
... |
Java | UTF-8 | 190 | 1.625 | 2 | [] | no_license | /**
* Package containing an implementation of a simple swing application for displaying two equal lists of dynamically generated primes.
*
* @since 7.0
*/
package hr.fer.oprpp1.gui.prim; |
Swift | UTF-8 | 1,370 | 2.828125 | 3 | [] | no_license | //
// PhotoCoreDataManager.swift
// MobileUpTest
//
// Created by Macbook Pro on 23.07.2021.
//
import UIKit
import CoreData
//MARK: - Photos Core Data Manager
final class PhotosCoreDataManager {
static var shared = PhotosCoreDataManager()
var persistentContainer: NSPersistentContainer = {
... |
Python | UTF-8 | 1,069 | 2.921875 | 3 | [] | no_license | n = int(input())
number = list(map(int, input().split()))
oper = list(map(int, input().split()))
max_answer = -10000000000
min_answer = 10000000000
def getSol(cur_value, idx, plus, minus, mul, div):
global n, max_answer, min_answer
if idx == n:
max_answer = max(max_answer, cur_value)
min_a... |
JavaScript | UTF-8 | 2,632 | 2.71875 | 3 | [] | no_license | import React, { Component } from "react";
import {
StyleSheet,
View,
TextInput,
Button,
} from "react-native";
export default class NewMessageForn extends Component {
constructor(props) {
super(props);
this.state = {
user_name: "",
time_stamp: "2020-03-06 18:35:14",
message_text: ... |
C | UTF-8 | 5,529 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | /*
* Copyright (c) 2020 Tobias Svehagen
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/ztest.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <zephyr/net/socket.h>
#include <poll.h>
#include <sys/eventfd.h>
#define TESTVAL 10
ZTEST_SUITE(test_eventfd, NULL, NULL, NULL, NULL, NUL... |
C# | UTF-8 | 2,000 | 3.765625 | 4 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerScience
{
public class InsertionSort
{
private int[] data;
private static Random generator = new Random();
public InsertionSort(int size)
{
... |
Java | UTF-8 | 1,116 | 2.21875 | 2 | [] | no_license | package POM;
import Commons.Driver;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium... |
Python | UTF-8 | 871 | 4.15625 | 4 | [] | no_license | """PROBLEM:
Given an array of integers nums, write a method that returns the "pivot" index of this array.
We define the pivot index as the index where the sum of the numbers to the left of the index is equal to the sum of the
numbers to the right of the index.
If no such index exists, we should return -1. If there a... |
Java | UTF-8 | 722 | 1.648438 | 2 | [
"Apache-2.0"
] | permissive | /*
* @(#)RoleGroupSearchConditions.java 1.0 Aug 28, 2015
* Copyright 2015 by GNU Lesser General Public License (LGPL). All rights reserved.
*/
package org.nlh4j.web.system.role.dto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nlh4j.web.base.common.controller.AbstractSearchConditionsDto;
... |
Java | UTF-8 | 1,028 | 2.328125 | 2 | [
"Apache-2.0"
] | permissive | package cn.gao.studs.login;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.beanutils.Be... |
Java | UTF-8 | 2,138 | 3.4375 | 3 | [] | no_license | package Utils;
/**
*
* <h2>青阳龙野中文姓名随机生成工具-姓氏字典</h2>
* <p>该接口定义了获取随机中文名生成工具(RandomChineseNameUtile)需要使用的姓氏字典的格式,
* 随机中文名工具将通过这个字典获取能够使用的姓氏集合。如果您需要自定义姓氏生成范围,
* 请创建自定义姓氏字典类并按照功能说明实现这个接口。
* </p>
* @author 青阳龙野(kohgylw)
* @version 1.0
*/
public interface SurnameDictionaries {
/**
*
* <h2>检查当前姓氏字典中是否有某一姓氏</... |
Markdown | UTF-8 | 1,539 | 3.15625 | 3 | [] | no_license | ### NIO
  同步非阻塞IO。它利用了自 NIO 子系统被引入 JDK 1.4 时便可用的基于选择器的 API。
#### Java NIO: Channels and Buffers(通道和缓冲区)
  标准的IO基于字节流和字符流进行操作的,而NIO是基于通道(Channel)和缓冲区(Buffer)进行操作,数据总是从通道读取到缓冲区中,或者从缓冲区写入到通道中。
#### Java NIO: Non-blocking IO(非阻塞IO)
  Java NIO可以让你非阻塞的使用IO,例如:当线程从通道读取数据到缓冲区时,线程还是可以进行其他事情。当数据被... |
Java | UTF-8 | 2,707 | 2.578125 | 3 | [] | no_license | package kr.ac.kaist.se.model.abst.cap;
import kr.ac.kaist.se.data.SimLogEvent;
import kr.ac.kaist.se.model.abst.obj._SimObject_;
import kr.ac.kaist.se.model.sos.SoS;
import java.util.ArrayList;
/**
* Abstract class to represent an action object
*
* In SIMVA-SoS Lite, _SimAction_ can be specialized into FuncAction... |
Java | UTF-8 | 3,879 | 1.898438 | 2 | [] | no_license | package com.hms.pojo;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;... |
JavaScript | UTF-8 | 1,219 | 2.53125 | 3 | [] | no_license |
'use strict';
import TodoService from '../service/todo-service';
const todoService = new TodoService();
/////////////////
// Fetch todos //
/////////////////
export const FETCH_TODOS_REQUEST = 'FETCH_TODOS_REQUEST';
function fetchTodosRequest() {
return {
type: FETCH_TODOS_REQUEST
};
}
export const FETCH_... |
Swift | UTF-8 | 1,101 | 3.03125 | 3 | [] | no_license | //
// RowView.swift
// ControlADOX
//
// Created by Teo Toledo on 07/06/2021.
//
import SwiftUI
struct RowView: View {
var dispositive: Dispositive
var body: some View {
HStack{
dispositive.avatar
.resizable()
.frame(width: 40, height: 40).paddi... |
JavaScript | UTF-8 | 1,209 | 3.546875 | 4 | [] | no_license | // Below are two imports at once: React and Component from 'react;
// Import BookList and add it to the render function below, to render it inside the app.
// Then make sure BookList has a link to Redux because we want our app to showcase a list of books.
// So, go to book-list.js and import 'react-redux' library
// Al... |
Ruby | UTF-8 | 1,765 | 2.828125 | 3 | [
"MIT"
] | permissive | module Airbrake
# A class that is capable of unwinding nested exceptions and representing them
# as JSON-like hash.
#
# @api private
# @since v1.0.4
class NestedException
# @return [Integer] the maximum number of nested exceptions that a notice
# can unwrap. Exceptions that have a longer cause cha... |
Markdown | UTF-8 | 10,078 | 3.03125 | 3 | [] | no_license | # 0801. 特别放送 | 深度关系与精神资源
> 梁宁·产品思维30讲
2018-01-14
在《02用户体验与结婚教练》中,我提到会有两篇关于深度关系的文章作为彩蛋。
我选取了这两篇文章的精彩片段作为赏读,让你从不同侧面对一个人的精神资源,以及对人与人之间的精神关系,希望你能有更深刻的理解。
## 01. 深度关系
原标题为《关系的深度——「纸牌屋」安德伍德与克莱尔夫妇的深刻关系》,感兴趣的话可以到公众号「梁宁-闲花照水录」(ID:cafeday)查看原文,以下为精彩节选。
春风沉醉,柳絮纷纷。走在草坪的小径里,想起《纸牌屋》第二季开篇的第一幕,安德伍德与克莱尔一起跑步登场。
《纸牌屋》的镜头里,这对夫妻独处的时候... |
Ruby | UTF-8 | 2,516 | 4.0625 | 4 | [] | no_license |
class Game
@@WORDS = ["hat", "cat", "ate", "run", "eye", "soup", "date",
"bake", "wake", "grape", "apple", "pride", "drive",
"tacos", "linux", "orange", "purple", "volume",
"liquid", "palace", "molasses", "diamond", "sausage",
"america", "england", "tit... |
Java | UTF-8 | 5,400 | 2.03125 | 2 | [] | no_license | package com.barang;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.GridLayoutMana... |
C# | UTF-8 | 1,556 | 2.609375 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Timer : MonoBehaviour
{
public bool allowUnscaledDeltaTime = false;
private float duration;
private Status status;
private float countingTime;
private bool counting;
public void SetTimer(float durati... |
C++ | UTF-8 | 1,177 | 3.359375 | 3 | [
"MIT"
] | permissive | #include <iostream>
#define MAX_SIZE 101
void merge(int list[], int p, int q, int r) {
int i = 0;
int j = 0;
int n1 = q - p + 1;
int n2 = r - q - 1;
int L[MAX_SIZE];
int R[MAX_SIZE];
for (i = 0; i < n1; i++) {
L[i] = list[p+i];
}
for (j = 0; j < n2; j++) {
R[j] = list[q+j];
}
i = 0;
... |
Java | UTF-8 | 1,723 | 3.15625 | 3 | [] | no_license | package leetcode;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
public class no301 {
HashSet<String> set=new HashSet<>();
int len;
public List<String> removeInvalidParentheses(String s) {
List<String> res=new ArrayList<>();
len=s.length();
int left=0;... |
Java | UTF-8 | 639 | 2.953125 | 3 | [] | no_license | package com.leetcode.offer.No61;
import java.util.HashSet;
/**
* @author jtchen
* @version 1.0
* @date 2021/2/15 23:47
*/
public class Solution3 {
public boolean isStraight(int[] nums) {
int[] map = new int[13];
int max = Integer.MIN_VALUE, min = Integer.MAX_VALUE;
for (... |
JavaScript | UTF-8 | 1,235 | 2.890625 | 3 | [
"MIT"
] | permissive | /**
* Created by Catter on 2016/3/9.
*/
//(function(){
//js实现hasClass,addClass,removeClass,ToggleClass
function hasClass(obj, cName){
return obj.className.match(new RegExp('(\\s|^)' + cName + '(\\s|$)'));
}
function addClass(obj, cName){
if(!hasClass(obj, cName)){
obj.clas... |
Python | UTF-8 | 949 | 3.640625 | 4 | [] | no_license | #MENU DE UN RECIEN NACIDO
import libreria
opc=0 #ocpiones
max=3 #maximo de opciones
def opcionA():
nom2=libreria.validar_nombre(input("OPCION 1: INGRESE SU NOMBRE PARA QUE PUEDA SUFRAGAR:")) #validad si es un nombre True y sino es False
print("el nombre del cliente es:",nom2)
print("")
def opcionB():
... |
Markdown | UTF-8 | 24,893 | 2.515625 | 3 | [
"BSD-2-Clause"
] | permissive | # 修改、改进 RxGo 包
## 题目要求
- 阅读 ReactiveX 文档。请在 pmlpml/RxGo 基础上,
1. 修改、改进它的实现
2. 或添加一组新的操作,如 filtering
- 该库的基本组成:
* rxgo.go 给出了基础类型、抽象定义、框架实现、Debug工具等
* generators.go 给出了 sourceOperater 的通用实现和具体函数实现
* transforms.go 给出了 transOperater 的通用实现和具体函数实现
## 注意事项
- 本次开发使用环境为linux
- api文档使用godoc生成
- 说明文档编辑采用csdn编辑,故图片可能会有水印
-... |
Java | UTF-8 | 1,702 | 2.375 | 2 | [
"MIT"
] | permissive | package com.dim.cls.model;
import com.dim.cls.util.BilCycleTypes;
public class Subject {
private String name;
private int grade;
private int charge;
private int discount;
private int discountPercentage;
private BilCycleTypes bilCycleType;
private int admissionFee;
private int admissionDiscount;
private int ... |
Java | UTF-8 | 9,774 | 1.953125 | 2 | [] | no_license | package com.woniu.car.message.web.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.s... |
Java | UTF-8 | 452 | 1.703125 | 2 | [] | no_license | package com.awscourse.filesmanagementsystem.api.file;
import com.awscourse.filesmanagementsystem.api.label.LabelSuggestionDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.net.URI;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class F... |
Java | UTF-8 | 169 | 2.75 | 3 | [] | no_license | public abstract class Car {
private double price;
private String model;
private String year;
public abstract void goUphill();
public abstract void goFast();
} |
JavaScript | ISO-8859-1 | 11,347 | 2.671875 | 3 | [
"MIT"
] | permissive |
/**
* Funciones de busqueda javascript
*
*/
function searchArtist( artista ){
//alert("Buscando artista "+artista);
artista=replaceAll(artista,' ','+');
$('#searchGif').show();
$('#searchresults').html('');
$('#searchresults').load('searchArtist.do?artist='+artista, function() {
$('#se... |
Markdown | UTF-8 | 4,035 | 2.8125 | 3 | [] | no_license | ## 文档
#### Base64
- [v2.0.0] 字符串base64编码
`yutil.Base64.Encode(data string) string`
- [v2.0.0] 对象进行base64编码
`yutil.Base64.Encode4Obj(data interface{}) string`
- [v2.0.0] base64字符串解码
`yutil.Base64.Decode(data string) string`
- [v2.0.0] base64字符串反序列化对象
`yutil.Base64.Decode2Obj(data string,v interface{})`
#### Md... |
C++ | UTF-8 | 2,028 | 2.625 | 3 | [] | no_license | /// TestEntry: utils_fs_module
/// With: ../src/utils/fs.cc
/// With: ../src/log/methods.cc
/// ----------------------
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include<sys/stat.h>
#include "../utilities/index.hpp"
#include "../../src/utils/utils.hpp"
char buf[128];
int main() {
char result[128];... |
C# | UTF-8 | 817 | 2.5625 | 3 | [] | no_license | using System;
using CodeNameTwang.ViewModels.DataStructures;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace UnitTestProject1
{
[TestClass]
public class TestRoom
{
[TestMethod]
public void testID()
{
Room usr = new Room();
usr.id = 1;
... |
PHP | UTF-8 | 1,952 | 2.796875 | 3 | [] | no_license | <?php
// use filter_input to sanitize video search
$search = (filter_input(INPUT_GET, "search", FILTER_SANITIZE_STRING));
if(empty($search) === true) {
echo "<span class=\"alert alert-danger\">Invalid search parameters. Please re-enter the search query and try again.</span>";
exit;
}
// load the API key and encode t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.