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 |
|---|---|---|---|---|---|---|---|
Markdown | UTF-8 | 7,204 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | # Integrate Exemplars with Metrics
This OTEP adds exemplar support to aggregations defined in the Metrics SDK.
## Definition
Exemplars are example data points for aggregated data. They provide specific context to otherwise general aggregations. For histogram-type metrics, exemplars are points associated with each bu... |
C++ | UTF-8 | 7,243 | 3 | 3 | [
"MIT"
] | permissive | #include "interfazCursos.h"
#include "interfazPrincipal.h"
#include "contenedorEscuelas.h"
#include "grupoProfesores.h"
#include "contenedorCursos.h"
#include "curso.h"
#include <iostream>
#include <conio.h>
#include <Windows.h>
using namespace std;
char Interfaz_Cursos::vMenuCursos()
{
char ans;
cout << "**********... |
Markdown | UTF-8 | 561 | 2.546875 | 3 | [] | no_license | # iTerm-ssh
iTerm 2 Plugin for Colouring SSH Connections
## Usage
This plugin must be put into the plugin directory with `oh-my-zsh`, this can either be the default one or the custom defined one.
Once it's been put into the correct directory add the plugin name into the **plugin array** in your `.zshrc`. The follow... |
Python | UTF-8 | 1,364 | 2.640625 | 3 | [] | no_license | #!/usr/bin/env python
import random
from slackclient import SlackClient
import time
from supporting_functions import parseInput, rollSomeDie, getDieResult,\
buildWeaponDictFromFile, getAllWeaponTypes
# Insert slack token
slack_token = ""
slack_conn = SlackClient(slack_token)
# Insert bot ID
at_bot = ""
def ... |
Java | UTF-8 | 473 | 1.757813 | 2 | [] | no_license | package com.tenone.gamebox.mode.able;
import android.content.Context;
import android.content.Intent;
import com.tenone.gamebox.mode.mode.OpenServiceNotificationMode;
import java.util.List;
public interface NotificationDetailsAble {
String getTitle(Intent intent);
List<OpenServiceNotificationMode> g... |
Go | UTF-8 | 399 | 3.0625 | 3 | [] | no_license | package uuid
import (
"math/rand"
"time"
)
func init() {
rand.Seed(time.Now().UnixNano())
}
const Base62 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
// UniqueFilename 文件名唯一表示 len:字符串长度
func UniqueFilename(length int) string {
vb := make([]byte, length)
for i, _ := range vb {
n := rand... |
PHP | UTF-8 | 3,054 | 2.625 | 3 | [] | no_license | <?php
namespace App\Model;
use App\Model\Conexao;
use PDO;
class Usuario
{
function __construct()
{
$this->connection = new Conexao();
}
public function add($request)
{
$usuario = $request->getParam('usuario');
$email = $request->getParam('email');
$senh... |
JavaScript | UTF-8 | 5,877 | 2.859375 | 3 | [] | no_license | "use strict";
import * as itbooks from "./itbookapi.js";
import * as db from "./datastore.js";
function writeBookElement(book, target) {
let bookElement = document.createElement("div");
bookElement.classList.add("book", "grid");
let bookCover = document.createElement("img");
bookCover.setAttribute("s... |
JavaScript | UTF-8 | 881 | 3.09375 | 3 | [] | no_license |
const app = {
title:'Indecision App',
subTitle:'This is a demo test',
options:['one','two','three']
};
// console.log("App.js is running")
const template=(
<div>
<h1>{app.title}</h1>
{app.subTitle && <p>Subtitle : {app.subTitle}</p>}
{app.options && app.options.length > 0 ? "Here are your... |
Markdown | UTF-8 | 1,137 | 2.625 | 3 | [] | no_license | # Memoire-M2
Ce repository contient tous les documents en relation avec mon mémoire de stage de deuxième de master "Technologies numériques appliquées à l'histoire" à l'École nationale des Chartes.
En plus du README, le repository contient deux dossiers et un PDF :
* Le dossier "Livrable technique" contient différe... |
C | UTF-8 | 8,768 | 2.875 | 3 | [] | no_license | #include "Origa_Nvm.h"
const ULONG g_culNvmTimeout = System_CyclesToNvmOut(System_MicrosToCycles(20000u)); /* 20ms */
/* ****************************************************************************
name: Nvm_ProgramData()
function: program desired data values into ORIGA NVM address space.
... |
PHP | UTF-8 | 3,798 | 2.625 | 3 | [] | no_license | <?php
include("login.php");
if(isset($_SESSION['login_user']))
{
header("Location: usuario.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<?php
include("template.php");
?>
</head>
<body>
<div>
<h1 class="mb-3">... |
Markdown | UTF-8 | 1,120 | 2.625 | 3 | [] | no_license |
## Table of contents
* [General info](#general-info)
* [Technologies](#technologies)
* [Libraries](#libraries)
* [Setup](#setup)
## General info
This project is based on Netmiko and Jinja ,this programme will build a configuration file from Jinja Template and pushes that file inividualy to each Devices.
When the pro... |
JavaScript | UTF-8 | 1,839 | 3.59375 | 4 | [] | no_license | for(var index = 0; index < 5; index++) {
setTimeout(() => {
console.log("After Seconds "+ (index+1)); //3- "1 second, 3rd second, 5 second"
}, 1000);
}
// console.log("File Name", __filename);
// console.log("Directory Name", __dirname);
// global.persons = [
// {id : 1, name : "J... |
C++ | UTF-8 | 1,612 | 3.0625 | 3 | [] | no_license |
//
// myString.cpp
// Hw5
//
// Created by Emil Iliev on 1/13/16.
// Copyright © 2016 Emil Iliev. All rights reserved.
//
#include "myString.hpp"
#include <string.h>
#include <iostream>
MyString::MyString(){
setLength(0);
allocatedLength = 1;
this->data = new char[allocatedLength];
data[0] = ... |
Java | UTF-8 | 4,688 | 3.09375 | 3 | [] | no_license | package ArvoreBinaria;
public class Tree {
private No root;
public Tree() {
this.root = null;
}
public void insert (double value) {
No neww = new No();
neww.item = value;
neww.right = null;
neww.left = null;
if(root == null)
root = neww;
else {
No current = root;
No previos;
w... |
TypeScript | UTF-8 | 1,035 | 2.6875 | 3 | [] | no_license | import { Song } from './Song';
export class Album {
private _songs: Song[];
public get songs(): Song[] {
return this._songs;
}
private _name: string;
public get name(): string {
return this._name;
}
public set name(v: string) {
this._name = v;
}
private _au... |
Java | UTF-8 | 672 | 3.640625 | 4 | [] | no_license | package com.techlab.unittesting;
import java.lang.reflect.Type;
public class UnitTestingExample {
public int cubeOfEven(int number) throws Exception {
int cubeOfEvenNumber;
if (number % 2 == 1) {
throw new Exception("Dont pass odd numbers");
}
if (number == (double) number) {
throw new Exception("Dont ... |
PHP | UTF-8 | 4,762 | 2.65625 | 3 | [] | no_license | <?php
/*
* 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; version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without e... |
Java | UTF-8 | 653 | 2.25 | 2 | [] | no_license | package com.it.SpringPublisher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;
@Component
public class SpringServer1 {
private SpringSe... |
PHP | UTF-8 | 5,559 | 2.59375 | 3 | [] | no_license | <?php
session_start();
require_once '../../model/connection.php';
require_once '../../model/usersModel.php';
require_once '../../model/categoriesModel.php';
require_once '../../model/orderModel.php';
require_once '../../model/pagesModel.php';
$categories = getAllCategoriesForNavigation($connection);
$pagesNavigation =... |
C# | UTF-8 | 632 | 2.828125 | 3 | [
"MIT"
] | permissive | using System;
using System.Reflection;
namespace ObservableComputations.ExtentionMethods
{
internal static partial class ExtensionMethods
{
public static bool IsReadOnly(this MemberInfo memberInfo)
{
PropertyInfo propertyInfo = memberInfo as PropertyInfo;
if (propertyInfo != null)
... |
PHP | UTF-8 | 1,103 | 2.78125 | 3 | [] | no_license | <?php
namespace RateHub\NewRelic\Exceptions;
use RateHub\NewRelic\Contracts\Exceptions\ExceptionFilter;
final class AggregateExceptionFilter implements ExceptionFilter
{
/**
* @var ExceptionFilter[]
*/
private $exceptionFilters;
/**
* @param ExceptionFilter[] $exceptionFilters
*/
... |
Java | UTF-8 | 794 | 2.109375 | 2 | [] | no_license | package com.cts.training.SeriesModelService.controller;
import java.util.List;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import com.cts.training.SeriesModelService.model.ModelModel;
import com.cts.training.SeriesModelService.model.SeriesModel;
impo... |
Python | UTF-8 | 460 | 3.65625 | 4 | [] | no_license | def printSubSequences(STR, subSTR=""):
"""
function:
To print all subsequences of string
concept:
Pick and Don’t Pick
variables:
STR = string
subSTR = to store subsequence
"""
if len(STR) == 0:
print(subSTR, end=" ")
return
... |
Ruby | UTF-8 | 1,534 | 3.328125 | 3 | [] | no_license | require './test/test_helper'
require './lib/writer'
class WriterTest < Minitest::Test
def test_it_is_a_thing
write = Writer.new
assert_instance_of(Writer, write)
end
def test_can_convert_single_letter_to_array_of_braille
writer = Writer.new
assert_equal(["0.", "..", ".."], writer.convert("a"))
... |
Rust | UTF-8 | 9,815 | 2.640625 | 3 | [
"MIT"
] | permissive | // Copyright (c) 2018 10X Genomics, Inc. All rights reserved.
// This file contains an equivalence relation struct. There is a literature on
// this and multiple rust implementations of sophisticated algorithms, see:
//
// 1. https://en.wikipedia.org/wiki/Disjoint-set_data_structure
// 2. https://crates.io/crates/uni... |
Java | UTF-8 | 3,266 | 3.046875 | 3 | [] | no_license | package Parser;
import java.io.*;
import java.util.ArrayList;
import Compile.Translator;
import DataTypes.Token;
import Errors.InvalidSyntaxException;
import SharedResources.InputType;
public class Lexer {
private static String buffer = "";
private static ArrayList<Token> tokens = new ArrayList<>();
pr... |
Java | UTF-8 | 258 | 1.515625 | 2 | [] | no_license | package com.ms.test.repository;
import org.springframework.data.repository.CrudRepository;
import com.ms.test.beans.Message;
/**
* MessageRepository
* @author Manish
*
*/
public interface MessageRepository extends CrudRepository<Message, Integer> {
} |
C# | UTF-8 | 1,404 | 2.625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace TrustyLadder.Models.DataGridModels
{
public class InMemoryServicesDataGridContext
{
const string SessionKey = "8c6f2106-d4fA-4057-b267-55afa3cf3890";
public ICollection<ServicesDataGrid> Services
... |
Java | UTF-8 | 986 | 2.109375 | 2 | [] | no_license | package entidades;
public class reclaTecniProce {
private String car_proc_pendiente;
private int plazo;
private String cod_agrupacion;
private int plazo_adic1;
private int plazo_adic2;
public void setCarProcPendiente(String car_proc_pendiente) {
this.car_proc_pendiente = car_proc_pendiente;
... |
JavaScript | UTF-8 | 291 | 3.03125 | 3 | [] | no_license | var d = new Date();
var dob = new Date("September 12, 2019");
var dtime = d.getTime();
var dobtime = dob.getTime();
var msDiff = dobtime - dtime;
console.log(msDiff);
var dateDiff = msDiff/(1000*60*60*24);
console.log(dateDiff);
dateDiff = Math.floor(dateDiff);
console.log(dateDiff);
|
C | UTF-8 | 11,287 | 3.046875 | 3 | [] | no_license | #include <geekos/fmt.h>
#include <math.h>
/* HELPER FUNCTIONS */
int minimum(int a, int b){
if(a < b)
return a;
return b;
}
//gets the block number for a <inode index>
int getBlockForIndex(int index){
int number_of_i_node_per_block = BLOCK_SIZE/sizeof(Inode);
return i_node_manager->start_i_node_blo... |
Java | UTF-8 | 16,149 | 3.421875 | 3 | [] | no_license | package fr.istic.prg1.tp6;
import java.util.Scanner;
import fr.istic.prg1.tp6.util.AbstractImage;
import fr.istic.prg1.tp6.util.Iterator;
import fr.istic.prg1.tp6.util.Node;
import fr.istic.prg1.tp6.util.NodeType;
/**
* @author Juvenal Attoumbre && Emilie DaConceicao
* @version 5.0
* @since 2021-11-22
*
* ... |
C++ | UTF-8 | 671 | 2.734375 | 3 | [
"MIT"
] | permissive | /*
* test.cpp
*
* Created on: 2017/03/09
* Author: tkato
*/
#include <stdio.h>
#include <stdlib.h>
#include "mmult_accel.h"
int main(void) {
int *x, *w, *y;
#define N_X 32
#define N_H 32
int n_x[] = {256,32,32};
int n_h[] = {32,32,10};
for (int i = 0; i < 3; i++) {
x = (int *) malloc(n_x[i] * siz... |
Go | UTF-8 | 3,201 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | package couch
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net/http"
"strings"
"github.com/go-kivik/kivik"
)
type statusErr interface {
StatusCode() int
}
func (d *DataService) CopyRoom(ctx context.Context, src, dst string) error {
rooms := d.client.DB(ctx, "rooms")
uiConfigs := d.client.DB(ctx, "ui-conf... |
Java | UTF-8 | 7,000 | 1.914063 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2016 Red Hat, Inc. and/or its affiliates.
*
* 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 a... |
PHP | UTF-8 | 1,805 | 2.84375 | 3 | [] | no_license | <?php
/**
* This is a generated class based on the schema.org type catalog.
*
* @license MIT
*/
declare(strict_types=1);
namespace EFrane\SchemaObjects;
/**
* A short TV or radio program or a segment/part of a program.
*/
class Clip extends CreativeWork
{
/**
* Position of the clip within an ordered ... |
C++ | UTF-8 | 10,965 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | // Copyright 2017 Google Inc.
//
// 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 agreed to in ... |
Python | UTF-8 | 1,266 | 2.84375 | 3 | [
"MIT"
] | permissive | """
Utility functions.
"""
from uuid import UUID
from functools import singledispatch
from .models import FeedbackForm, Placement
class dotdict(dict):
"""
dot.access to dict attributes, even across nested dictionaries.
"""
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__
def __g... |
JavaScript | UTF-8 | 2,048 | 2.59375 | 3 | [] | no_license | (function(){
/* Global YUITest, CSSLint */
var Assert = YUITest.Assert;
YUITest.TestRunner.add(
new YUITest.TestCase({
name: "A-To-Z Property Order Errors",
"Properties that are not ordered alphabetically (excluding vendor-specific) should result in a warning (simple)": function()... |
Ruby | UTF-8 | 1,475 | 3.765625 | 4 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | require 'pry'
class Pokemon
attr_accessor :id, :name, :type, :db
def initialize(args)
@name = args[:name]
@type = args[:type]
@db = args[:db]
@id = args[:id]
end
def self.save(name, type, db)
sql = "INSERT INTO pokemon (name, type) VALUES (?, ?)"
db.execute(sql, name, type)
end
... |
C++ | UTF-8 | 958 | 2.796875 | 3 | [] | no_license | #include <cstdlib>
#include <string>
#include "DVD.h"
using namespace std;
DVD::DVD(string Title,string Category,string Runtime,string Studio,string releaseDate){
this->Title = Title;
this->Category = Category;
this->Runtime = Runtime;
this->Studio = Studio;
this->releaseDate = releaseDate;
}
... |
Shell | UTF-8 | 420 | 3.28125 | 3 | [
"MIT"
] | permissive | #!/bin/bash
set -e
# parse command line arguments
cuda=false
for key in "$@"; do
case $key in
--cuda)
cuda=true
;;
esac
done
# install requirements
./tensorflow_cc/ubuntu-requirements.sh
if $cuda; then
# install libcupti
apt-get -y install cuda-command-line-tools-11-6
fi
apt... |
Java | UTF-8 | 550 | 1.859375 | 2 | [] | no_license | package com.ebizprise.das.form.base;
import java.util.List;
public class DvdForm {
private String currency;
private List dividends;
private String assetId;
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public List getDividends()... |
Java | UTF-8 | 876 | 1.742188 | 2 | [] | no_license | package com.jjxt.ssm.service;
import java.util.List;
import java.util.Map;
import com.jjxt.ssm.entity.SignMatchExt;
import com.jjxt.ssm.utils.DataSource;
public interface SignMatchExtService {
@DataSource("master")
public List<SignMatchExt> findPageList(Map<String, Object> map) throws Exception;
@DataSource("mast... |
C# | UTF-8 | 3,021 | 3.421875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace LazyLoading
{
public class LazyLoadingCalculator
{
string inputPath;
string outputPath;
const int minimumApparentWeight = 50;
public ... |
Markdown | UTF-8 | 2,045 | 3.390625 | 3 | [] | no_license | # Promise
Promise is a async program solution, it is a contructor.It has three status: Pending, Resolved, Rejected.
### base demo 1
```javascript
var _promise = new Promise(function(resolve, reject) {
if(/* finish async operation */) {
resolve(value);//The params will be passed to callback func
} el... |
Python | UTF-8 | 207 | 3.046875 | 3 | [] | no_license | import numpy as np
from matplotlib.pyplot import plot, show, xlabel, ylabel
def f(x, t):
return np.exp(-(x-3*t)**2)*np.sin(3*np.pi*(x-t))
t = 0
x = np.linspace(-4, 4, 41)
y = f(x, t)
plot(x, y)
show() |
Python | UTF-8 | 3,517 | 2.515625 | 3 | [] | no_license | #!/usr/bin/python
#
# Copyright (c) 2015 EMC Corporation
# All Rights Reserved
#
# This software contains the intellectual property of EMC Corporation
# or is licensed to EMC Corporation from third parties. Use of this
# software and the intellectual property contained therein is expressly
# limited to the terms and c... |
Java | UTF-8 | 2,428 | 2.140625 | 2 | [] | no_license | package com.course22056.sherlock4;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import and... |
Python | UTF-8 | 1,350 | 3.296875 | 3 | [] | no_license | import multiprocessing as mp
import random
import string
# Define an output queue
output = mp.Queue()
# define a example function
def rand_string(length, pos, output):
""" Generates a random string of numbers, lower- and uppercase chars. """
rand_str = ''.join( random.choice(string.ascii_lowercase + string.as... |
Python | UTF-8 | 1,185 | 3.8125 | 4 | [] | no_license | class Account:
def __init__(self,name,balance,min_balance):
self.name=name
self.balance=balance
self.min_balance=min_balance
def deposite(self,amount):
self.balance+=amount
def withdraw(self,amount):
if self.balance-amount >= self.min_balance:
... |
C# | UTF-8 | 873 | 2.859375 | 3 | [] | no_license | using Logistics.DB;
using System.Collections.Generic;
using System.Linq;
namespace Logistics.Core
{
public class LogisticsServices : ILogisticsServices
{
private LogisticsContext _context;
public LogisticsServices(LogisticsContext context)
{
_context = context;
}
... |
C# | UTF-8 | 6,208 | 2.59375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
namespace Graphics3D
{
class ParticleEmitter
{
private Vector3 position;
private Texture2D partic... |
Python | UTF-8 | 316 | 3.328125 | 3 | [] | no_license |
# coding: utf-8
# In[1]:
i=2000
x=''
while i<=3000:
#print (i)
if i%7==0 and i%5!=0:
x=x+','+str(i)
i=i+1
print (x[1:len(x)])
# In[3]:
print("Enter FirstName:")
x=input()
print("Enter LastName:")
y=input()
print(y+' '+x)
# In[10]:
d=12
r=12/2
pi=3.14
V=4/3*pi*r**3
print(V)
|
TypeScript | UTF-8 | 2,860 | 2.734375 | 3 | [
"MIT"
] | permissive | import suite, { fixture } from "../test-suite";
import { join } from "path";
import * as tmp from "tmp";
import { EventEmitter } from "events";
import * as sf from "./sf";
suite(__filename, s => {
s.case("exists", async t => {
t.true(await sf.exists(fixture.path("empty")));
t.false(await sf.exists(fixture... |
JavaScript | UTF-8 | 9,595 | 3.140625 | 3 | [] | no_license | /**
* Class to create Comparison Country/Region input field + tags
*/
class ComparisonWidget {
/**
* Class constructor
* @param {Selected} _selected
* @param {Object} _constants = {regionMapper, countries, regions, dispatcherEvents}
* @param {Object} _dispatcher : d3 dispatcher
*/
c... |
PHP | UTF-8 | 704 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Bermuda\Validation\Rules;
use Bermuda\Validation\NullValidationDataException;
/**
* @method string|bool validate
*/
final class Required implements RuleInterface, ValidationDataAwareInterface
{
use RuleTrait, ValidationDataTrait;
public function __construct(private string $columnName, ?stri... |
Python | UTF-8 | 3,178 | 2.65625 | 3 | [] | no_license | import pandas as pd
import csv
import os
import json
import sys
from Models.Auction import *
from Models.Time import *
from decimal import Decimal
import pyodbc
import requests
from bs4 import BeautifulSoup
import numpy as np
import urllib.request
class Surplus(object):
_instance = None
auctionList = []
a... |
Markdown | UTF-8 | 7,733 | 2.765625 | 3 | [
"MIT"
] | permissive | # 브라우저 탐지
브라우저 탐지 방법은 웹 개발에서 항상 뜨거움 쟁점입니다. 이 논쟁은 특히 과거에 가장 인기 있었떤 넷스케이프 내비게이터의 등장으로 더 일찌감치 시작되었습니다. 당시 넷스케이프2.0은 다른 웹 브라우저보다 훨씬 발달하여 웹사이트가 사용자에게 정보를 보내기 전에 사용자 에이전트 문자열을 확인하는 것도 가능했습니다. 이 때문에 많은 브라우저 공급사, 특히 마이크로소프트에서는 어쩔 수 없이 당시 쓰였던 브라우저 탐지 방법에 맞춰 사용자 에이전트 문자열을 넣게 되었습니다.
## 6.1 사용자 에이전트 탐지
요즘에는 클라이언트에서 브라우저를 주로 탐지하지... |
PHP | UTF-8 | 4,793 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
class extension_reflecteduploadfield extends Extension
{
/*------------------------------------------------------------------------*/
/* DEFINITION & SETTINGS
/*------------------------------------------------------------------------*/
/**
* Name of the extension field table
* @var str... |
Swift | UTF-8 | 1,958 | 3.125 | 3 | [] | no_license | //
// DailyLogView.swift
// WaterApp
//
// Created by Aiur on 15.11.2020.
//
import SwiftUI
private struct LogItem: View {
@State var day: DailyLog
var body: some View {
ZStack {
RoundedRectangle(cornerRadius: 25)
.fill(Color.white)
.shadow(color: .g... |
Markdown | UTF-8 | 1,552 | 3.828125 | 4 | [] | no_license | # Burger Town
### Problem the app addresses
This app allows you to enter a hamburger name and update the database to store that new name. It then allows you to change the status of that hamburger to devoured and change it to a separate list on the webpage.
### How the app is layed out
The app has essentially three se... |
Java | UTF-8 | 290 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | package com.example;
public class ChatBotLogic {
public String chatBotProcess(String message) {
if( "do-not-reply".equals(message) ) {
return null; // no response in the chat
}
return "echo from the bot: " + message; // echoes the message
}
} |
Markdown | UTF-8 | 2,525 | 2.65625 | 3 | [] | no_license | # GitHub action for WordPress.org Plugin Deployment
This actions uses the content in the latest pushed tag, runs the build process inside the repository root and copies latest files excluding specified files and commits to WP.org plugin directory.
If an assets directory is provide it will be used to update assets dire... |
C# | UTF-8 | 1,378 | 3.328125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lab2
{
public enum Material
{
PINE = 0,
OAK = 1,
STEEL = 2,
SILVER = 3,
GOLD = 4
}
public enum Style
{
SIMPLE = 0,
... |
Python | UTF-8 | 1,429 | 4.34375 | 4 | [] | no_license | # 正则表达式
# 给你一个字符串 s 和一个字符规律 p,请你来实现一个支持 '.' 和 '*' 的正则表达式匹配。
#
# '.' 匹配任意单个字符
# '*' 匹配零个或多个前面的那一个元素
# 所谓匹配,是要涵盖 整个 字符串 s的,而不是部分字符串。
#
# 说明:
# s 可能为空,且只包含从 a-z 的小写字母。
# p 可能为空,且只包含从 a-z 的小写字母,以及字符 . 和 *。
# 示例 1:
# 输入:
# s = "aa"
# p = "a"
# 输出: false
# 解释: "a" 无法匹配 "aa" 整个字符串。
# 示例 2:
# 输入:
# s = "aa"
# p = "a*"
# 输出: tr... |
C# | UTF-8 | 1,176 | 2.921875 | 3 | [] | no_license | ////////////////////////////////////////////////////////////
///// WatchedObject.cs
///// James McNeil - 2020
////////////////////////////////////////////////////////////
using System.Collections.Generic;
using UnityEngine;
namespace PersonalFramework
{
public class WatchedObject : MonoBehaviour
{
... |
C# | UTF-8 | 2,451 | 2.828125 | 3 | [] | no_license | using System.Collections;
using UnityEngine;
namespace TimeOfTheDay
{
public class GameTimeHandler : MonoBehaviour
{
public int DayLengthInSeconds;
public bool isEnabled;
public delegate void GameTimeEventHandler();
public event GameTimeEventHandler OnAfterValueChangedEvent;
... |
Python | UTF-8 | 810 | 3.609375 | 4 | [] | no_license | #python3
import sys
def fibonacci_number_naive(num):
f_1, f_2 = 0,1
temp = 0
for _ in range(0, num):
temp = f_1 + f_2
f_1 = f_2
f_2 = temp
return f_1
def fibonacci_number_reccursive(num):
if((num == 0) or (num == 1)):
return num
else:
return fibonac... |
PHP | UTF-8 | 1,137 | 2.703125 | 3 | [] | no_license | <?php
// report all errors
error_reporting(E_ALL);
ini_set('display_errors', 1);
// include the class file
require_once '../Contact/Vcard/Build.php';
// instantiate a builder object
// (defaults to version 3.0)
$vcard = new Contact_Vcard_Build();
// set a formatted name
$vcard->setFormattedName('Brandon... |
C | UTF-8 | 815 | 3.65625 | 4 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
int gen_array(int *arr, int n) {
int i = 0;
while (n) {
arr = realloc(arr, (i + 1) * sizeof(int));
int d = n % 10;
n /= 10;
arr[i] = d;
++i;
}
int l = i;
for (int j = 0; j< l/2; ++j){
int t = arr[j];
arr[... |
C# | UTF-8 | 160 | 2.625 | 3 | [] | no_license | using System;
using System.Linq;
class P
{
static void Main()
{
Console.WriteLine(Console.ReadLine().Split().Select(int.Parse).Min());
}
}
|
Java | GB18030 | 7,544 | 2.40625 | 2 | [
"Apache-2.0"
] | permissive | package com.cloudfire.dao.impl;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import com.cloudfire.dao.OperationDao;
import com.cloudfire.db.DBConn... |
Python | UTF-8 | 1,159 | 3.015625 | 3 | [] | no_license | #!/usr/bin/python
# epivot.py - calculate the pivot energy from PL2 fit parameters
# See: http://tinyurl.com/epivot for further details
# Stephen Fegan - sfegan@llr.in2p3.fr - 2011-03-31
# $Id$
import math
import sys
if len(sys.argv) != 7:
print """Usage %s K g CKg Cgg E1 E2
Calculate the pivot energy from the ... |
Java | UTF-8 | 4,716 | 2.4375 | 2 | [] | no_license | package org.serger.servlets;
import org.serger.controller.ActionRest;
import org.serger.controller.ActionResult;
import org.serger.controller.ControllerException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotatio... |
Markdown | UTF-8 | 9,505 | 2.96875 | 3 | [
"MIT"
] | permissive | # Dynamic Django Forms
## Looking for Maintainer
I haven't used Django in years, and am not actively maintaining this package.
If anyone is interested in maintaining this package, either on this repo or
as a fork, please let me know in a new issue!
## Anyways...
**dynamic-django-forms** is a simple, reusable app th... |
Python | UTF-8 | 2,489 | 2.71875 | 3 | [] | no_license | #!/usr/bin/env python
#
# server-version.py: print a Subversion server's version number
#
# USAGE: server-version.py URL
#
# The URL can contain any path on the server, as we are simply looking
# for Apache's response to OPTIONS, and its Server: header.
#
# EXAMPLE:
#
# $ ./server-version.py http://svn.collab.net/
# ... |
Markdown | UTF-8 | 1,362 | 2.734375 | 3 | [
"MIT"
] | permissive | # Gradiance
**ATENÇÃO**: Tente fazer e entender as questões do Gradiance antes de ler esse documento.
Nessa página você irá encontrar as respostas com explicações delas
Esse github não providência as respostas sem explicações[.](https://github.com/thiagola92/PUC-INF1015/tree/0a21d31cd10dd1b2e7df2e0877fe30bb7040144... |
Python | UTF-8 | 4,267 | 2.5625 | 3 | [
"MIT"
] | permissive | # PyTorch Lightning Imports
import pytorch_lightning as pl
from pytorch_lightning.metrics.functional import accuracy
from pytorch_lightning.loggers import TensorBoardLogger
# PyTorch Imports
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.functional import cross_entropy
from torch.util... |
C | UTF-8 | 9,914 | 2.5625 | 3 | [] | no_license |
#include "axdr.h"
#include <stdio.h>
#include <string.h>
#include <assert.h>
typedef enum
{
DLMS_null_data = 0,
DLMS_array = 1,
DLMS_structure = 2,
DLMS_boolean = 3,
DLMS_bit_string = 4,
DLMS_integer32 = 5,
DLMS_unsigned32 ... |
Python | UTF-8 | 899 | 2.96875 | 3 | [] | no_license | # Converts .json to .sql
import json
with open('./data/documents.json') as json_file:
data = json.load(json_file)
with open("./data/documents.sql", "a") as myfile:
i = 1
for row in data:
if (i % 100 == 0):
print(i)
url = row["url"].trans... |
C | UTF-8 | 10,741 | 3.546875 | 4 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
//Definimos los Struct
//Estructura de Alumno
typedef struct Alumno{
int boleta;
struct Alumno *sigAlumno;
}nodoAlumno;
//Estructura de Listas que contienen Alumno
typedef struct Lista {
struct Alumno *start;
}Lista;
//Fu... |
TypeScript | UTF-8 | 1,083 | 2.578125 | 3 | [] | no_license | import { Ingrediant } from "../shared/ingrediant.model";
import { Subject } from 'rxjs';
export class ShoppingListService{
ingrediantChanged = new Subject<Ingrediant[]>();
startedEditing = new Subject<number>();
ingrediants: Ingrediant[] = []
getIngrediants(){
return this.ingrediants.s... |
C++ | UTF-8 | 2,201 | 3.609375 | 4 | [] | no_license | #include "Maze.hpp"
#include <fstream>
#include <sstream>
#include <iostream>
using std::ifstream;
using std::istringstream;
using std::cout;
using std::endl;
Maze::Maze(string mazeFilename)
{
ifstream mazeFile(mazeFilename);
string line;
int i = 0;
while (getline(mazeFile, line))
{
... |
C# | UTF-8 | 673 | 2.890625 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/* Adds 1.0f to player when
* it picks up the health potion.
*/
public class HealthPotion : MonoBehaviour {
public int healthAmt = 5;
PlayerCharacter pc;
// Use this for initialization
void Awake()
{
pc = FindOb... |
C | UTF-8 | 3,589 | 2.8125 | 3 | [] | no_license | /**
* loop.c -- handling loop devices
*
* Author: Vincent Fourmond <fourmond@debian.org>
* Copyright 2011 by Vincent Fourmond
*
* This software is distributed under the terms and conditions of the
* GNU General Public License. See file GPL for the full text of the license.
*/
#include <stdio.h>
#incl... |
TypeScript | UTF-8 | 637 | 3.140625 | 3 | [
"MIT"
] | permissive | type DataType = {
検査実施人数: number
陽性患者数: number
入院中: number
退院: number
死亡: number
}
type ConfirmedCasesType = {
検査実施人数: number
陽性患者数: number
入院中: number
退院: number
死亡: number
}
/**
* Format for *Chart component
*
* @param data - Raw data
*/
export default (data: DataType) => {
const formatted... |
JavaScript | UTF-8 | 6,608 | 2.546875 | 3 | [
"MIT"
] | permissive | App = {
web3Provider: null,
contracts: {},
account: '0x0',
init: function () {
return App.initWeb3();
},
initWeb3: function () {
// TODO: refactor conditional
if (typeof web3 !== 'undefined') {
// If a web3 instance is already provided by Meta Mask.
App.web3Provider = web3.currentP... |
Python | UTF-8 | 819 | 2.515625 | 3 | [] | no_license | import pandas as pd
df=pd.read_csv("helper_data/data.csv")
tohave=df["Unnamed: 0"].tolist()
colors= [
'#1f77b4',
'#ff7f0e',
'#2ca02c',
'#d62728',
'#9467bd',
'#8c564b',
'#e377c2',
'#7f7f7f',
'#bcbd22',
'#17becf'
]
df_2=pd.read_csv("helper_data/Diagnosis_imp... |
PHP | UTF-8 | 1,256 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace BSForm\Types;
use BSForm\Interfaces\FieldInterface;
use BSForm\Interfaces\FieldContainerInterface;
use BSForm\Traits\FieldContainerTrait;
use BSForm\Traits\IndentableTrait;
use BSForm\Traits\SearchableTrait;
class ColumnType implements FieldInterface, FieldContainerInterface
{
use Searc... |
Python | UTF-8 | 5,329 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | #!/usr/bin/env python
# Copyright (c) 2014, Paessler AG <support@paessler.com>
# All rights reserved.
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
# 1. Redistributions of source code must retain the above copyright not... |
C# | UTF-8 | 3,080 | 3.234375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using KeyManagerData;
using System.Data.SQLite;
namespace KeyManagerClassLib
{
public class Location : IComparable<Location>
{
// list property
public List<Door> doors = new List... |
C | UTF-8 | 10,422 | 3.078125 | 3 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | /*
* Name: svstack.c
* Description: Stacks.
* Author: cosh.cage#hotmail.com
* File ID: 0318171803E0530191456L00306
*
* The following text is copied from the source code of SQLite and padded
* with a little bit addition to fit the goals for StoneValley project:
*
* The author disclaims ... |
Python | UTF-8 | 2,720 | 2.5625 | 3 | [
"MIT"
] | permissive | import sys
sys.path.append("../")
import time
import cv2
import torch
import numpy as np
from duckietown_rl.gym_duckietown.simulator import Simulator
from duckietown_rl.ddpg import DDPG
from _loggers import Logger
env = Simulator(seed=123, map_name="zigzag_dists", max_steps=5000001, domain_rand=True, camera_width=640,... |
Swift | UTF-8 | 18,204 | 3.34375 | 3 | [] | no_license | //
// FactProvider.swift
// FunFacts
//
// Created by Melissa Oveson on 3/24/18.
// Copyright © 2018 Miss Geek Bunny. All rights reserved.
//
import GameKit
struct FactProvider {
let facts = ["Ants stretch when they wake up in the morning.",
"Ostriches can run faster than horses.",
"Olympic go... |
Java | UTF-8 | 3,743 | 1.9375 | 2 | [
"BSD-2-Clause"
] | permissive | /**
* Copyright (c) 2011-2013, ReXSL.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: 1) Redistributions of source code must retain the above
* copyright notice, this list of condition... |
Python | UTF-8 | 212 | 3.703125 | 4 | [] | no_license | thing = "animal"
animal = "cat"
if thing=="animal":
if animal == "dog":
print "this thing is a dog"
else:
print "this thing is an animal"
else:
print "I dont know what this thing is"
|
Python | UTF-8 | 3,872 | 3.1875 | 3 | [] | no_license | import numpy as np
import matplotlib.pyplot as plt
from sympy import mod_inverse
def printGr(a,b):
y, x = np.ogrid[-10:10:100j, -10:10:100j]
plt.contour(x.ravel(), y.ravel(), pow(y, 2) - pow(x, 3) - x * a - b, [0])
plt.grid()
plt.show()
def summ(x1, y1, x2, y2, fp):
t1=y2-y1
t2=x2-x1
x3 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.