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 |
|---|---|---|---|---|---|---|---|
C# | UTF-8 | 1,184 | 2.53125 | 3 | [] | no_license | using System;
using System.Linq;
using System.Net.Http;
using System.Reflection;
using System.IO;
using System.Text;
using System.Xml.Linq;
using OpenXmlPowerTools;
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Wordprocessing;
public class DocxToHtml {
static vo... |
Python | UTF-8 | 9,704 | 2.546875 | 3 | [
"MIT"
] | permissive | import cv2 as cv
import numpy as np
from sklearn.feature_extraction.image import extract_patches_2d
from raisr.utils import is_image, build_goal_func
import os
import pickle
from raisr.hash_key_gen import gen_hash_key
from raisr.processor import UNSHARP_MASKING_5x5_KERNEL
from datetime import datetime
import time
from ... |
Markdown | UTF-8 | 4,578 | 2.8125 | 3 | [] | no_license | ---
title: 'MySQL general log'
category: mysql
excerpt: 'Let''s run through how you can setup and configure the MySQL general log.'
updated_by: 197c1509-8dff-4d72-9898-334084519619
updated_at: 1609787181
video: 'https://www.youtube.com/watch?v=fyZPlC6iSXI'
id: a2fb5146-0af3-4923-ac25-2b9d98ecc154
content:
-
type:... |
JavaScript | UTF-8 | 3,302 | 2.53125 | 3 | [] | no_license | // 导出 文章相关的API函数
import request from '@/utils/request'
/**
* 获取文章列表
* @param {Integer} channelId - 频道ID
* @param {Integer} timestamp - 时间戳
*/
export const getArticles = (channelId, timestamp) => {
return request('/app/v1_1/articles', 'get', {
channel_id: channelId,
timestamp,
with_top: 1
})
}
/**... |
Java | UTF-8 | 724 | 3.828125 | 4 | [] | no_license | package Second.JavaLearning.JavaLearning;
public class GetNumberOfUpperAndSmallAndDigits {
public static void main(String[] args) {
String aa = "India is my country 100%";
int totalChar = aa.length();
int upperCase = 0;
int lowerCase = 0;
int digits = 0;
int others = 0;
for (int i = 0; i < totalChar;... |
Python | UTF-8 | 1,796 | 3.03125 | 3 | [] | no_license | # import the necessary packages
from picamera.array import PiRGBArray
from picamera import PiCamera
import time
import cv2
# initialize the camera and grab a reference to the raw camera capture
camera = PiCamera()
camera.resolution = (640, 480)
camera.framerate = 32
rawCapture = PiRGBArray(camera, size=(640, 480))
#... |
SQL | UTF-8 | 2,071 | 3.84375 | 4 | [
"Apache-2.0"
] | permissive | CREATE OR REPLACE PROCEDURE vstat(idVin INTEGER) AS
--DECLARE
--Selection des regions de production du vin demande (idVin) et le nombre de producteurs/region
cursor V_REGIONSPROD is Select distinct P.region,count(P.np) as nombreProducteurs from Producteurs P, Recoltes, Vins
where P.NP=RECOLT... |
Java | UTF-8 | 1,719 | 3.125 | 3 | [] | no_license | package tcp;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;
public class FileServer implements Runnable {
private final ServerSocket serverSocket;
priv... |
Python | UTF-8 | 1,346 | 2.765625 | 3 | [] | no_license | #################################################
# Google SafeBrowsing console client #
# Using the standalone Python3 request library #
# Coded by: Macariola Ace H #
# #
#################################################
import requests
fro... |
TypeScript | UTF-8 | 624 | 2.75 | 3 | [
"MIT"
] | permissive | import Client from './client';
import Driver from './driver';
export default class Node {
driver: Driver;
client: Client;
constructor(node?: any) {
this.driver = node && node.driver ? new Driver(node.driver) : undefined;
this.client = node && node.client ? new Client(node.client) : undefined;
}
get... |
Markdown | UTF-8 | 1,394 | 2.75 | 3 | [] | no_license | # ✈ Alura Intercâmbios - Tema Wordpress
Este projeto é o resultado do curso [WordPress: Criação de um tema personalizado](https://unibb.alura.com.br/course/wordpress-criacao-tema-personalizado).
Trata-se de um tema para o wordpress, baseado em uma empresa fictícia chamada "Alura Intercâmbios".
Neste curso, foi possí... |
Java | UTF-8 | 1,143 | 2.1875 | 2 | [] | no_license | package org.noahsark.client.manager;
import org.noahsark.client.heartbeat.HeartbeatFactory;
import org.noahsark.client.heartbeat.HeartbeatStatus;
import org.noahsark.server.remote.RetryPolicy;
/**
* 连接管理类
* @author zhangxt
* @date 22021/4/4
*/
public class ConnectionManager {
private HeartbeatFactory<?> hear... |
JavaScript | UTF-8 | 1,347 | 2.6875 | 3 | [] | no_license | import React, { useState } from 'react';
import TodoFrom from './components/TodoFrom';
import TodoList from './components/TodoList';
function TodoRemove() {
const [todoList, setTodoList] = useState(() => {
const initTodoList = [
{
id: 1,
title: 'code',
... |
Markdown | UTF-8 | 2,911 | 3.59375 | 4 | [] | no_license | # NOIP课程第一讲:编程入门
## 教学目标
### 0、认识C++编程
### 1、认识NOIP编程比赛
## 教学重点
### 0、【起步】
以Scratch的图形化编程作为入口,转化到代码形式的编程,使学生对编程形成最基本的概念理解
### 1、【基础】
通过上机演练的方式,让学生把课堂教学内容按照原样复现结果
### 2、【提升】
变化课堂教学所用的案例,测试学生理解情况,进一步引导学生对编程概念的理解
### 3、【习惯】
编程的核心是**输入**、**计算**、**输出**。所有课堂案例,都需要关注让学生形成解题的基本思维。
## 教学难点
C++编程中的知识点不能引入太多,减... |
Markdown | UTF-8 | 24,525 | 3.140625 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "An introduction to conditional (in)dependence, causality and probabilistic graphical models"
excerpt: "For the purpose of feature selection in prediction or characterization"
modified: 2018-07-17
tags: [causality, pgm, statistics]
comments: false
---
<!-- Inline math replace: -->
<!-- \$(.*?)... |
Shell | UTF-8 | 1,231 | 3.34375 | 3 | [] | no_license | #!/bin/bash
RED='\033[1;31m'
GREEN='\033[1;32m'
YELLOW='\033[1;33m'
SCOLOR='\033[0m'
echo -e "${GREEN}Choose Connection Method:"
echo "0 - SSH Direct "
echo "1 - PAYLOAD "
echo "2 - SSL "
echo -e "3 - SSL+PAYLOAD \nEnter choice number :${SCOLOR}"
read mode
find=`cat settings.ini | grep "connection_mode = " |awk '{p... |
Java | UTF-8 | 2,335 | 2.625 | 3 | [] | no_license | package io.mqttpush.mqttclient.handle;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.log4j.Logger;
import io.mqttpush.mqttclient.conn.CancelbleExecutorService;
import io.mqttpush.mqttclient.conn.Connetor... |
PHP | UTF-8 | 250 | 3.359375 | 3 | [] | no_license | <?php
$a = 10;
echo $a++; //adiciona mais 1 após a mostrar a variavel a
echo "<br>";
echo ++$a; //adiciona mais 1 antes de mostrar a variavel a
echo "<br>";
echo --$a;
echo "<br>";
echo $a--;
echo "<br>";
?> |
Java | UTF-8 | 1,531 | 2.15625 | 2 | [] | no_license | package compta.core.presentation.handlers.handler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.commands.IHandlerListener;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.ui.Pl... |
Markdown | UTF-8 | 1,300 | 2.671875 | 3 | [] | no_license | # 基础架构
架构说明:主数据管理包括主数据标准、主数据管理规范、主数据技术产品,主数据产品落地主数据标准和管理规范,集中管理主数据,建立 唯一视图,并由主数据管理平台统一分发;产品的功能主要包括四大块:
1、模型管理:落地数据模型标准,为主数据管理建立结构,配置编码规则,为主数据自动生成编码,界面建模为主数据管理定义操
作界面,根据需求也可为主数据维护配置流程、权限模型,模型管理是主数据管理的基础。
2、数据清洗:数据清洗主要是汇集主数据,并对汇集的数据进行清洗,如排重、合并、完善等,数据清洗保证有一份干净的、高质
量的主数据。
3、主数据维护:主数据... |
Markdown | UTF-8 | 5,805 | 2.546875 | 3 | [] | no_license | ---
published: true
organization_id: '2016170'
year_submitted: 2016
category: play
body_class: strawberry
project_id: '6102215'
challenge_url: >-
https://challenge.la2050.org/entry/explore-los-angeless-past-present-and-future-in-augmented-reality-through-perceptoscope
title: >-
Explore Los Angeles's past, present, ... |
JavaScript | UTF-8 | 2,860 | 2.734375 | 3 | [
"CC-BY-SA-3.0",
"CC-BY-SA-4.0"
] | permissive |
captiontext = [
"11014 Gemeinden, davon 2 bewohnte gemeindefreie Gebiete (Stand 31.12.2018)",
"4511 Verwaltungsgemeinschaften, davon 1254 Gemeindeverbände (Stand 31.12.2018)",
"401 Kreise, davon 107 kreisfreie Städte (Stand 31.12.2018)",
"19 Regierungsbezirke (Stand 31.12.2018)",
"16 Bundesländer (Stand 31.12.2018)","... |
Java | UTF-8 | 2,816 | 2.09375 | 2 | [] | no_license | package com.example.nmsm.sta.config.auth;
import com.example.nmsm.dyn.dao.UserDAO;
import com.example.nmsm.sta.config.oauth.*;
import com.example.nmsm.sta.model.UserEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org... |
Python | UTF-8 | 1,527 | 2.890625 | 3 | [] | no_license | import csv
import tkinter
from tkinter import messagebox
with open('AvocadoPrice.csv') as csv_file:
csv_reader = csv.reader(csv_file)
head_row = next(csv_reader)
dic = {}
for row in csv_reader:
combo = (row[0], row[1])
dic[combo] = format(float(row[2]), '.2f')
def compare_price(tuple ,... |
Python | UTF-8 | 251 | 3.140625 | 3 | [] | no_license | import sys
sys.stdin = open("input.txt", "r")
T = int(input())
res = []
for tc in range(T):
n = input()
if(int(n[-1]) % 2 == 0):
res.append("Even")
else:
res.append("Odd")
for i in range(T):
print(f"#{i+1} {res[i]}") |
C++ | UTF-8 | 1,791 | 3.15625 | 3 | [] | no_license | #include <array>
#include <functional>
#include <queue>
#include <string>
#include <unordered_set>
#include <vector>
int openLock(std::vector<std::string>& deadends, const std::string& target) {
const std::array<char, 10> NEXT{
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'
};
const std::unorde... |
Python | UTF-8 | 2,205 | 2.8125 | 3 | [
"MIT"
] | permissive | from matplotlib import pyplot
import numpy
from scipy.optimize import curve_fit
def function(x, A1, B1, C1, A2, B2, C2):
return A1 * numpy.exp(-B1 * (x - C1)**2) + \
A2 * numpy.exp(-B2 * (x - C2)**2)
def main():
lengths = [10, 20, 30, 40, 50]
V1_max_mean = []
V2_max_mean = []
for ... |
JavaScript | UTF-8 | 3,885 | 2.53125 | 3 | [] | no_license | import React, { useState, useEffect } from "react";
import { Link } from 'react-router-dom';
import { Form, FormInput, FormGroup, Button } from "shards-react";
import { AddBundleToCart } from '../services/common';
export default function PreviousOrderInput() {
const [ bubbles, updateBubbles ] = useState([]);
c... |
Markdown | UTF-8 | 1,076 | 3.1875 | 3 | [
"MIT"
] | permissive | # Lab07-Collections
**Author**: Benjamin Taylor
**Version**: 1.0.0
## Overview
An application that creates a deck of 52 cards and shuffles it.
## Getting Started
1. Create a fork of this repository, and clone your fork to your device.
2. Open the solution file (Cards.sln) in Visual Studio.
3. To run the app, clic... |
Markdown | UTF-8 | 840 | 2.875 | 3 | [] | no_license | #### 弹窗模板
添加了关闭弹窗时的回调
####8.23
添加了图片预加载的方法,向外暴露
1.向外暴露一个js文件,会暴露出一个构造函数
```javascript
var prop = new Baitai.Popup({
body:".test" //弹窗模板需要放置的地方
});
//弹窗图片预加载(可以选择性的调用)
prop.preImgLoad();
```
2.向外暴露的方法:
```javascript
sendMessage(DATA) //传入弹窗的展示数据
toggleState(ACTION) //弹窗的展示和隐藏,显示:‘show’,隐藏:‘hidd... |
Python | UTF-8 | 11,517 | 2.703125 | 3 | [] | no_license | #Circle Neighborhood using GDAL and PP
# Parallel Processing- dividing image with border zones, moving window across each piece then recombines
# Calculating the density over circles with radii from 1 to 20 miles
# Circular moving window is approximated using a regular-shaped octagon following Glasbey and Jones (1997)
... |
C++ | UTF-8 | 509 | 3.671875 | 4 | [] | no_license | #include<iostream>
using namespace std;
void maximum_difference_problem(int a[],int n)
{
int res = a[1] - a[0];
int k = a[0];
for(int i=1;i<n;i++)
{
res = max(res,a[i]-k);
k = min(k,a[i]);
}
cout<<"The max difference is : "<<res<<endl;
}
int main(void)
{
int n;
cout<<"... |
Java | UTF-8 | 2,327 | 2.234375 | 2 | [] | no_license | package com.luwei.dubbo_provider.rocketmq.producer;
import org.apache.rocketmq.client.exception.MQClientException;
import org.apache.rocketmq.client.producer.DefaultMQProducer;
import org.apache.rocketmq.common.BrokerConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.fact... |
C# | UTF-8 | 3,547 | 2.96875 | 3 | [] | no_license | using SpeechLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Speech.Synthesis;
using System.Text;
using System.Threading;
namespace LB.Common
{
public class LBSpeakHelper
{
public static string SpeakString="";
private static SpeechSynthesizer speak = new Spe... |
JavaScript | UTF-8 | 1,216 | 3.875 | 4 | [] | no_license | // Array with 3 of my favorite games as objects, each object should have the same 4 properties
const games = [
{name: 'Cards Against Humanity', numberOfPlayers: 4, rating:5, type:'card game'},
{name: 'Taboo Midnight', numberOfPlayers: 4, rating:4, type:'buzzer game'},
{name: 'The Game of Life Quarter Life C... |
JavaScript | UTF-8 | 532 | 2.75 | 3 | [] | no_license | let numOfSegments;
let stepAngle;
let radius;
function setup() {
createCanvas(500,500);
colorMode(HSB,360,100,100);
}
function draw() {
numOfSegments = map(mouseX,0,width,10,40);
stepAngle = (TWO_PI)/numOfSegments;
radius = 200;
push();
translate(250,250);
beginShape(TRIANGLE_FAN);
... |
Java | UTF-8 | 635 | 2.046875 | 2 | [
"Apache-2.0"
] | permissive | package si.opkp;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
import si.opkp.model.MySQLDatabase;
import si.opkp.model.NodeSuccessResult;
import si.opkp.util.Pojo;
@Component
@Primary
class DatabaseMock ext... |
TypeScript | UTF-8 | 239 | 3.015625 | 3 | [
"MIT"
] | permissive | export default class NumberUtils {
static roundRange(val: number, min: number, max: number) {
if (val > max) {
val = max;
} else if (val < min) {
val = min;
}
return val;
}
}
|
JavaScript | UTF-8 | 2,746 | 2.890625 | 3 | [] | no_license | const S_UP = 0;
const S_DOWN = 1;
const S_LEFT = 2;
const S_RIGHT = 3;
const S_WIDTH = 320;
const S_HEIGHT = 240;
const S_BODYSIZE = 16;
var arrow = S_DOWN;
var bodyarr = new Array();
var foodarr = new Array();
init = function() {
for (i = 0; i<9; i++) {
var tmp = new Object();
tmp.x = i*S_BODYSIZE;
tmp.y = 0;... |
C++ | UTF-8 | 5,089 | 3.390625 | 3 | [] | no_license | #include <iostream>
#include <map>
template<typename K>
class Key
{
public:
Key(K val) : _val(val) {}
// copyable
Key(K& k) : _val(k._val) {}
// assignable
void operator=(const Key<K>& k) { _val = k._val; }
// less than
bool operator<(const Key<K>& k) const { return _val ... |
Markdown | UTF-8 | 660 | 2.625 | 3 | [
"MIT",
"CC-BY-NC-4.0",
"CC-BY-NC-SA-3.0"
] | permissive | <!-- title: Les souvenirs du 15 août -->
<!-- category: Humeur -->
Mon parrain a toujours aimé le 15 août et sa fête annuelle au village. Le gros de la journée était rythmé par le tournoi de pétanque, en doublette ou en triplette, avec ses beau-frères. Je me souviens de la franche camaraderie et de la bonne humeur m... |
Markdown | UTF-8 | 2,599 | 2.75 | 3 | [
"MIT",
"Apache-2.0"
] | permissive |
[环境类问题](#1)
[ 1、项目初始构建出现 Could not get resource 'https:xxxxx'](#1.1)
[配置类问题](#2)
[ 1、使用系统组件加载异常](#2.1)
[ 2、manifest allowBackup 问题](#2.2)
[ 3、运行启动插件异常——Excution failed for task ':app:phInstallPluginDebug'](#2.3)
[代码实现问题](#3)
------... |
Python | UTF-8 | 3,450 | 3.390625 | 3 | [
"MIT"
] | permissive |
import math
class Tile:
#a tile of the map and its properties
def __init__(self, blocked, block_sight=None):
self.blocked = blocked
self.explored = False
#by default, if a tile is blocked, it also blocks sight
if block_sight is None:
block_sight = blocked
... |
C# | UTF-8 | 3,115 | 3.09375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Text;
using static System.Console;
namespace Factory
{
//public class NYStyleChessPizza: Pizza
// {
// public NYStyleChessPizza()
// {
// name = "NY Style Sauce and Cheese Pizza";
// dough = "Thin Crust Dough"... |
C++ | UTF-8 | 1,224 | 3.15625 | 3 | [] | no_license | //
// Created by Ahmed Al Mahrooqi on 2019-02-28.
//
#include "gtest/gtest.h"
#include "IntHashTable.h"
#include "EmployeeDirectory.h"
TEST(inthashtable, iterator_functions) { //test begin(),end() and increment(), and getData() functions
IntHashTable t(6);
t.insert(1);
t.insert(3);
t.insert(5... |
Java | UTF-8 | 2,691 | 2.40625 | 2 | [] | no_license | package com.ab.cryptoportfolio.configuration;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecuri... |
Python | UTF-8 | 786 | 2.90625 | 3 | [] | no_license | import yagmail
string1 = 'portal'
# opening a text file
file1 = open("ymail.txt", "r")
# read file content
readfile = file1.read()
# checking condition for string found or not
if string1 in readfile:
sender_email = 'abdmail799@gmail.com'
receiver_email = ['habhilash3@gmail.com','manikantar281@gmail.com']
subjec... |
C | UTF-8 | 757 | 4 | 4 | [
"MIT"
] | permissive | /*
A alocação dinâmica é feita via funções malloc, realloc, calloc e free da biblioteca stdlib.h
*/
# include <stdio.h>
# include <stdlib.h>
int main(void) {
// A função malloc irá alocar memória e retornar o ponteiro do primeiro espaço alocado retornando um ponteiro do tipo "void".
int *ptr_mDinamica = m... |
C# | UTF-8 | 1,161 | 2.75 | 3 | [] | no_license | using System.Collections.Generic;
using Cosmetics.Contracts;
namespace Cosmetics.Handlers
{
public class AddToShoppingCartHandler : ProcessingCommnadHandler
{
private const string ProductAddedToShoppingCart = "Product {0} was added to the shopping cart!";
public AddToShoppingCartHandler(ICosm... |
C# | UTF-8 | 1,070 | 2.96875 | 3 | [] | no_license | using BLInterfaces;
using System;
using System.Collections.Generic;
namespace ConsolePL
{
public class AwardPL
{
private ILogicLayer _BL;
public AwardPL(ILogicLayer bl)
{
_BL = bl;
}
public void AddAward()
{
List<string> userInfo = new ... |
C | UTF-8 | 594 | 2.515625 | 3 | [] | no_license | #include "loading.h"
#include "common.h"
#include "resource.h"
#include "env.h"
SDL_Surface* loading_bg;
SDL_Surface* loading_status_bg;
SDL_Surface* loading_status_fg;
SDL_Surface* loading_screen;
void loading_init(SDL_Surface* screen)
{
loading_screen = screen;
loading_bg = load_global_image("loading.png")... |
C# | UTF-8 | 15,780 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NLog;
using org.apache.zookeeper;
using org.apache.zookeeper.data;
namespace Org.Apache.CuratorNet.Client.Utils
{
public class ZKPaths
{
/**
* Zookeeper's path separator c... |
Java | UTF-8 | 1,349 | 1.851563 | 2 | [] | no_license | package com.kapalert.kadunastategovernment.utils;
import android.app.Application;
import android.content.Context;
import android.os.StrictMode;
import androidx.multidex.MultiDex;
import org.acra.ACRA;
import org.acra.config.ACRAConfiguration;
import org.acra.config.ConfigurationBuilder;
import uk.co.chrisjenx.call... |
Java | UTF-8 | 2,040 | 1.71875 | 2 | [] | no_license | package defpackage;
/* renamed from: avp reason: default package */
/* compiled from: PG */
public final class avp {
public java.util.Set a = new java.util.HashSet();
private boolean b;
private boolean c;
private boolean d;
private java.lang.String e;
private android.accounts.Account f;
pri... |
Python | UTF-8 | 922 | 3.1875 | 3 | [] | no_license | import sys
from operator import itemgetter
from heapq import heappush, heappop
input = sys.stdin.readline
def simulate(camels):
camels.sort(key=itemgetter(0))
queue = []
ans = 0
for k, l, r in camels:
ans += l
if len(queue) < k:
# ok
heappush(queue, l - r)
... |
PHP | UTF-8 | 239 | 2.734375 | 3 | [] | no_license | <?php
function getName($d_id, $dbc)
{
$sql = 'SELECT Name FROM Datei WHERE D_ID = :d_id';
$get_name = $dbc->prepare($sql);
$get_name->bindParam(':d_id', $d_id);
$get_name->execute();
return $get_name->fetchColumn();
}
|
Java | UTF-8 | 1,621 | 2.734375 | 3 | [] | no_license | package com.serkancay.multiplerecyclerview;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import com.serkancay.multiplerecyclerview.Book.Type;
import java.util.ArrayList;
import java.util.List;
public class MainActivity extends AppCompatActiv... |
C# | UTF-8 | 818 | 2.9375 | 3 | [
"MIT"
] | permissive | using System.Collections;
using System.Collections.Generic;
using System.IO.Ports;
using UnityEngine;
using UnityEngine.Events;
public class ArduinoConnection : MonoBehaviour
{
// Callback signature
// Has: Return of type 'void' and 2 parameters
public delegate void TouchCallback(int pin, bool touched);... |
Markdown | UTF-8 | 2,119 | 3.4375 | 3 | [
"MIT"
] | permissive | Traditional PHP Method of Accessing Files
=========================================
Traditionally, files were accessed through a stream resource and many specialised
functions that operated on that resource.
What is a Resource?
-------------------
Resources were created to fill the gap that the lack of OOP left in e... |
PHP | UTF-8 | 1,852 | 2.625 | 3 | [] | no_license | <?php
//
// Created by Grégoire JONCOUR on 09/04/2015.
// Copyright (c) 2015 Grégoire JONCOUR. All rights reserved.
//
namespace App\Entity;
use App\App;
use App\Vendor\Avatar;
use Core\Entity\Entity;
class UserEntity extends Entity
{
public function getName(){
return $this->firstname.' '.$this->lastname;... |
Markdown | UTF-8 | 1,088 | 3.109375 | 3 | [] | no_license | # 웹엑스 강의
- 문제는 파이참을 통해 푼다.
## 배열 활용 예제
- 입력의 4가지 방법
```python
a = input()
b = int(input())
c = list(input().split())
d = list(map(int, input().split())) # map 을 하지 않으면 리스트로만 받고 이를 숫자로 받고싶으면 map이 필
print(a, type(a))
```
- gravity
> 상자들이 쌓여있는 방이 있다. 방이 오른쪽으로 90도 회전하여 상자들이 중력의 영향을 받아 낙하한다고 할 때, 낙차가 가장 큰 상자를 구하... |
C# | UTF-8 | 1,669 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Traffic;
namespace Traffic
{
/// <summary>
/// Script for plat.
/// </summary>
public class Plat : OnRoadObject
{
[SerializeField]
private Vector3 startPosition;
[SerializeField]
pr... |
C++ | UTF-8 | 3,703 | 2.5625 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <semaphore.h>
#include <sys/shm.h>
#include "data_struct.h"
#include <fcntl.h>
#include <fstream>
//消费者1
#define PRODUCER_NUM 2 //生产者数目
#define CONSUMER_NUM 2 //消费者数目
#define SHARED_SIZE 64
#define BUFFER_SIZE (SHARED_SIZE/sizeof(CommonData)) ... |
Java | UTF-8 | 638 | 2.03125 | 2 | [] | no_license | package test;
import driver.DriverSingleton;
import org.openqa.selenium.WebDriver;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Listeners;
import util.TestListener;
import java.util.concurrent.TimeUnit;
@Listeners ({TestListener.class})
public cla... |
Java | UTF-8 | 734 | 3 | 3 | [] | no_license | package l28try2;
public class Application {
public static void main(String[] args) {
byte byteValue = 127;
short shortValue = 334;
int intValue = 1234;
long longValue = 342356;
float floatValue = 42.545f;
double doubleValue = 342.534534;
shortValue = byteValue;
System.out.println(... |
Shell | UTF-8 | 976 | 3.921875 | 4 | [
"MIT"
] | permissive | #!/usr/bin/env bash
# Constants
source "$(dirname "$(realpath "$0")")/../../scripts/common.sh"
declare -ri EXIT_MISSING_BINS=110
declare -ri EXIT_UKNOWN_OPT=111
declare -ri EXIT_RSYNC=112
run_check "$EXIT_MISSING_BINS" "Missing binaries" \
"ensure_bins rsync"
# Show help text
show_help() {
cat <<EOF
upload.sh... |
PHP | UTF-8 | 2,021 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace WebTranslator\Utility;
use Symfony\Component\Translation\Translator;
use Symfony\Component\Translation\TranslatorInterface;
class TranslationHelper
{
public static function getRealCatalogueSize($primaryLocale, Translator $translator)
{
$primaryCatalogue = $translator->getCatalogue($pr... |
Java | UTF-8 | 983 | 3.1875 | 3 | [] | no_license | package hw07;
import static org.junit.Assert.assertEquals;
import controller.ImageUtils;
import java.io.IOException;
import model.image.Image;
import org.junit.Before;
import org.junit.Test;
/**
* Tests for the resize class, observing if the images are correctly resized while still maintaining
* the correct makeup... |
Java | UTF-8 | 143 | 1.84375 | 2 | [] | no_license | @OnCreateMountContent protected static EditTextWithEventHandlers onCreateMountContent(Context c){
return new EditTextWithEventHandlers(c);
}
|
PHP | UTF-8 | 2,996 | 2.765625 | 3 | [] | no_license | <?php
namespace models;
use core\Model;
class Subscription extends Model
{
private $planningId;
private $userId;
private $dateTime;
private $grade;
private $reviewed;
private $present;
private $planning;
private $user;
public function __construct()
{
parent::__constru... |
Java | UTF-8 | 332 | 2.453125 | 2 | [] | no_license | import java.applet.*;
import java.awt.*;
public class IBMChatClientApplet extends Applet {
public void init() {
String host = getParameter("host");
int port = Integer.parseInt(getParameter("port"));
setLayout(new BorderLayout());
add("Center", new IBMChatClient(host, port));... |
PHP | UTF-8 | 651 | 3.140625 | 3 | [
"Apache-2.0"
] | permissive | <?
namespace rude;
class crypt
{
public static function password($password, $salt = null, $salt_length = 32)
{
if ($salt === null)
{
$salt = static::salt($salt_length);
}
$hash = md5($password . $salt);
return array($hash, $salt);
}
public static function salt($length = 32, $alphabet = '0123456789... |
C | UTF-8 | 2,656 | 2.765625 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include "fantasma.h"
#include "fantasmaDos.h"
#include "utn.h"
#define QTY 100
#define QTY_PUB 1000
#include "informar.h"
int main()
{
Cliente arrayC[QTY];
Publicacion arrayP[QTY_PUB];
int menu;
int auxiliarId;
... |
Java | UTF-8 | 1,069 | 2.125 | 2 | [] | no_license | package com.example.diary;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
import com.google.android.material.textfield.TextInputEditText;
public class MainActivity extends AppCompatActivity
{
TextIn... |
C# | UTF-8 | 627 | 3.09375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Day4Exercise_Starting
{
class SectionH_q1
{
static void Main()
{
int num = ReadInteger();
Console.WriteLine("Entered Integer:"+num);
}
... |
Java | UTF-8 | 7,763 | 2.09375 | 2 | [] | no_license | package cn.com.fero.system.service.impl;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.com.fero.domain.system.criteria.SysSettingClobCriteria;
import cn.c... |
C | UTF-8 | 1,707 | 4.15625 | 4 | [] | no_license | #include "binary_trees.h"
/**
* binary_tree_is_perfect - This function checks if a binary tree is perfect
* @tree: A pointer to the root node
* Return: 1 if a tree is perfect, otherwise 0
*/
int binary_tree_is_perfect(const binary_tree_t *tree)
{
/* empty tree is APPARENTLY NOT perfect */
if (!tree)
return (0)... |
JavaScript | UTF-8 | 7,047 | 2.8125 | 3 | [] | no_license | let context // canvas实例
let direction // 点击的方位
let touchCurrentIndex = -1 // 选中的下标
// 圆饼的四个方位
const RIGHT_DOWN = 0
const LEFT_DOWN = 1
const LEFT_UP = 2
const RIGHT_UP = 3
const radius = 70 // 圆的半径
const max_radius = 80 // 选中后的那一个的半径
let axis_x = 0 // 圆心x坐标
let axis_y = 0 // 圆心y坐标
Component({
/**
* 组件的初始... |
C++ | UTF-8 | 431 | 2.765625 | 3 | [] | no_license |
#ifndef _ROBOT_H_
#define _ROBOT_H_
#include "point.h"
#include "angle.h"
class Robot {
public:
Robot(Point _position, Angle _frontAngle);
~Robot();
private:
Point position;
Angle frontAngle;
public:
Angle getFrontAngle(void);
Point getPosition(void);
... |
C | UTF-8 | 1,662 | 2.78125 | 3 | [] | no_license | #include "sysutils.h"
#include "errors.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <time.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/file.h>
int write_pid(const char* file)
{
FILE *pid_file;
pid_file = fopen(file, "w");
if (!pid_file)
ret... |
JavaScript | UTF-8 | 2,105 | 2.578125 | 3 | [] | no_license | import React, {Component} from "react";
import { Container, ListGroup, ListGroupItem } from "reactstrap";
class UserViewChefList extends Component {
constructor(props) {
super(props);
this.state = {
chefs: [],
isLoading: true,
};
}
componentDidMount() {
this.setState({ isLoading: true... |
Shell | UTF-8 | 317 | 3.03125 | 3 | [] | no_license | #! /bin/sh
BASEDIR=$(dirname $0)
DEPLOY_DIR="/var/www-$1/gleebox"
rsync -qrlpgoDz -c --delete $EXCLUDES --progress $BASEDIR $DEPLOY_DIR
cd $DEPLOY_DIR
pwd
if [ $1 = "staging" ]; then
./runpaste-staging stop
./runpaste-staging start
else if [ $1 == "production" ]; then
./runpaste stop
./runpaste start
fi
fi
|
C++ | UTF-8 | 4,490 | 3.15625 | 3 | [] | no_license | /*
ID: j316chuck
PROG: union_area_rectangles
LANG: C++
*/
#include <bits/stdc++.h>
#define Rd(r) freopen(r, "r", stdin)
#define Wt(w) freopen(w, "w", stdout)
#define deb(x) cerr << "DEBUG: "<< #x << " = " << x << endl;
#define endl '\n'
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
const double EPS = 1e-9... |
C++ | UTF-8 | 885 | 3.09375 | 3 | [] | no_license | /*
Arithmetic Number
Link: https://practice.geeksforgeeks.org/problems/arithmetic-number2815/1#
*/
#include<bits/stdc++.h>
#define int long long
using namespace std ;
//--------------------------------------------------------------------
class Solution
{
public :
int inSequence(int A, int B, in... |
C++ | GB18030 | 832 | 4.1875 | 4 | [] | no_license | //2дԭΪvoid index(int a[], int n,int &sub)
//ܣڴСΪnaУijsub
//ҵӦԪص±긳subûҵ-1sub
//ͨжsubֵжǷи
//sub͵IJֵá
#include<iostream>
using namespace std;
void index(int a[], int n,int &sub)
{
int i = 0;
if (NULL == a || n < 1)
{
sub = -1;
return ;
}
else
{
for(i=0; i<n; i++)
{
if(a[i] == sub)
{
sub = i;
... |
Java | UTF-8 | 1,072 | 2.375 | 2 | [] | no_license | package com.mdy.student.bean;
public class Student {
private String id;
private String name;
private double chinese;
private double math;
private double english;
private double per;
private double homework;
private char level;
public String getId() {
return id;
}
public void setId(String id) {
this.... |
TypeScript | UTF-8 | 8,723 | 2.890625 | 3 | [
"MIT"
] | permissive | import {Base, IQuestion, IConditionRunner, ISurveyData, ISurvey, HashTable, Event} from './base';
import {QuestionCustomWidget} from './questionCustomWidgets';
import {JsonObject} from './jsonobject';
import {ConditionRunner} from './conditions';
import {ILocalizableOwner} from "./localizablestring";
/**
* A base cl... |
PHP | UTF-8 | 2,956 | 2.578125 | 3 | [] | no_license | #!/usr/local/bin/php
<?php
require("/home/content/48/7686848/html/includes/bv-library.php");
require("/home/content/48/7686848/html/inset/inset_includes/insetdb.php");
require("/home/content/48/7686848/html/inset/inset_includes/forms.php");
//printHeader("Welcome to Brainvoyage.com");
//check if it is first time o... |
Java | UTF-8 | 946 | 1.867188 | 2 | [
"Apache-2.0"
] | permissive | package com.edge.xshtsk.service.inter;
import java.util.List;
import com.edge.xshtsk.entity.ERP_Xshtsk;
import com.edge.xshtsk.entity.ERP_Xshtsk_QueryVo;
public interface XshtskService {
// 分页展现销售合同收款
public List<ERP_Xshtsk> xshtskList(ERP_Xshtsk_QueryVo vo);
// 查询销售合同收款总记录
public Integer xshtskCoun... |
Markdown | UTF-8 | 4,657 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | # Project 3 - Globitek Forgery, Theft, and Hijacking Prevention
Time spent: **7** hours spent in total
## User Stories
The following **required** functionality is completed:
**(all required stories completed)**
- [x] Test for vulnerabilities
- [x] Configure sessions
- [x] Login page
- [x] Require login to access s... |
Java | UTF-8 | 319 | 2.171875 | 2 | [] | no_license | package edu.temple.pihomesecuritymobile;
import android.util.Log;
public class ClientThread extends Thread{
private Client client;
public ClientThread(Client c) {
this.client = c;
}
public void run(){
Log.d("client_test","Starting Server Thread...");
client.start();
}
}
|
Python | UTF-8 | 1,726 | 3.734375 | 4 | [] | no_license | import random
import copy
surnames = ['cat', 'dogggggo', 'owlie']
given = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', "I", 'J']
class Student:
def __init__(self, surname, given_name, id, courses):
self.surname = surname
self.given_name = given_name
self.id = id
self.courses = courses
... |
PHP | UTF-8 | 631 | 2.578125 | 3 | [] | no_license | <?php
/**
* Content Link preparation
*
* @author Tim Lochmüller
*/
namespace HDNET\Tagger;
use TYPO3\CMS\Backend\Utility\BackendUtility;
/**
* Prepare the content Link
*/
class ContentLink implements LinkBuilderCallbackInterface
{
/**
* Prepare the link building array
*
* @param string $ta... |
Java | UTF-8 | 19,540 | 1.976563 | 2 | [] | no_license | package hasoffer.core.product.solr;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import hasoffer.base.config.AppConfig;
import hasoffer.base.enums.SearchResultSort;
import hasoffer.base.model.PageableResult;
import hasoffer.base.utils.StringUtils;
imp... |
C++ | UTF-8 | 2,843 | 2.625 | 3 | [
"MIT"
] | permissive | /*
* ofxMask.h
*
* Created by Patricio Gonzalez Vivo on 10/1/11.
* Copyright 2011 http://PatricioGonzalezVivo.com All rights reserved.
*
* ******************************************************************
*
* tex0 -> Image
* tex1 -> LUT
*
*/
#ifndef OFXLUT
#define OFXLUT
#define STRINGIFY(A) #A
#in... |
Go | UTF-8 | 339 | 3.484375 | 3 | [] | no_license | package main
import (
"fmt"
"sync"
)
var once sync.Once = sync.Once{}
var instanse *singler
type singler struct {
Name string
}
func NewSingler() *singler {
once.Do(func() {
instanse = new(singler)
instanse.Name = "这是一个单例"
})
return instanse
}
func main() {
singler := NewSingler()
fmt.Println(singler.N... |
Markdown | UTF-8 | 3,577 | 2.703125 | 3 | [
"MIT"
] | permissive | # motionEAP
The motionEAP project aims to augment workplaces with in-situ projection to support workers during manual assembly tasks. Using a depth-sensor, motionEAP is able to deliver appropriate feedback regarding the current assembly step. Correct or wrong assembly steps as well as picks from bins are detected usin... |
Markdown | UTF-8 | 584 | 2.6875 | 3 | [] | no_license | # LIDAR-VR
Code and experiments to construct surfaces from point clouds and render them, as part of a hackathon.
algos - contains code to convert formats, and has a few algorithms to sparsify point clouds and construct surfaces from them. Also has some code to render point clouds in Blender.
test3 - Unity applicatio... |
Python | UTF-8 | 4,276 | 3.140625 | 3 | [
"BSD-3-Clause"
] | permissive | # -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2023 all rights reserved
#
# triangulated surfaces
def surface(**kwds):
"""
Create a surface
"""
# get the factory
from .Surface import Surface
# make one and return it
return Surface(**kwds)
# logically cartesian g... |
Java | UTF-8 | 1,552 | 4.0625 | 4 | [] | no_license | package app;
class Person {
// Propriétés des objets de type "personne"
private String firstName;
private String lastName;
private int age;
private boolean isMale;
// Constructeur: cette méthode est appelée automatiquement lorsqu'une nouvelle instance
// de cette classe est créée (à l'aide... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.