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 | 679 | 2.703125 | 3 | [] | no_license | #ifndef BULLETSMANAGER_H
#define BULLETSMANAGER_H
#include "Bullet.h"
#include "Shooter.h"
#include <iostream>
#include <SFML/Graphics/Texture.hpp>
#include <SFML/Graphics/RenderWindow.hpp>
class BulletsManager : public Shooter
{
public :
BulletsManager();
inline void addExploser2Bullets(Exploser *exploser) ... |
Python | UTF-8 | 1,234 | 3.125 | 3 | [
"MIT"
] | permissive | import pandas as pd
import numpy as np
import plotly.graph_objects as go
from plotly.offline import offline
import plotly.express as px
class dataGraph():
def __init__(self):
raw_df = pd.read_csv("data.csv")
self.df = raw_df.set_index("time")
def time_graph(self):
'''
This fu... |
Markdown | UTF-8 | 10,682 | 2.65625 | 3 | [] | no_license | ---
title: Le désir de la grande aventure
author: Pierre Berthomieu
---
# Le désir de la grande aventure
Aventurier de la pellicule, John Huston est l'auteur d'une œuvre hétéroclite et surprenante. S'il sert les genres du cinéma hollywoodien (le film noir en particulier avec *Le Faucon maltais* ou *Quand la Ville dor... |
Java | UTF-8 | 923 | 2.375 | 2 | [] | no_license | package com.sucl.sbjms.core.view;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @author sucl
* @date 2019/4/9
*/
@Data
public class MenuNode implements TreeNode{
private String id;
private String text;
private String cls;
private String link;
private boolean lea... |
Shell | UTF-8 | 1,112 | 3.6875 | 4 | [] | no_license | #!/bin/bash
#post json to solace
#Ramesh Natarajan, Solace PSG
me=start-replay
# read env
[ -f env.sh ] || { echo Missing env file env.sh ; exit 1; }
echo "Reading env.sh"
. env.sh
if [ $# -lt 2 ]; then
echo "ERROR $me: missing arguments"
echo "Usage: $me router-config-file queue1 queue2 ..."
exit 1
fi
# ... |
Python | UTF-8 | 2,314 | 3.015625 | 3 | [] | no_license | #!/usr/bin/python
# From: http://www.tedunangst.com/flak/post/sct-set-color-temperature
import argparse
import os
import subprocess
import sys
def convert_input(input):
""" Convert command line argument to sct input """
try:
return int(input)
except ValueError as e:
input = str(input).low... |
PHP | UTF-8 | 1,544 | 2.5625 | 3 | [] | no_license | <?php
header("Content-type: text/html; charset=utf-8");
include "config.php";
include "mysql.lib.php";
class Token
{
public $wechat_error;
public $wechat_code;
public $wechat_url;
public $token;
public $openid;
public $access_info;
public function __construct($error_code = false)
{
... |
PHP | UTF-8 | 1,204 | 2.5625 | 3 | [] | no_license | <?php
include('db.php');
function get_posts(){
global $connection;
$query = "SELECT * FROM posts";
$result = mysqli_query($connection, $query);
while($row = mysqli_fetch_assoc($result)){
$post = [
];
$post['id'] = $row['post_id'];
$... |
C++ | UTF-8 | 1,010 | 2.65625 | 3 | [] | no_license | //
// main.cpp
// practice
//
// Created by Mahmud on 04/30/18.
// Copyright © 2018 Mahmud. All rights reserved.
//
#include <iostream>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>
#include <ctime>
using namespace std;
const int MAX = 100;
int N;
int a[MAX], pos[MAX]... |
Python | UTF-8 | 936 | 2.546875 | 3 | [] | no_license | import scrapy
class FairytalesExtractor(scrapy.Spider):
name = 'fairytales'
def start_requests(self):
url = 'https://deti-online.com/skazki/'
yield scrapy.Request(url=url, callback=self.parse)
def parse(self, response):
for x in response.css('tr'):
try:
... |
Markdown | UTF-8 | 1,369 | 3.109375 | 3 | [
"MIT"
] | permissive | # REDCap Capture Save Time
## Description
This External Module captures the date/time when a Data Entry Form and/or Survey is saved/submitted. The captured time will be stored in a selected text field, while the format of the date/time will match with the datetime validation of the text field.
<br><br>
There are plen... |
Java | UTF-8 | 289 | 2.71875 | 3 | [] | no_license | public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
Calculator calc = new Calculator();
calc.add(4);
calc.subtract(1);
calc.multiply(6);
calc.divide(2);
calc.square_root();
}
} |
C# | UTF-8 | 2,494 | 2.6875 | 3 | [
"MIT"
] | permissive | using System.Windows;
using Navigation.Constants;
using Navigation.Models;
using Navigation.Utils;
using System.Linq;
namespace Navigation.ViewModels
{
public class FoodSelectionViewModel : ViewModelBase, INavigationAware
{
#region Fields
private readonly INavigationManager _navigationManager... |
C++ | UTF-8 | 394 | 2.96875 | 3 | [] | no_license | #include "Person.hpp"
#include "ChatRoom.hpp"
void ChatRoom::broadcast(const std::string &origin, const std::string & message)
{
for(auto p: people)
{
if(p->name ! = origin)
p->receive( origin, message);
}
}
void ChatRoom ::join ( Person * p)
{
std::string join_msg = p->name + " joins the chat " ;
bro... |
Markdown | UTF-8 | 5,931 | 2.6875 | 3 | [
"CC-BY-4.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | # Exploring Polybius's syntax with dependency trees
[Neven Jovanović](orcid.org/0000-0002-9119-399X), Department of Classical Philology, Faculty of Humanities and Social Sciences,
University of Zagreb

## Introduction
In Croatia there is re... |
Java | UTF-8 | 5,205 | 2.34375 | 2 | [] | no_license | package de.thwildau.guido;
import java.util.ArrayList;
import java.util.List;
import java.util.Observable;
import java.util.Observer;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.DialogInterface;
import android.content.DialogInt... |
PHP | UTF-8 | 9,042 | 2.8125 | 3 | [] | no_license | <?php
/*
* Jscript.php
* intermediate file for every ajax call in application
* which return table grid, add data, inventory data and view inventory page
* very important file for application
*
*/
include_once "classes/manufacturer.php";
include_once "classes/model.php";
if (isset($_POST['action']) && $_POST['a... |
Java | UTF-8 | 1,209 | 2.484375 | 2 | [] | no_license | package com.school.entity;
/**
* @program: design
* @description: 时光胶囊评论
* @author: Antony
* @create: 2019-04-18 09:44
**/
public class TimecapsuleComm {
//id
private long id;
//时光胶囊的id
private long timecapsuleId;
//用户的id
private long userId;
//评论内容
private String content;
pub... |
Java | UTF-8 | 1,862 | 2.65625 | 3 | [] | no_license | package com.techbee.userprofileapi.classes;
public class UserProfile {
private int userProfileId;
private String firstName;
private String lastName;
private String email;
private String password;
public UserProfile() {
}
/**
* @return the userProfileId
*/
public int getUserProfileId() {
return use... |
Java | UTF-8 | 1,585 | 2.1875 | 2 | [] | no_license | package com.kuycoding.covid19.viewModel;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import com.kuycoding.covid19.api.ApiEndPoint;
import com.kuycoding.covid19.api.ApiService;
import com.kuycoding.covid19.model.CountryModel;
import java.util.Lis... |
Markdown | UTF-8 | 3,274 | 2.875 | 3 | [
"MIT"
] | permissive | ---
title: Аврам становится Авраамом
date: 20/04/2021
---
Не только имена Бога имеют духовное и богословское значение, но и имена людей. Для нас сегодня не так важно, какое имя дать девочке: Мария или Сусанна. Однако для древних семитов имя было исполнено духовного значения. Все семитские имена что-то означают и обы... |
C# | UTF-8 | 1,194 | 2.796875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Lista_de_Estrutura_Condicional___Forms
{
public partial class Exercicio11 : Form
{
... |
Python | ISO-8859-1 | 835 | 2.53125 | 3 | [] | no_license | # -*- coding: iso-8859-1 -*-
"""
MoinMoin - MoinMoin.Page Tests
@copyright: 2003-2004 by Jrgen Hermann <jh@web.de>
@license: GNU GPL, see COPYING for details.
"""
import unittest
from MoinMoin._tests import request
from MoinMoin import Page
class existsTestCase(unittest.TestCase):
"""Page: testing wi... |
C++ | UTF-8 | 500 | 2.71875 | 3 | [] | no_license | /***from dust i have come, dust i will be***/
class Solution {
public:
vector<int> dp;
void solve(int curr, int cnt, int n)
{
if(curr > n) return;
if(dp[curr] != -1) return;
dp[curr] = cnt;
solve(curr << 1 | 1, cnt + 1, n);
solve(curr << 1, cnt, n);... |
C# | UTF-8 | 1,172 | 2.921875 | 3 | [
"MIT"
] | permissive | using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class PlayerScore : MonoBehaviour {
// instantiate the class so that it can be reffered to from other scripts
public static PlayerScore instance;
// when the script instance is awaken, store the instance class (used for references... |
JavaScript | UTF-8 | 577 | 3.171875 | 3 | [] | no_license | let tony={
name: "tonny",
lastname: 'stark',
friends: ["hulk","banner"],
age: 33,
isAvenger: true,
abc:undefined,
address:{
state: "new york" ,
city: "he",
}
,sayhi:function fn(){
console.log("hey everyone");
return " its iron man here";
}
}
/... |
Markdown | UTF-8 | 1,028 | 3.078125 | 3 | [] | no_license | The username must be between 5 and 49 charcters.
There is a function func(char*,char*,...) that gets as arguments a pointer to a char array, the string "%lX" and EAX.
The password and the array of characters are the compared using lstrcmpA.
So we need to see what that function does and how is EAX calculated.
ec... |
Markdown | UTF-8 | 4,459 | 3.28125 | 3 | [] | no_license | ## 说明
- sqlite模块函数主要是用于操作sqlite数据库
- sqlite模块的对象前缀是sqlite,例如 sqlite.close()这样调用
- sqlite 教程:https://www.runoob.com/sqlite/sqlite-tutorial.html
- **频繁读写有可能造成sqlite的锁住,请再读写数据的时候进行加上sleep进行暂停50ms**
## sqlite.connectOrCreateDb 连接数据库
* 创建或者链接一个数据库
* @param dbName 数据库路径名称
* @return boolean true 代表请求权限成功,false代表失败
> ```... |
C# | UTF-8 | 13,194 | 2.59375 | 3 | [] | no_license | using System;
using System.IO;
using SevenEngine;
using SevenEngine.Imaging;
using Seven.Structures;
using SevenEngine.Shaders;
using Game.States;
using OpenTK.Graphics.OpenGL;
namespace Game
{
// This is an example of how to use my engine.
// Read this file and the "GameState.cs" file within the "State" folder... |
Java | UTF-8 | 3,457 | 2.5625 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package DAL;
import banco.Banco;
import entidades.Pet;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.u... |
Java | UTF-8 | 2,566 | 3.140625 | 3 | [] | no_license | package db.pojos;
import java.sql.Date;
import java.util.*;
public class Day {
private Integer id;
private int deaths;
private int infectedPatients;
private float average;
private Date date;
private List<Day> savedDates = new ArrayList();
public Day(Integer id, int deaths,int infectedPatients , float average,... |
PHP | UTF-8 | 371 | 3.234375 | 3 | [] | no_license | <?php
class Local
{
private $name;
private $location;
public function __construct(string $name, array $location)
{
$this->name = $name;
$this->location = $location;
}
public function getInformations() : array
{
return [
'name' => $this->name,
... |
Markdown | UTF-8 | 9,871 | 2.5625 | 3 | [] | no_license | # 大型网站架构系列:负载均衡详解(3) - 建建的博客 - CSDN博客
2017年03月10日 13:53:42[纪建](https://me.csdn.net/u013898698)阅读数:125
## [大型网站架构系列:负载均衡详解(3)](http://www.cnblogs.com/itfly8/p/5080743.html)
## 本次分享大纲
- 软件负载均衡概述
- Ngnix负载均衡
- Lvs负载均衡
- Haproxy负载均衡
- 本次分享总结
## 一、软件负载均衡概述
硬件负载均衡性能优越,功能全面,但是价格昂贵,一般适合初期或者土豪级公司长期使用。因此软件负载均衡在互联网领域大量使用。常用的软件负载均... |
Python | UTF-8 | 3,356 | 4.03125 | 4 | [
"Apache-2.0"
] | permissive | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
************************************************
@Time : 2019-08-05 10:58
@Author : zxp
@Project : AlgorithmAndDataStructure
@File : 13_基本排序.py
@Description: ==================================
冒泡排序,选择排序,插入排序
@license: (C) Copyright 2013-2019.
************... |
Java | UTF-8 | 1,327 | 2.4375 | 2 | [] | no_license | /**
*
*/
package com.santosh.moviesapp.services.impl;
import java.util.List;
import java.util.Optional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import com.santosh.moviesapp.persistence.dao.CustomerDao;
import com.santosh.moviesapp.persistence.models.... |
Markdown | UTF-8 | 1,525 | 2.875 | 3 | [] | no_license | # Botanical Workspace
A web application that helps you stay focused while maintaining a real houseplant
## Description
Botanical Workspace is a productivity app with a twist - your focus determines the fate of a real houseplant. When you want to be productive, click the start timer button and get to work! If you... |
Python | UTF-8 | 2,210 | 4.25 | 4 | [] | no_license | import turtle
def getSideLength():
"""
This function is here to ask the user for the size of the image/flower.
:return: This return returns the size that the user has just replied with back to the main and converts their input
to an int.
"""
side_length = input("What do you want the side lengt... |
Markdown | UTF-8 | 4,167 | 3.109375 | 3 | [] | no_license | ## 功能说明
调低设备温度接口属于温度控制和查询消息(Temperature Control and Query Messages),包括 *DecrementTargetTemperatureRequest*、*DecrementTargetTemperatureConfirmation* 用于将指定设备的温度降低指定值。
>**注意**:Smart Home Skill API 始终将摄氏温度设置传递给您的技能适配器,而您的技能适配器应该以摄氏温度返回温度。您还需要将温度保存至少两位小数,这能确保内部转换需要的足够精度。
## DecrementTargetTemperatureRequest
#### 示例语句
“小微,空... |
Java | UTF-8 | 162 | 1.945313 | 2 | [] | no_license | package com.nsp.test.jvm.class_test;
public class SuperClass
{
public static final int value = 123;
static {
System.out.println("Super class init");
}
}
|
C | UTF-8 | 4,765 | 2.90625 | 3 | [
"MIT"
] | permissive | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <sys/wait.h>
#include "commander.h"
#include "grunt.h"
int get_num_args(char *line) {
// Get the number of arguments by counting non space chunks
int num_args = 0;
int in_space = 0;... |
Java | UTF-8 | 470 | 1.679688 | 2 | [] | no_license | package com.gec.service;
import java.util.List;
import com.gec.bean.Document;
import com.gec.util.PageModel;
public interface DocumentService {
//分页查询
public PageModel<Document> findByPage(int pageIndex,Document entity);
public Document findById(Integer id);
public boolean save(Document entity);... |
Markdown | UTF-8 | 2,972 | 3.640625 | 4 | [] | no_license | # CSS 也能修改图片颜色?
图标是前端页面中不可避免要用到的,常用图标的形式也有多种:图片、字体、SVG。目前越来越多地会使用 SVG 和字体图标,其中一个原因就是字体和 SVG 都能动态改变颜色,而图片却不能,因为很多情况下我们需要对同一个图标进行不同的颜色显示。
那么,图片究竟可不可以改变颜色呢?通常我们可以在 PS 中修改一个图片的颜色,但是在 HTML 中还真没听说过。
这可能是咱们孤陋寡闻了,还真就有这样一个神奇的 CSS 属性。我们看下面的代码
```html
<div class="box">
<span class="icon"></span>
</div>
```
应用下面的 CSS
```cs... |
Java | UTF-8 | 1,349 | 2.109375 | 2 | [] | no_license | /**
* Copyright © 2017鼎泰智源科技有限公司. All rights reserved.
*
* @Title: Field.java
* @Prject: InterfaceWeb
* @Package: com.fahai.cc.interf.mysql.entity
* @Description: TODO
* @author: Aaron.ye
* @date: 2017年6月16日 下午1:23:47
* @version: V1.0
*/
package com.fahai.cc.interf.mysql.entity;
import java.io.Serializ... |
Rust | UTF-8 | 7,670 | 3.40625 | 3 | [
"MIT"
] | permissive | use std::{
collections::HashMap,
fmt,
fs::{self, File, OpenOptions},
io::{BufRead, BufReader, Write},
net::IpAddr,
path::{Path, PathBuf},
result,
};
pub type Result<T> = result::Result<T, Box<dyn std::error::Error>>;
/// A custom error struct for this crate.
#[derive(Debug, Clone)]
pub str... |
Python | UTF-8 | 13,448 | 3.796875 | 4 | [] | no_license | # import os
# PATH = r"D:\GIT\python\setting"
# FILE_NAME = 'damages.txt'
#
# full_path = os.path.join(PATH, FILE_NAME)
#
#
# with open(full_path, 'r', encoding='UTF-8') as file:
# for el in file:
# print(el)
# Задание - 1
# Создайте функцию, принимающую на вход Имя, возраст и город проживания чел... |
Java | UTF-8 | 286 | 2.0625 | 2 | [] | no_license | package rube.simple;
import org.springframework.integration.annotation.Gateway;
import org.springframework.integration.annotation.MessagingGateway;
@MessagingGateway
public interface EchoGateway {
@Gateway(requestChannel = "requestChannel")
String echo(String message);
}
|
C# | UTF-8 | 392 | 2.9375 | 3 | [] | no_license | using System;
using System.Threading;
namespace DemoApplication
{
class Program
{
static void Main(string[] args) {
Console.WriteLine("Введите ваше имя: ");
string name = Console.ReadLine();
Thread.Sleep(5000);
Console.WriteLine("Привет " + name + "!");
... |
Ruby | UTF-8 | 518 | 3.484375 | 3 | [] | no_license | class Bitmap
DEFAULT_COLOR = "0"
attr_reader :image
def initialize(x:, y:)
@x, @y = x, y
clear
end
def show
puts @image.map { |line| line << "\n" }.join
end
def clear
@image = Array.new(@y) { Array.new(@x, DEFAULT_COLOR) }
end
def draw_colour(x:, y:, colour:)
x, y = normalize_... |
TypeScript | UTF-8 | 2,843 | 2.890625 | 3 | [] | no_license | import * as ts from "typescript";
import { fixExpressionNode } from "./ExpressionNode";
import { ConvertState } from "./ConvertState";
import { addComments } from "./Utils";
export function removeThisKeyword(block: ts.Block, text: string, context: ts.TransformationContext) {
function removeThis(node: ts.Node) {
... |
Python | UTF-8 | 5,298 | 2.625 | 3 | [] | no_license | import serial
import time
import threading
class Cabinet:
'Faxitron cabinet communications class'
def SerialRead(self):
while (self.stopThread == False):
while self.ser.inWaiting() > 0:
self.tempBuff += self.ser.read(1)
if self.tempBuff != '':
... |
PHP | UTF-8 | 925 | 2.640625 | 3 | [] | no_license | <?php
#U ovom kontroleru handlamo sve staticne stranice nase aplikacije
#namespace pomaze da kontroleru kazemo da ostane u ovom folderu!
namespace App\Http\Controllers;
use App\Category;
use App\Post;
class PagesController extends Controller
{
#kad pravimo metode u kotrolerima nazivamo ih vrstazahtjevaImeMetode
... |
Java | UTF-8 | 1,874 | 2.015625 | 2 | [
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"Apache-2.0",
"MIT",
"BSD-2-Clause"
] | permissive | /*
This file is part of Intake24.
© Crown copyright, 2012, 2013, 2014.
This software is licensed under the Open Government Licence 3.0:
http://www.nationalarchives.gov.uk/doc/open-government-licence/
*/
package uk.ac.ncl.openlab.intake24.client.survey.rules;
import org.pcollections.PSet;
import org.pcollections.PV... |
Python | UTF-8 | 227 | 3.625 | 4 | [] | no_license | arr = [5,7,8,9,1,2,6,3,4]
n = len(arr)
for i in range(n-1):
for j in range(0, n-i-1):
if arr[j] > arr[j + 1]:
arr[j], arr[j + 1] = arr[j + 1],arr[j]
for i in range(len(arr)):
print(arr[i],end = " ")
|
C# | UTF-8 | 1,309 | 2.859375 | 3 | [
"MIT"
] | permissive |
namespace dotgo.io
{
/// <summary>
/// ReaderAt is the interface that wraps the basic ReadAt method.
/// ReadAt reads len(p) bytes into p starting at offset off in the underlying input source.
/// It returns the number of bytes read (0 <= n <= len(p)) and any error encountered.
/// When ReadAt... |
Markdown | UTF-8 | 2,117 | 3.03125 | 3 | [] | no_license | # Code Portfolio
## I590 - Applied Data Science
### April 15, 2019
This folder is an organized collection of code snippets and additional comments that would be useful as a data scientist. The expectation is that while this is start as part of the Applied Data Science course, it will continue to grow and evolve over t... |
C++ | UTF-8 | 2,276 | 3.421875 | 3 | [] | no_license | #include "ClapTrap.hpp"
ClapTrap::ClapTrap(std::string const &name):
hitPoints(100), maxHitPoints(100), energyPoints(100),
maxEnergyPoints(100), level(1), name(name),
meleeAttackDamage(100), rangedAttackDamage(100),
armorDamageReduction(100)
{
std::cout << "ClapTrap " << this->name << " created." << std::endl... |
JavaScript | UTF-8 | 1,844 | 4.15625 | 4 | [] | no_license |
/*
You are given a text, which contains different english letters and punctuation symbols. You should find the most frequent letter in the text. The letter returned must be in lower case.
While checking for the most wanted letter, casing does not matter, so for the purpose of your search, "A" == "a". Make sure you do ... |
Java | UTF-8 | 902 | 2.125 | 2 | [] | no_license | package hsl.pojo.command.ad;
import hg.common.component.BaseCommand;
/**
*
* @类功能说明:修改广告状态(显示-隐藏)Command
* @类修改者:
* @修改日期:
* @修改说明:
* @公司名称:浙江汇购科技有限公司
* @部门:技术部
* @作者:yuqz
* @创建时间:2014年12月25日下午3:14:57
* @版本:V1.0
*
*/
public class HslUpdateAdStatusCommand extends BaseCommand{
private st... |
Markdown | UTF-8 | 3,553 | 2.671875 | 3 | [
"Unlicense"
] | permissive |
# Chilean police officer arrested after shooting students at protest
Published at: **2019-11-07T21:33:13+00:00**
Author: **Jonathan Franklin**
Original: [the Guardian](https://www.theguardian.com/world/2019/nov/07/chile-protests-police-arrest-shooting-students)
Other officers have been accused of a beatin... |
SQL | UTF-8 | 3,700 | 4.0625 | 4 | [] | no_license | /* -----------------------------------------------------------------------
Vorlesung Datenbanksysteme
Burkhardt Renz, THM
SQL Teil 10
Views
$Id: sql10.sql 367 2019-03-04 08:39:50Z br $
----------------------------------------------------------------------- */
;
/* Das Ergebnis einer Select-Anweisung ... |
Python | UTF-8 | 485 | 3.046875 | 3 | [] | no_license | class Solution:
def maxSubArray(self, nums):
max_seq = nums[0]
curr_sum = nums[0]
for num in nums[1:]:
if curr_sum <= 0:
curr_sum = num
else:
curr_sum += num
if curr_sum > max_seq:
max_seq = curr_sum
... |
Java | UTF-8 | 1,365 | 2.984375 | 3 | [] | no_license | /*
* Copyright 2006-2021 (c) Care.com, Inc.
* 77 Fourth Avenue, 5th Floor Waltham, MA, 02451, U.S.A.
* All rights reserved.
*
* This software is the confidential and proprietary information of
* Care.com, Inc. ("Confidential Information"). You shall not disclose
* such Confidential Information and shall use it ... |
Python | UTF-8 | 1,520 | 2.5625 | 3 | [] | no_license | # import the necessary packages
import os
import cv2
import utils
import time
import argparse
import mask_rcnn
import numpy as np
args = mask_rcnn.get_args(video=True)
labels = mask_rcnn.get_labels(args["classes_path"])
net = mask_rcnn.get_net( args["frozen_inference"], args["inception"])
vs = cv2.VideoCapture(args["... |
Java | UTF-8 | 296 | 1.984375 | 2 | [
"MIT"
] | permissive | package sushi.bpmn.element;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
/**
* This enum contains the gateway types of an BPMN event-based gateway.
* @author micha
*/
public enum BPMNEventBasedGatewayType {
@Enumerated(EnumType.STRING)
Exclusive, Parallel;
}
|
C# | UTF-8 | 4,529 | 3.53125 | 4 | [
"MIT"
] | permissive | using System;
namespace Classes_e_Obejtos
{
//classes statics não permitem instanciar objetos,e nem construtores/destrutores
class Jogador // a classe pode ser public,abstract , sealed , static
{
public int energia = 100; // propriedades |ou| variaveis
public bool viv... |
TypeScript | UTF-8 | 125 | 2.53125 | 3 | [] | no_license | export enum IColorMode {
DARK = 'dark',
LIGHT = 'light',
}
export interface ISettingsState {
colorMode: IColorMode;
}
|
Java | UTF-8 | 353 | 2.1875 | 2 | [] | no_license | package model.commands;
import java.io.Serializable;
/**
* Enum allows the server to create the drawable objects instead of the client
* since android has trouble creating graphical java objects.
*
* @author William Snider
*
*/
public enum Drawing implements Serializable {
RECTANGLE, CIRCLE, T... |
Python | UTF-8 | 614 | 3.296875 | 3 | [] | no_license | """
Parses an input file in .fasta format
and returns the gene dictionary
"""
def parse_fasta(data):
keys = []
label_idxes = []
values = []
removed_lines = data.split()
for i in range(len(removed_lines)):
if removed_lines[i].startswith('>'):
keys.append(removed_lines[i].strip... |
JavaScript | UTF-8 | 10,863 | 2.65625 | 3 | [] | no_license | const chai = require('chai');
const chaitHttp = require('chai-http');
const faker = require('faker');
const mongoose = require('mongoose');
const expect = chai.expect;
const activityRouter = require('../routers/activityRouter');
const {Activity} = require('../models/activityModel')
const {Event} = require('../models/... |
Python | UTF-8 | 448 | 3.34375 | 3 | [] | no_license | def add_letters(*letters):
if letters:
lst = [0, "a", "b", "c", "d", "e", "f","g", "h", "i", "j", "k", "l", "m", "n", "o", "p", 'q', "r", "s", "t", "u", "v", "w", "x", "y", "z" ]
sum = 26
for i in letters:
if i in lst:
sum += lst.index(i)
if sum > 26:
... |
C# | UTF-8 | 2,147 | 2.671875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Storage.Queues;
using Bogus;
using Newtonsoft.Json;
using Spectre.Console;
namespace CarvedRockSoftware.Seeder.AzureStorageQueues
{
public class AzureStorageQueuesSeeder... |
Java | UTF-8 | 289 | 2.046875 | 2 | [] | no_license | package ch1.aop;
import org.springframework.stereotype.Service;
/**
* 方法式拦截
*
* @author liaoxiaoxia
* @version 1.0.0
* @date 2019/5/29 10:41
* @since JDK 1.8
*/
@Service
public class DemoMethodService {
public void add() {
}
public void update() {
}
}
|
Python | UTF-8 | 1,304 | 3.765625 | 4 | [] | no_license | import random
from turtle import Turtle
COLORS = ["red", "orange", "yellow", "green", "blue", "purple"]
STARTING_MOVE_DISTANCE = 5
MOVE_INCREMENT = 10
class Car(Turtle):
def __init__(self):
super().__init__()
self.shape('square')
self.color(random.choice(COLORS))
self.penup()
... |
C++ | UTF-8 | 616 | 2.578125 | 3 | [
"Unlicense"
] | permissive | #ifndef TEXTURE_H
#define TEXTURE_H
#pragma once
#include <iostream>
#include <string>
#include <vector>
#define NO_TEXTURE "!ROOT!/headers/gfx/Textures/std/untextured.jpg"
//#define NO_TEXTURE "!ROOT!/data/textures/std/untextured.jpg"
// ttexture = Type Texture
typedef std::string ttexture;
class texture {
private:... |
Markdown | UTF-8 | 3,793 | 2.609375 | 3 | [] | no_license | # PhotoGallery
> System Design Project on PhotoGallery module
## Related Projects
- https://github.com/styeld-components/PhotoGallery
- https://github.com/styeld-components/Calendar
- https://github.com/styeld-components/reviews
- https://github.com/styeld-components/Carousel
## Table of Contents
1. [Usage... |
JavaScript | UTF-8 | 1,551 | 2.5625 | 3 | [] | no_license | const buildForApi = (payload) => {
return {
name: payload.name,
task_list_id: payload.taskListId
};
};
const buildForUi = (payload) => {
return {
id: payload.id,
name: payload.name,
taskListId: payload.task_list_id
};
};
const all = (organizationId, projectId) => {
return fetch(`${proces... |
Python | UTF-8 | 901 | 2.59375 | 3 | [] | no_license | import boto3
dynamo = boto3.resource('dynamodb')
table=dynamo.Table('courses')
def lambda_handler(event, context):
tempid=event['id']
titleVal=event['title']
watchHrefVal=event['watchHref']
authorIdVal=event['authorId']
lenghtVal=event['length']
categoryVal=event['category']
... |
C# | UTF-8 | 4,368 | 3.65625 | 4 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AlgorithmNote
{
public class MinHeap<T> where T : IComparable
{
private ArrayList<T> data;
public MinHeap(int capacity)
{
data = new ArrayList<T>(c... |
Go | UTF-8 | 1,497 | 2.875 | 3 | [] | no_license | package redis
import (
"time"
"github.com/astaxie/beego"
"github.com/garyburd/redigo/redis"
)
var (
db_addr string = ""
db_password string = ""
Session_live_time int = 3600 //session过期时间 单位秒
redisPool *redis.Pool //redis连接池
)
func init() {
db_addr = beego.AppConfig.String("redis_addr")
db_password = ... |
TypeScript | UTF-8 | 3,476 | 2.578125 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | const pinBox = document.getElementById("pinBox") as HTMLDivElement;
const pinInput = document.getElementById("pinInput") as HTMLInputElement;
const loadingSpinnerContainer = document.querySelector(".spinner-container") as HTMLDivElement;
const loadingSpinner = document.getElementById("loadingSpinner") as HTMLDivElement... |
Python | UTF-8 | 1,869 | 3.859375 | 4 | [] | no_license | import random
print('HI GUYS WELCOME TO PLAY AHORCADOS')
# words = ['unlucky', 'steps', 'so', 'last', 'let', 'something', 'sometimes']
words = ['unlucky','unlucky']
def draw(n=[]):
print(['unlucky', 'steps', 'so', 'last', 'let', 'something', 'sometimes'])
container = """\t\t\t+------------------+
\t\t\t| ... |
Markdown | UTF-8 | 5,665 | 2.53125 | 3 | [
"CC-BY-4.0",
"MIT",
"CC-BY-3.0"
] | permissive | <properties
pageTitle="自動調整入口網站中的雲端服務 |Microsoft Azure"
description="瞭解如何使用自動小數位數的設定規則的雲端服務 web 角色或工作者角色 Azure 中的入口網站。"
services="cloud-services"
documentationCenter=""
authors="Thraka"
manager="timlt"
editor=""/>
<tags
ms.service="cloud-services"
ms.workload="tbd"
ms.tgt_pltfrm... |
JavaScript | UTF-8 | 429 | 3.578125 | 4 | [] | no_license | str="The quick brown fox jumps over the lazy dog"
chr='the'
function count(s,c){
let strArray=s.split(" ")
return strArray.filter(word => word.toLowerCase() == c).length
//console.log(strArray.filter(word => word.toLowerCase() == c).length)
// strArray.forEach(function(value){
// if(value.toLow... |
Python | UTF-8 | 633 | 2.75 | 3 | [] | no_license | from observer.lib import Subject
class KPIs(Subject):
_opened_tickets = -1
_closed_tickets = -1
_new_tickets = -1
@property
def opened_tickets(self) -> int:
return self._opened_tickets
@property
def closed_tickets(self) -> int:
return self._closed_tickets
@property
... |
C# | UTF-8 | 563 | 3.546875 | 4 | [] | no_license | using System.Drawing;
namespace Inflate_Rectangle
{
class InflateRectangle
{
static void Inflate(ref Rectangle rect, Size inflateSize)
{
rect.X -= inflateSize.Height;
rect.Y -= inflateSize.Width;
rect.Height += 2 * inflateSize.Height;
rect.Width ... |
Markdown | UTF-8 | 13,016 | 2.53125 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
uid: web-api/overview/web-api-routing-and-actions/create-a-rest-api-with-attribute-routing
title: 使用 ASP.NET Web API 2 中的屬性路由建立 REST API |Microsoft Docs
author: MikeWasson
description: ''
ms.author: riande
ms.date: 06/26/2013
ms.assetid: 23fc77da-2725-4434-99a0-ff872d96336b
msc.legacyurl: /web-api/overview/web-api-... |
C | UTF-8 | 5,472 | 2.640625 | 3 | [] | no_license | #include <stdio.h>
#include <math.h>
unsigned int crca,crcb;
FILE *fp;
main(argc,argv,envs)
int argc;
char *argv[];
char *envs[];
{ unsigned long word;
int i;
fp = fopen("dig.dat","r");
fscanf(fp,"%x",&word);
crc(0,word);
printf(" word=%0.8x offline crca=%x crcb=%x\n",word,crca,crcb);
for(i... |
TypeScript | UTF-8 | 551 | 2.765625 | 3 | [] | no_license | import { Temp } from "../../src/common/temp";
import { TemperatureConverter } from "../../src/openweather/temp.converter";
describe("TemperatureConverter", () => {
test.each([
[Temp.CELSIUS, "metric"], [Temp.FAHRENHEIT, "imperial"]
])("Successfully map %o => %s", (from: Temp, to: string) => {
e... |
Java | UTF-8 | 4,772 | 1.804688 | 2 | [
"Apache-2.0"
] | permissive | package com.savor.operation.activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.Process;
import android.text.TextUtils;
import android.view.KeyEvent;
import an... |
C++ | UTF-8 | 1,729 | 3.5 | 4 | [] | no_license | #ifndef DOCUMENTHEAP_HPP_INCLUDED
#define DOCUMENTHEAP_HPP_INCLUDED
#include "Document.hpp"
#include <vector>
/**
* \brief Documents max heap
*/
class DocumentHeap{
private:
/// heap array of document
std::vector<Document*> documents;
/// actual number of elements in the heap
size_t _size = 0, max_s... |
Python | UTF-8 | 461 | 3.296875 | 3 | [] | no_license | # -*- coding: utf-8 -*-
def collatz(x):
if x%2 == 0:
return x/2
else:
return 3*x+1
def get_collatz_seq_len(x):
length = 1
while x != 1:
x = collatz(x)
length += 1
return length
init = 1000000
big_seq_len = 0
big_seq_num = init
while init > 0:
seq_len = get_co... |
Java | UTF-8 | 3,021 | 2.78125 | 3 | [] | no_license | package selenium.pages;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.How;
import selenium.helpers.Person;
import static org.junit.Assert.*;
public class FeedbackCheckPage extends GenericSamplePage {
//region get/set;
public String getEn... |
Markdown | UTF-8 | 1,216 | 2.734375 | 3 | [] | no_license | # Xml Document Transform
Are you using notepad to edit web.config files on production servers?
I use this tool to patch application and web configuration files during deployment as part of a CI/CD pipeline. Visual Studio can do this at build time but I often need to deploy the RELEASE build to multiple environments u... |
Markdown | UTF-8 | 12,715 | 2.609375 | 3 | [] | no_license | ###### Biden’s border bind
# Joe Biden faces a humanitarian crisis at the southern border
##### A humanitarian crisis risks turning into a political one

> Mar 18th 2021
THE FIRST thing you see after crossing the bridge from Reynosa, in Mexico, into Texas is a large white ... |
C++ | UTF-8 | 1,025 | 3.078125 | 3 | [] | no_license | #pragma once
#include <windows.h>
class GlobalTime
{
private:
static DWORD lastTick;
static DWORD curTick;
static DWORD lastStep;
static DWORD lastTimeGetTime;
static bool paused;
GlobalTime( void );
GlobalTime( const GlobalTime &rhs );
GlobalTime &operator =(... |
C# | UTF-8 | 3,108 | 3.125 | 3 | [] | no_license | using System;
using System.Text;
namespace Echelon
{
public sealed class Arrays
{
private Arrays()
{
}
public static bool AreEqual(bool[] a, bool[] b)
{
if (a == b)
{
return true;
}
if (a == null || b == null)
{
return false;
}
return Arrays.a(a, b);
}
public static bool ... |
Markdown | UTF-8 | 1,213 | 2.578125 | 3 | [] | no_license | # Download: Converts .csv transaction files into .txf files.
**Program name:**
## 1099-B Importer 1.2
**Thumbshot:** 
**Download link:** [Download Converts .csv transaction files into .txf files.](http://freesoftwares.boysofts.com/1099-B-Importer_p... |
C++ | UTF-8 | 1,650 | 4.03125 | 4 | [] | no_license | #include <iostream>
using namespace std;
int **getData(int &,int &); //Return the 2-D array and its size.
void prntDat(const int* const *,int,int);//Print the 2-D Array
void destroy(int **,int,int); //Deallocate memory
int sum(const int * const *, int,int); //Return the Sum
int main(){
... |
Markdown | UTF-8 | 4,738 | 3.453125 | 3 | [
"MIT"
] | permissive | # 聊聊深拷贝和浅拷贝
## 什么是深拷贝和浅拷贝
1. 浅拷贝:将一个对象(包括数组)的引用赋值给一个新对象,这时新对象也只是原对象的引用
2. 深拷贝:创建一个新的对象(包括数组),将原对象的各个属性值拷贝到新的对象,两个对象都是全新的引用,互不相关,操作也就互不影响了。
***
这里提一下 原始值 和 引用值
1. 原始值:存储在栈中的直接的数据,可以直接访问,存储的是实实在在的值。
~~~
Undefined,Stirng,Boolean,Null, Number
注意:原始值当直接赋值时是等于 复制一个全新的值,两则修改没有任何联系。
~~~
2. 引用值:存储在栈中的名称,只是一个对应堆中的的一个引用... |
JavaScript | UTF-8 | 4,704 | 2.984375 | 3 | [
"MIT"
] | permissive | function transpose(A) {
var m = A.length;
var n = A[0].length;
var AT = [];
for (var j = 0; j < n; j++) {
var ATj = [];
for (var i = 0; i < m; i++) {
ATj.push(A[i][j]);
}
AT.push(ATj);
}
return AT;
}
function dot(v1, v2) {
/*
* Compute dot... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.