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 |
|---|---|---|---|---|---|---|---|
JavaScript | UTF-8 | 2,399 | 2.859375 | 3 | [] | no_license | var playlist = ["assets/NikeFindYourGreatness.mp4",""]
var pos = 0;
var videoPaused = false;
var videoPlaying = false;
var effectFunction = null;
window.onload = function () {
var controlBtns = document.querySelectorAll(".videoBtns button");
var video = document.getElementById("video");
for(var i = 0, length1 = c... |
Java | UTF-8 | 1,622 | 2.234375 | 2 | [] | no_license | package com.atguigu.security;
import com.alibaba.dubbo.config.annotation.Reference;
import com.atguigu.pojo.Permission;
import com.atguigu.pojo.Role;
import com.atguigu.service.UserService;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthor... |
Python | UTF-8 | 1,107 | 3 | 3 | [] | no_license | import numpy as np
import helper
import random
### SQUARE CHECK PENDING ###
def generate(grid):
for i in range(len(grid)):
for j in range(len(grid)):
if grid[i][j]==0:
for m in range(1,len(grid)+1):
if helper.backtrack_check(i,j,m,grid):
... |
Python | UTF-8 | 2,083 | 2.8125 | 3 | [] | no_license | import pygame
import os
pygame.init()
all_fonts = pygame.font.get_fonts()
clr = (0, 0, 0)
beige = (145, 145, 120)
bkg = (245, 245, 220)
red = (200, 0, 0)
size = (390, 390)
screen = pygame.display.set_mode(size)
screen.fill(bkg)
pygame.display.update()
font = pygame.font.Font(None, 100)
y1 = [0, 0, 0, 0]
... |
Markdown | UTF-8 | 1,079 | 2.578125 | 3 | [
"MIT"
] | permissive | # ESP Battery Monitor
A battery and power usage monitor based on the ESP8266 (Node V2) and the INA3221 current monitor.
The SW is based on the ESP8266 Non-OS SDK and uses the IoT-Demo as a basis.
Features:
- Measures up to 12 current and voltage values (3 per INA3221, common ground)
- Estimates state-of-charge and sta... |
TypeScript | UTF-8 | 869 | 2.609375 | 3 | [] | no_license | import { Document, Schema, Model, model } from 'mongoose'
export type IUser = {
username: String,
password: String,
socketId: String,
sessionId: String,
}
export interface IUserModel extends IUser, Document {
}
export const UserSchema: Schema = new Schema({
username: { type: String, required: true... |
Markdown | UTF-8 | 1,002 | 2.75 | 3 | [
"MIT"
] | permissive | # Ejercicio N°1
11942 - Lumberjack Sequencing: [Link Interno](../pdf/p11942.pdf) o si lo prefieres puedes verlo en el [Link Oficial Del Ejercicio](https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=3093)
## Analisando El Ejercicio
<p style="text-align: justify;"> El ejercicio nos pa... |
Java | UTF-8 | 17,940 | 1.882813 | 2 | [] | no_license | package org.apache.batik.css.engine.sac;
public class CSSLangCondition implements org.w3c.css.sac.LangCondition, org.apache.batik.css.engine.sac.ExtendedCondition {
protected java.lang.String lang;
protected java.lang.String langHyphen;
public CSSLangCondition(java.lang.String lang) { super();
... |
Java | UTF-8 | 3,150 | 3.375 | 3 | [] | no_license | import java.text.DecimalFormat;
public class InventoryBook {
private String ISBN, title;
private double price;
private int yearPublished, quantityOnHand;
public final static int MAX_TITLE_LENGTH = 30;
public final static int MAX_ISBN_LENGTH = 13;
//total byte size o... |
Java | WINDOWS-1250 | 730 | 3.109375 | 3 | [
"MIT"
] | permissive | package heranca;
import java.util.Scanner;
public class Aluno extends Pessoa{
private String matricula;
private String nomeCurso;
@Override
public String toString() {
return super.toString()+"-"+getMatricula()+"-"+getNomeCurso();
}
@Override
public void cadastra(Scanner s) {
super.cadastra(s);
System... |
Python | UTF-8 | 7,767 | 3.09375 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env python
# Copyright (c) 2011-2020, wradlib developers.
# Distributed under the MIT License. See LICENSE.txt for more info.
"""
Data Quality
^^^^^^^^^^^^
This module will serve two purposes:
#. provide routines to create simple radar data quality related fields.
#. provide routines to decide which radar... |
Java | UTF-8 | 981 | 2.515625 | 3 | [] | no_license | package com.just.example.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import javax.validation.constraints.NotNull;
public class Account {
private long accountId;
@NotNull
@JsonProperty(required = true)
private BigDecimal balance;
public Account() {
... |
Java | UTF-8 | 163 | 1.523438 | 2 | [] | no_license | package com.dy.learn.service;
public class SecondPrintService {
public static void main(String[] args){
System.out.println("New Add a file");
}
}
|
Markdown | UTF-8 | 1,760 | 2.71875 | 3 | [
"MIT"
] | permissive | # Dump and Fuse Component data
These scripts allow manipulation of component data from a font by editing a text file (likely in a spreadsheet). These two scripts were written in 2006 for John Hudson at [Tiro Typeworks](http://tiro.com). The scripts run in FontLab with RoboFab installed, RoboFont, and likely Glyphs wit... |
Python | UTF-8 | 504 | 3.46875 | 3 | [] | no_license | def findClosestValueInBst(tree, target):
# Write your code here.
tracker = tree
closestValue = tracker.value
while tracker is not None:
if abs(target-closestValue) > abs(target-tracker.value):
closestValue = tracker.value
if target < tracker.value:
tracker = tracker.left
elif target > tracker.value... |
JavaScript | UTF-8 | 1,048 | 2.59375 | 3 | [] | no_license | const mongoose = require('mongoose');
const uuid = require('uuid');
const bcrypt = require('bcrypt');
const userSchema = new mongoose.Schema(
{
name: String,
login: String,
password: String,
_id: {
type: String,
default: uuid
}
},
{ versionKey: false }
);
userSchema.pre('validate... |
Markdown | UTF-8 | 3,178 | 3.4375 | 3 | [] | no_license | # std::map implementation
Implement a container class template named Map similar to the std::map class from the C++ Standard Library. Such containers implement key-value pairs, where key and value may be any types, including class types. (In the following, the value will be referred to as the mapped type or mapped obj... |
Java | UTF-8 | 1,826 | 2.046875 | 2 | [
"MIT"
] | permissive | package com.playtika.test.azurite;
import com.azure.storage.blob.BlobContainerClient;
import com.azure.storage.blob.BlobServiceClient;
import com.azure.storage.blob.BlobServiceClientBuilder;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation... |
Python | UTF-8 | 580 | 3.6875 | 4 | [] | no_license | #两个乒乓球队进行比赛,各出三人。甲队为a,b,c三人,乙队为x,y,z三人。已抽签决定比赛名单。有人向队员打听比赛的名单。a说他不和x比,c说他不和x,z比,请编程序找出三队赛手的名单。
for i in range(ord('x'), ord('z') + 1):
for j in range(ord('x'), ord('z') + 1):
for k in range(ord('x'), ord('z') + 1):
if (i != j) and (i != k) and (j != k):
if (i != ord('x')) and (k... |
C# | UTF-8 | 2,345 | 2.53125 | 3 | [] | no_license | using Appreciation.Manager.Infrastructure;
using Appreciation.Manager.Infrastructure.Models;
using Appreciation.Manager.Repository.Contracts;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
namespace Appreciation.Manager.Repository
{
public class StudentExamRepository : Repository<StudentExam>... |
Python | UTF-8 | 1,181 | 4.15625 | 4 | [] | no_license | # coding=utf-8
from time import sleep
from collections import Iterable
from collections import Iterator
class Classmate(object):
def __init__(self):
self.names = list()
def add(self, name):
self.names.append(name)
def __iter__(self):
"""
如果要对一个对象称之为可迭代对象,即为可使用for循环获得的值,那么... |
Rust | UTF-8 | 1,556 | 3.1875 | 3 | [] | no_license | use errors::StribotError;
use regex::Regex;
use reqwest::Url;
use std::time::{Duration, SystemTime};
pub fn current_temperature() -> Result<f64, StribotError> {
let client = reqwest::Client::builder()
.timeout(Duration::from_secs(3))
.build()?;
let tick = SystemTime::now()
.duration_si... |
Shell | UTF-8 | 1,966 | 3.28125 | 3 | [] | no_license | #!/bin/sh
# shellcheck source=./default.conf
. "./default.conf"
# the gcc-lib shim
if test ! -f $STAGE1_CHROOT/packages/$TARGET_CPU/gcc-libs-shim-7.2.0-1-$TARGET_CPU.pkg.tar.xz; then
cd $STAGE1_BUILD || exit 1
sudo rm -rf gcc-libs-shim
mkdir gcc-libs-shim
cd gcc-libs-shim || exit 1
mkdir -p pkg/gcc-libs-shim/u... |
Markdown | UTF-8 | 2,744 | 2.71875 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learning"
date: 2017-11-09 23:06:14
categories: arXiv_CL
tags: arXiv_CL Knowledge Attention Reinforcement_Learning Optimization Relation
author: Victor Zhong, Caiming Xiong, Richard Socher
mathjax: true
---
* cont... |
JavaScript | UTF-8 | 5,912 | 2.75 | 3 | [] | no_license | // import Ball from "./Ball";
// import Box from "./Box";
const boxSize = 200;
const FONT_SIZE = 18;
let theBox;
let pageData;
let restTime = 0;
let GRAVITY = -0.1;
function preload() {
pageFont = loadFont("./assets/Castoro-Regular.ttf");
}
function setup() {
createCanvas(windowWidth, windowHeight, WEBGL);
pageDat... |
Markdown | UTF-8 | 2,539 | 2.875 | 3 | [] | no_license | # Project management plan
## Objectives
The following table lists the main objectives of the pSpace project order by their urgency.
| Objective | Priority | Effort | Status |
| - | - | - | - |
| Reliability | high | medium | ✘ |
| Maintainability | medium | low | ✘ |
| Interoperability | high | medium/high | ✘ |... |
Java | UHC | 1,519 | 2.65625 | 3 | [] | no_license | package sec03.ex01;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletR... |
Java | GB18030 | 1,713 | 2.078125 | 2 | [] | no_license | /* Generated by Together */
package org.radf.plat.sieaf.soap.encoding.deser;
/**<p>Description:vector</p>
* <p>Copyright: Copyright (c) 2002 by LBS Co., Ltd.</p>
* <p>Company: LBS</p>
* @author chenshuichao
* @version 1.0
*/
import java.util.Vector;
import org.xml.sax.Attributes;
import org.xml.sax.SAXExceptio... |
Java | UTF-8 | 676 | 2.796875 | 3 | [] | no_license | package com.example.demo.entity;
public class Cell {
private String id;
private int value;
private int status;
public Cell(String id, int value, int status) {
this.id = id;
this.value = value;
this.status = status;
}
public Cell() {
}
public String getId() {
... |
Markdown | UTF-8 | 3,983 | 2.875 | 3 | [] | no_license | ## 1. 接口描述
本接口(CreateLocalSourceIPPortTranslationAclRule)用于添加本端 IP 端口转换 ACL 策略。
接口请求域名:vpc.api.qcloud.com
## 2. 输入参数
以下请求参数列表仅列出了接口请求参数,正式调用时需要加上公共请求参数,详情请参见<a href="https://cloud.tencent.com/document/product/215/4772" title="公共请求参数"> 公共请求参数 </a>页面。其中,此接口的 Action 字段为 CreateLocalSourceIPPortTranslationAclRule。
| 参数名... |
Ruby | UTF-8 | 1,245 | 2.96875 | 3 | [
"MIT"
] | permissive | module Generator
class SampleData
# quantity should be less than 17. Otherwise, generated time is going to exceed 24:00.
def events(quantity)
(1..quantity).inject([]) do |events, i|
events << {
"title" => "Event " + i.to_s,
"location" => "Location " + i.to_s,
"det... |
Python | UTF-8 | 280 | 2.96875 | 3 | [] | no_license | """
supports lazy evaluation!
"""
from decorators import print_fn_name
def num_generator_up_to(n):
i = 0
while i < n:
yield i # magic!
i += 1
@print_fn_name
def use_generator(n):
for a in num_generator_up_to(n):
print a
use_generator(3)
|
Python | UTF-8 | 2,289 | 3.140625 | 3 | [] | no_license | import math
def declination(c, m, s):
out = ["", "", ""]
if c == 1:
out[0] = " час : "
elif 1 < c < 5:
out[0] = " часа : "
elif c >= 5 or c == 0:
out[0] = " часов : "
if m == 1:
out[1] = " минута : "
elif 1 < m < 5:
out[1] = " минуты : "
elif m >= 5 ... |
TypeScript | UTF-8 | 4,478 | 4.53125 | 5 | [] | no_license | // Tipos implicitos
// string
let nome = 'Fernando'
console.log(nome)
// nome = 28 -> Retorna um erro, pois 28 não é do tipo string, onde é inserido implicitamente ao inicializar a variável nome.
// numbers
let idade = 28
idade = 28.5
console.log(idade)
// boolean
let possuiHobbies = false
possuiHobbies = true
cons... |
Java | UTF-8 | 7,153 | 2.5 | 2 | [] | no_license | package com.growdane.exercise.dao;
import com.growdane.exercise.entity.Product;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
/**
* @author growdane@gmail.com
* @date 2020-01-28 22:04
*/
p... |
Markdown | UTF-8 | 1,441 | 2.8125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | ---
permalink: /
title: "Welcome to Kehan's Homepage"
excerpt: "About me"
author_profile: true
redirect_from:
- /about/
- /about.html
---
About Me
------
I am a second year Computer Science master student at [ETH Zurich](https://inf.ethz.ch), specializing in Computer Graphics. I obtained my bachelor's degree in C... |
Java | UTF-8 | 2,039 | 2.453125 | 2 | [] | no_license | package me.lumpchen.sledge.pdf.syntax.filters;
import java.nio.ByteBuffer;
import me.lumpchen.sledge.pdf.syntax.SyntaxException;
import me.lumpchen.sledge.pdf.syntax.lang.PDictionary;
import me.lumpchen.sledge.pdf.syntax.lang.PName;
public abstract class Decode {
protected PDictionary decodeParms;
protected PName... |
Java | UTF-8 | 5,954 | 2.078125 | 2 | [] | no_license | /*
* Copyright 2001-2008 Aqris Software AS. All rights reserved.
*
* This program is dual-licensed under both the Common Development
* and Distribution License ("CDDL") and the GNU General Public
* License ("GPL"). You may elect to use one or the other of these
* licenses.
*/
package net.sf.refactorit.t... |
Java | UTF-8 | 503 | 2.078125 | 2 | [] | no_license | package com.atsistemas.EncuestaProj.mapper;
import java.util.List;
import com.atsistemas.EncuestaProj.dto.CourseDTO;
import com.atsistemas.EncuestaProj.dto.CourseDTOPost;
import com.atsistemas.EncuestaProj.model.Course;
public interface CourseMapper {
public Course courseDtoToDao(CourseDTO courseDTO);
public Cou... |
Shell | UTF-8 | 621 | 2.84375 | 3 | [] | no_license | #!/bin/sh
# path configure
sdk_build_path=`pwd`
sdk_path=`pwd`/..
mpp_liteos_path=${sdk_path}/amp/a7_liteos
source ${sdk_path}/.config
serdes_enable=n
if [ "${CONFIG_SNS0_SERDES}" == "y" ]; then
serdes_enable=y
elif [ "${CONFIG_SNS1_SERDES}" == "y" ]; then
serdes_enable=y
fi
if [ "${serdes_enable}" == "y" ]; then... |
Java | UTF-8 | 8,410 | 2.609375 | 3 | [] | no_license | import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.*;
import ij.*;
import ij.process.*;
import ij.gui.*;
import ij.plugin.*;
import ij.plugin.filter.Analyzer;
import ij.gui.Wand;
import ij.plugin.frame.PlugInFrame;
import ij.measure.*;
import ij.text.*;
impo... |
PHP | UTF-8 | 2,381 | 3.28125 | 3 | [] | no_license | <?php
// PDO: PHP data objects ....
/**
* procedural and oo interface of database connection in php
* both are ok but must be consistent
*
*/
require './classes/Database.php';
require './classes/Article.php';
require './classes/User.php';
$db = new Database();
$conn = $db -> getConn();
// using static method in t... |
Java | UTF-8 | 522 | 2 | 2 | [] | no_license | package com.sergeybochkov.jaip.model.pdf.validator;
import java.lang.annotation.*;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;
@Documented
@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = PagesValidator.class)
publi... |
PHP | UTF-8 | 193 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
class HomeRepository implements HomeRepositoryInterface
{
public function welcomeMessage() : string{
return "PHP Challenge 20201117";
}
}
|
Markdown | UTF-8 | 4,788 | 2.75 | 3 | [] | no_license | ###### Buttonwood
# Why the most important hedge is against unexpected inflation

> print-edition iconPrint edition | Finance and economics | Jan 4th 2020
IT IS HARD to say precisely when a cherished theory of inflation lost its sway. But if you had to pick a moment, it might ... |
Python | WINDOWS-1252 | 864 | 3.546875 | 4 | [] | no_license | # Python Type Hints
# typing Support for type hints
# This module supports type hints as specified by PEP 484 and PEP 526.
# The most fundamental support consists of the types 'Any', 'Union', 'Tuple', 'Callable', 'TypeVar', and 'Generic'.
# typing.Optional
# Optional type.
# Optional[X] is equivalent to Union[X... |
C | UTF-8 | 413 | 3.140625 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int matriz(int l, int c){
int lin, col, **a;
a = calloc(l, sizeof(int*));
for(lin = 0;lin < l; lin++){
a[lin] = calloc(c, sizeof(int));
for(col = 0;col < c; col++){
a[lin][col] = 100;
}
}
return **a;
... |
JavaScript | UTF-8 | 3,429 | 2.546875 | 3 | [] | no_license | 'use strict';
import fetch from 'isomorphic-fetch';
import { browserHistory } from 'react-router';
import {
POLL_DATA_REQUEST,
POLL_DATA_SUCCESS,
POLL_DATA_FAILTURE,
POLL_UPDATE_REQUEST,
POLL_UPDATE_SUCCESS,
POLL_UPDATE_FAILTURE,
POLL_ADD_OPTION_ENABLE,
POLL_ADD_OPTION_DISABLE,
DI... |
Java | UTF-8 | 600 | 2.546875 | 3 | [] | no_license | import com.easycsv.annotations.CSVHeader;
import com.easycsv.annotations.CSVHeaderPosition;
public class MemberAddress {
@CSVHeaderPosition(value = 2)
@CSVHeader(value = "Address line 1")
private String line1;
@CSVHeaderPosition(value = 1)
@CSVHeader(value = "Address line 2")
private String l... |
Java | UTF-8 | 794 | 1.945313 | 2 | [] | no_license | package in.projecteka.gateway.common;
import in.projecteka.gateway.common.model.Service;
import lombok.AllArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.co... |
C++ | UTF-8 | 1,303 | 2.609375 | 3 | [] | no_license | //In The Name Of God
#include <bits/stdc++.h>
using namespace std;
int arr[110][110];
int main() {
ios::sync_with_stdio(0);
int tc, n, m, mon; cin >> tc;
for(int i = 1; i <= tc; i++) {
cout << "Case #" << i << ": ";
int ansSize = 0, ansMon = 0;
cin >> n >> m >> mon;
for(int... |
C# | UTF-8 | 541 | 2.625 | 3 | [] | no_license | using UnityEngine;
using System.Collections;
public class projectileDamage : MonoBehaviour {
public float baseDamage = 10f;
public float lifeLength = 4f;
private float damage;
// Use this for initialization
void Start () {
damage = baseDamage;
StartCoroutine (lifeTimer());
}
public float getDamage (){
... |
Markdown | UTF-8 | 2,317 | 3.34375 | 3 | [
"MIT"
] | permissive | ---
layout: essay
type: essay
title: Reflecting on smart questions
date: 2016-09-08
labels:
- Learning
---
While computer scientists can be very well-versed in a plethora of different coding languages, some of them can be very incompetent when using spoken languages. I have heard from several professors about how th... |
Java | UTF-8 | 3,420 | 2.390625 | 2 | [
"MIT"
] | permissive | package com.geansea.gslayoutdemo;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PointF;
import android.graphics.RectF;
import android.graphics.Typeface;
import android.text.TextPaint;
import android.util.AttributeSet;
import android.view.View;
i... |
TypeScript | UTF-8 | 600 | 2.734375 | 3 | [] | no_license | type TParam = {
id: string;
pwd: string;
};
//로그인
export const signIn = ({ id, pwd }: TParam): boolean => {
// const response = client.post('/api/auth/login', {id, pwd});
// return response;
const userId = localStorage.getItem('userId') || '';
if ((userId == '' || id != userId) && pwd) {
return false;
... |
C | UTF-8 | 269 | 2.671875 | 3 | [] | no_license | #include "util.h"
void
error (bool fatal, const char *format, ...)
{
fprintf (stderr, "error: ");
va_list args;
va_start (args, format);
vfprintf (stderr, format, args);
va_end (args);
fprintf (stderr, "\n");
if (fatal)
exit (1);
}
|
Java | UTF-8 | 1,737 | 2.296875 | 2 | [] | no_license | package com.yikangcheng.admin.yikang.activity.adapter.movieadapter;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.yikangcheng.admin.yikang... |
JavaScript | UTF-8 | 8,488 | 2.734375 | 3 | [] | no_license | // if this is running, show the elements that rely on JS
Array.from(document.querySelectorAll('.js-deactivated')).forEach(elem => elem.classList.remove('js-deactivated'))
const fuseOptions = {
includeScore: true,
threshold: .4,
keys: [
{ name: 'title', weight: .5 },
{ name: 'subtitle', wei... |
C | UTF-8 | 694 | 3.25 | 3 | [
"MIT"
] | permissive | #include<stdio.h>
#include<stdlib.h>
struct Point{
int x;
int y;
}point[50000];
int cmp(const void *a, const void *b)
{
struct Point x,y;
x=*(struct Point *)a;
y=*(struct Point *)b;
if (x.x<y.x)
return 1;
else if (x.x>y.x)
return -1;
else if (x.y<y.y)
return 1;
else if (x.y>y.y)
retur... |
C | GB18030 | 300 | 3.53125 | 4 | [] | no_license | #include <stdio.h>
//ִкֲڽؾֲ̬ȫֱĵַǰȫġ
int* f()
{
int i = 12;
return &i;
}int g()
{
int k = 24;
printf("k=%d\n", k);
}
int main()
{
int* p = f();
printf("*p=%d\n",*p);
g();
printf("*p=%d\n", *p);
}
|
Python | UTF-8 | 458 | 2.59375 | 3 | [] | no_license | #! /usr/bin/python
import socket,sys,os
s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
drive_nme=raw_input("enter drive name:")
drive_size=raw_input("enter size of drive:")
s_ip="192.168.122.3"
s_port=8888
s.sendto(drive_nme,(s_ip,s_port))
s.sendto(drive_size,(s_ip,s_port))
resp=s.recvfrom(20)
if resp[0] == "done":... |
Java | UTF-8 | 761 | 1.53125 | 2 | [] | no_license | package com.ruoyi.project.system.biScopeAttendSpotData.vo;
import lombok.Data;
import java.util.Date;
/**
* @Auther: Administrator
* @Date: 2019/4/2 0002 17:37
* @Description:
*/
@Data
public class BiScopeAttendSpotDataVO
{
private int tid;
private String id;
private String attendSpotType;
privat... |
Java | UTF-8 | 11,266 | 1.96875 | 2 | [] | no_license | package www.coders.org.qr_fintech_client;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import andr... |
C | UTF-8 | 194 | 3.1875 | 3 | [] | no_license | #include "holberton.h"
/**
* _strlen - prints length of string
* @s: string variable
*
* Return: 0
*/
int _strlen(char *s)
{
int i;
for (i = 0; s[i] != '\0'; i++)
{
}
return (i);
}
|
PHP | UTF-8 | 965 | 2.75 | 3 | [] | no_license | <?php
namespace App\Business\Service;
use App\Business\Model\User;
class MemberService{
public static $instance = null;
private function __construct(){
}
public static function getInstance(){
if(self::$instance == null){
self::$instance = new self();
}
return self::$instance;
}
public func... |
Java | UTF-8 | 4,072 | 2.640625 | 3 | [] | no_license | package com.uzumaki.naruto;
import android.content.AsyncTaskLoader;
import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import java.util.ArrayList;
/**
* Created by aarushi on 27/3/15.
*/
public class MusicLoader extends AsyncTaskLoader<Ar... |
C++ | GB18030 | 625 | 2.875 | 3 | [] | no_license | #include<iostream>
#include<cstdio>
using namespace std;
int b,p,k,a;
int f(int p) //÷b^p % k
{
if (p==0) return 1; // b^0 %k=1
int tmp=f(p/2)%k;
tmp=(tmp*tmp) % k; // b^p %k=(b^(p/2))^2 % k
if ... |
Python | UTF-8 | 1,165 | 3.5625 | 4 | [] | no_license | # this is essentially a workspace to get concepts going
# for example, a first hello world message
message = "Hello World"
print(message)
# or a first api call
import requests
response = requests.get("https://jsonplaceholder.typicode.com/todos/1")
# or working with dictionaries in a list in a dictionary to get some... |
PHP | UTF-8 | 2,259 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
require('./require_admin.php');
// GETパラメーターで最大数、自分のみ、いいね数が多い順
$res = mysql_query('SELECT * from btn ORDER BY id DESC') or die(mysql_error());
/*$json = "[";
// 結果を出力します。
while ($row = mysql_fetch_array($res, MYSQL_NUM)) {
$json.='{"id": "' . $row[0] . '", "html": "' . addslashes($row[1]) . '", "c... |
Java | UTF-8 | 257 | 1.921875 | 2 | [] | no_license | package com.frontier.repository;
import com.frontier.model.Coupon;
import org.springframework.data.jpa.repository.JpaRepository;
//@Repository
public interface CouponRepo extends JpaRepository<Coupon, Long> {
Coupon findByCode(String couponCode);
}
|
Markdown | UTF-8 | 1,412 | 2.78125 | 3 | [] | no_license | 1. Are there any sub-optimal choices( or short cuts taken due to limited time ) in your implementation? \
a. I'd say that the design and the choice of backend were a bit suboptimal, in addition I feel like I could have implemented a forced refresh button because that was something I had wanted to do as well. I could... |
Ruby | UTF-8 | 494 | 2.75 | 3 | [] | no_license | require "string_analyzer"
describe StringAnalyzer do
context "With valid string input" do
it "should detect when a string contains vowels" do
sa = StringAnalyzer.new
test_string = 'uuu'
expect(sa.has_vowels? test_string).to be true
end
it "should detect whe a string DOES NOT contain v... |
Java | UTF-8 | 565 | 2.734375 | 3 | [] | no_license | package Kalitim;
public class Yonetici extends Calisan {
private int kisi_sayisi;
public Yonetici() {
}
public Yonetici(String name, String department, int salary, int kisi_sayisi) {
super(name, department, salary);
this.kisi_sayisi = kisi_sayisi;
}
public void zam_durumu(i... |
Markdown | UTF-8 | 265 | 2.59375 | 3 | [] | no_license | # react-climate-display
This is a basic react project that displays the message by taking in the latitude of the user and figuring out whether they live in the northern or the southern hemisphere and display a message according to the weather that they are facing.
|
JavaScript | UTF-8 | 3,663 | 2.84375 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
function advanceSearch(){
var searchFor = new Array();
var searchTokens = new Array();
var i = 0;
if(document.ge... |
JavaScript | UTF-8 | 755 | 2.609375 | 3 | [] | no_license | import React, { useState } from "react";
const Form = (props) => {
const [inputValue, setInputValue] = useState("");
const createTodo = async (e) => {
const res = await fetch("http://localhost:1000/", {
method: "post",
body: JSON.stringify({ title: inputValue }),
headers: { "Content-type": "application/j... |
Markdown | UTF-8 | 4,933 | 3.296875 | 3 | [] | no_license | ---
layout: default
title: 基础
permalink: "fundamentals.html"
---
更新时间: 2012-12-30
------
使用D3前需要理解这些概念: HTML, DOM, CSS, JavaScript, SVG,还需要有必要的开发工具。
## HTML
HTML(超文本标记语言, HyperText Markup Language)用于结构化网页内容。最简单的HTML页面如下
{% highlight html %}
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>Page Title</... |
Python | UTF-8 | 1,282 | 2.84375 | 3 | [] | no_license | import requests
from bs4 import BeautifulSoup
import pandas as pd
pages = []
prices = []
stars = []
titles = []
stock = []
pages_to_scrape = 1
new_url = 'http://books.toscrape.com/'
#new_url = 'http://books.toscrape.com/' +soup.find("li", class_="next").find('a').get('href')
while new_url != '':
source = reques... |
JavaScript | UTF-8 | 3,237 | 2.84375 | 3 | [] | no_license |
class LayoutSetting {
constructor () {
this.setScrollDone = false;
this.setTopDone = false;
this.setAnchorDone = false;
this.ELEMENT_NODE = 1;
}
setBackToTop(n_backToTopId) {
if (!this.setScrollDone) {
window.addEventListener("scroll",function(){
let backTopElem = document.getElementById(n_backToTo... |
SQL | UTF-8 | 306 | 3.21875 | 3 | [] | no_license | SELECT * FROM books WHERE author_fname LIKE 'dav%';
SELECT author_lname, AVG(released_year) 'avg year' FROM books GROUP BY author_lname;
AVG IGNORES NULL
SELECT released_year, COUNT(*) FROM books GROUP BY released_year;
SELECT author_fname, author_lname FROM books ORDER BY author_lname, author_fname; |
C# | UTF-8 | 2,080 | 2.75 | 3 | [] | no_license | /*
* Justin Robb
* 4/29/16
* Subscriber Feed
*
*/
namespace SubscriberFeed
{
using System.Drawing;
using System.Windows.Forms;
/// <summary>
/// We can use a transparent text box to display text in our
/// transparent notifications (<see cref="NotificationForm"/>) on top of all other appl... |
C++ | UTF-8 | 621 | 3.796875 | 4 | [] | no_license | #include <iostream>
#include <cstdlib>
using namespace std;
class rectangle {
private:
int x1, y1, x2, y2;
public:
rectangle(int a, int b, int c, int d) {
x1 = a; y1 = b; x2 = c; y2 = d;
}
int area();
int largearea(rectangle rect);
};
int rectangle::area() {
int width =... |
Java | UTF-8 | 761 | 2.984375 | 3 | [] | no_license | package replaySubjectCache;
import io.reactivex.rxjava3.core.Observable;
import java.util.concurrent.TimeUnit;
public class ReplayCacheLesson {
public static void main(String[] args) throws InterruptedException {
Observable<Long> src =
Observable.interval(1, TimeUnit.SECONDS)
... |
PHP | UTF-8 | 3,073 | 2.59375 | 3 | [] | no_license | <?php if (isset($route_name)): ?>
<h2>« <?php echo $route_name ?> » documentation</h2>
<?php endif; ?>
<div class="well">
<?php if (!empty($DESCRIPTION)): ?>
<?php echo $DESCRIPTION ?>
<?php elseif (!empty($ROUTE_DESCRIPTION)): ?>
<?php echo $ROUTE_DESCRIPTION ?>
<?php endif; ?>
</div>
<h2 id="formal... |
Java | UTF-8 | 587 | 2.46875 | 2 | [] | no_license | package resources;
//enum is special class in java which has collection of constants or methods
public enum APIResources {
createProject("/rest/api/3/project/"),
createTask("/rest/api/3/issue/"),
postComment("/rest/api/3/issue/{issueId}/comment"),
updateComment("/rest/api/3/issue/{issueId}/comment/{id}... |
C# | UTF-8 | 1,988 | 3.3125 | 3 | [] | no_license | using System;
namespace BrainCSharp
{
class HelloWorld
{
static void Main(string[] args)
{
sbyte a = -10;
byte b = 40;
Console.WriteLine($"a={a}, b={b}");
short c = -30000;
ushort d = 60000;
Console.WriteLine($"c={c}, d... |
Python | UTF-8 | 1,407 | 2.859375 | 3 | [] | no_license | import pandas as pd
import roundy as rd
from pandas import ExcelWriter
def core(filePath):
data = pd.ExcelFile(filePath)
#reading data from given path
df = rd.meanCore(filePath)
#creating dataFrame from meanCore function of Roundy file
uniqueTime = []
newTarget = []
finalArray = []
#initializing uniqueTime,... |
Java | UTF-8 | 582 | 2 | 2 | [] | no_license | package com.NJCDaniel.dao;
import javax.naming.*;
import javax.sql.*;
public class PostgreSQLConnect {
private static DataSource PostgreSQLConnect = null;
private static Context context = null;
public static DataSource PostgreSQLConnectConn() throws Exception {
if (PostgreSQLConnect != null) {
return Po... |
Markdown | UTF-8 | 5,856 | 3.1875 | 3 | [
"MIT"
] | permissive | ---
published: true
layout: post
subtitle: NFA和DFA等价转换
author: persuez
header-img: img/post-bg-ios9-web.jpg
catalog: true
tags:
- 计算理论
- NFA
- DFA
---
# 每个NFA都有一个等价的DFA
### 证明思路(NFA转DFA的方法)
我们要证明NFA和DFA等价,因为DFA是NFA的一般化,所以NFA一定可以模拟DFA,因此我们需要做的是用DFA模拟NFA。因为NFA在当前状态读到一个字符后可以有多条路可以走,所以模拟该NFA的DFA将有$2^k$个状态,每个状态都是NFA状... |
Java | UTF-8 | 1,167 | 4.0625 | 4 | [] | no_license | package aps2.reversestringfindmax;
public class ReverseStringFindMax {
/**
* This function takes the string argument and reverses it.
*
* @param str Input string.
* @return Reverse version of the string or null, if str is null.
*/
public String swap(char first,char second){
char temp = first
first=sec... |
Markdown | UTF-8 | 543 | 2.65625 | 3 | [
"MIT"
] | permissive | # BRIO Tuscan Grille
* Address: Southlake Town Square, 1431 Plaza Pl, Southlake, TX 76092
* Hours: Open 24 hours a day.
* Phone: (817) 310-3136
“An extensive menu” of “upscale” Italian cuisine (served with “to-die-for” bread) pleases palates at these “frequently packed” chain members in Allen, boasting a “spartan, mo... |
PHP | UTF-8 | 1,116 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace DreamsArk\Commands\Project\Stages\Review;
use DreamsArk\Commands\Command;
use DreamsArk\Events\Project\Stages\ReviewWasCreated;
use DreamsArk\Models\Project\Project;
use DreamsArk\Repositories\Project\Review\ReviewRepositoryInterface;
use Illuminate\Contracts\Bus\SelfHandling;
use Illuminate\Contracts... |
Java | UTF-8 | 2,781 | 2.171875 | 2 | [] | no_license | package com.example.hackproject;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class ProtectionActivity extends Activ... |
C++ | UTF-8 | 1,059 | 3.59375 | 4 | [] | no_license | #include <iostream>
#include <vector>
using namespace std;
void get_temperature_all_days(vector<int>& temperature) {
for (int& t : temperature) {
cin >> t;
}
}
int64_t get_average_temperature(const vector<int>& temperature) {
int64_t sum = 0;
for (auto t : temperature)
sum += t;
... |
Markdown | UTF-8 | 1,676 | 2.609375 | 3 | [
"MIT"
] | permissive | # Contributing to HERE Map Widget for Jupyter
Thank you for taking the time to contribute.
The following is a set of guidelines for contributing to this package.
These are mostly guidelines, not rules. Use your best judgement and feel free to propose
changes to this document in a pull request.
## Coding Guidelines
1... |
Java | UTF-8 | 2,176 | 2.28125 | 2 | [
"Apache-2.0"
] | permissive | package org.haftrust.verifier.dao;
import static org.junit.Assert.*;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.List;
import org.haftrust.verifier.config.DbConfig;
import org.haftrust.verifier.model.Verifier;
import org.haftrust.verifier.model.enums.EmployeeType;
import org.haftrust.verifi... |
Python | UTF-8 | 1,669 | 3.265625 | 3 | [] | no_license | import csv
#This function reads the tsv file given by the file_name parameter
def read_tsv(file_name, separator):
try:
f = open(file_name, 'r', newline='', encoding='utf-8')
except IOError:
print('Cannot open the file <{}>'.format(file_name))
raise SystemExit
tsv_read = csv.reader(... |
Python | UTF-8 | 3,832 | 2.796875 | 3 | [] | no_license | import torch
import torch.nn as nn
import torchvision
import torchvision.transforms as transforms
from torch.autograd import Variable
import numpy as np
import sys
from sklearn.model_selection import GridSearchCV
# from skorch import NeuralNetClassifier
class NeuralNet(nn.Module):
def __init__(self, input_size, ... |
TypeScript | UTF-8 | 718 | 2.609375 | 3 | [] | no_license | import { Http } from '@angular/http';
import { Injectable } from '@angular/core';
import 'rxjs/add/operator/map';
@Injectable()
export class WeatherProvider {
apiKey: any;
url: any;
constructor(public http: Http) {
this.apiKey = "c6ef55c91cd0eb97383abf69248d2b7f";
this.url = "https://api.openweather... |
Java | UTF-8 | 3,313 | 3.265625 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package lab1;
import java.util.Scanner;
/**
*
* @author user
*/
public class Building {
public void setInf... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.