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 |
|---|---|---|---|---|---|---|---|
Java | UTF-8 | 2,596 | 2.09375 | 2 | [] | no_license | package com.myapp.yooceii.fluidrss.activity;
import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.F... |
Java | UTF-8 | 1,353 | 2.03125 | 2 | [] | no_license | package asryab.com.mvvmproject.screens.authorization.signup;
import android.content.Context;
import android.content.Intent;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.Nullable;
import asryab.com.mvvmproject.R;
import asryab.com.mvvmproject.abstracts.BaseAct... |
Java | UTF-8 | 4,314 | 3.09375 | 3 | [] | no_license | package com.gojek.parkinglot;
import com.gojek.com.gojek.model.Commands;
import com.gojek.exceptions.ParkingLotNotPresent;
import com.gojek.exceptions.ParkingOverflowException;
import com.gojek.spot.ParkingSpot;
import com.gojek.spot.SpotSize;
import com.gojek.vehicle.Car;
import java.io.File;
import java.util.Scanne... |
TypeScript | UTF-8 | 575 | 2.765625 | 3 | [] | no_license | export class BrowserStorage {
STORAGE_KEY = 'todos';
getAll(): Promise<any> {
var raw = window.localStorage.getItem(this.STORAGE_KEY),
val;
if (typeof raw === 'string') {
try {
val = JSON.parse(raw);
} catch (err) {
val = raw; //if it's not a valid json, than it's just a ... |
C++ | UTF-8 | 1,323 | 3.078125 | 3 | [] | no_license | #include <stdio.h>
#define VR 0
#define VGR 1
#define RV 2
#define RVG 3
#define RQ 4
typedef struct {
bool active;
int age;
int sigs;
char description[10];
} state;
state states[5] = {
{ true, 0, 0, "VR"},
{ false, 0, 0, "VGR"},
{ false, 0, 0, "RV"},
{ false, 0, 0, "RVG"},
{ false, 0, 0, "RQ"}
... |
C# | UTF-8 | 1,065 | 2.828125 | 3 | [] | no_license | using UnityRipper.Exporter.YAML;
namespace UnityRipper.Classes
{
public class Vector4f : IStreamReadable, IYAMLExportable
{
public Vector4f()
{
}
public Vector4f(float x, float y, float z, float w)
{
X = x;
Y = y;
Z = z;
W = w;
}
public void Read(EndianStream stream)
{
X = stream.Re... |
Markdown | UTF-8 | 884 | 2.65625 | 3 | [] | no_license | # Article L4444-2
Sous réserve des adaptations prévues au second alinéa, les articles L. 4061-1 à L. 4061-7 sont applicables en Nouvelle-
Calédonie et en Polynésie française dans leur rédaction résultant de l'ordonnance n° 2018-20 du 17 janvier 2018 17 janvier
2018.
Pour l'application en Nouvelle-Calédonie et en Poly... |
Markdown | UTF-8 | 3,812 | 2.71875 | 3 | [
"MIT"
] | permissive | <h1><i class="fas fa-asterisk" style="color:#ff1c3f"></i> Textile <small>cafe</small></h1>
#### Cafe Mode
If you are using Textile to develop an application, you may want to run your Textile daemon in _Cafe mode_. This means the node will be open for your app to relay messages to other users when they are offline, ca... |
Java | UTF-8 | 1,076 | 1.921875 | 2 | [] | no_license | package com.flouis.counter;
import com.flouis.common.redis.util.RedisStringCache;
import com.flouis.common.usual.util.SnowflakeIdWorker;
import com.flouis.counter.config.CounterConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.au... |
JavaScript | UTF-8 | 896 | 3.90625 | 4 | [] | no_license | /*In MS Excel you have column pattren like A,B,C...Z , AA,AB,AC....AZ, BA,BB,BC..BZ,...ZZ..AAA, AAB,AAC...AAZ
Means A =1 B=2 AA =27
Find excel column name based on input number
input = 23
Output = 23
A =1
Z =26
AA =27
AZ= 52
BZ = 78
zz 676 + 26 = 702
703 = AAA */
function findExcelColumnName(n) {
console.log... |
Python | UTF-8 | 1,167 | 3.390625 | 3 | [] | no_license |
import random
def merge(A,B):
R = []
i=0;
j=0;
N=len(A);
M=len(B);
while(i+j<N+M):
if j==M or (i<N and A[i] <= B[j]):
R.append(A[i])
#print "adding A[{}]={}, setting i={}".format(i, A[i], i+1)
i=i+1
else:
R.append(B[j])
#print "adding B[{}]={}, setting j={}".format(j, B[j], j+1)
j=j+1
ret... |
Java | UTF-8 | 6,380 | 1.898438 | 2 | [] | no_license | /*
* Copyright (C) 2009-2015 SM2 SOFTWARE & SERVICES MANAGEMENT
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... |
Java | UTF-8 | 332 | 2.453125 | 2 | [
"Apache-2.0"
] | permissive | package irvine.oeis.a050;
import irvine.math.z.Z;
import irvine.oeis.a035.A035117;
/**
* A050282 a(n) is the starting position of the first occurrence of a string of n 3's in the decimal expansion of Pi.
* @author Sean A. Irvine
*/
public class A050282 extends A035117 {
@Override
protected Z digit() {
ret... |
C++ | UTF-8 | 1,021 | 2.5625 | 3 | [] | no_license | #ifndef CPBBASEPOPUPMANAGER_H
#define CPBBASEPOPUPMANAGER_H
#include <QObject>
#include <QString>
#include <QVariant>
namespace CPB {
class BasePopupManager : public QObject
{
Q_OBJECT
Q_PROPERTY(QString path READ path NOTIFY pathChanged)
Q_PROPERTY(Policy policy READ policy NOTIFY policyChanged)
Q_P... |
JavaScript | UTF-8 | 2,245 | 2.734375 | 3 | [] | no_license | import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
export default class Context extends React.Component {
/**
* @constructor Context
* @param props
*/
constructor(props) {
super(props);
this.state = props;
}
/**
* Dependent classes can overrid... |
Markdown | UTF-8 | 6,965 | 2.734375 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | # @aws-sdk/client-support-node
[](https://www.npmjs.com/package/@aws-sdk/client-support-node)
[](https://www.npmjs.com/package/@aws-sdk/client-support-nod... |
C# | UTF-8 | 1,050 | 2.734375 | 3 | [
"MIT"
] | permissive | using System.Text;
using KutterJordanBossenForm.Interfaces;
namespace KutterJordanBossenServices
{
public class EncryptionService : IEncryptionService
{
private ICryptoRepository _cryptoRepository;
public EncryptionService(ICryptoRepository cryptoRepository)
{
_cryptoRepo... |
Java | UTF-8 | 302 | 1.820313 | 2 | [] | no_license | package org.gradle.test.performance61_1;
public class Production61_80 extends org.gradle.test.performance15_1.Production15_80 {
private final String property;
public Production61_80() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
Markdown | UTF-8 | 7,407 | 2.9375 | 3 | [] | no_license | # Reproducible Research Week 1 Assignment
========================================================
## Assignment Details
The data is from a personal activity monitoring device. This device collects data at 5 minute intervals through out the day. The data consists of two months of data from an anonymous individual coll... |
Swift | UTF-8 | 4,178 | 2.640625 | 3 | [
"MIT"
] | permissive | import Cocoa
extension AppState {
private func addInfoMenuItem() {
guard let website = WebsitesController.shared.current else {
return
}
var url = website.url
do {
url = try replacePlaceholders(of: url) ?? url
} catch {
error.presentAsModal()
return
}
let maxLength = 30
if !website.menu... |
C# | UTF-8 | 1,368 | 2.578125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Text;
namespace NmtExplorer.Business
{
public class ExtensionUtils
{
public static bool HasMatchingExtension(string extensions, string extension)
{
extension = extension.ToLower();
extensions = exten... |
C# | UTF-8 | 2,240 | 3.609375 | 4 | [] | no_license | using System;
using System.Collections.Generic;
using System.Text;
namespace Leetcode.Model
{
public class TreeNode
{
public int val;
public TreeNode left;
public TreeNode right;
public TreeNode(int val = 0, TreeNode left = null, TreeNode right = null)
{
th... |
JavaScript | UTF-8 | 8,257 | 2.75 | 3 | [] | no_license | let mijnAfstand = 1;
// slider
let mijnUitleg = document.getElementById('UX');
var inputElement = document.getElementById('customRangeInput');
inputElement.oninput = setInput;
inputElement.onchange = setInput; // IE fix
veranderenAfstand()
function setInput(){
inputElement.value = closestValue(inputElement.... |
C# | UTF-8 | 1,942 | 2.8125 | 3 | [] | no_license | /*
App's Name: Movie Bonanza
Author's Name: Kannika Bhatia
Student ID: 200332992
App's Creation Date: 4th March 2017
App Description: Movie rental application that has the movie's selection form,
order form, confirmation form
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using... |
Markdown | UTF-8 | 1,422 | 2.609375 | 3 | [] | no_license | 基本地址
- http://dev.cloudchain.cn/ 开发
- http://www.cloudchain.cn/ 生产
### 查询任务对应题目列表
- 请求地址 qc/api/quest/Subject.do?method=getSubjects
- 参数 {"quest_id":1,"subject_id":1,"subject_type":"0","group_type":"1","create_user":"","rows":10,"token":"xxxx"}
- 参数说明
名称 | 类型 | 非空 | 备注
--- | --- | --- | ---
quest_id | int | √ | ... |
SQL | UTF-8 | 34,515 | 2.765625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 2.10.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 03, 2009 at 08:05 AM
-- Server version: 5.0.41
-- PHP Version: 5.2.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `zupal`
--
-- --------------------------------------------------------
-- ... |
Java | UTF-8 | 1,373 | 3.359375 | 3 | [] | no_license | // Deck.java
//
//
//
package common;
import java.util.*;
import java.io.*;
public class Deck implements Serializable, Comparable<Deck> {
private Vector<Card> cards;
private int id;
private String name;
public Deck() {
this("Deck.name");
}
public Deck(String n) {
this(n, new... |
Java | UTF-8 | 2,054 | 1.742188 | 2 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | /*
* Copyright Hyperledger Besu Contributors.
*
* 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 agr... |
C | UTF-8 | 668 | 2.609375 | 3 | [] | no_license | /*
** EPITECH PROJECT, 2018
** p_func_str2
** File description:
** p_func_str2
*/
#include "include/my.h"
#include "include/errors.h"
int p_ptr(va_list args, struct input_flags flags)
{
char *str = malloc(sizeof(char) * 14);
char *pstr = convert_to_base(va_arg(args, long), "0123456789abcdef");
my_strcat(... |
Java | UTF-8 | 4,812 | 2.3125 | 2 | [] | no_license | package com.example.android.quakereport;
import android.content.Context;
import android.graphics.drawable.GradientDrawable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.view.LayoutInflater;
import android.view.Vie... |
C++ | UTF-8 | 688 | 3.265625 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
int main() {
int n,e,u,v;
cout<<"\nEnter No. of vertices:\n";
cin>>n;
cout<<"\nEnter no. of edges:\n";
cin>>e;
int matrix[n][n];
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
matrix[i][j] = 0;
}
}
for(int i=0... |
Python | UTF-8 | 96 | 2.828125 | 3 | [] | no_license | input()
valid = [int(b) for b in input().split() if int(b) != -1]
print(sum(valid) / len(valid)) |
C++ | UTF-8 | 1,389 | 2.6875 | 3 | [] | no_license | #include "log.h"
std::ostringstream & Log::get(log_types level) {
LVL_REPORTING = (log_types)LOG_TYPE;
msg_lvl = level;
auto now = std::chrono::system_clock::now();
auto in_time_t = std::chrono::system_clock::to_time_t(now);
os << "- " << std::put_time(std::localtime(&in_time_t), "%Y-%m-%d %X");
os << " " ... |
Java | UTF-8 | 283 | 2 | 2 | [] | no_license | package channels;
import service.Peer;
import utils.Log;
public class MDBChannel extends Channel {
public MDBChannel(Peer parentPeer, String mcastAddr, String mcastPort) {
super(parentPeer, mcastAddr, mcastPort);
Log.log("Backup channel initialized!");
}
}
|
JavaScript | UTF-8 | 2,393 | 3.109375 | 3 | [] | no_license |
//rekursiv proqramlasma
// function topla(a,b) {
// if (a <=b) {
// cem=cem+a
// a=a+1
// topla(a=a,b=b)
// }
// }
// cem=0
// topla(1,4)
// document.write(cem)
// function yaz(a,b){
// //if(a<=b){ (bele olanda sonlu dovr say artir getdikce )
// document.write(a+'<br>')
// a=a+1
// yaz(a=... |
Python | UTF-8 | 451 | 3.546875 | 4 | [] | no_license | #!/usr/bin/python
## from sys import argv- this is recommended one
#using IF ELSE command, but is not recommended any where.. It is just for learning purpose.
import sys
if len(sys.argv)== 3:
print 'Total parameters given at command line:', len(sys.argv)
print 'Given values in command line', sys.argv
pr... |
C++ | UTF-8 | 458 | 3.21875 | 3 | [] | no_license |
#include <bits/stdc++.h>
using namespace std;
int countBST(int n){
vector<int> T(n+1,0);
T[0] = 1;
T[1] = 1;
for(int i=2; i<=n; ++i){
int sum = 0;
for(int j=0; j<=(i-1); ++j){
sum += T[j]*T[(i-1) - j]; // #(tree on left) * #(tree on right)
}
T[... |
C# | UTF-8 | 363 | 2.734375 | 3 | [] | no_license | using System;
namespace Matematik
{
class Program
{
static void Main(string[] args)
{
double sayi1, sayi2;
sayi1=double.Parse(Console.ReadLine());
sayi2=double.Parse(Console.ReadLine());
DortIslem dortIslem = new DortIslem();
dortIsle... |
Java | UTF-8 | 5,417 | 2.125 | 2 | [] | no_license | package excelapp.model;
import excelapp.entity.Order;
import excelapp.entity.OrderDate;
import excelapp.entity.Product;
import excelapp.converter.TextConverter;
import org.apache.poi.sl.usermodel.Hyperlink;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.use... |
C++ | UTF-8 | 4,533 | 2.96875 | 3 | [] | no_license | #pragma once
#include <iostream>
#include <list>
#include <queue>
#include <tuple>
#include <unordered_map>
#include "misc.hh"
enum State {
ok,
done,
need_input,
};
class IntCode {
unordered_map<long, long> memory;
queue<long> inputs;
deque<long> outputs;
long cursor;
long offset;
... |
C++ | UTF-8 | 5,497 | 2.609375 | 3 | [
"MIT"
] | permissive | #include <WebEncoder.hpp>
#if defined(WEB_ENCODER)
#include <crypto/base64.hpp>
#include <fstream>
WebEncoder::WebEncoder() :
m_Options( cxxopts::Options( "", "" ) )
{
m_Options.add_options()
( "e,enc", "Encrypt procedure", cxxopts::value<std::string>(), "string(aes|rsa)" )
( "d,dec", "Decr... |
Java | UTF-8 | 789 | 2.9375 | 3 | [] | no_license | package ioma.gui;
import java.util.ArrayList;
import java.util.Objects;
public class Users {
private String name;
private String ip;
private ArrayList<Messages> messageList = new ArrayList<Messages>();
public Users (String name, String ip){
this.name = name;
this.ip = ip;
}
pu... |
Ruby | UTF-8 | 243 | 2.84375 | 3 | [] | no_license | class Sieve
def initialize(len)
@primes = [nil, nil, *2..len]
(2..len**0.5).each do |n|
(n**2..len).step(n) { |m| @primes[m] = nil } if @primes[n]
end
@primes.compact!
end
end
module BookKeeping
VERSION = 1
end
|
Java | UTF-8 | 744 | 1.945313 | 2 | [] | no_license | package com.yxld.yxchuangxin.entity;
/**
* 作者:hu on 2017/7/12
* 邮箱:365941593@qq.com
* 描述:
*/
public class PrePay {
/**
* data : 非固定车位cw1499859303383
* success : 0
* msg : ok
*/
private String data;
private int success;
private String msg;
public Strin... |
Java | UTF-8 | 879 | 2.296875 | 2 | [
"Apache-2.0"
] | permissive | package com.zeroq6.common.utils;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;
import org.apache.commons.validator.routines.EmailValidator;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
... |
Python | UTF-8 | 684 | 2.625 | 3 | [] | no_license | import argparse
import cv2
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", type=str, required=True, help="image")
ap.add_argument("-m", "--mask", type=str, required=True, help="mask")
ap.add_argument("-a", "--method", type=str, default="telea",
choices=["telea", "ns"], help="inpainting algorithm")
arg... |
C++ | UTF-8 | 410 | 2.609375 | 3 | [] | no_license | #include<iostream>
using namespace std;
int main()
{
long long int x, y;
cin>>x>>y;
if(x < 0)
{
if(y < 0) cout<<x + y<<" 0 0 "<<x + y<<endl;
else cout<<x + (-y)<<" 0 0 "<<-x + y<<endl;
}
else
{
if(y < 0) cout<<"0 "<<-x + y<<" "<<x - y<<" 0"<<endl;
else cout<... |
Python | UTF-8 | 8,354 | 3.0625 | 3 | [] | no_license | # Copyright (c) 2020 Alberto Córdoba Ortiz
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merg... |
PHP | UTF-8 | 762 | 2.59375 | 3 | [] | no_license | <?php
class conexion
{
private $conexion;
private $server = "localhost";
private $usuario ="root";
private $pass = "";
private $db = "bdlespool";
private $user;
private $password;
public function __construct(){
$this->conexion=new mysqli($this->server,$this->usuario, $this->pass, $this->db);
if ($this->conexion-... |
Java | UTF-8 | 9,533 | 2.078125 | 2 | [
"Apache-2.0"
] | permissive | package me.imli.swipelayout.sb;
import android.annotation.SuppressLint;
import android.content.Context;
import android.support.v4.view.GestureDetectorCompat;
import android.support.v4.view.ViewCompat;
import android.support.v4.widget.ViewDragHelper;
import android.util.AttributeSet;
import android.view.MotionEvent;
im... |
Java | UTF-8 | 340 | 1.789063 | 2 | [] | no_license | package com.sqli.echallenge.bap.web.facade;
import java.util.List;
import com.sqli.echallenge.bap.web.dto.PosteDto;
public interface IPosteFacade {
public PosteDto find(Long i);
public Boolean delete(Long id);
public PosteDto edit(PosteDto dto);
public PosteDto save(PosteDto dto);
public List<Poste... |
Python | UTF-8 | 511 | 2.9375 | 3 | [
"MIT"
] | permissive | import json
from wingedsheep.carcassonne.objects.side import Side
class Connection:
def __init__(self, a: Side, b: Side):
self.a = a
self.b = b
def to_json(self):
return {
"a": self.a.to_json(),
"b": self.b.to_json()
}
def __str__(self):
r... |
Markdown | UTF-8 | 1,358 | 2.8125 | 3 | [
"MIT"
] | permissive | ---
title: Scala Basics
tags: [Notebooks/Scala, Scala]
created: '2019-03-17'
modified: '2019-06-26'
---
# Scala Basics
<span style="text-decoration: underline black;">18/03/2019</span>
Introduction to the [`Scala`](https://scala-lang.org/) programming language.
> "`Scala` is a general-purpose programming language p... |
Markdown | UTF-8 | 4,183 | 3.0625 | 3 | [] | no_license | ---
layout: post
title: Sketching In Narrative Form
---
*“Chrutsssh”*. I put my keys into the door and open it. I just have been out for a walk again. Alone. There is nothing else that one can do outside these times. I close the door and put up my jacket when I see the one segment being flipped at the box hanging in m... |
JavaScript | UTF-8 | 865 | 3.90625 | 4 | [
"MIT"
] | permissive | // function sayHi(){
// //
// }
// console.log(this)
let nepal = {
// add property
mountains: ['Everest', 'Fish Tail', 'Fuji'],
// method to print all the mountains
printWithDash: function () {
setTimeout(() => console.log(this.mountains.join(" - ")), 3000)
}
}
nepal.printWithDash()
let thingsToDo = {
morn... |
Java | UTF-8 | 4,251 | 2.1875 | 2 | [] | no_license | package pepepay.pepepaynative.backend.social31.handler.qrCode;
import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.Result;
import java.util.Arrays;
import me.dm7.barcodescanner.zxi... |
Java | UTF-8 | 2,521 | 2.09375 | 2 | [] | no_license | package org.techtown.ppackchinda.ui;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.IBinder;
import android.view.View;
import android.view.Window;
import android.widget.SeekBar;... |
Markdown | UTF-8 | 1,767 | 2.84375 | 3 | [] | no_license | ---
layout: post
title: Lecture Focuses On Computer System Monitoring The Monterey Bay
author: UCSC Currents
---
Fog, breezes, and shifting currents are part of life in Monterey Bay, but how they arise and evolve is shrouded in mystery. A computer system called the Real-time Environmental Information Network and Analy... |
Java | UTF-8 | 23,223 | 2.5625 | 3 | [] | no_license | package com.cg.Application.WFM;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.WebElement;
import com.cg.Logutils.HtmlResult;
import com.cg.SeleniumTestSetup.TestSetUp;
public class BusinessComponent_WFM_03 extends Tes... |
Markdown | UTF-8 | 1,303 | 2.71875 | 3 | [] | no_license | 生成控制器的两种方法
```
php artisan make:controller TestController
或者
php artisan make:controller TestController -r 【生成各个方法】
查看相关参数
php artisan make:controller -h
Description:
Create a new controller class
Usage:
make:controller [options] [--] <name>
Arguments:
name The name of ... |
C | UTF-8 | 3,425 | 2.828125 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "datos.h"
double xToFramePoint(double xp, int hres, int xmax, int xmin){
double xResult;
xResult = (double)((xp * hres) - (xmin * hres)) / ( double)(xmax - xmin);
return xResult;
}
double yToFramePoint(double yp, int vres, int ymax, int ymin){
d... |
C++ | UTF-8 | 902 | 3.03125 | 3 | [] | no_license |
#include "LRL_Cell.h"
#include "LRL_Cell_Degrees.h"
#include <iomanip>
#include <sstream>
#include <string>
const double pi = 4.0*atan(1.0);
const double twopi = 2.0*pi;
LRL_Cell_Degrees::LRL_Cell_Degrees(const LRL_Cell& cell) {
m_cell = cell.GetVector();
m_valid = cell.GetValid() && m_cell[3] < pi && m_cell... |
Shell | UTF-8 | 187 | 2.875 | 3 | [
"MIT"
] | permissive | #!/bin/sh
for f in /opt/node_exporter/*; do
bn=$(basename ${f%.sh})
${f} > /var/run/node_txtfile/${bn}.tmp
mv /var/run/node_txtfile/${bn}.tmp /var/run/node_txtfile/${bn}.prom
done
|
Python | UTF-8 | 6,454 | 3.8125 | 4 | [] | no_license | VERTICAL = 0
HORIZONTAL = 1
Y = 0
X = 1
UP = 'u'
DOWN = 'd'
LEFT = 'l'
RIGHT = 'r'
BOARD_SIZE = 7
CELL = 0
class Car:
"""
This class represents cars that are used in the rush hour game,
each car has a name, length, location and orientation, can move only in its
orientation and only one space.
"""
... |
Java | UTF-8 | 4,940 | 2 | 2 | [] | no_license | package com.example.school_bus.Fragment;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.viewpager2.adapter.FragmentStateAdapt... |
Shell | UTF-8 | 5,125 | 3.453125 | 3 | [] | no_license | #!/bin/bash
#SBATCH --job-name=test
#SBATCH --output=/home/mila/g/gagnonju/logs/faiss_dpr.txt
#SBATCH --error=/home/mila/g/gagnonju/logs/faiss_dpr.txt
#SBATCH --ntasks=1
#SBATCH --time=48:00
#SBATCH --gres=gpu:turing:1
#SBATCH --partition=unkillable
####################################################################... |
Markdown | UTF-8 | 12,452 | 3.09375 | 3 | [
"MIT"
] | permissive |
Like many of you here, I am trying to contribute
towards a renaissance in Africa.
The question of transformation in Africa
really is a question of leadership.
Africa can only be transformed by enlightened leaders.
And it is my contention that the manner in which
we educate our leaders is fundamental
to progress on thi... |
Markdown | UTF-8 | 105,655 | 2.609375 | 3 | [] | no_license | # THE WASPS
INTRODUCTION
"This Comedy, which was produced by its Author the year after the
performance of 'The Clouds,' may be taken as in some sort a companion
picture to that piece. Here the satire is directed against the passion of
the Athenians for the excitement of the law-courts, as in the former its
object ... |
PHP | UTF-8 | 577 | 2.75 | 3 | [] | no_license | <?php
require "mysql_connect.php";
$query = "SELECT `locationID`, AVG(`latitude`) AS 'avgLat' FROM `routes` GROUP BY `locationID`";
$result = mysqli_query($conn,$query);
$latitudes = [];
if ( mysqli_num_rows($result) > 0 ) {
while ( $row = mysqli_fetch_assoc($result) ) {
$latitudes[] = $row;
}
}
echo ... |
PHP | UTF-8 | 3,847 | 2.5625 | 3 | [] | no_license | <?php
//Chama a página de configuração e conexão com o banco de dados
include ('../connections/config.php');
include ('functions.php');
switch(@$_GET['var']){
case 'user':
//Criando variáveis e pegando os dados preenchidos no formulário
$email = $_POST['email'];
$username = $_POST['username']... |
Python | UTF-8 | 4,484 | 2.828125 | 3 | [
"MIT"
] | permissive | # This version is using the Flourish app to generate the animation
import csv
import os, sys
import numpy as np
import datetime
from utils import *
def clean_date_format(tmp_date):
# Transform date format
_date = tmp_date[0:4]+'-'+tmp_date[4:6]+'-'+tmp_date[6:8]
d_day = _date.split('-')
d = datetime.... |
Rust | UTF-8 | 2,062 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | // Copyright 2018 The Grin Developers
//
// 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... |
Java | UTF-8 | 324 | 1.851563 | 2 | [] | no_license | package pl.coderslab.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import pl.coderslab.model.Group;
import java.util.List;
public interface GroupRepository extends JpaRepository<Group, Long> {
List<Group> findGroupsByCompanyId(Long id);
List<Group> findGroupsByProductId(Long id);... |
Python | UTF-8 | 961 | 3.515625 | 4 | [] | no_license | fname = input("Enter file: ")
if len(fname) < 1:
fname = "clown.txt"
hand = open(fname)
dic = dict()
for line in hand:
line = line.rstrip()
words = line.split()
for word in words:
dic[word] = dic.get(word, 0) + 1 # idiom: retrieve/create/update counter
"""old_count = dic.get(word, 0... |
Rust | UTF-8 | 24,950 | 3.75 | 4 | [] | no_license | #![forbid(unsafe_code)]
#![warn(clippy::pedantic)]
use num_traits::{Bounded, CheckedSub, One, PrimInt, Zero};
/// Our own custom error enumeration, to provide better errors than
/// [`std::num::ParseIntError`].
#[derive(Debug, Clone, PartialEq)]
pub enum IntegerParseError {
/// The radix we received was invalid (... |
Java | UTF-8 | 1,433 | 1.84375 | 2 | [] | no_license | package wrappers;
//import java.io.FileNotFoundException;
import java.io.IOException;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeMethod;
import org.testng.a... |
C++ | UTF-8 | 1,647 | 3.28125 | 3 | [] | no_license | #include <iostream>
using namespace std;
bool BinarySearch(int a[], int n, int x)
{
int left = 0, right = n - 1;
while (left <= right)
{
int middle = (left + right) / 2;
if (a[middle] == x)
return true;
else if (a[middle] > x)
right = middle - 1;
... |
Python | UTF-8 | 725 | 2.671875 | 3 | [] | no_license | from selenium import webdriver
from selenium.webdriver.common.by import By
import time
driver = webdriver.Chrome(executable_path = "C:\Selenium\Browser\chromedriver.exe")
driver.get("https://www.selenium.dev/selenium/docs/api/java/index.html")
driver.get("http://demo.automationtesting.in/Windows.html")
driver.find_ele... |
Markdown | UTF-8 | 797 | 2.890625 | 3 | [] | no_license | ## 測試!測試!
因為很重要,所以要說兩遍!
但是⋯
你的專案支援自動化測試嗎?儘管測試的重要性,各位都已經聽到很厭倦了,但是有多少專案,真的有做到足夠的測試呢?
關於單元測試的書,以及相關框架的使用,坊間已經有太多書籍,所以不是這本書想要討論的主題。
在這本書裡面,我們專注於「網站自動化測試」。
筆者在參與工研院雲端中心的專案時,成功導入 Geb 網站自動化測試方案,並與 Jenkins CI 持續整合流程結合,成為在專案開發過程中,軟體品質的第一線守門員。
儘管 Web Test 的工具眾多,但是從來沒有一個工具像 Geb 如此易學易用,並且輕鬆達成各種測試案例的需求。
|
Markdown | UTF-8 | 857 | 3.359375 | 3 | [] | no_license | # Type Checking
JavaScript에서 변수나 상수를 선언할때에는 String에서 살펴본것과 같이 type을 정의하지 않고 Dynamic type이 된다.
하지만, 우리가 Type에 대해 확인을 하거나 데이터를 변환할 때는 정확한 결과를 예측하기 위해 Type을 체크해야 할 필요가 있다.
이때는 `Type of`를 사용하면 된다.
먼저 변수들을 선언해주자
```javascript
"use strict";
const string = "node.js";
const array = [];
const obj = {};
const number = ... |
Python | UTF-8 | 295 | 3.546875 | 4 | [] | no_license | f = open("numbers_even_odd.txt", "w")
f.write('42,43,44\n')
f.close()
f = open("numbers_even_odd.txt")
line = f.readline()
parts = line.split(',')
numbers = [int(p) for p in parts]
e = 0
d = 0
for x in numbers:
if((x)%2==0):
e+=1
d = len(numbers)-e
print(f"Even = {e} and Odd = {d}") |
Java | UTF-8 | 10,714 | 2.203125 | 2 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Controller;
import java.awt.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnect... |
Python | UTF-8 | 1,232 | 2.828125 | 3 | [] | no_license | """
@Description: This file is to clean the Guangzhou to Adelaide flight data
@Author: Liyuan Gu
@Time: 2019-10-03
"""
import pandas as pd
AdlFlightData = pd.read_excel('AirlineData_ADL.xlsx')
# To change the IATA code to common language.
AdlFlightData['DepartureAirport'].replace(
{'CAN T2': 'Guangzho... |
JavaScript | UTF-8 | 1,297 | 3.515625 | 4 | [] | no_license | let count = 0;
const value = document.querySelector('#value');
const btns = document.querySelectorAll('.btn');
// btns[0] mein btn-decrease, btns[1] mein btn-reset, btns[2] mien btn-inc
//The forEach() method calls a function once for each element in an array, in order.
btns.forEach(function (item) {
//elem... |
Java | UTF-8 | 277 | 1.882813 | 2 | [
"MIT"
] | permissive | package xyz.brassgoggledcoders.moarcarts.mods.ironchest.entities;
import net.minecraft.world.World;
/**
* @author SkySom
*/
public class EntityMinecartDiamondChest extends EntityMinecartIronChest
{
public EntityMinecartDiamondChest(World world)
{
super(world, 2);
}
}
|
Markdown | UTF-8 | 6,789 | 2.78125 | 3 | [
"MIT"
] | permissive | # Get Started
Transformers.jl contain multiple functionalities, from basic building block for a transformer model to using pretrained
model from huggingface. Each of them is put under different submodule in Transformers.jl.
You should find more examples in the [example folder](https://github.com/chengchingwen/Trans... |
Markdown | UTF-8 | 2,662 | 2.8125 | 3 | [
"MIT"
] | permissive | ---
title: 경상남도 창원시 의창구 - 북면 신촌리
date: Mon May 04 2020 00:00:00 GMT+0900
tags: [경상남도-창원시-의창구]
_site_name: 매일 업데이트 되는 아파트 실거래가
_title: 경상남도 창원시 의창구 북면 신촌리 아파트 실거래가
_description: 2020년 5월 4일 경상남도 창원시 의창구 북면 신촌리 아파트 실거래 정보입니다. 4건 아파트 정보가 있습니다.
_excerpt: 2020년 5월 4일 경상남도 창원시 의창구 북면 신촌리 아파트 실거래 정보입니다. 4건 아파트 정보가 있습니다.
_upda... |
Python | UTF-8 | 7,668 | 3.5625 | 4 | [] | no_license | import numpy as np
from src.dice import Dice
import matplotlib.pyplot as plt
# ------------------------------------------- #
# Aleatory Variable #
# ------------------------------------------- #
class AleatoryVariable:
def __init__(self, domain: np.ndarray, distribution: np.ndarray):
... |
Markdown | UTF-8 | 1,453 | 2.921875 | 3 | [] | no_license | # 1차원 배열
## [10818] 최소, 최대
주어진 숫자 중 가장 큰 수와 가장 작은 수를 구하는 문제. 입력 값을 배열로 가공해서 정렬해서 풀었다.
## [2562] 최대값
역시 배열로 가공 후 정렬해서 풀었다.
## [2577] 숫자의 개수
카운트를 집계할 배열을 초기화해두고 배열로 가공해서 처리.
## [3052] 나머지
입력값으로 10개의 자연수가 주어지고 42로 나눈 나머지가 몇가지 수인지 출력하는 문제. 첫번째 구현은 배열로 반복해서 연산을 처리하고 결과값은 set으로 만들어 중복 제거를 한뒤 size를 출력했다. 입력값이 잘못된 걸 알 ... |
Java | UTF-8 | 2,080 | 2.34375 | 2 | [] | no_license | package za.ac.cputassignment.Controller.person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.s... |
Markdown | UTF-8 | 3,943 | 3.546875 | 4 | [] | no_license | # Problem: Martian Robots
## The Problem
The surface of Mars can be modelled by a rectangular grid around which robots are able to
move according to instructions provided from Earth. You are to write a program that
determines each sequence of robot positions and reports the final position of the robot.
A robot posi... |
Python | UTF-8 | 21,314 | 2.703125 | 3 | [] | no_license | import pickle, pdb, os, glob, cv2
import matplotlib.pyplot as plt
import numpy as np
# convenience function for more readable code
def repeatAndJitter(x_val,x_len,jitter_magnitude): # for a given y vector, create an x vector that repeats the same value with random jitter.
x = list()
x.append(x_val)
x = x *... |
Python | UTF-8 | 2,585 | 3.109375 | 3 | [] | no_license | # How to handle Censoring
## Approach 1: Consider the cases for which we have the time
df_train_churn = df_train.query("Churn == 'Yes'")
df_test_churn = df_test.query("Churn == 'Yes'")
preprocessing_notenure = ColumnTransformer([
('scale', make_pipeline(SimpleImputer(strategy='median'), StandardScaler()), n... |
Markdown | UTF-8 | 2,413 | 2.546875 | 3 | [] | no_license | ---
layout: post
section-type: post
title: "css实现圆点加载动画"
date: 2017-09-04 09:00:00 +0800
categories: css
tag: css
---
* content
{:toc}
这篇文件介绍的动画是QQ邮箱APP里的加载动画,效果类似,但是不完全一样。实现过程不复杂,这里不详细解释了,直接上源码。
<!-- more -->
## 先看截图
<img src="http://oky1tshnu.bkt.clouddn.com/0904blog_dot_loading.png" width="30%">
... |
Markdown | UTF-8 | 1,010 | 2.640625 | 3 | [] | no_license | # Birdie - A Slack bot for ~~taking over the world~~ getting stuff done.
## Prerequisites
1. [Pip](https://pip.pypa.io/en/stable/installing/)
2. [Slack bot user API token](https://my.slack.com/services/new/bot)
## Installation
1. Clone the project and cd into the project directory.
```
git clone git@github.com:... |
Java | UTF-8 | 2,978 | 2.140625 | 2 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | /*
* Copyright (C) 2017 Jens Reimann <jreimann@redhat.com>
*
* 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 appli... |
Java | UTF-8 | 609 | 3.1875 | 3 | [] | no_license | package PractiseSet2;
public class MaxSubarray {
public static void main(String[] args) {
int[] nums = {-2,1,-3,4,-1,2,1,-5,4};
int[] sumArray = new int[nums.length];
sumArray[0] = nums[0];
for(int i = 1; i < nums.length; i++) {
if(sumArray[i-1] + nums[i] > nums[i])
... |
Java | UTF-8 | 524 | 3.5625 | 4 | [] | no_license | package primitiveTypes;
/*
* reverse 100011 to 110001
*/
public class reverseBits {
public static void reverseBitsMethod (long x) {
int b = 0;
while (x != 0) {
b <<= 1;
System.out.println("value of b <<=1 is " + b);
b |= (x&1);
System.out.println("value of b |= (x&1) is " + b);
x >>= 1;
Sy... |
Markdown | UTF-8 | 2,618 | 2.578125 | 3 | [] | no_license | # Linux源与镜像源配置分析.2.apt
参考文章
1. [关于ubuntu的sources.list总结](http://www.cnblogs.com/jiangz/p/4076811.html?utm_source=tuicool&utm_medium=referral)
2. [ubuntu添加ppa源(个人软件包集)简单方法](http://www.jbxue.com/LINUXjishu/26993.html)
apt的配置文件在 `/etc/apt`目录下, 虽然文件名不一样, 但配置结构与CentOS相似, `source.list`文件相当于`yum.conf`为主配置文件, `source.list.d... |
TypeScript | UTF-8 | 997 | 2.65625 | 3 | [] | no_license | import { UninformedSearch } from "./UninformedSearch";
import { NodePuzzle8 } from "./nodes/Puzzle8";
import { diagramTemplate } from "./print-data";
import { readFromFile, writeToFile } from "./utils";
// extract initial state and final state from json file
const { initialState, finalState } = readFromFile("input.jso... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.