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 | 902 | 2.609375 | 3 | [
"MIT"
] | permissive | # AOI Proxy 青いプロキシ
A simple proxy for switching between blue and green environments.
The proxy is configured with an address to a blue environment and the address of a green environment.
The proxy will listen on a specified port and send all requests to the blue environment.
Using a web api, you can toggle the envir... |
C | UTF-8 | 4,219 | 2.90625 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "pilotos.h"
#include "vuelos.h"
#include "controller.h"
#include "parser.h"
#include "validaciones.h"
int Parser_generarListaVuelos(FILE* pFile, LinkedList* listaDeVuelos)
{
eVuelo* auxVuelo;
char titulos[100];
char idVuelo[51];
char i... |
C | UTF-8 | 1,648 | 3.015625 | 3 | [] | no_license |
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "my_include.h"
#if 0
{
char ip[16]={0}; // allochiamo un array di 16 char perche' nel caso peggiore 192.156.111.222
char ip_1[4]={0}; // parte piu' significativa del'ip
int i=0;
while(1)
{
if((ip[i]=='.')||(i>15))
break;
ip_1[... |
Python | UTF-8 | 2,154 | 3.046875 | 3 | [] | no_license | import os
import unittest
from Hyde import Hyde
from TestUtility import TestUtility
class JekyllPageTest(unittest.TestCase):
def test_handle_add_new_page(self):
"""
Tests adding a page and ensures the file is created.
Then cleans up the file and the directory.
"""
page_name = 'TestPage'
actual_file_name... |
C++ | UTF-8 | 532 | 3.328125 | 3 | [] | no_license | #include "circle.hpp"
#include <cassert>
#include <cmath>
Circle::Circle(const point_t ¢er, const double &radius) :
center_(center),
radius_(radius)
{
assert(radius_ >= 0);
}
double Circle::getArea() const
{
return M_PI * radius_ * radius_;
}
rectangle_t Circle::getFrameRect() const
{
return {2 * radiu... |
Python | UTF-8 | 15,764 | 3.375 | 3 | [
"MIT",
"CC-BY-4.0"
] | permissive | # -*- coding: utf-8 -*-
"""
Elasticity solutions calculator
Juan Vergara
Juan Gomez
"""
#
import scipy.special as sci
import numpy as np
import signals as sig
#
def myfunction(x,y,p):
"""
Template for user defined elasticity solution.
"""
ux=(x**2.+y**2.)**p
return ux
#
def cunia(x,y,phi,l,nu,E,S):
... |
JavaScript | UTF-8 | 3,769 | 2.578125 | 3 | [] | no_license | const should = require("should");
const mocha = require("mocha");
const supertest = require("supertest");
var fs = require("fs");
var configDir = "/Users/macbookpro/JavaScriptMocha/AirwallexTest/Test/test.config";
var urlInfo = fs.readFileSync(configDir).toString();
var url = urlInfo.substring(4);
var server = supert... |
Python | UTF-8 | 7,648 | 2.59375 | 3 | [] | no_license | #!/usr/bin/env python
# pagechange.py - quick script to check if page has changed
# (eg - for price checking)
# .product-prices .oldPrice
# http://www.massimodutti.com/gb/two-tone-bluchers-with-laces-c1313028p6954836.html
# //*[@id="product-info"]/div/div[2]/div[1]/div/div/p[2]
import os
import os.path
import re
imp... |
Python | UTF-8 | 259 | 3.109375 | 3 | [] | no_license | def to_int(x):
return int(x)
n = int(input())
l = []
for _ in range(n):
g, s = map(to_int, input().split(" "))
l.append("%02d:%02d" % (s, g))
for ans in sorted(l, reverse=True):
s, g = map(to_int, ans.split(":"))
print("%d %d" % (g, s))
|
Python | UTF-8 | 18,996 | 2.59375 | 3 | [] | no_license | import numpy as np
from itertools import product
import copy
def _concatenate_sorted_list_of_integer_strings(l):
l.sort(key=int)
string = ''
for i in l:
string = string + i + "_"
return string[:-1]
def _diff_list(a, b):
b = set(b)
return [aa for aa in a if aa not in b]
def _mask_nod... |
Python | UTF-8 | 730 | 3.046875 | 3 | [] | no_license | #!/usr/bin/env python3
# File: anchortag-comments.py
from urllib.request import urlopen
from bs4 import BeautifulSoup
import ssl
# ignore them cert errors
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
url = input('Enter - ')
html = urlopen(url, context=ctx).read()
soup... |
Java | UTF-8 | 4,217 | 3.21875 | 3 | [] | no_license | package _4Sum;
import java.util.*;
public class Solution {
private class Node implements Comparable {
protected int sum;
protected int a;
protected int b;
public Node(int sum, int a, int b) {
this.a = a;
this.b = b;
this.sum = sum;
}
... |
JavaScript | UTF-8 | 1,070 | 2.796875 | 3 | [] | no_license | (function(window){
var arrTests = [];
var UnitTest = function(title, testFunction){
if(testFunction) {
$('#testresults').append('<div>'+title+':</div>');
this.title = title;
this.ul = $('<ul></ul>').appendTo($('#testresults'));
this.test = testFunction;
arrTests.push(this);
}
... |
Python | UTF-8 | 701 | 2.78125 | 3 | [] | no_license | #============================================
# Title: Exercise 9.3
# Author: Professor Krasso
# Modified by: James Brown
# Date: 6/26/2020
# Description: coding per requirements of exercise 9.3
#===========================================
#import statements
from pymongo import MongoClient
import pprint
import date... |
PHP | UTF-8 | 5,582 | 2.59375 | 3 | [
"MIT",
"GPL-1.0-or-later",
"GPL-2.0-or-later",
"GPL-2.0-only"
] | permissive | <?php
/**
* Creates common globals for the rest of WordPress
*
* Sets $pagenow global which is the current page. Checks
* for the browser to set which one is currently being used.
*
* Detects which user environment WordPress is being used on.
* Only attempts to check for Apache, Nginx and IIS -- three web
* ser... |
Java | UTF-8 | 651 | 3.21875 | 3 | [] | no_license | package timing;
public interface ITimer {
/**
* Starts a new timer. <br>
* If called without a prior <b>stop</b>, it resets the current time loosing
* all time information.
*/
public void start();
/**
* Stop and reset current timer.
*
* @return Elapsed <b>nanoseconds</b> since <b>start</b> was invo... |
C | UTF-8 | 405 | 3.0625 | 3 | [] | no_license | #include <cs50.h>
#include <stdio.h>
#include <math.h>
int main (void){
float dollar;
do{
dollar= get_float("enter dollar: ");
} while(dollar <= 0);
float money=round (dollar*100);
int b=money/25;
int c= money-(b*25);
c=c/10;
int d=money-(b*25)-c*10;
d=d/5;
int e= money-(b*25)-c*10-d*5;
printf("%d\n", b+c+d... |
PHP | UTF-8 | 954 | 2.703125 | 3 | [] | no_license | <?php
namespace Repository\Component\Pagination\Handlers;
use Repository\Component\Pagination\PaginationParameter;
use Repository\Component\Contracts\Pagination\HandlerInterface;
/**
* Handle Pagination Logic over Array Collection.
*
* @package \Repository\Component\Pagination
* @author Hariyanto - harrieant... |
Markdown | UTF-8 | 6,392 | 3.984375 | 4 | [] | no_license | # Assignment 1: Code Design & Efficiency Analysis
## Code Design
### Organization
We separated our helper functions into files, and put them into `src/`. `heap.c` contains min heap functions. `flags.c` contains command line flag parsing functions. `tokens.c` contains functions that tokenize the file into the linked ... |
PHP | UTF-8 | 1,687 | 2.953125 | 3 | [] | no_license | <?php
interface captcha {
public function __construct( $width, $height, $size, $map );
public function __destruct();
public function getCode();
public function getImage();
}
$captcha = new class implements captcha {
private $_im;
private $_code;
public function __construct( $width = 80, $height ... |
Go | UTF-8 | 706 | 2.6875 | 3 | [
"MIT"
] | permissive | // Go lang completion
// By: Christian Gunderman
package languageservice
import (
"go/ast"
"go/token"
"golang.org/x/tools/go/ast/astutil"
)
// GetCloseBraceOfEnclosingBlock returns the correct indentation of the selected position in the
// document.
func (id WorkspaceID) GetPositionOfCloseBraceOfEnclosingBlock(f... |
Java | UTF-8 | 3,447 | 3.703125 | 4 | [] | no_license | package com.cracking.coding.company.linkedlist.removeduplicates;
import java.util.HashMap;
import java.util.Map;
public class LinkedList {
Node first;
Node last;
private static int size=0;
public int getSize(){
return this.size;
}
public void add(Node node) {
size++;
if (first == null) {
first = node;
... |
Java | UTF-8 | 938 | 2.078125 | 2 | [] | permissive | package com.juzi.oerp.model.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.time.LocalDateTime;
/**
* <p>
*
* </p>
*
* @author Juzi
* @since 2020-07-14
*/
@Data
@Tab... |
JavaScript | UTF-8 | 522 | 3.25 | 3 | [] | no_license | class Wagon{
constructor(capacity){
this.capacity = capacity
this.passengers = []
}
getAvailableSeatCount(){
return this.capacity - this.passengers.length
}
join(traveler){
if (this.getAvailableSeatCount() > 0){this.passengers.push(traveler)}
}
shouldQuaran... |
Java | UTF-8 | 5,226 | 2.546875 | 3 | [] | no_license | package booksys.presentation;
import java.awt.*;
import javax.swing.*;
import javax.swing.filechooser.*;
import javax.swing.text.StyledEditorKit;
import java.awt.event.*;
import java.io.*;
public class Note extends JFrame
{
// ���� ����
JTextArea text;
Container pane;
JMenuBar nb = new JMe... |
Java | UTF-8 | 6,105 | 1.90625 | 2 | [
"Apache-2.0"
] | permissive | package org.succlz123.s1go.app.ui.thread.info;
import org.succlz123.s1go.app.MainApplication;
import org.succlz123.s1go.app.R;
import org.succlz123.s1go.app.bean.ThreadInfo;
import org.succlz123.s1go.app.bean.UserInfo;
import org.succlz123.s1go.app.config.RetrofitManager;
import org.succlz123.s1go.app.ui.base.BaseThr... |
Java | UTF-8 | 1,178 | 3.609375 | 4 | [] | no_license | class Counter {
public synchronized void count(boolean countEven) {
for (int i = (countEven ? 0 : 1); i < 100; i+=2) {
System.out.println("I'm in thread with id = " + Thread.currentThread().getId() + " and counting = " + i);
notify();
try {
wait();
... |
Python | UTF-8 | 385 | 3.140625 | 3 | [] | no_license | class Hero:
jumlah = 0 # class Variabel
__privateJumlah = 0
def __init__(self,name,health):
self.nama = name
self.darah = health
# Variable instance private
self.__private = 'private'
# variable intance protected
self._protected = "protected"
lina = H... |
Java | UTF-8 | 1,715 | 3.65625 | 4 | [] | no_license | package RotateArray;
import java.util.Arrays;
public class RotateClass {
public static void main(String[] args){
}
//Rotate array One by One
public static Integer[] usingOneByOne(Integer[] array, int rotateBy, int n){
Integer[] result = Arrays.copyOf(array,n);
for(int i=0;i<rotateBy;i... |
Shell | UTF-8 | 2,511 | 4.25 | 4 | [] | no_license | #!/bin/bash
set -o errexit -o pipefail -o noclobber -o nounset
USAGE="Usage: $0 [-u string] [-p string] [-t string,string] (up|down|status|help) connection
where:
-u|--user User name
-p|--password Password
-t|--tokens Comma separated list of OTPs
"
# ensure running as root
if [ "$(id -u)" != "0" ]... |
Markdown | UTF-8 | 19,546 | 2.546875 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: Erőforrások zárolása a módosítások megakadályozása érdekében
description: Annak megakadályozása, hogy a felhasználók az összes felhasználóra és szerepkörre vonatkozó zárolást alkalmazzanak az Azure-erőforrások frissítésére vagy törlésére.
ms.topic: conceptual
ms.date: 03/09/2021
ms.custom: devx-track-azurecl... |
C | UTF-8 | 886 | 2.796875 | 3 | [] | no_license | /*
* CustomTimer.c
*
* Created: 16/02/2021 12:06:28 AM
* Author: Nicolas VERHELST
*/
#include "Timer/CustomTimer.h"
#include "Timer/atmega-timers.h"
#include "LCD/lcd_drv.h"
#include <stdbool.h>
// Global variable to be accessed within this file
static functionTypeAction G_Action;
static long G_TargetCount = 1... |
Java | UTF-8 | 1,388 | 3.03125 | 3 | [] | no_license | package pl.pawelkwiecien.commons;
public class StaticSupportMethods {
private static final int FIRST_ROW_NUMBER_IN_ASCII = 49;
private static final int LAST_ROW_NUMBER_IN_ASCII = 56;
private static final int FIRST_COLUMN_LETTER_IN_ASCII = 97;
private static final int LAST_COLUMN_LETTER_IN_ASCII = 104;... |
TypeScript | UTF-8 | 339 | 3.59375 | 4 | [] | no_license | interface Ship {
name: string;
cannons: number;
}
const testShip: Ship = {
name: 'Barca',
cannons: 2,
};
type MyCustomReadonly<T> = {
readonly [P in keyof T]: T[P]; // For each prop/key of T
};
function freezeShip<T>(ship: T): MyCustomReadonly<T> {
return Object.freeze(ship);
}
const newShip = freezeShi... |
JavaScript | UTF-8 | 312 | 2.828125 | 3 | [] | no_license | if (!sessionStorage['counter']) {
sessionStorage['counter'] = 0;
} else {
sessionStorage['counter']++;
}
document.querySelector('#content').innerHTML =
'<p>This sample has been run ' + sessionStorage.getItem('counter') + ' times</p>' +
'<p>(The value will be available until we close the tab)</p>'; |
JavaScript | UTF-8 | 389 | 3.171875 | 3 | [
"MIT"
] | permissive | function Plane() {
this.status = "Flying";
}
Plane.prototype.land = function () {
if (this.status === "Landed") throw "The plane has already landed!";
this.status = "Landed";
return "The plane landed";
};
Plane.prototype.takeoff = function () {
if (this.status === "Flying") throw "The plane has already take... |
Python | UTF-8 | 402 | 3.625 | 4 | [] | no_license | # Match score is X:Y, user prediction is A:B.
# If user predicts the result of the match - user gets 10 point
# If user predicts the win or lose or draw - user gets 5 point
# If user make a mistake - user gets nothing
def f(x, y, a, b):
score = 0
if x == a and b == y:
score = 10
elif x > y and a... |
C | UTF-8 | 3,911 | 2.78125 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
int main()
{
// int x = 100; //ได้ 3 อย่าง ตัวแปร ค่าตัวแปร และ ที่อยู่
// int a = 0144; //มีค่า 100 ในฐาน16
// int b = 0x64; //มีค่า 100 ในฐาน16
// printf("x = %d\n",x);
// printf("reference x = %lu\n", &x); //จะได้ค่า ที่อยู่ออกมา
// printf("reference x = %p\n"... |
TypeScript | UTF-8 | 1,323 | 2.640625 | 3 | [] | no_license | import transform, { ByIdDictionary } from '../services/transform';
import { DynamicEntity, StaticEntity } from '../services/api/area';
import { AreaAction, AreaActions } from '../actions/area';
export interface AreaState {
isPending: boolean,
size: {
width: number,
height: number
},
sta... |
Python | UTF-8 | 496 | 3.875 | 4 | [] | no_license | #!/bin/python
concat=''
frase = raw_input("Ingresa una palabra o frase: ")
print "Contiene %s caracteres" % len(frase)
print "Aplicando lower(): %s" % frase.lower()
print "Aplicando upper(): %s" % frase.upper()
ind = raw_input("Obtener la letra en indice: ")
concat = concat + frase[int(ind)]
ind = raw_input("Obten... |
Python | UTF-8 | 2,110 | 2.828125 | 3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | class NcellResponse(object):
def __init__(self, response):
self.__response = response
self.__responseDict = self.__response.json()
self.__responseDict2 = self.__responseDict.copy()
def __repr__(self):
return f"<Response [{self.responseHeader['responseDescD... |
Java | UTF-8 | 1,796 | 2.171875 | 2 | [] | no_license | /**
* This file is part of linkoopdb.
* <p>
* Copyright (C) 2016 - 2018 Datapps, Inc
*/
package com.datapps.linkoopdb.worker.spark.ai.classifier;
import com.datapps.linkoopdb.worker.spark.ai.core.MetaDataType;
import com.datapps.linkoopdb.worker.spark.ai.core.SparkFunctionContext;
import com.datapps.linkoopdb.wor... |
Markdown | UTF-8 | 2,063 | 3.125 | 3 | [
"MIT"
] | permissive | # Getting Started
## Installation
1. Install the **peer dependencies** listed below:
```bash
yarn add @xstyled/styled-components @xstyled/system prop-types react react-dom styled-components
```
2. Install the the `core` component and any other components you need for your webapp e.g. if you need just a button…
```... |
PHP | UTF-8 | 2,096 | 2.65625 | 3 | [] | no_license | <?php
require_once dirname(dirname(__FILE__)) . '/Klarna.php';
// Dependencies from http://phpxmlrpc.sourceforge.net/
require_once dirname(dirname(__FILE__)) .
'/transport/xmlrpc-3.0.0.beta/lib/xmlrpc.inc';
require_once dirname(dirname(__FILE__)) .
'/transport/xmlrpc-3.0.0.beta/lib/xmlrpc_wrappers.inc';
/**
... |
C# | UTF-8 | 944 | 2.90625 | 3 | [] | no_license | using System;
using FluentAssertions;
using NUnit.Framework;
using RomanNumberConverter.Console.ApplicationServices;
using RomanNumberConverter.Console.Domain;
namespace RomanNumberConverter.Tests.ApplicationServices
{
[TestFixture]
public class RomanConverterTests
{
[TestCase("10", "X")]
... |
C++ | UTF-8 | 1,325 | 3.703125 | 4 | [
"MIT"
] | permissive | /**
* Find the longest increasing subsequence of a given sequence / array.
*
* In other words, find a subsequence of array in which the subsequence’s elements are in strictly increasing order, and in which the subsequence is as long as possible.
* This subsequence is not necessarily contiguous, or unique.
* In thi... |
SQL | UTF-8 | 1,248 | 2.890625 | 3 | [] | no_license | DROP DATABASE IF EXISTS bamazon_DB;
CREATE DATABASE bamazon_DB;
USE bamazon_DB;
CREATE TABLE product(
id INT NOT NULL AUTO_INCREMENT,
article VARCHAR(100) NOT NULL,
department VARCHAR(45) NOT NULL,
quantityInStock INT default 0,
PRIMARY KEY (id)
);
INSERT INTO product (article, department, quantityInStock)... |
Java | UTF-8 | 21,237 | 2.46875 | 2 | [] | no_license | package org.lwjglb.engine;
import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
/**
* Created by Lucas on 20/... |
Python | UTF-8 | 3,401 | 2.765625 | 3 | [] | no_license | import numpy as np
import matplotlib.pyplot as plt
#from scipy.optimize import curve_fit
grid = []
for k in list(np.round(np.logspace(0, 4))):
if k not in grid:
grid.append(k)
msd = np.loadtxt('msd10.dat')
food = np.loadtxt('food10.dat')
diff = np.loadtxt('diff10.dat')
corr1 = np.loadtxt(... |
PHP | UTF-8 | 3,054 | 3.328125 | 3 | [] | no_license | <?php
class Sudoku {
private $_initial_board = [];
private $_working_board = [];
public function Sudoku($input_file)
{
$file = file_get_contents($input_file);
$lines = explode("\n", $file);
$i=0;
foreach($lines as $line) {
$this->_initial_board[$i++] = arra... |
Python | UTF-8 | 637 | 2.5625 | 3 | [
"MIT"
] | permissive | from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.ext.declarative import declared_attr
from .config import Base
class MenuCategory(Base):
@declared_attr
def event_id(cls): # Null for dining items because they don't belong to a specific event
return Column(Integer, ForeignKey(... |
Markdown | UTF-8 | 2,619 | 3.171875 | 3 | [] | no_license | # Challenge 1: Got Containers?
[< Previous Challenge](./00-prereqs.md) - **[Home](../README.md)** - [Next Challenge >](./02-acr.md)
## Introduction
The first step in our journey will be to take our application and package it as a container image using Docker.
## Demo
Your coach will demonstrate running the applicat... |
C | UTF-8 | 3,126 | 2.96875 | 3 | [] | no_license | /*******************************************************
* *
* Full test case for addition of multi-dimensional *
* arrays to Small C V2.0 using the modified *
* CUG disk #163, and PC Club of Toronto #152. *
* Release 1.01 ... |
C++ | UTF-8 | 732 | 3.140625 | 3 | [] | no_license | #pragma once
#include <cstring>
#include <stdexcept>
#define DIM 4
class Matrix4x4
{
public:
Matrix4x4();
Matrix4x4(const float* m);
Matrix4x4(const float m[DIM][DIM]);
Matrix4x4(float m11, float m12, float m13, float m14,
float m21, float m22, float m23, float m24,
float m31, float m32, float m33, flo... |
PHP | UTF-8 | 1,428 | 2.578125 | 3 | [] | no_license | <?php
namespace Core;
use Core\Auth;
class View {
public function __construct() {
}
public function render($template, $data = null, $layout = null)
{
$content = $this->getTemplatePath($template);
if ($data) {
extract($data);
}
i... |
C# | UTF-8 | 672 | 2.875 | 3 | [] | no_license | string myXml =
"<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + Environment.NewLine +
"<!-- This is a comment -->" + Environment.NewLine +
"<Root><Data>Test</Data></Root>";
System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
xml.PreserveWhitespace = true;
xml.LoadXml(myXml);
... |
C++ | UTF-8 | 463 | 2.96875 | 3 | [] | no_license | #include <Arduino.h>
#include "USB_Serial.h"
void USB_Serial_init(uint32_t baudRate)
{
Serial.begin(baudRate);
}
uint32_t USB_Serial_available()
{
return Serial.available();
}
uint8_t USB_Serial_writeByte(uint8_t data)
{
return Serial.write(data);
}
size_t USB_Serial_writeBytes(uint8_t * data, size_t count)
{
... |
Python | UTF-8 | 2,359 | 2.921875 | 3 | [] | no_license | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/12/22 17:57
# @Author : Python12_秋
# @Email : 793630871@qq.com
# @File : mysql.py
# @Software : PyCharm
# @Explain : MYsql数据量链接
"""
1.链接数据库
2.编写sql
3.建立游标
4.执行
"""
from common import http_path
from common.Http_config import Reading
import pymysq... |
Java | UTF-8 | 3,528 | 2.28125 | 2 | [] | no_license | package edu.uapa.ui.gamify.views.security;
import com.vaadin.flow.component.ClickEvent;
import com.vaadin.flow.component.ComponentEventListener;
import com.vaadin.flow.component.Tag;
import com.vaadin.flow.component.button.Button;
import com.vaadin.flow.component.combobox.ComboBox;
import com.vaadin.flow.component.dep... |
SQL | UTF-8 | 4,552 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 18-04-2019 a las 14:27:44
-- Versión del servidor: 10.1.38-MariaDB
-- Versión de PHP: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
TypeScript | UTF-8 | 241 | 2.59375 | 3 | [] | no_license | import { Injectable } from "@angular/core";
//a service is just a normal TypeScript class
@Injectable()
export class LoggingService {
logStatusChange(status: string){
console.log('Ammm server status changed, new status: ' + status);
}
} |
Swift | UTF-8 | 1,628 | 3.140625 | 3 | [] | no_license | //
// PACServices.swift
// PR3
//
// Copyright © 2018 UOC. All rights reserved.
//
import Foundation
class Services {
static var storedMovements: [Movement]?
static func validate(username: String, password: String) -> Bool {
if (username == "uoc" && password == "1234") {
return tru... |
C++ | UTF-8 | 2,358 | 3.296875 | 3 | [] | no_license | #ifndef __SDR_LOGGER_HH__
#define __SDR_LOGGER_HH__
#include <string>
#include <sstream>
#include <list>
namespace sdr {
// DIFFERENT TYPES of LOG MESSAGES
typedef enum {
LOG_DEBUG = 0, // Everything that may be of interest
LOG_INFO, // Messages about state changes
LOG_WARNING, // Non-critical errors... |
Shell | UTF-8 | 2,259 | 3.453125 | 3 | [] | no_license | #!/bin/bash
red=`tput setaf 1`
reset=`tput sgr0`
cur_dir="$(pwd)"
action=$1
bench=$2
if [ "$3" != "" ]; then
individual=$3
else
individual=all
fi
#check if additional arguments are given; otherwise use defaults.
if [ "$bench" == "spec2006" ] || [ "$bench" == "spec2017" ]; then
if [ "$4" != "" ]; then
... |
SQL | UTF-8 | 3,718 | 2.609375 | 3 | [] | no_license | INSERT INTO tweet (id_parent, id_user, text, timestamp)
VALUES
(0, 1, 'This is my first twitter! Yeah!', '2019-05-03 13:44:03'),
(0, 1, 'Hello Twitter', '2019-05-03 13:45:03'),
(0, 1, 'Today is a great day!', '2019-05-03 13:46:03'),
(0, 1, 'Cant wait til summer!!!', '2019-05-03 13:50:03'),
(0, 1, 'Im bored!', '2019-05-... |
JavaScript | UTF-8 | 959 | 2.59375 | 3 | [] | no_license | function validateForm()
{
var a = document.forms["rreg"]["rname"].value;
var b = document.forms["rreg"]["rpass1"].value;
var c = document.forms["rreg"]["rpass2"].value;
var d = document.forms["rreg"]["rmail"].value;
var e = document.forms["rreg"]["rmobile"].value;
var f = document.forms["rreg"]["rsecques"].value;... |
Markdown | UTF-8 | 9,541 | 3.109375 | 3 | [
"MIT"
] | permissive | ## 这是关于 store 相关的使用介绍
#### createStore(mixin?: Function, hooks?: Object, Options?: Object) : Store
store 是通过 `mp-store` 导出的 `createStore` 这个方法来创建的,这个方法接受三个参数
+ 第一个参数为 [`mixin`](./mixin.md) 的注入函数
+ 第二个参数为 [`hooks`](./hooks.md)
+ 第三个参数为 `options`
store 会把原生的 `Page`、`Component` 函数包装一层,来做一层拦截,这样 store 就可以收集... |
Python | UTF-8 | 9,079 | 2.984375 | 3 | [] | no_license | #Import libraries
import pygame, os, sys
from pygame.locals import *
from time import sleep
from math import sin, cos, atan, atan2, radians, degrees, pi, sqrt
from random import randint
pygame.init() #Start pygame
pygame.mixer.init() #Start pygame mixer
#Functions
def parabolic_shot(arrow, arrow_copy, velocity, arrow... |
Markdown | UTF-8 | 7,027 | 2.53125 | 3 | [] | no_license | # Origami_in_Unity
***
Unity上でメッシュを折り紙のように折れるデモプロジェクトです。 <br />
<br />
[Go to English Readme](https://github.com/Mpaop/Origami_in_Unity/blob/master/README.md)<br />
<br />
<br />
<img src="https://raw.githubusercontent.com/wiki/Mpaop/Origami_in_Unity/images/fold01.gif" alt="Demo" width="700"/>
<br />
<br />
***
## 環... |
Java | UTF-8 | 7,110 | 2.78125 | 3 | [] | no_license | /*
Pavel Yakovlev
pyakovlev@bearcubs.santarosa.edu
29.12.2017
Final Project - IMDb Browser Application
Java 17.11
IMDbBrowserController.java
*/
package edu.srjc.yakovlev.pavel.imdb_browser;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.f... |
JavaScript | UTF-8 | 831 | 3.34375 | 3 | [] | no_license | /**
* @param {string} s
* @param {number} numRows
* @return {string}
*/
var convert = function (s, numRows) {
if (numRows == 1) {
return s
}
new_s = ""
n = s.length
for (i = 0; i < numRows; i++) {
for (j = 0; j < n; j++) {
u = parseInt(j / (numRows - 1))
u... |
PHP | UTF-8 | 1,851 | 2.515625 | 3 | [] | no_license | </!DOCTYPE html>
<html lang="fr">
<?php include("en-tete.php");?>
<?php include 'openbdd.php';?>
<body>
<?php
if (isset($_POST['Titre']) && isset($_POST['Date']) && isset($_SESSION['identifiant'])){
$T=$_POST['Titre'];
$Des=$_POST['Description'];
$D=$_POST['Date'];
$I=$_POST['Infos'];
$requete = "INSERT... |
Swift | UTF-8 | 1,143 | 2.5625 | 3 | [] | no_license | //
// PaginatedTosList.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
#if canImport(AnyCodable)
import AnyCodable
#endif
public struct PaginatedTosList: Codable, Hashable {
public var count: Int?
public var next: String?
public var previous: String?
... |
Java | UTF-8 | 425 | 3.109375 | 3 | [] | no_license | package testeIO;
import java.util.Collection;
import java.util.HashSet;
public class TesteDuplicadosNaLista {
public static void main(String[] args) {
Collection<Conta> contas = new HashSet<>();
Conta contaA = new Conta(135, 150.0F, "Andrey F. Alves");
Conta contaB = new Conta(135, 150.0F, "Andrey Frazatti"... |
Shell | UTF-8 | 2,852 | 3 | 3 | [
"Apache-2.0"
] | permissive | #!/bin/bash
#
# Copyright (C) 2021-2022 Chair of Electronic Design Automation, TUM.
#
# SPDX-License-Identifier: Apache-2.0
#
# 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
#
# www.apache.org/li... |
PHP | UTF-8 | 1,009 | 2.546875 | 3 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Srdata_Model_Layer extends Zend_Db_Table_Row_Abstract
{
private $_columnMap = array(
'sphericalMercator' => 'sphericalmercator',
'isBaseLayer' => 'isbaselayer',
'numZoomLevels' => 'numzoomlevels',
'maxZoomLevel' => 'maxzoomlevel',
'minZoomLevel' => 'minzoomlevel'
);
protected f... |
Python | UTF-8 | 2,899 | 2.96875 | 3 | [] | no_license | import collections
import sys
ID, FORENAME, MIDDLENAME, SURNAME, DEPARTMENT = range(5)
User = collections.namedtuple("User",
"username forename middlename surname id")
def process_line(line, usernames):
fields = line.split(":")
username = generate_username(fields, usernames)
user = User(usern... |
PHP | UTF-8 | 2,904 | 2.921875 | 3 | [] | no_license | <?php
//echo "here";exit;
define('__ROOT__', dirname(__FILE__));
//echo "here1 ".__ROOT__; exit;
// load the db specific handlers
//require_once( __ROOT__."/db_mysql.php" );
require_once( dirname(__FILE__)."/meekrodb.2.3.class.php" );
//DB::$user = 'root';
//DB::$password = 'daff0d1l';
//DB::$dbName = 'mullsoft';
... |
Java | UTF-8 | 1,313 | 2.421875 | 2 | [
"Apache-2.0"
] | permissive | package com.zte.shawn.persistence;
import android.content.Context;
import android.os.Environment;
/**
* Created by 10192984 on 2017/2/10.
*/
public class PersistPathManager {
private Context context;
private static PersistPathManager instance;
private String privateExternalPath;
private String publ... |
Java | UTF-8 | 3,754 | 2.21875 | 2 | [
"Apache-2.0"
] | permissive | /*
* #%L
* wcm.io
* %%
* Copyright (C) 2014 wcm.io
* %%
* 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... |
Java | UTF-8 | 1,554 | 2.15625 | 2 | [] | no_license | package info.esblurock.reaction.chemconnect.core.client.pages;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.clien... |
Python | UTF-8 | 825 | 3.484375 | 3 | [] | no_license | """
[질문 3] http://python-data.dr-chuck.net/comments_42.xml
해당 URL의 xml을 load한 후, comments의 총 갯수와 comments에 있는 각 count들을 모두 더해서 출력하는 파이썬 프로그램을 작성해주세요.
(urllib, xml.etree.ElementTree 등을 import 하여 사용하시면 됩니다.) *
"""
import xml.etree.ElementTree as ET
import urllib.request, urllib.parse, urllib.error
import re
raw = urlli... |
Markdown | UTF-8 | 1,300 | 3.65625 | 4 | [
"MIT"
] | permissive | # 函数
+ 优点:
+ 允许模块化设计程序。函数存储在数据库中,可独立于程序源代码修改。
+ 每次调用时无需重新解析和优化,缩短了执行时间,执行速度更快。
+ 减少网络流量。
+ 与存储过程对比
+ 共同点
+ 可重复使用编程代码,减少开发时间。
+ 隐藏SQL细节,给业务开发人员提供良好的数据库操作接口。
+ 模块化设计便于维护和扩展。
+ 不同点
+ 存取过程的权限允许程序执行存储过程而不允许其存取数据表,增强程序安全性。
+ 函数必须返回一个值。
+ 存储过程的返回值不能被直接使用而函数可以。
+ 函数定义
### 示例1
```
#删除函数
DROP... |
Java | UTF-8 | 1,397 | 1.921875 | 2 | [] | no_license | package hello.entity;
import java.util.List;
public class LoginResponse {
public boolean success;
public Data data;
public static class Contacts {
public String vk;
public String phone;
public String email;
public String updated;
}
public static class Data {
... |
Markdown | UTF-8 | 2,044 | 2.65625 | 3 | [] | no_license |
git init : activate a folder as repository
git add "file" or git add . or better git add --all : to generate an index of all the files to follow
git commit -m "add message here" : to save the modifications you did to your files
git log: to view the commits you've done before
git commit -a -m "Ajouté itinéraire dan... |
SQL | UTF-8 | 1,258 | 3.65625 | 4 | [
"Apache-2.0"
] | permissive | ALTER TABLE collection ADD COLUMN theme INT(11) NOT NULL;
UPDATE collection, questionnaire
SET collection.theme = questionnaire.theme
WHERE collection.id = questionnaire.id;
-- The first step is to get all the 'questionnaire.permalink' fields unique
UPDATE questionnaire q1
JOIN questionnaire q2 ON q1.permalink = q2... |
Swift | UTF-8 | 1,211 | 2.8125 | 3 | [] | no_license | //
// UIer+UIView.swift
//
//
// Created by Minhyuk Kim on 2020/03/14.
//
import UIKit
public extension UIView {
@IBInspectable
var cornerRadius: CGFloat
{
set (radius) {
self.layer.cornerRadius = radius
self.layer.masksToBounds = radius > 0
}
ge... |
Java | UTF-8 | 3,686 | 3.09375 | 3 | [] | no_license | package genericCheckpointing.util;
public class MyAllTypesFirst extends SerializableObject
{
private int myInt, myOtherInt;
private long myLong, myOtherLong;
private String myString;
private boolean myBool;
/**
* Constructor for the MyAllTypesFirst class
*
* @param int - initial va... |
SQL | UTF-8 | 358 | 2.90625 | 3 | [] | no_license | drop database if exists business;
create database business;
use business;
create table Customers (
CustomerID int NOT NULL auto_increment,
CompanyName varchar(40),
Country varchar(40),
City varchar(40),
primary key (CustomerID)
);
insert into Customers (CustomerID, CompanyName, Country, City) values(1... |
Java | UTF-8 | 282 | 1.820313 | 2 | [] | no_license | package com.tyss.Bussinessmanagement.dto;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import lombok.Data;
@Entity
@Data
public class Products {
@Id
@Column
private int id;
@Column
private String name;
}
|
TypeScript | UTF-8 | 1,210 | 2.6875 | 3 | [
"MIT"
] | permissive |
/**
* motor
*/
//% weight=100 color=#0fbc11 icon="\uf1b9"
namespace custom {
/**
* TODO: 控制电机
* @param n1 在此处描述参数, eg: AnalogPin.P0
* @param n2 在此处描述参数, eg: AnalogPin.P1
* @param e 在此处描述参数, eg:0
*/
//% block="电机A+%n1|A-%n2|速度%e"
//%e.min=-255 e.max=255
export function setSpe... |
JavaScript | UTF-8 | 3,553 | 2.578125 | 3 | [] | no_license | const http = require('../../util/http')
const config = require('../../config')
const iconv = require('iconv-lite');
const redisUtil = require('../../util/redisUtil')
function isIntNum(val) {
var regPos = /^\d+$/; // 非负整数
if (regPos.test(val)) {
return true;
} else {
return false;
}
}
mo... |
Markdown | UTF-8 | 3,396 | 3.265625 | 3 | [] | no_license | # University-course-scheduling
University departments offer many courses each semester. Creating a schedule is a big challenge since a huge number of constraints have to be considered, e.g. availability of rooms,
number of estimated participants, no overlap with other courses or courses belonging to the same field of... |
Java | UTF-8 | 1,882 | 2.640625 | 3 | [] | no_license | package com.xworkz.projector;
import java.awt.Container;
import java.util.ArrayList;
import java.util.ListIterator;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplic... |
C++ | UTF-8 | 3,622 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | #ifndef _Scene_H_
#define _Scene_H_
#include "../../Headers/QwerkE_Enums.h"
#include "../../Headers/QwerkE_Global_Constants.h"
#include <map>
#include <vector>
#include <string>
namespace QwerkE {
extern int g_WindowWidth, g_WindowHeight; // TODO: Remove
class GameCore;
class MyMatrix;
class Scenes... |
Markdown | UTF-8 | 8,977 | 2.875 | 3 | [] | no_license | ## TL;DR
Knowledge-based system for blood glucose control in T1 Diabetes. Clone and run demo.py for interactive demo.
## DiaBuddy - Developing a knowledge-based system for T1 Diabetes disease management
### T1DM
Type 1 Diabetes Mellitus (T1DM) is a chronic metabolic disorder, characterized by abnormal blood glucos... |
Shell | UTF-8 | 1,031 | 3.46875 | 3 | [] | no_license | #!/bin/bash
# install headphones
# update programs and Upgrade any software packages
echo 'Start update and upgrade'
sudo apt-get update -y && sudo apt-get upgrade -y
# Install dependencies
sudo apt-get install git-core -y
# Git clone the Headphones installation into Raspbian
echo 'Download from github'
sudo git clo... |
Python | UTF-8 | 115 | 2.65625 | 3 | [] | no_license | #asctime
import time
print(time.asctime(time.gmtime()))
"""
output:
-------
Wed Jul 21 10:16:16 2021
"""
|
Java | UTF-8 | 1,262 | 2.765625 | 3 | [] | no_license | package methodEmbedding.Cookie_Clicker_Alpha.S.LYD1244;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.DecimalFormat;
public class CookieClickerAlpha {
public static void main(String[] args) throws IOException {
Buffer... |
JavaScript | UTF-8 | 1,696 | 2.515625 | 3 | [] | no_license | // 모듈을 추출합니다.
var connect = require('connect');
var fs = require('fs');
// 변수를 선언 합니다.
var id = 'rintiantta';
var password = '12345678';
// 서버를 생성합니다.
var server = connect.createServer();
// 미들웨어를 사용합니다.
server.use(connect.cookieParser());
server.use(connect.bodyParser());
server.use(connect.router(function... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.