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 | 294 | 3.40625 | 3 | [
"MIT"
] | permissive | #include<stdio.h>
int main(void)
{
int p, n;
float r, i;
printf("Enter Principle Amount \n");
scanf("%i",&p);
printf("Enter Rate of Interest in Percentage \n");
scanf("%f",&r);
printf("Enter Number of Months \n");
scanf("%i",&n);
i=p*r*n/100;
printf("Interest Value is %f \n",i);
}
|
C# | UTF-8 | 608 | 2.734375 | 3 | [] | no_license | using System.Runtime.InteropServices;
public string GetUserName()
{
byte[] user = new byte[256];
Int32[] len = new Int32[1];
len[0] = 256;
GetUserName(user, len);
return (System.Text.Encoding.ASCII.GetString(user));... |
Python | UTF-8 | 818 | 3.875 | 4 | [] | no_license | class User:
def __init__(self, name, score):
self.name = name
self.score = score
def increase_score(self):
self.score += 1
def get_score(self):
return self.score
def __str__(self):
return f"<<User object: name={self.name} score={self.score}>>"
class Customer(User):
def __init__(self,... |
Markdown | UTF-8 | 2,884 | 3.015625 | 3 | [] | no_license | # Events Manager Import Export (Network mode)
Basic import and export function for [Events Manager](https://wordpress.org/plugins/events-manager/).
Forked version to fix issues related to network mode Wordpress Installation.
Original project(s) on github:
- https://github.com/asmartin/events-manager-import-expor... |
Python | UTF-8 | 1,987 | 2.5625 | 3 | [] | no_license | import os
import boto3
from flask import Flask
from flask import jsonify, request
app = Flask(__name__)
# USERS_TABLE = os.environ['cpfevents']
tablename = 'BaseC'
client = boto3.client('dynamodb')
@app.route('/')
def index():
return 'Index Page'
@app.route('/hello')
def hello():
return 'Hello, World'
@... |
Markdown | UTF-8 | 667 | 2.9375 | 3 | [] | no_license | Banana Bread
Ingredients:
* 3 ripe bananas
* 256 g (2 cups) all-purpose flour
* 6 g (1 tsp) salt
* 4 g (1 tsp) baking powder
* 5 g (1 tsp) baking soda
* 113 g (1/2 cup) soft butter
* 201 g (1 cup) sugar
* 2 large eggs
* 1/4 tsp vanilla
* 1 tbsp milk
* 1 cup chopped walnuts
* 53.3 g (1/3 cup) dark chocolate chips
Step... |
C++ | UTF-8 | 441 | 2.671875 | 3 | [] | no_license |
#include <iostream>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <utility>
using namespace std;
using ll = long long;
int main() {
ll n;
cin >> n ;
vector <ll> a(n);
for (ll i=0;i<n;i++) {
cin >>a[i];
}
sort(a.begin(),a.end());
for (ll i... |
C++ | UTF-8 | 985 | 2.515625 | 3 | [
"MIT"
] | permissive | //
// Created by everettjf on 2017/7/23.
//
#include "LoadCommandsViewNode.h"
MOEX_NAMESPACE_BEGIN
void LoadCommandsViewNode::Init(MachHeaderPtr mh){
mh_ = mh;
for(auto & cmd : mh_->loadcmds_ref()){
LoadCommandViewNodePtr o = LoadCommandViewNodeFactory::Create(cmd);
cmds_.push_back(o);
}... |
JavaScript | UTF-8 | 42,753 | 2.796875 | 3 | [] | no_license | $(document).ready(function() {
let januaryArray = [
'“I believe that if one always looked at the skies, one would end up with wings.” <br /> —Gustave Flaubert',
'“It is a matter of shame that in the morning the birds should be awake earlier than you.” <br /> —Abu ... |
Python | UTF-8 | 290 | 2.5625 | 3 | [] | no_license | import cPickle
import sys
if __name__ == '__main__':
nodes = dict()
with open(sys.argv[1]) as IN:
IN.readline()
for line in IN:
nodes[line.strip().split(' ')[0]] = 1
with open(sys.argv[2]) as IN:
IN.readline()
for line in IN:
assert(line.strip().split(' ')[0] in nodes) |
Markdown | UTF-8 | 1,879 | 2.953125 | 3 | [] | no_license | ####form 优点
1. 自动提交表单
2. 回车键绑定
3. 数据获取更轻松
```
<div>
<input id="user" />
<input id="password" />
</div>
jQ 获取对应值的方式 $('user').val() ///这个看着挺简单的,但是性能损耗比较大
///form方式的解决方案
<form id="regist">
<input id="user" />
<in... |
Markdown | UTF-8 | 4,552 | 2.53125 | 3 | [] | no_license | ## Architecture
The video triggering system is composed of a number of raspberry pi zero w's, one running as an access point that all the others join. A control computer also connects to that network and will recieve OSC messages to control resolume and the video output. Each individual pi broadcasts OSC, so the ips do... |
Markdown | UTF-8 | 4,431 | 3.046875 | 3 | [
"MIT"
] | permissive | # Nodejs
## 介绍
Node.js 是一个基于 Chrome V8 引擎的 JavaScript 运行环境,是一个应用程序。
官方网址 <https://nodejs.org/en/>,中文站 <http://nodejs.cn/>
## 作用
- 解析运行 JS 代码
- 操作系统资源,如内存、硬盘、网络
## 应用场景
* APP 接口服务
* 聊天室
* 动态网站, 个人博客, 论坛, 商城等
* 后端的Web服务,例如服务器端的请求(爬虫),代理请求(跨域)
* 前端项目打包(webpack, gulp)
## 使用
### 下载安装
工具一定要到官方下载,历史版本下载 <https://npm... |
C++ | UTF-8 | 413 | 2.859375 | 3 | [] | no_license | #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
vector<int> v{1,2,3};
next_permutation(v.begin(),v.end());
next_permutation(v.begin(),v.end());
next_permutation(v.begin(),v.end());
next_permutation(v.begin(),v.end());
next_permutatio... |
PHP | UTF-8 | 4,787 | 2.578125 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace Ociosos\UsuarioBundle\Entity;
use Symfony\Component\Security\Core\User\UserInterface;
use Doctrine\ORM\Mapping as ORM;
use Ociosos\ComunBundle\Entity\Centro;
/**
* Usuario
*
* @ORM\Table(name="usuario")
* @ORM\Entity(repositoryClass="Ociosos\UsuarioBundle\Entity\UsuarioRepository")
*
*/
class ... |
C# | UTF-8 | 4,282 | 3.015625 | 3 | [] | no_license | using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Security.Authentication.ExtendedProtection;
namespace json_to_graphql_schema
{
class Program
{
static Dictionary<string, List<string>... |
Python | UTF-8 | 1,795 | 3.296875 | 3 | [] | no_license | # ex15.py generate fake data
import random
from datetime import timedelta, datetime
words = [x.strip().capitalize() for x in open("words.txt").readlines()]
breeds = ['Dog', 'Cat', 'Fish', 'Unicorn']
pet_names = words[:int(len(words)/2)]
owner_names = words[:int(len(words)/2):]
owner_insert = '''INSERT INTO person ... |
PHP | UTF-8 | 814 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* @property integer $id
* @property string $contact_person
* @property string $website
* @property string $about_us
* @property string $address
* @property string $email
* @property string $phone_number
* @property string $remember_token
... |
Java | UTF-8 | 1,679 | 2.875 | 3 | [] | no_license | package com.team1640;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
public class MenuBar extends JMenuBar implements ActionListener{
private static final long serialVersionUID = 1L;
private ScoutMobi... |
Java | UTF-8 | 1,194 | 2.046875 | 2 | [] | no_license | package com.xxx.model.base.service;
import com.baomidou.mybatisplus.plugins.Page;
import com.xxx.common.framework.base.BaseService;
import com.xxx.common.util.SmsUtil;
import com.xxx.model.base.dao.CareDAO;
import com.xxx.model.base.entity.Care;
import org.springframework.stereotype.Service;
import org.springframework... |
Python | UTF-8 | 678 | 3.65625 | 4 | [] | no_license | def main():
pass
import random
finalList = []
listA = []
listB = []
for i in range(50):
listA.append(random.randint(0, 100))
listB.append(random.randint(0, 100))
print("Lista A: " + str(listA))
print("Lista B: " + str(listB))
for elementA in listA:
if elementA in listB:
if elementA not in f... |
Markdown | UTF-8 | 3,219 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | project_path: /web/tools/_project.yaml
book_path: /web/tools/_book.yaml
description:由於大多數桌面設備都沒有觸摸屏、GPS 芯片和加速度計,所以測試它們比較困難。Chrome DevTools 傳感器模擬器可以通過模擬常見的移動設備傳感器來降低測試的開銷。
{# wf_updated_on: 2016-03-07 #}
{# wf_published_on: 2015-04-13 #}
# 模擬傳感器:地理定位與加速度計 {: .page-title }
{% include "web/_shared/contributors/megginke... |
Markdown | UTF-8 | 2,385 | 2.875 | 3 | [
"MIT"
] | permissive | +++
title = "Sensing the real world through NHS prescriptions data"
date = 2021-09-18T12:14:56+01:00
draft = false
# Tags and categories
# For example, use `tags = []` for no tags, or the form `tags = ["A Tag", "Another Tag"]` for one or more tags.
tags = ["News"]
categories = []
# Featured image
# Place your image i... |
C++ | WINDOWS-1251 | 3,120 | 2.953125 | 3 | [] | no_license | #include <SFML/Graphics.hpp>
using namespace sf;
using namespace std;
const int countWall = 50;//
const int map_width = 40;//
const int map_height = 20;//
const int map_size = 20;//
const int quantityFood = 10;
const int quantityPoison = 10;
int countFood = 0;
int countPoison =0;
class Map
... |
JavaScript | UTF-8 | 755 | 2.546875 | 3 | [] | no_license | import React from 'react';
import { Link } from 'react-router-dom';
const Greeting =(props)=>{
/* note tahte its porops.history.push to chagne the page basically nooooo match lul*/
const onSend = (event)=>(
props.logout()//.then(res=>props.history.push('/wtfitsowrking??'))
)
const withUser =(... |
SQL | UTF-8 | 220 | 2.578125 | 3 | [] | no_license | CREATE TABLE games (
id INT AUTO_INCREMENT PRIMARY KEY,
state VARCHAR(50) NOT NULL,
players VARCHAR (100)
);
insert into games (state, players) values
('PLAYING', 'bart,lisa'),
('OPEN', 'homer'),
('OPEN', NULL);
|
Python | UTF-8 | 8,291 | 2.53125 | 3 | [
"MIT"
] | permissive | #
# Do NOT modify or remove this copyright and license
#
# Copyright (c) 2019 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
#
# This software is subject to the terms of the MIT License. If a copy of the license was
# not distributed with this file, you can obtain one at https://opensource.org/licens... |
Markdown | UTF-8 | 600 | 2.65625 | 3 | [
"MIT"
] | permissive | # Abe locale
> translate Abe backoffice texts
## Config Abe
set a property ```siteLocaleFolder``` to your abe.json file which link to your folder on your website source
exemple :
```javascript
{
"siteLocaleFolder": "mylocales"
}
```
Under mylocales folder you can add a folder named en-US which is the default lan... |
Java | UTF-8 | 2,520 | 2.078125 | 2 | [] | no_license | /* */ package net.minecraft.network.play.server;
/* */
/* */ import com.google.common.collect.Maps;
/* */ import java.io.IOException;
/* */ import java.util.Map;
/* */ import net.minecraft.network.INetHandler;
/* */ import net.minecraft.network.Packet;
/* */ import net.minecraft.network.PacketB... |
Java | UTF-8 | 556 | 1.820313 | 2 | [] | no_license | package com.ulane.running.dao.comtech.impl;
/*
* 北京优创融联科技有限公司 综合客服管理系统 -- http://www.ulane.cn
* Copyright (C) 2008-2010 Beijing Ulane Technology Co., LTD
*/
import com.htsoft.core.dao.impl.BaseDaoImpl;
import com.ulane.running.dao.comtech.CtScrCatDao;
import com.ulane.running.model.comtech.CtScrCat;
/**
*
* @... |
Markdown | UTF-8 | 1,055 | 3.8125 | 4 | [] | no_license | #### 牛客网-华为机试练习题 07
#### 题目描述
写出一个程序,接受一个正浮点数值,输出该数值的近似整数值。如果小数点后数值大于等于5,向上取整;小于5,则向下取整。
#### 输入描述:
```
输入一个正浮点数值
```
#### 输出描述:
```
输出该数值的近似整数值
```
示例1
输入
```
5.5
```
输出
```
6
```
#### 思路:
1,对数据进行取整操作,使用(int)方法,只保留整数部分,结果为i
2,然后判断d-i和0.5的关系,如果大于0.5,就返回i+1,否则返回i
#### 解决代码
```java
import java.util.Scan... |
Shell | UTF-8 | 303 | 2.6875 | 3 | [] | no_license | eval "$(/opt/homebrew/bin/brew shellenv)"
. $(brew --prefix asdf)/libexec/asdf.sh
. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash
for file in $HOME/.{git-completion.sh,git-prompt.sh,exports.sh,extras.sh,bash_morgan,bash_aliases,paths.sh}; do
[ -r "$file" ] && source "$file"
done
unset file
|
Markdown | UTF-8 | 1,641 | 2.828125 | 3 | [
"MIT"
] | permissive | Assignment 2: dartboard detector
This assignment detects dartboards in a set of images combining a object detector that uses Haar-like features generated by a boosting procedure with a line detector and a circle detector.
The detector (or strong classifier) is the file darcascade.xml. It's generated taking a set of po... |
JavaScript | UTF-8 | 107 | 3.03125 | 3 | [] | no_license | var person = {
name: 'ulff'
};
person.age = 34;
debugger;
person.name = 'Olaf';
console.log(person);
|
Markdown | UTF-8 | 2,308 | 3.640625 | 4 | [] | no_license | ## 0937. Reorder Data in Log Files
https://leetcode.com/problems/reorder-data-in-log-files/
### Description
> You have an array of `logs`. Each log is a space delimited string of words.
>
> For each log, the first word in each log is an alphanumeric *identifier*. Then, either:
>
> - Each word after the identifier... |
Go | UTF-8 | 900 | 3.84375 | 4 | [
"BSD-3-Clause"
] | permissive | package clise
import "fmt"
func ExampleClise_Pop() {
var (
c *Clise = New(5)
item interface{}
)
c.Push(1, 2, 3, 4, 5, 6)
item = c.Pop()
for item != nil {
fmt.Println(item)
item = c.Pop()
}
// Output:
// 6
// 5
// 4
// 3
// 2
}
func ExampleClise_RecentSlice() {
var c *Clise = New(5)
c.Push(1... |
PHP | UTF-8 | 2,490 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace ZfrMail\Mail;
/**
* Simple interface for a mail
*
* @author Michaël Gallego
*/
interface MailInterface
{
/**
* Add a new "from" address and return a new mail
*
* @param string $from
* @return static
*/
public function withFrom(string $from): MailInterface;
/*... |
Python | UTF-8 | 4,173 | 3.328125 | 3 | [] | no_license | import multiprocessing
import time
from learning_logic import decision_tree
## -------------------- FOREST CREATION --------------------------
## =================================================================
# Creates a decision tree for each subset inside dataset. The structure of the tree is determined by
... |
Markdown | UTF-8 | 4,016 | 3.421875 | 3 | [
"Apache-2.0"
] | permissive | ## Aggregate
With the command and event in place we can now start adding our business logic.
In Domain Driven Design all of this logic belongs within the aggregate which
for our example we will call name `BankAccount`.
And for our simple set of business rules, we will use two fields.
```rust,ignore
#[derive(Seriali... |
Java | UTF-8 | 485 | 2.171875 | 2 | [] | no_license | package cn.xiaochuankeji.tieba.background.g;
public class a {
private double a;
private double b;
private double c;
private long d;
public void a(double d) {
this.b = d;
}
public double a() {
return this.a;
}
public void b(double d) {
this.a = d;
}
... |
Markdown | UTF-8 | 8,040 | 3.078125 | 3 | [
"CC0-1.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | # Unit6 - Turn on the Lion lights -
Richard Turere is a 12-years-old Masai boy from Nairobi, Kenya.
Richard Turereは、ケニアのナイロビ出身の12歳のマサイ少年です。
His family raises animals near the south end of Nairobi National Park.
彼の家族はナイロビ国立公園の南端近くで動物を飼育しています。
The national park does not have fences, so wild animals are free to wan... |
C | UTF-8 | 1,351 | 2.9375 | 3 | [] | no_license | /** Author:Monk_
* Topic:inroder and predecessor **/
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define _for(i,a,b) for(i=a;i<b;i++)
#define _rfor(i,a,b) for(i=a;i>=b;i--)
#define mp(a,b) make_pai... |
C++ | ISO-8859-1 | 23,564 | 2.703125 | 3 | [] | no_license | #include <vector>
#include <GL/glfw.h>
#include <fstream>
#include <iostream>
#include <string>
#include <time.h>
#include <cstdlib>
using namespace std;
#include "Stuff.hpp"
#include "Vec.hpp"
#include "OBJ_Model.hpp"
OBJ_Model::OBJ_Model():Escala(1),_isAABBStarted(false){};
void OBJ_Model::clear(){
Faces.cl... |
Java | UTF-8 | 3,855 | 2.59375 | 3 | [] | no_license | import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.Scanner;
import javax.imageio.ImageIO;
import javax.swing... |
Shell | UTF-8 | 6,120 | 3.90625 | 4 | [
"MIT"
] | permissive | #!/usr/bin/env bash
#
# Minimalistic SSH deployment.
#
# Author: Artem Sapegin, sapegin.me
# License: MIT
#
# Inspired by:
# https://github.com/visionmedia/deploy
# http://gleero.com/all/remote-ssh/
#
PROGRAM=$(basename "$0")
VERSION="0.4.0"
CONFIG_DIR=$(pwd)
CONFIG_NAME=.shipit
CONFIG=
TARGET=deploy
SSH_HOST=
SSH_PA... |
Python | UTF-8 | 3,592 | 2.515625 | 3 | [] | no_license | """
Daniel Maidment
maidment.daniel@gmail.com
"""
import os
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib
import time
import pandas as pd
import scipy.io
import scipy.signal as signal
import scipy.linalg as linalg
import warnings
from numpy import pi
from numpy ... |
Python | UTF-8 | 4,506 | 2.859375 | 3 | [] | no_license | import pandas as pd
import os
class StartFunction(dict):
def __init__(self, value, family="S"):
self[0] = value
self.family = family
def __hash__(self):
return hash(self.family)
#Dados experimentais
alfa = 8.414499908
beta = 0.1969820003
gama = -15.31551146
mort = 0.823/100 #livre p... |
C# | UTF-8 | 1,020 | 4.15625 | 4 | [] | no_license | using System;
namespace Task2
{
class Program
{
static void Main(string[] args)
{
// Make a console application called SumOfEven.
// Inside it create an array of 6 integers.
// Get numbers from the input, find and print the sum of the even numbers
... |
Python | UTF-8 | 8,741 | 3.140625 | 3 | [] | no_license | r"""Language model with RNN layers.
Usage:
import lmp
model = lmp.model.BaseRNNModel(...)
logits = model(...)
pred = model.predict(...)
"""
# built-in modules
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_l... |
Python | UTF-8 | 2,338 | 2.578125 | 3 | [] | no_license | import sys
import os
from defcon import Font, Component
from fontTools.misc.py23 import *
from fontTools.feaLib.parser import Parser
def parse(features):
subs = {}
featurefile = UnicodeIO(tounicode(features))
fea = Parser(featurefile, []).parse()
for statement in fea.statements:
if getattr(sta... |
Python | UTF-8 | 712 | 4.09375 | 4 | [] | no_license | # 클래스 : 상속(다형성), 포함 등의 기법 구사
print('어쩌구 저쩌구 하다가.........')
class TestClass:
aa = 1 # 멤버 변수(클래스 내 전역변수)
def __init__(self):
print('생성자')
def __del__(self):
print('소멸자')
# 메소드
def printMsg(self):
name = '홍길동'
print(name)
print... |
PHP | UTF-8 | 2,177 | 2.8125 | 3 | [] | no_license | <?php
class App_Service_User
{
const E_WRONG_CREDENTIALS = 'wrong-credentials';
/**
* @var string
*/
protected $_lastError = null;
/**
* @return string
*/
public function getLastError()
{
return $this->_lastError;
}
/**
* @param string $lastError
... |
Java | UTF-8 | 2,588 | 2.328125 | 2 | [] | no_license | package com.qa.ninja.tests;
import java.util.Map;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import com.qa.ninja.base.BaseTest;
public class ProductInfoTest extends BaseTest{
@BeforeClass
public void productInfoPageSetUp() {
accountsPage = loginPage... |
Java | UTF-8 | 18,364 | 1.84375 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2015 Key Bridge LLC.
*
* 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 law or agree... |
Markdown | UTF-8 | 3,589 | 3.640625 | 4 | [
"MIT"
] | permissive | # 堆和栈
- from https://blog.csdn.net/weixin_49738644/article/details/127994071
堆和栈是程序员必须面对的两个概念,在理解这两个概念的时候,需要放到具体的场景中,在不同的场景中堆和栈表示的含义是不同的:
程序内存布局场景下,堆和栈表示的是两种内存管理方式;
数据结构场景下,堆和栈表示两种常用的数据结构。
堆和栈其实是操作系统管理进程占用的内存空间的两种管理方式。主要的区别如下:
管理方式不同:堆和栈是由操作系统自动分配和释放的,无需我们手动操作,堆的申请和释放是由程序员控制,容易出现内存泄漏。
成长方向不同。堆的增长方向是向上的,内存的地址是从低到高的;... |
C# | UTF-8 | 916 | 2.78125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Tarun.Data;
using Tarun.Models;
using Tarun.Services;
namespace Tarun.Repository
{
public class ContactRepository : IContact
{
private ApplicationDbContext db;
public ContactRepository(Applic... |
Java | UTF-8 | 1,370 | 2.5 | 2 | [] | no_license | package org.firstinspires.ftc.teamcode.proto_new;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.Servo;
/**
* Created by Alin on 27.01.2018,m
*/
@TeleOp(name = "ExtensonTest", group = "TeleOp")
//... |
Java | UTF-8 | 6,016 | 2.9375 | 3 | [
"MIT"
] | permissive | package be.unamur.info.b314.compiler.main.symboltable.symbols;
import be.unamur.info.b314.compiler.main.symboltable.Helpers.Errors;
import be.unamur.info.b314.compiler.main.symboltable.contracts.Type;
/**
* @overview La classe MapSymbol représente le symbole de la Map de jeu constitué d'un tableau à deux dimensions
... |
Java | WINDOWS-1251 | 1,955 | 3.5 | 4 | [] | no_license | package ua.khpi.oop.Hrianyk03;
/**
* \brief L3-Help
* \author Heorhii Hrianyk
* \version 1.0
* \date septemer 2020
* \warning main
*
* :
*
*/
public class Helper
{
//static functions
public static boolean onditionalheck(char text)///
{
ret... |
Java | UTF-8 | 589 | 1.570313 | 2 | [] | no_license | package com.jx.product;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
/**
* @Description:
* @Author: zhangjx
* @Date: 2... |
Python | UTF-8 | 4,946 | 2.84375 | 3 | [] | no_license | '''
Get a face, and then draw points of interest
Created on Aug 1, 2011
@author: davk
'''
import sys, math, platform
import cv
import pygame
from pygame import image, display, event, draw
from pygame.locals import *
CAMWIDTH = 640
CAMHEIGHT = 480
def get_pygame_image(img_cv):
img_cv_rgb = cv.CreateMat(img_cv.... |
C++ | UTF-8 | 733 | 2.890625 | 3 | [] | no_license | #include "CellChoose.h"
CellChoose::CellChoose(QTreeWidgetItem * rowid,QWidget *parent)
: QWidget(parent), rowid(rowid)
{
ui.setupUi(this);
connect(ui.checkBox, SIGNAL(stateChanged(int)), this, SLOT(onCheckboxChanged()));
}
CellChoose::~CellChoose()
{
}
void CellChoose::setChecked(bool state){
if(state == tru... |
Markdown | UTF-8 | 981 | 3.078125 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "Remembering"
date: 2013-03-22 08:12
external-url:
---
I was talking with a friend yesterday about sentimentality. She told me about a Journey concert t-shirt she's kept from years ago because it reminds her of a fun night. I don't share this mindset at all and it reminded my of a [great post ... |
C# | UTF-8 | 2,115 | 2.953125 | 3 | [
"MIT"
] | permissive | using System.Text;
namespace Plugin.NFC
{
/// <summary>
/// NFC tools
/// </summary>
public static class NFCUtils
{
/// <summary>
/// Returns the content size of an array of <see cref="NFCNdefRecord"/>
/// </summary>
/// <param name="records">array of <see cref="NFCNdefRecord"/></param>
/// <returns>Co... |
SQL | UTF-8 | 178 | 2.625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-18T09:06:00Z' AND timestamp<'2017-11-19T09:06:00Z' AND temperature>=47 AND temperature<=58
|
Java | UTF-8 | 953 | 1.742188 | 2 | [] | no_license | package com.facebook.android.maps;
import android.os.Looper;
import com.facebook.android.maps.a.aa;
import com.facebook.android.maps.a.ad;
import com.facebook.android.maps.model.k;
import com.facebook.android.maps.model.n;
final class ah
extends aa
{
ah(ai paramai, int paramInt1, int paramInt2, int paramInt3, int... |
JavaScript | UTF-8 | 4,222 | 2.609375 | 3 | [] | no_license | var makeAndModelData = null;
var optionSets = null;
$(document).ready(function () {
$.ajax({
type: "POST",
url: "/getMakeAndModel",
success: function (data) {
handleMakeAndModel(data);
showModel($("#select-make").val());
showInf($("#select-make"... |
Shell | UTF-8 | 4,089 | 2.921875 | 3 | [] | no_license | # Maintainer: Michael Lass <bevan@bi-co.net>
# Contributor: Szymon Jakubczak <szym-at-mit-dot-edu>
# This PKGBUILD is maintained on github:
# https://github.com/michaellass/AUR
pkgname=openafs
pkgver=1.8.10
pkgrel=1
pkgdesc="Open source implementation of the AFS distributed file system"
arch=('i686' 'x86_64' 'armv7h'... |
C++ | UTF-8 | 851 | 3.796875 | 4 | [] | no_license | //Implementing operator(+ and <<) overloading on template class point to represent coordinates (x,y)
#include<iostream>
using namespace std;
template<class T> class point
{
T x,y; //Variables
public:
friend ostream& operator<<(ostream& out,point<double> p); //Prototypes and friend funtion
explicit ... |
Python | UTF-8 | 3,338 | 2.515625 | 3 | [] | no_license | import pygame
import cv2
import numpy as np
import os
import time
os.environ['SDL_VIDEO_WINDOW_POS'] = "%d,%d" % (0,0)
BLACK = (0,0,0)
WHITE = (255, 255, 255)
BLUE = ( 0, 0, 255)
GREEN = ( 0, 255, 0)
RED = (255, 0, 0)
TEXTCOLOR = ( 0, 0, 0)
(width, height) = (1920, 1000)
... |
JavaScript | UTF-8 | 270 | 3.84375 | 4 | [] | no_license | #!/usr/bin/node
// Prints 3 lines: (like 1-multi_languages.js)
// but by using an array of string and a loop.
const arrayStrings = ['C is fun',
'Python is cool',
'Javascript is amazing'];
for (let step = 0; step < 3; step++) {
console.log(arrayStrings[step]);
}
|
Markdown | UTF-8 | 3,650 | 2.546875 | 3 | [] | no_license |
# 数据结构例程——最小生成树的普里姆算法 - 迂者-贺利坚的专栏 - CSDN博客
2015年11月07日 10:29:37[迂者-贺利坚](https://me.csdn.net/sxhelijian)阅读数:4224
本文是[[数据结构基础系列(7):图](http://edu.csdn.net/course/detail/1595)]中第11课时[[最小生成树的普里姆算法](http://edu.csdn.net/course/detail/1595/24601)]的例程。
(程序中graph.h是图存储结构的“算法库”中的头文件,详情请[单击链接…](http://blog.csdn.net/sxhelijian/... |
Markdown | UTF-8 | 4,328 | 2.671875 | 3 | [
"MIT"
] | permissive | # Nextjs-symblai-demo
## Introduction
Symbl is a comprehensive suite of APIs for analyzing natural human conversations - both for your team’s internal conversations and of course the conversations you are having with your customers. Built on our Contextual Conversation Intelligence (C2I) technology, the APIs enable ... |
C | UTF-8 | 2,100 | 3.34375 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define N 30
typedef struct list {
char c_node[N];
char courses[N];
struct list *sonraki;
} liste;
liste *ilk = NULL, *son = NULL, *yeni, *gecici;
const char *c[N];
const char *d[N];
/*struct Node
{
char c_node[N];
char courses[N];
struct ... |
SQL | UTF-8 | 2,680 | 3.1875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64)
--
-- Host: localhost Database: apteka
-- ------------------------------------------------------
-- Server version 8.0.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4... |
Python | UTF-8 | 2,253 | 2.96875 | 3 | [
"MIT"
] | permissive | import torch
import torch.nn as nn
class GlobalAverage(nn.Module):
def __init__(self, rank=2, keepdims=False):
"""
:param rank: dimension of image
:param keepdims: whether to preserve shape after averaging
"""
super().__init__()
self.axes = list(range(2, 2 + rank))... |
Python | UTF-8 | 21,715 | 2.734375 | 3 | [] | no_license | import sys
import tkinter as tk
import tkinter.ttk as ttk
class State:
def __init__(self, sname, stype, sparamlist):
self.stname = sname
self.sttype = stype
self.stparamlist = sparamlist
def __str__(self):
return "<State> "+self.stname
class Screen:
def __init__(self, name,... |
C++ | UTF-8 | 17,852 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | #ifndef CONCEPTS_H
#define CONCEPTS_H
#include <vlog/support.h>
#include <vlog/consts.h>
#include <vlog/graph.h>
#include <kognac/logs.h>
#include <string>
#include <inttypes.h>
#include <stdlib.h>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
/*** PREDICATES ***/
#define EDB 0
#define ID... |
Markdown | UTF-8 | 5,295 | 3.40625 | 3 | [
"Apache-2.0"
] | permissive | # GPIO Device Service
## Overview
GPIO Micro Service - device service for connecting GPIO devices to EdgeX.
- Function:
- This device service use sysfs to control GPIO devices. For a just connected GPIO device, export the needed pin number, set correct GPIO direction, and then start to read or write data from GPIO d... |
Java | UTF-8 | 8,840 | 2.4375 | 2 | [] | no_license | package cz.cuni.mff.kocur.world;
import java.io.IOException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import cz.cuni.mff.kocur.agent.ControllersManager;
import cz.cuni.mff.kocur.configuration.ConfigurationChangeListener;
import cz.cuni.mff.kocur.configuration.FrameworkConfi... |
C# | UTF-8 | 1,607 | 2.875 | 3 | [] | no_license | using AgendaTelefonica.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace AgendaTelefonica.Repositorio
{
public class ContatoRepositirio
{
private List<Contato> Contatos;
private void CriaDados()
{
Contatos ... |
Rust | UTF-8 | 10,338 | 2.875 | 3 | [
"LLVM-exception",
"Apache-2.0"
] | permissive | use rayon::iter::{IntoParallelIterator, ParallelExtend, ParallelIterator};
use std::convert::TryFrom;
use wasmtime::{AsContext, AsContextMut};
const WASM_PAGE_SIZE: u32 = 65_536;
/// The maximum number of data segments that most engines support.
const MAX_DATA_SEGMENTS: usize = 100_000;
/// A "snapshot" of Wasm stat... |
Python | UTF-8 | 2,200 | 2.8125 | 3 | [] | no_license | import logging
import pygame
from battle_city.game_objects.game_object import Directions, Movable
logger = logging.getLogger(__name__)
class Missile(Movable):
image = "media/images/missile.png"
def __init__(self, position, direction: Directions, *args, **kwargs):
super().__init__(position, *args, ... |
Markdown | UTF-8 | 6,074 | 3.3125 | 3 | [] | no_license | # JS 一些常用的手写方法
## 判断数据类型
```js
function checkIsDataType(data) {
return Object.prototype.toString.call(data).slice(8, -1)
}
```
## 数组去重
```js
function unique(array) {
return array.filter((item, index, array) => {
return array.indexOf(item) === index
})
}
```
## 数组扁平化
```js
function flatten(arra... |
Java | UTF-8 | 181 | 1.90625 | 2 | [] | no_license | package cs413f15team01p4.timer.model.clock;
/**
* Created by Home on 11/5/2015.
*/
public interface ClockModel extends OnTickSource {
void onStart();
void onStop();
}
|
C# | UTF-8 | 1,749 | 2.71875 | 3 | [] | no_license | namespace DataCollectionAPI.Migrations
{
using Microsoft.AspNet.Identity.EntityFramework;
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
internal sealed class Configuration : DbMigrationsConfiguration<DataCollectionAPI.Models.ApplicationDbContex... |
Java | UTF-8 | 7,040 | 1.851563 | 2 | [] | no_license | package com.smoothsys.qonsume_pos.FragmentsAndActivities;
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.app.Fragment;
import android.support.v4.widget.SwipeRefreshLayout;
import android.... |
Ruby | UTF-8 | 729 | 3.1875 | 3 | [] | no_license | require_relative '../setup'
require_relative './exercise_1'
require_relative './exercise_2'
require_relative './exercise_3'
require_relative './exercise_4'
require_relative './exercise_5'
puts "Exercise 6"
puts "----------"
# Your code goes here ...
# Update store1 name back to Burnaby
burnaby = Store.find_by(id: 1)... |
Java | UTF-8 | 307 | 2.515625 | 3 | [] | no_license | package document;
public class Author {
private String firstname;
private String lastname;
private String email;
private String belongto;
public Author(String f, String l, String e, String b) {
this.firstname = f;
this.lastname = l;
this.email = e;
this.belongto = b;
}
}
|
Python | UTF-8 | 3,877 | 3.015625 | 3 | [] | no_license | from manipulate_sequences import *
# use this function to get the positions of the coding sequence for each transcript
def get_CDS_positions(caeno_gff):
'''
(file) -> dict
Returns a dictionnary with transcript name as key and list of tuples containing the start and end positions
of each coding re... |
Java | UTF-8 | 2,195 | 2.296875 | 2 | [] | no_license | package ee.bmagrupp.aardejaht.server.rest;
import java.util.Date;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.spring... |
C | UTF-8 | 1,250 | 3.21875 | 3 | [] | no_license | #include "functions_headerfile.h"
ssize_t ft_strlen(char *string)
{
int i;
i = 0;
if (string == NULL)
return (-1);
while (string[i] != 0)
i++;
return (i);
}
char *my_calloc(int length)
{
int i;
char *result;
i = 0;
result = malloc(length);
if (result == NULL)
return (NULL);
while (i < length)
{
... |
Shell | UTF-8 | 428 | 2.546875 | 3 | [] | no_license | #!/bin/bash -l
#SBATCH -p aolin.q
#SBATCH --exclusive
hostname
module rm gcc/8.2.0
module add gcc/9.2.0
# compile for CPU with optimization level 1
gcc -O1 -lm $1 -o ${2}.O1
# execute and measure total time and general performance counters
perf stat ${2}.O1
echo
# execute and generate performance profiling file (p... |
C++ | UTF-8 | 1,655 | 3.140625 | 3 | [] | no_license | #include "../classes/Airplane.h"
#include "../classes/Airport.h"
#include "../classes/Runway.h"
#include "../classes/Location.h"
#include <gtest/gtest.h>
class LocationDomainTests: public ::testing::Test {
protected:
friend class Location;
virtual void SetUp() {
::testing::FLAGS_gtest_death_test_styl... |
C++ | UTF-8 | 392 | 3.234375 | 3 | [] | no_license | // loops.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
using namespace std;
int main()
{
for (int i = 0; i < 10; i++)
{
if (i == 6)
{
break; //if i is 6 the program stops without printing it
}
else if (i == 4)
{
contin... |
Java | UTF-8 | 301 | 1.671875 | 2 | [] | no_license | package com.TwistWallet.service;
import com.TwistWallet.utils.TwistWalletRequest;
import com.TwistWallet.utils.TwistWalletResponse;
public interface UserService {
public TwistWalletResponse createUser(TwistWalletRequest request);
public TwistWalletResponse sendMail(TwistWalletRequest request);
}
|
Python | UTF-8 | 2,454 | 3.53125 | 4 | [] | no_license | # AdaptiveLinearStretching.py
#
# Description:
# This program gets as inputs a window parameter (w) and names of the input and the
# output images. The output image is computed from the input image by changing only
# the L values such that L(i, j) is computed by applying linear stretching to the
# window ... |
Java | UTF-8 | 509 | 2.234375 | 2 | [] | no_license | package service;
import dao.RainManageDao;
import entity.RainQuality;
import java.util.List;
public class RainMangerService {
private RainManageDao rainManageDao = new RainManageDao();
public List<RainQuality>getAllInfo(){
return rainManageDao.getAllInfo();
}
//新增雨量
public int addNewRainI... |
Markdown | UTF-8 | 692 | 3.09375 | 3 | [] | no_license | ---
layout: post
title: Depends on yourself
date: 2017-02-02 22:22:22 +0800
---
算下来,从12岁离家上初中到现在,将近20年都是一个人面对着一切,中考,高考,工作,北漂,就算已经结婚四年,依然如此,只不过从我一个人变成了我们两个的一个人。
这种一个人,在面对问题的时候,往往首先想到的是我自己能不能解决,不寄希望于别人。
这种一个人,让我特别害怕欠人情,比如借钱,比如麻烦朋友,尽管我知道他们并不在意,每次还是会打心底感谢他们的帮助。
这种一个人,一定程度上强迫自己变强,因为你只能依靠你自己。
|
Python | UTF-8 | 4,434 | 2.5625 | 3 | [] | no_license | import numpy as np
import bornagain as ba
from bornagain import deg, angstrom, nm, nm2, kvector_t
def get_sample(height=50):
# Defining Materials
material_1 = ba.MaterialBySLD("example10_Air", 0.0, 0.0)
material_2 = ba.MaterialBySLD("example10_Particle", 108.29e-6, 0.0)
material_3 = ba.MaterialBySLD("... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.