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 | 1,517 | 2.578125 | 3 | [] | no_license | import sys
import re
foods = []
ingrs = set()
allergs = set()
candidates = dict()
rcandidates = dict()
for line in sys.stdin:
ingr, allerg = line.split(" (contains ")
ingr = ingr.split(" ")
allerg = allerg.split(", ")
allerg[-1] = allerg[-1][:-2]
foods.append((ingr, allerg))
allergs |= set(allerg)
ingrs |= set(... |
TypeScript | UTF-8 | 1,305 | 2.953125 | 3 | [
"MIT"
] | permissive | interface LatticeSecureRequest {
// Message header
header: LatticeMessageHeader;
// Request data
payload: LatticeSecureRequestPayload;
}
interface LatticeSecureRequestPayload {
// Indicates whether this is a connect (0x01) or
// encrypted (0x02) secure request
// [uint8]
requestType: LatticeSecureMsgTy... |
C++ | BIG5 | 1,114 | 3.125 | 3 | [] | no_license | /*ҡG
* qӱ誺dp(i)=dp(i-1)+dp(i-2)tܦӨ
* ѩnOثeB
* ]Adp(i,k)=q0iWLkBk
* AӡAdp(i,k) = dp(i-1,k-1) + dp(i-2,k-1)
* ]G@Ҥldp(3,2)q03WL2Bk
* [|{Odp(2,1)+dp(1,1)AzѬOJMAn3SnWLB
* bҼ{n1BF1β2ɭԡAp@ӦAWh@BĤT~|WLB
*/
#include<bits/stdc++.h>
#define endl '\n'
#define maxn 1001
#define MOD_N 1000000009
using namespace std;
int n, k , dp[m... |
Java | UTF-8 | 836 | 2.625 | 3 | [] | no_license | package classes.security;
import java.io.Serializable;
import java.util.ArrayList;
public class EncryptionKey implements Serializable {
private String id, value;
private ArrayList<String> signatures;
public EncryptionKey(String arrIndex, String arrValue) {
this.id = arrIndex;
this.va... |
Shell | UTF-8 | 556 | 2.59375 | 3 | [] | no_license | #!/bin/bash
username='ubuntu'
sudo apt-get update
sudo apt-get install nano git apt-transport-https -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
apt... |
C# | UTF-8 | 3,059 | 2.578125 | 3 | [] | no_license | using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
namespace Data.Remote
{
public class BaseRequest : MonoBehaviour
{
public Action<string> OnFailed;
public Action<string> OnComplete;
public Action<string> OnTimeout;
public enum EStatus
{
WAITING,
REQUESTIN... |
C# | UTF-8 | 915 | 2.53125 | 3 | [] | no_license | namespace eCat.Repository.Mapped
{
public class ParametroConfiguration : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<eCat.Data.Entities.Parametro>
{
public ParametroConfiguration()
: this("dbo")
{
}
public ParametroConfiguration(string schema)
... |
SQL | UTF-8 | 759 | 2.734375 | 3 | [] | no_license | BEGIN
pkg_drop.drop_proc(object_name => 'cls_employees_scd', object_type => 'table');
END;
CREATE TABLE cls_employees_scd
(
employee_surr_id NUMBER(38) NOT NULL,
employee_id VARCHAR2(50 BYTE) NOT NULL,
first_name VARCHAR2(50 BYTE) NOT NULL,
last_name VARCHAR2(50 BYTE) NOT NULL,
... |
PHP | UTF-8 | 153 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Exception;
class RepositoryException {
public function __construct($exception) {
echo $exception;
}
} |
C# | UTF-8 | 2,875 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | using OpenTK;
using System;
namespace OpenTKbuild
{
enum Camera_Movement
{
forward,
backward,
left,
right
};
class Camera
{
public float Yaw = -90.0f;
public float Pitch = 0.0f;
public float Movespeed = 3.0f;
public float Sen... |
Java | UTF-8 | 4,286 | 3.453125 | 3 | [] | no_license | package dkeep.logic;
import dkeep.logic.Map;
import dkeep.logic.GameState;
public class Hero extends Character
{
private boolean armed;
/**
* Constructor of the class. The Hero is initially unarmed.
*
* @param x The x coordinate of the new hero.
* @param y The y coordinate of the new hero.
*
*/
pu... |
Python | UTF-8 | 2,948 | 2.78125 | 3 | [] | no_license | import codecs
import re
from typing import List
from commons import data_io
def doc_generator(file_path):
"""
PubTator docs are of the form:
UID|TITLE|TEXT
UID|ABSTRACT|TEXT
UID SPAN MENTION ENTITY_TYPE MESH_ID
...
See -- data/bioconcepts2pubtator_offsets.sample
"""
with c... |
Java | UTF-8 | 2,025 | 1.921875 | 2 | [] | no_license | package generalassembly.yuliyakaleda.startercode;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import and... |
Swift | UTF-8 | 12,861 | 2.703125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | //
// Copyright 2022 The Matrix.org Foundation C.I.C
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... |
PHP | UTF-8 | 796 | 3.25 | 3 | [] | no_license | <?php
// The concrete Robot class based on the RobotPlan interface
require_once "RobotPlan.php";
class Robot implements RobotPlan
{
private $robotHead;
private $robotTorso;
private $robotArms;
private $robotLegs;
public function setRobotHead($head)
{
$this->robotHead = $head;
}
public function getRobot... |
Python | UTF-8 | 689 | 2.71875 | 3 | [] | no_license | # _*_ coding: utf-8 _*_
# 找到probase中的实体
def leaf():
hypoList = []
hypeList = []
i = 0
with open('data-concept-instance-relations.txt', 'r', encoding='utf-8')as f:
for line in f.readlines():
i += 1
hype = line.strip().split('\t')[0]
hypo = line.strip().split('... |
JavaScript | UTF-8 | 460 | 3.046875 | 3 | [
"MIT"
] | permissive | // a random number generator
var generator = fc.randomGeometricBrownianMotion()
.steps(11);
// some formatters
var dateFormatter = d3.timeFormat('%b');
// randomly generated sales data starting at one
var data = generator(1).map(function(d, i) {
return {
month: dateFormatter(new Date(0, i + 1, 0)),
sale... |
C++ | UTF-8 | 1,072 | 3.59375 | 4 | [] | no_license |
void insert(node** root, int item){
node* temp = new node;
node* ptr;
temp->data = item;
temp->next = NULL;
if (*root == NULL)
*root = temp;
else {
ptr = *root;
while (ptr->next != NULL)
ptr = ptr->next;
ptr->next = temp;
}
}
node... |
Ruby | UTF-8 | 392 | 3.375 | 3 | [] | no_license | class CrewMember
attr_reader :country
def initialize(country)
@country = country
@on_the_ship = true
end
def receive_order(_order)
say "\e[31mThe water is cold!\e[0m" if @on_the_ship
end
def jump
if @on_the_ship
say "\e[32mJumping!!\e[0m"
@on_the_ship = false
end
end
... |
Ruby | UTF-8 | 1,032 | 3.109375 | 3 | [
"MIT"
] | permissive | require 'pry'
require 'open-uri'
class StellingBanjos::Scraper
@@all = []
def self.scrape_catalog_page(link)
catalog = Nokogiri::HTML(open(link))
catalog.css("div.ProductItem").each do |banjo|
name = banjo.css("h2").text.strip
if banjo.css("span").text.strip.include?("Sold out")
sold_... |
C# | UTF-8 | 5,770 | 2.5625 | 3 | [] | no_license | using System;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Api;
using Api.Models;
using Domain.Models;
using FluentAssertions;
using Newtonsoft.Json;
using NUnit.Framework;
namespace SmokeTests
{
public class CustomersControllerTest... |
TypeScript | UTF-8 | 1,383 | 3.578125 | 4 | [] | no_license | interface Day1Reducer {
(accumulator: number[], value: number, _: number, array: number[]): number[];
}
const reduceTheTwoUsing = (yourTotal: number): Day1Reducer => (
accumulator,
value,
_,
array,
) => {
if (accumulator.length === 2) {
return accumulator;
}
const otherNumber = yourTotal - value;
... |
Markdown | UTF-8 | 2,893 | 2.78125 | 3 | [] | no_license | ---
title: Spring Boot CLI使用
date: 2017-10-18 19:40:59
categories: [Java,Spring]
tags: [java,spring]
---
Spring Boot CLI是Spring Boot项目提供的一个用于快速运行Spring Boot应用的命令行工具,通过结合Groovy,可以实现一个文件的WEB应用,用于快速实验原型是最好不过的了。
<!--more-->
## 安装
手动安装:https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#getting-started-... |
JavaScript | UTF-8 | 1,619 | 2.75 | 3 | [
"MIT"
] | permissive | /*
This is an example of 2D rendering, simply
using bitmap fonts in orthographic space.
var geom = createText({
multipage: true,
... other options
})
*/
global.THREE = require('three')
var createOrbitViewer = require('three-orbit-viewer')(THREE)
var createText = require('../../src/engine/three-bmfont... |
Java | UTF-8 | 4,264 | 3.46875 | 3 | [] | no_license | import java.util.Comparator;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
public class Assn6_3 {
public static void main(String[] args) {
class Employee implements Comparable<Employee>
{
String id, name, department;
double salary;
vo... |
Java | UTF-8 | 751 | 2.671875 | 3 | [] | no_license | import java.applet.*;
import java.io.*;
import javax.swing.*;
import javax.sound.sampled.*;
public class GameAmbientSound
{
public static final String RAIN = "sounds/amb_rain.wav";
public static final String FULL_TREES = "sounds/amb_trees1.wav";
public static final String DEAD_TREES = "sounds/amb_trees2.wav";
... |
Markdown | UTF-8 | 1,508 | 2.515625 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: Числовые пределы (C++)
ms.date: 11/04/2016
helpviewer_keywords:
- numerical limits
ms.assetid: 5ebc9837-e273-4ea6-ac7d-14b3c2c974c7
ms.openlocfilehash: 54854150b484e2caf66b8e9bc0cb97597d693b49
ms.sourcegitcommit: 6052185696adca270bc9bdbec45a626dd89cdcdd
ms.translationtype: MT
ms.contentlocale: ru-RU
ms.lasth... |
Java | UTF-8 | 13,323 | 2.390625 | 2 | [] | no_license | package com.natallia.shoppinglist.database;
import android.app.Activity;
import android.util.Log;
import com.natallia.shoppinglist.R;
import java.util.ArrayList;
import java.util.List;
import io.realm.Realm;
import io.realm.RealmObject;
import io.realm.RealmResults;
import io.realm.Sort;
/**
* Класс для работы с ... |
Swift | UTF-8 | 4,762 | 4.03125 | 4 | [] | no_license | /*:
## Упражнение для приложения — информирование об успехах
>Эти упражнения закрепляют понимание Swift в контексте фитнес-приложения.
Довольно часто вам нужно передавать в функцию вводную информацию. К примеру, функция информирования об успехах, которую вы написали в упражнении «Работающее приложение», может б... |
C# | UTF-8 | 693 | 2.515625 | 3 | [
"MIT"
] | permissive | using Amadevus.RecordGenerator.TestsBase;
using System;
using Xunit;
namespace Amadevus.RecordGenerator.Test
{
public class RecordConstructorTests : RecordTestsBase
{
[Fact]
public void Ctor_HasParametersNamedLikeProperties()
{
new Item(id: ItemId, name: ItemName);
... |
Markdown | UTF-8 | 10,199 | 2.640625 | 3 | [] | no_license | # Pretraining language models on SNLI
This repository contains code for pre-training and evaluating 4 different language models pre-trained on the SNLI (inference) task. The inference is performed by a shallow linear classifier that works on the output of one of the 4 encoder models:
* The baseline encoder averages the... |
C++ | UTF-8 | 681 | 3.28125 | 3 | [] | no_license | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
vector<int> intVec;
INSERT_ELEMENTS(intVec,1,9);
vector<int>::iterator pos;
pos = find(intVec.begin(),intVec.end(),5);
if(pos != intVec.end())
cout << "The value 5 exists,and its position is " <<
... |
TypeScript | UTF-8 | 2,252 | 2.546875 | 3 | [
"MIT"
] | permissive | import { Component, Input, ViewChild } from '@angular/core';
import { AbstractControl, ControlContainer, ControlValueAccessor, FormControlDirective, NG_VALUE_ACCESSOR } from '@angular/forms';
import { get, has } from 'lodash-es';
@Component({
selector: 'error-messages',
template: `<span *ngFor="let item of filteredE... |
Python | UTF-8 | 1,916 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | #!/usr/bin/evn python
#coding:utf-8
import MySQLdb
class MysqlHelper(object):
def __init__(self):
self.__Host = 'kali'
self.__User = 'dbuser'
self.__Passwd = '0110'
self.__DB = 'web'
def __Conn(self):
try:
conn = MySQLdb.connect(host=self.__Hos... |
Python | UTF-8 | 1,588 | 3.421875 | 3 | [] | no_license | import random
import numpy as np
import matplotlib.pyplot as plt
'''
creates random coords,
used to generate data for testing other functions
number: amount of coords desired
a, b: ranges, must be a > b
return:
arrayx = x only coords
arrayy = y only coords
other = xy coords
'''
def nC... |
PHP | UTF-8 | 5,701 | 3.203125 | 3 | [] | no_license | <?php
use Resource\Native\Object;
use Resource\Native\Mystring;
/**
* The URL Class, it is part of the utility package and extends from the Object Class.
* It implements PHP basic url functions, and adds enhanced features upon them.
* a URL object is immutable, once set it cannot be altered with setter methods.
*... |
C# | UTF-8 | 1,773 | 2.515625 | 3 | [
"MIT"
] | permissive | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemyController2 : MonoBehaviour
{
public float fireDelay = 1f;
public int onFireProjectileCount = 3;
// private int projectilesFired = 0;
public GameObject projectile;
private float timeSinceLastFire ... |
JavaScript | UTF-8 | 1,498 | 2.703125 | 3 | [] | no_license | document.addEventListener("DOMContentLoaded", function(event) {
getStartTransactionActionElement()
.addEventListener("click", onStartTransactionClicked);
getViewProductsActionElement().addEventListener(
"click",
() => { window.location.assign("/productListing"); });
getCreateEmployeeActionElement().addEventL... |
Java | UTF-8 | 1,836 | 2.140625 | 2 | [] | no_license | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.logikas.kratos.core.osgi;
import com.google.common.eventbus.EventBus;
import com.google.inject.Inject;
import com.logikas.kratos.core.module.Module;
import com.logikas.kratos.core.module.event.CoreEventBus;
... |
Python | UTF-8 | 5,116 | 3.046875 | 3 | [] | no_license | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import random
import pdb
class ff_net:
'''Class represents a generalized, fully-connected neural network using
the frame work discussed in Rojas Chpt. 7'''
def __init__(self, layers):
self.layers = layers #List of layer s... |
Markdown | UTF-8 | 614 | 2.71875 | 3 | [
"MIT"
] | permissive | # libeuler
`libeuler` calculates an approximation of the base `e` of the [natural logarithm](https://en.wikipedia.org/wiki/Natural_logarithm).
### Method
The approximation is done using the equation  where the value of `e` gets more accurate as `n` gets bigger and bigger.
### Dependencies
* [libe... |
Python | UTF-8 | 3,357 | 2.515625 | 3 | [] | no_license | if __name__ == "__main__":
import os
import time
import signal
# --------------------------- LOAD ENV VARIABLES ---------------------------
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
os.environ["PY_ENV"] = "production"
print('-------------------------------... |
Java | UTF-8 | 762 | 2.34375 | 2 | [
"MIT"
] | permissive | package com.mpatric.mp3agic;
import org.junit.Test;
import static org.junit.Assert.*;
public class ID3v1GenresTest {
@Test
public void returnsMinusOneForNonExistentGenre() {
assertEquals(-1, ID3v1Genres.matchGenreDescription("non existent"));
}
@Test
public void returnsCorrectGenreIdForFirstExistentGenre() ... |
C++ | UTF-8 | 1,851 | 2.75 | 3 | [] | no_license | /*
MD_AButton.h - Arduino library to handle multiple buttons on one analog input.
Copyright (C) 2013 Marco Colli
All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundatio... |
JavaScript | UTF-8 | 1,538 | 2.75 | 3 | [] | no_license | const sqlite3 = require('sqlite3').verbose();
const fs = require('fs');
const db_path = 'db.sqlite3';
const populateFlag = !fs.existsSync(db_path);
let db = new sqlite3.Database(db_path);
if (populateFlag) {
populateDB();
}
function resetDB(cb) {
db.close(function() {
try {
fs.unlinkSync(db_path);
... |
Python | UTF-8 | 3,067 | 2.65625 | 3 | [
"MIT"
] | permissive | import numpy as np
import cv2
from time import sleep
import math
from threading import Thread
# -------------------V--OPENCV--V----------------------
cap = cv2.VideoCapture(0)
##fgbg = cv2.createBackgroundSubtractorMOG2()
tempret, initframe = cap.read()
#sleep(1)
calib = cv2.cvtColor(cap.read()[1], cv2.COLOR_BGR2GRAY... |
Python | UTF-8 | 16,985 | 2.921875 | 3 | [] | no_license |
# --------------------------------------- Description --------------------------------------- #
# Python Vein Processor. This python file runs on a Laptop and receives near-infrared
# hand images from a Raspberry Pi IoT device over wifi using a the custom I2P
# appication protocol. It then applies various imag... |
Markdown | UTF-8 | 1,184 | 2.515625 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: "String constants must end with a double quote | Microsoft Docs"
ms.date: "2015-07-20"
ms.prod: ".net"
ms.reviewer: ""
ms.suite: ""
ms.technology:
- "devlang-visual-basic"
ms.topic: "article"
f1_keywords:
- "vbc30648"
- "bc30648"
dev_langs:
- "VB"
helpviewer_keywords:
- "BC30648"... |
Python | UTF-8 | 4,339 | 3.390625 | 3 | [] | no_license | #!/usr/bin/python
# -*- coding: utf-8 -*-
import numpy as np
import scipy.io as sio # 读取mat文件
import matplotlib.pyplot as plt
import scipy.optimize as opt
import pandas as pd
data = sio.loadmat("ex3data1.mat")
"""
# 图像数据data.get('X')X中表示为400维向量(其中有5,000个)。 400维“特征”是原始20 x 20图像中每个像素的灰度强度。
# 图像数据data.get('... |
Java | UTF-8 | 782 | 2.140625 | 2 | [] | no_license | package com.example.demo.service;
import com.example.demo.model.Classroom;
import com.example.demo.repository.ClassroomRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ClassroomService {
@Autowir... |
Python | UTF-8 | 407 | 2.84375 | 3 | [] | no_license | import six
import socket
def get_host_ip():
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(('8.8.8.8', 80))
ip = s.getsockname()[0]
finally:
s.close()
return ip
def bytes_to_str(s, encoding='utf-8'):
"""Returns a str if a bytes object is given."""
... |
Markdown | UTF-8 | 2,317 | 2.75 | 3 | [] | no_license | # Функциональные требования
ФТ-01. Показать различия текущего и требуемого портфелей, чтобы понимать,
какие бумаги следует продать, а какие купить.
Различие отображать в виде таблицы:
```text
|название | количество | купить/продать |
| | текущее | требуемое | шт | руб |
| VTBE | 100 | 12... |
Java | UTF-8 | 996 | 2.484375 | 2 | [] | no_license | package autonomous;
import arm.Arm;
import drive.DriveBase;
import elevator.Elevator;
import gripper.Gripper;
import interfaces.AutFunction;
public class BoxDrop implements AutFunction {
private final int duration = 250;
private final Gripper gripper;
private final Arm arm;
private final Elevator elevator;
priv... |
Java | UTF-8 | 976 | 3.28125 | 3 | [] | no_license | //package ru.geekbrains;
//
//public class hw0231 {
//
//
// public static void main(String[] args) {
//
// if (checkBalans() == true){
// System.out.println("есть такое место");
// } else {
// System.out.println("нет такого места");
// }
//
//
// }
//
//
//
//
// sta... |
C# | UTF-8 | 808 | 2.625 | 3 | [
"MIT"
] | permissive | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class SplashFade : MonoBehaviour
{
public Image splashImage;
IEnumerator Start()
{
splashImage.canvasRenderer.SetAlpha(0.0f);
FadeIn();
yi... |
Java | UTF-8 | 351 | 2.359375 | 2 | [] | no_license | package com.example.radhakrishnan.codechallenge.database;
public class CityTable {
private String cityName;
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public CityTable(String cityName) {
thi... |
Python | UTF-8 | 406 | 2.765625 | 3 | [] | no_license | # encoding:utf-8
import urllib
class Download:
def download(url, num_retries=2):
print('Downloading', url)
try:
html = urllib.request.urlopen(url).read()
except (URLError, HTTPError, ContentTooShortError) as e:
print('Download error:', e.reason)
html = None
if num_retries > 0:
if hasattr(e, 'co... |
Shell | UTF-8 | 997 | 3.65625 | 4 | [
"BSD-2-Clause"
] | permissive | #!/bin/bash
# Volume Down script
STEP=5000
MINVOLUME=0 #as a percentage
defindex=""
volumel=
volumer=
ready=false
# retrieve volume for default output
while read line
do
if [ -z "$defindex" ]
then
defindex="$(echo "$line" | awk '/* index:/{print $3}')"
elif [ -z "$volume" ]
then
read volumel volumer <<<$(ech... |
Java | UTF-8 | 2,156 | 2.28125 | 2 | [] | no_license | package com.jerry.lottery_draw.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.util.Date;
public class TEmployee {
@TableId(type = IdType.AUTO)
private Long id;
private String employeeId;
private String employeeName;
p... |
Java | UTF-8 | 2,644 | 1.757813 | 2 | [] | no_license | /*******************************************************************************
* Copyright (c) 2013 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at... |
Markdown | UTF-8 | 2,605 | 2.765625 | 3 | [] | no_license |
# Markdown Basics
## Headlines, paragraphs, basic programming
### Headlines
#### Headline 4
##### Headline 5
###### Headline 6
### Paragraphs and Line Breaks
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima repellendus delectus fugiat laborum reprehenderit. Cupiditate aspernatur dicta ipsa corpo... |
Java | UTF-8 | 124 | 2.265625 | 2 | [] | no_license | package factorypattern;
/**
* Created by ZhangHongbin on 2017/1/5.
*/
public interface Color {
public void fill();
}
|
Java | UTF-8 | 592 | 1.992188 | 2 | [] | no_license | package com.dalv1k.bstorage.server.service;
import com.dalv1k.bstorage.server.entity.*;
import java.util.List;
import java.util.Map;
public interface IncomeService {
List<Income> getAllIncomeGoods();
int getLastIncomePrice (Model model);
List<Brand> getAllBrands();
List<Model> getAllModels();
... |
Markdown | UTF-8 | 23,110 | 2.6875 | 3 | [
"MIT"
] | permissive | [{]: <region> (header)
# Step 2: Chats page
[}]: #
[{]: <region> (body)
## First Ionic Component
Now that we're finished with the initial setup, we can start building our app.
An application created by Ionic's CLI will have a very clear methodology. The app is made out of pages, each page is made out of 3 files:
- `... |
Shell | UTF-8 | 111 | 2.921875 | 3 | [] | no_license | #!/bin/sh
if [ -n "$1" ]
then
docker rmi -f trickbooter/$1
echo ""
docker build -t trickbooter/$1 $1/
fi |
C | UTF-8 | 1,727 | 3.921875 | 4 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct { // 成績を格納する構造体を定義
char name[8];
unsigned char kokugo; // 0 ~ 100を表現できればいいのでunsigned char型でもいいはず
unsigned char sugaku;
unsigned char English;
} Grades;
int main()
{
char title[][13] = {"出席番号", "名前", "国語", "数学", "英語"}; // タイト... |
C# | UTF-8 | 999 | 2.71875 | 3 | [] | no_license | using System;
using EventDomain;
namespace EventReceiver
{
class Program
{
static void Main(string[] args)
{
ScheduleManager scheduleManager = new ScheduleManager();
NotificationSender notificationSender = new NotificationSender();
ShowNotification eventReceiver = new ShowNotification... |
Java | UTF-8 | 148 | 1.617188 | 2 | [] | no_license | package com.sa.task.ui.base;
/**
* Created by temp on 19/11/17.
*/
public interface BasePresenter {
void onStart();
void onStop();
}
|
Markdown | UTF-8 | 2,335 | 2.953125 | 3 | [
"BSD-3-Clause",
"BSD-2-Clause",
"Apache-2.0"
] | permissive | ---
title: 'User Feedback'
sidebar_order: 3
---
Sentry provides the ability to collect additional feedback from the user upon hitting an error. This is primarily useful in situations where you might generally render a plain error page (the classic `500.html`). To collect the feedback, an embeddable JavaScript widget i... |
Java | UTF-8 | 314 | 1.78125 | 2 | [] | no_license | package com.cgwx.dao;
import com.cgwx.data.entity.PdmIndustryElectricPowerSegmentationInfo;
import java.util.List;
public interface PdmIndustryElectricPowerSegmentationInfoMapper {
int insert(PdmIndustryElectricPowerSegmentationInfo record);
List<PdmIndustryElectricPowerSegmentationInfo> selectAll();
} |
C# | UTF-8 | 3,074 | 2.546875 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
/// <summary>
/// マップ生成
/// </summary>
public class MapMaker : MonoBehaviour
{
[SerializeField, Header("読込むテキストファイル")]
TextAsset textAsset;
[SerializeField, Header("マ... |
Java | UTF-8 | 6,335 | 1.929688 | 2 | [] | no_license | package edu.hendrix.huynhem.seniorthesis.UI;
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
imp... |
Python | UTF-8 | 80 | 3 | 3 | [] | no_license | def celsius_para_fahrenheit(x):
fahrenheit= x*(9/5)+32
return farenheit
|
Java | UTF-8 | 9,526 | 2.375 | 2 | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | /* Copyright (C) 2013-2023 TU Dortmund
* This file is part of AutomataLib, http://www.automatalib.net/.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/li... |
Markdown | UTF-8 | 1,379 | 3.046875 | 3 | [] | no_license | # SUMMARY #
## CSS Grid ##
- CSS Grid Layout is the most powerful layout system available in CSS.
- It is a 2-dimensional system, meaning it can handle both columns and rows, unlike flexbox which is largely a 1-dimensional system.
- Grid gives us control over how wide or narrow each of the ‘grid cells’ get. This allo... |
C# | UTF-8 | 550 | 3.21875 | 3 | [] | no_license | using System;
namespace lesson3HandsOn
{
class Program
{
static void Main(string[] args)
{
string[] names = new string[] {"Emily", "Harry", "Rupert", "Clara", "Lily", "Michael"};
for(int i = 0; i < names.Length; i++)
{
Console.Writ... |
C | UTF-8 | 1,439 | 3.15625 | 3 | [] | no_license | #include "rooms.h"
struct Room *room(char *description, struct Item *items, struct Room *current, struct Room *north, struct Room *south,
struct Room *east, struct Room *west,
struct Room *up, struct Room *down)
{
struct Room *newRoom = (struct Room *)malloc(sizeof(str... |
Shell | UTF-8 | 2,307 | 3.4375 | 3 | [] | no_license | #!/bin/bash
JAVA_NAME=$1
JAVA_PORT=$2
JAVA_TYPE=$3
JAVA_DO=$4
if [ "$JAVA_NAME" = "" ]; then
echo "参数不为空,使用sh $0 JAVA_NAME JAVA_PORT JAVA_DO";exit 1
fi
if [ "$JAVA_PORT" = "" ]; then
echo "参数不为空,使用sh $0 JAVA_NAME JAVA_PORT JAVA_DO";exit 1
fi
if [ "$JAVA_TYPE" = "" ]; then
echo "参数不为空,使用sh $0 JAVA_NAME JA... |
JavaScript | UTF-8 | 667 | 3.390625 | 3 | [] | no_license |
function rollDice() {
return -1 * Math.floor(Math.random() * 6) + 1;
}
require('chai').should();
var expect = require('chai').expect;
describe('When a customer rolls a dice', function(){
it('should return an integer number', function() {
expect(rollDice()).to.be.an('number');
});
it('should get a numbe... |
Markdown | UTF-8 | 1,012 | 3.296875 | 3 | [
"MIT",
"Unlicense"
] | permissive | ---
title: How does the GC handle circular references?
categories: .Net
date: 2007-04-13 15:35:30 +10:00
---
I am a little curious about how the garbage collector cleans up CLR objects. From what I understand, it will wait until objects are de-referenced and then will go through a couple of generations (as required) t... |
Java | UTF-8 | 724 | 2.515625 | 3 | [] | no_license | package com.sudhir;
public class LoggerFinder {
static{
System.out.println("First here");
Package objPackage = org.apache.log4j.Logger.class.getPackage();
System.out.println("Logging vendor"+objPackage.getImplementationVendor());
System.out.println("Logging version"+objPackage.getSpecificationVer... |
C++ | UHC | 2,123 | 3.15625 | 3 | [] | no_license | #include <iostream>
#include <algorithm>
using namespace std;
const int INF = 1<<21;
struct segtree{
int start;
long long arr[INF], lazy[INF];
//
segtree(){
start = INF/2;
fill(arr, arr+INF, 0);
fill(lazy, lazy+INF, 0);
}
//leaf Է ü segment tree
void construct(){
for(int i=start-1; i>0; i--){
... |
Python | UTF-8 | 362 | 2.59375 | 3 | [] | no_license | import pymysql
db = pymysql.connect(host='192.168.33.30',user='root',password='root',db='test',port=3306)
cur = db.cursor()
sql_insert = "insert into user(name,url) values('test','test.com')"
try:
affected_rows = cur.execute(sql_insert)
db.commit()
print(cur.lastrowid)
except Exception as e:
... |
JavaScript | UTF-8 | 5,249 | 2.984375 | 3 | [] | no_license | const socket = io()
socket.on('connect', function () {
console.log('Connected')
})
socket.on('disconnect', function () {
console.log('Disconnected')
})
socket.on('webhook-event', function (e) {
if (e.type === 'note') {
console.log('Type of webhook event: ' + e.type)
createNotification(e, '... |
Java | UTF-8 | 12,446 | 1.679688 | 2 | [] | no_license | package jdhe.iyibank.com.iyimeal.sqlitedb.db;
/**
* Created by Administrator on 2017/8/8.
*/
public class TableConfig {
public static final String TABLE_ACCOUNTS = "accounts" ;
/**
* Accounts数据表的字段
*/
public static class Accounts{
//Accounts
public static final String ID="ID";
... |
Python | UTF-8 | 5,631 | 3.09375 | 3 | [] | no_license | import os, sys, time
import subprocess
import hashlib
# #####################################################################
def leer_texto_claro(num):
hash = list()
texto_claro = list()
file = open('C:/tarea4/cracked/crack_'+ num +'.txt', 'r')
if(num == "1"):
for hash_texto ... |
Java | UTF-8 | 975 | 1.90625 | 2 | [] | no_license | package ru.fondorg.mytracksrv.domain;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.Set;
@Getter
@Setter
@Entity
@NoArgsConstructor
public class Issue {
@Id
... |
C++ | UTF-8 | 10,197 | 2.515625 | 3 | [] | no_license | /*
* StreamListView.cc
*
* Created on: Apr 4, 2015
* Author: amyznikov
*/
#include "msmwctl.h"
#include "StreamListView.h"
#define count_of(x) (sizeof(x)/sizeof((x)[0]))
namespace {
struct column_decs {
const char * name;
WLength width;
};
#define INPUT_COLUMN_NAME 0
#define INPUT_COLUMN_ST... |
JavaScript | UTF-8 | 2,692 | 2.8125 | 3 | [
"MIT"
] | permissive | /**
* A specialized form used to select from a checklist of attributes, traits, or properties
* @extends {DocumentSheet}
*/
export default class TraitSelector extends DocumentSheet {
/** @inheritdoc */
static get defaultOptions() {
return foundry.utils.mergeObject(super.defaultOptions, {
id: "trait-selec... |
Java | UTF-8 | 759 | 1.554688 | 2 | [] | no_license | package com.yonyou.aco.docquery.service;
import com.yonyou.aco.docquery.entity.SearchBean;
import com.yonyou.cap.common.util.PageResult;
public interface IDocqueryService {
public PageResult<SearchBean> getAllBasicinfo(int pageNum,int pageSize,String[] params,String title,String sortName,String sortOrder);
PageResu... |
Java | UTF-8 | 471 | 1.84375 | 2 | [
"MIT"
] | permissive | package com.example.easyhelp.Construction.Activity;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import com.example.easyhelp.R;
public class ConstructionActivity extends AppCompatActivity
{
/*
* This is for construction when server goes down
*/
@Override
protected ... |
Python | UTF-8 | 143 | 3.53125 | 4 | [] | no_license | num = input("请输入数字")
if int(num) < 10:
print(num)
if 10 <= int(num) < 50:
print(int(num) + 1)
else:
print(int(num) + 10)
|
C++ | UTF-8 | 469 | 2.84375 | 3 | [] | no_license | #include<iostream>
using namespace std;
int main()
{
bool ch = true;
char x[30],y[30];
char *p1, *p2;
cin >> x;
cin >> y;
p1 = x;
p2 = y;
while (*p1 != '\0' && *p2 != '\0')
{
if (*p1 == *(p1 + 1))
{
p1++;
}
if (*p2 == *(p2 + 1))
{
p2++;
}
if (*p1 != *(p1 + 1) && *p2 != *(p2 + 1))
{
if ... |
Markdown | UTF-8 | 3,482 | 2.546875 | 3 | [] | no_license | ---
title: mysql的json字段查询
date: 2020-06-12 20:49:49
tags: mysql
---
## mysql对JSON数据进行查询
这篇文章主要介绍了mysql查询字段类型为json时的查询方式.
<!-- more -->
### 创建表
```sql
-- ----------------------------
-- Table structure for user_json
-- ----------------------------
DROP TABLE IF EXISTS `user_json`;
CREATE TABLE `user_json` (
`uid`... |
Python | UTF-8 | 1,313 | 3.0625 | 3 | [] | no_license | """
Made by Sikanaama
"""
import sopel.module
import math
import urllib
from bs4 import BeautifulSoup as BS
URL = 'https://www.etaisyys.com/etaisyys/%s/%s/'
@sopel.module.rule(r'^.matka (\w+) (\w+)(?: (\d+))?')
@sopel.module.example('!matka Helsinki Riihimäki 100')
def module(bot, trigger):
start = trigger.g... |
Java | UTF-8 | 3,554 | 1.898438 | 2 | [] | no_license | package com.novsu.antonivanov.exampleproject.TestNotification;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.res.AssetFileDescriptor;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;... |
Python | UTF-8 | 853 | 3.125 | 3 | [] | no_license | #!/usr/bin/env python
# encoding: utf-8
"""
Given: A collection of n (n≤10) GenBank entry IDs.
Return: The shortest of the strings associated with the IDs in FASTA format.
"""
from sys import argv
from Bio import Entrez
from Bio import SeqIO
__author__ = "Ethan Hart"
def get_nuc_fasta(nucleotide_ids):
"""nuc... |
JavaScript | UTF-8 | 3,566 | 2.609375 | 3 | [
"MIT"
] | permissive | function contactSendEmail() {
let product = $("#contact_product option:selected").text()
let jobDescription = $("#contact_description").val();
let postcode = $("#contact_postcode").val();
let businessName = $("#contact_businessName").val();
let name = $("#contact_name").val();
let email = $("#c... |
JavaScript | UTF-8 | 4,102 | 2.875 | 3 | [] | no_license | $(function() {
// 字符验证
jQuery.validator.addMethod("stringCheck", function(value, element) {
return this.optional(element) || /^[\u0391-\uFFE5\w]+$/.test(value);
}, "只能包括中文字、英文字母、数字和下划线");
// 中文字两个字节
jQuery.validator.addMethod("byteRangeLength", function(value, element,
param) {
var length = value.length;
... |
Python | UTF-8 | 243 | 2.734375 | 3 | [] | no_license | import re
import requests
requisicao = requests.get('http://carmodorioclaro.mg.gov.br/portal/?Link=Contato')
padrao = re.findall(r'[\w\.-]+@[\w\.-]+', requisicao.text)
if padrao:
print(padrao)
else:
print("Padrão não encontrado") |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.