language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
Java | UTF-8 | 2,791 | 2.109375 | 2 | [] | no_license | package com.hanatour.api.login.interceptor;
import java.io.PrintWriter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.ui.ModelMap;
impor... |
Python | UTF-8 | 2,580 | 2.703125 | 3 | [] | no_license | from tkinter import *
from tkinter import messagebox
import sqlite3
from login import *
con = sqlite3.connect("test.db")
cd= con.cursor()
cd.execute("create table if not exists login(username varchar2(40),password varchar(20));")
root = Tk()
root.title("Signup")
width = root.winfo_screenwidth()
height = root.winfo_sc... |
Go | UTF-8 | 1,173 | 2.703125 | 3 | [
"MIT"
] | permissive | package partners
import "github.com/alexeyco/unisender/api"
// GetCheckedEmailResponse sender info.
type GetCheckedEmailResponse struct {
Email string `json:"email"`
Name string `json:"name"`
IsChecked bool `json:"is_checked"`
}
// GetCheckedEmailRequest request, that gets an object with confirmed and ... |
Java | UTF-8 | 1,296 | 3.40625 | 3 | [] | no_license | package com.io;
import java.io.PrintWriter;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Scanner;
public class Employee {
private String name;
private double salary;
private Date hireDay;
public Employee(String name, double salary,int year,... |
Ruby | UTF-8 | 4,080 | 3.03125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | module Datadog
class Statsd
class ConnectionCfg
attr_reader :host
attr_reader :port
attr_reader :socket_path
attr_reader :transport_type
def initialize(host: nil, port: nil, socket_path: nil)
initialize_with_constructor_args(host: host, port: port, socket_path: socket_path) ... |
TypeScript | UTF-8 | 807 | 2.859375 | 3 | [] | no_license | import { Controller, Get, Post, Request, Response, Param, Next, HttpStatus, Body } from '@nestjs/common';
import { CreateUserDTO } from './DTO/create-users.dto';
@Controller('users')
export class UsersController {
@Get()
//使用Express的參數
getAllUsers( @Request() req, @Response() res, @Next() next) {
... |
Python | UTF-8 | 458 | 3.109375 | 3 | [] | no_license | from gc import collect
class Cache:
def __init__(self, src, cvt):
self._src = src
self._cvt = cvt
def reset(self, length: int):
self._arr = [None] * length
collect()
def __getitem__(self, idx: int):
item = self._arr[idx]
if item is None:
ite... |
Python | UTF-8 | 866 | 3.21875 | 3 | [] | no_license | import bisect
def precompute(n):
# print(n)
result = 1
temp = 0
while n%2 == 0:
n/=2
temp+=1
result = temp*2 +1
if(result >= 10000):
return -1
i=3
while i*i <= n:
temp = 0
while n%i == 0:
n/=i
temp+=1
... |
Java | UTF-8 | 1,151 | 1.695313 | 2 | [] | no_license | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.cardinalblue.android.piccollage.view;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas... |
JavaScript | UTF-8 | 2,737 | 2.75 | 3 | [] | no_license | /*$(document).ready(function(){
$.ajax({
url :"http://www.omdbapi.com/?apikey=[48390ddf] ",
//اذا اردت ان يجدني
data :{
id :'48390ddf'
}
}).done(function(user){
console.log(user.id)
})
})*/
//API openweather
const api ={
key :'361a6339c3c0363eed30196989922d2a',
base_url :... |
C++ | UTF-8 | 2,613 | 3.140625 | 3 | [] | no_license | // Problem: 10557 - XYZZY
// Link: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1498
// Solution: Mai Thanh Hiep
// Complextiy: O(N^4), N <= 100
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
// check if have path from src to ds... |
PHP | UTF-8 | 1,162 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreProductInfo extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get ... |
Markdown | UTF-8 | 4,937 | 3.078125 | 3 | [] | no_license | # Référentiel CMS
## Méthodologie d'utilisation du référentiel CMS
### Champ d'application
Le référentiel s'applique à un outil si :
- l'outil permet d'éditer des contenus ;
- les contenus saisis ont vocation à être rendus publics à un groupe d'utilisateurs.
Ainsi, un formulaire de contact sur un site n... |
Python | UTF-8 | 1,473 | 3.125 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Thu Nov 7 13:56:45 2019
@author: Mustafa Biyikli & Katarzyna Lenard
"""
import numpy as np
class Wavelet:
def __init__(self, number_of_taps):
self.M = number_of_taps
def Morlet(self):
mor1 = np.empty(self.M)
mor1_inversed = np.empty(... |
C++ | UTF-8 | 876 | 2.984375 | 3 | [] | no_license | //
// CardTester.hpp
// DeckOfCards
//
// Created by Ningning Liu on 5/14/19.
// Copyright © 2019 Ningning Liu. All rights reserved.
//
// Class Name : CardTester
//
// Description: Testing class for Card class.
// 1. testCardCreation will check if the Card created will have the right suit and rank.
// 2. test... |
Java | UTF-8 | 157 | 2.125 | 2 | [] | no_license | package designpattern.others.servicelocator;
/**
* Created by kimi on 4/28/16.
*/
public interface Service {
String getName();
void execute();
}
|
Markdown | UTF-8 | 538 | 2.65625 | 3 | [] | no_license | # Tuna
Educational project about mobx, typescript and sass, and other web technologies I want to try out.
I want to implement a round based tactical rpg using web technologies, because why not.
No canvas rendering, just plain elements. let's see how that works.
---
## Development
I use storybook to develop component ... |
Markdown | UTF-8 | 14,533 | 2.703125 | 3 | [] | no_license | # Практика. Классификация изображений с использованием возможностей модуля dnn библиотеки OpenCV
## Содержание
1. [Цели][purpose]
1. [Задачи][tasks]
1. [Последовательность выполнения работы][scheme]
1. [Структура репозитория][repo-structure]
1. [Полезные ссылки][refs]
## Цели
**Цель** данной работы состоит в том, ч... |
C# | UTF-8 | 4,722 | 2.953125 | 3 | [
"MIT"
] | permissive | using System;
namespace XPNet
{
// TODO: inIsBefore should either be an enum that maps to the expected int values or
// an XPBoolean; don't want to expose 'int' as if it was a 'bool' b/c that's a C-ism
// that isn't how you do things in C#. An enum makes the possible values crystal clear,
// but XPBo... |
JavaScript | UTF-8 | 381 | 2.8125 | 3 | [
"MIT"
] | permissive | const CustomError = require("../extensions/custom-error");
module.exports = class DepthCalculator {
calculateDepth(arr, counter = 1) {
if(!Array.isArray(arr)) {
throw Error();
}
if(arr.some(elem => Array.isArray(elem))) {
arr = arr.flat();
counter++;
} else {
return count... |
Java | UTF-8 | 3,336 | 3.484375 | 3 | [
"MIT"
] | permissive | package seedu.address.commons.util;
import static java.util.Objects.requireNonNull;
//@@author CT15
/**
* Utility methods related to dates
*/
public class DateUtil {
public static final String MESSAGE_DATE_CONSTRAINTS =
"The date for %1$s must exist and follow DD-MM-YYYY format";
private stati... |
Java | UTF-8 | 949 | 1.898438 | 2 | [] | no_license | package com.levi9.imgtocurve;
import com.levi9.imgtocurve.storage.StorageService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
... |
JavaScript | UTF-8 | 1,836 | 2.5625 | 3 | [] | no_license | import express from 'express'
import dotenv from 'dotenv'
import asyncHandler from 'express-async-handler'
import connectDB from './config/db.js'
import Task from './models/taskModel.js'
dotenv.config()
connectDB()
const app = express()
app.use(express.json())
app.get(
'/api/tasks',
asyncHandler(async (req, res) ... |
Java | UTF-8 | 863 | 2.390625 | 2 | [
"BSD-3-Clause"
] | permissive | package codeprober.protocol.data;
import org.json.JSONObject;
public class PutTestSuiteReq implements codeprober.util.JsonUtil.ToJsonable {
public final String type;
public final String suite;
public final TestSuite contents;
public PutTestSuiteReq(String suite, TestSuite contents) {
this.type = "Test:Put... |
Java | UTF-8 | 610 | 2.96875 | 3 | [] | no_license | package models;
public class Inventory {
public int id;
public String name;
public int quantity;
public int safetyStock;
public Inventory(int id, String name, int quantity, int safetyStock) {
this.id = id;
this.name = name;
this.quantity = quantity;
this.safetyStock = safetyStock;
}
public Inventory(... |
Markdown | UTF-8 | 1,308 | 3.015625 | 3 | [] | no_license | # drawlab
Collaborative Drawing App (in progress)
## Tough Problems Encountered
# Problem 1
Problem: When you're drawing a line too fast the event listener isn't able to pick up on all the pixels your mouse went over. There'd be gaps of a couple pixels.
Solution: Keep track of previous point encountered and connect... |
Shell | UTF-8 | 930 | 3.671875 | 4 | [] | no_license | #!/bin/sh
TABB=' '
clock() {
date +%H:%M:%S
}
geteth() {
var=$(echo $(ifconfig eth0 | grep 'inet ') | awk '{print $2;}')
echo "E: $var"
}
freespace(){
myS=$(df -k / | tail -1 | awk '{print $4}')
myW=$(echo "scale=2 ; $myS / 1000" | bc)
echo "$myW MB"
}
getip(){
echo "extIP: $(curl -... |
Python | UTF-8 | 2,056 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | # 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 writing, software
# distributed under the Li... |
Java | UTF-8 | 738 | 3.484375 | 3 | [] | no_license | package exercicio.exercicio03;
public class Conta {
private int numConta;
private double saldo;
public Conta(int numConta){
this.numConta = numConta;
this.saldo = 0;
}
public double getSaldo() {
return saldo;
}
public int getNumConta() {
return numConta;
... |
Python | UTF-8 | 2,783 | 3.28125 | 3 | [] | no_license | import sys
import time
import user_utils
USER_DICT = {}
Questions = {
1: 'What is your fathers name ->: ',
2: 'What is your teachers name ->: ',
3: 'What is your pets name ->: ',
4: 'What is your last working company\'s name ->: ',
}
def register_user(username, password, question, answer):
u... |
TypeScript | UTF-8 | 1,545 | 2.640625 | 3 | [
"ISC"
] | permissive | import path from 'path';
import { ux, Flags } from '@oclif/core';
import BaseCommand from '../BaseCommand';
import { readMetadataFromFileSystem } from '../helpers/readMetadataFromFileSystem';
import { SerializableIO } from '../../serializable/SerializableIO';
export default class Cache extends BaseCommand {
static ... |
C++ | UTF-8 | 1,686 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | #include "corpus.h"
using namespace std;
Dict::Dict() : b0_("<bad0>") {
words_.reserve(1000);
}
unsigned Dict::max() const {
return words_.size();
}
bool Dict::is_ws(char x) {
return (x == ' ' || x == '\t');
}
void Dict::ConvertWhitespaceDelimitedLine(const string& line, WordVector* out) {
size_t cur = 0;
siz... |
Markdown | UTF-8 | 2,843 | 2.796875 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "The Ultimate Revelation Of Example Of Biodata For Job"
postname: "example-of-biodata-for-job"
date: 2017-04-23 09:43:55 +0700
categories: [resume]
---
Example of Biodata for Job Options
====================================
The Bizarre Secret of Example of Biodata for Job
---------------... |
Java | UTF-8 | 21,427 | 2.4375 | 2 | [] | no_license | package com.lz.game.test.common;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import redis.clients.jedis.*;
import redis.clients.jedis.BinaryClient.LIST_POSITION;
import java.util.*;
import java.util.concurrent.TimeUnit;
/**
* @author Teaey
* @creation 2012-8-15
*/
public class Redis implements JedisCom... |
TypeScript | UTF-8 | 460 | 3.09375 | 3 | [] | no_license | export function User(name: string, email: string) {
return function(classFn: Function) {
classFn.prototype.name = name;
classFn.prototype.email = email;
};
}
@User("name", "email")
export class Guest implements IAdmin {
name: string;
email: string;
constructor(name: string, email: string) {
this... |
Java | UTF-8 | 13,529 | 1.8125 | 2 | [] | no_license | package org.appspot.apprtc.chat;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActi... |
Markdown | UTF-8 | 837 | 2.796875 | 3 | [] | no_license | # mask 遮罩层
### 引入
```js
import { kisMask } from 'kisUI';
```
## 代码演示
### 基础用法
```html
<kis-mask :showmask="showmask" :zindex="999" @hideMask="hideMask" />
```
```js
export default {
data() {
return {
showmask: true,
};
},
methods: {
hideMask() {
this.showmask = false;
},
},
};
... |
TypeScript | UTF-8 | 516 | 3.15625 | 3 | [
"MIT"
] | permissive | // tslint:disable
export type EasingFunction = (
currentStep: number,
offsetValue: number,
distance: number,
totalSteps: number,
) => number
export const defaultEasingFunction: EasingFunction = (
currentStep: number,
offsetValue: number,
distance: number,
totalSteps: number,
) => {
currentStep /= tot... |
C++ | UTF-8 | 416 | 3.453125 | 3 | [] | no_license | #include <iostream>
#include <cmath>
using namespace std;
bool isPrime(int);
bool isPrime(int n){
for(int i = 2; i <= sqrt(n); ++i){
if(n % i == 0){
return false;
}
}
return true;
}
int main()
{
int n;
for(n = 10; n <= 1000; ++n){
if (isPrim... |
Python | UTF-8 | 471 | 3.15625 | 3 | [] | no_license | from abc import ABCMeta, abstractmethod
class PersistentInteger(object):
"""This class represents a persistent integer.
All operations have ACID semantics.
"""
__metaclass__ = ABCMeta
@abstractmethod
def get(self):
"""Return the integer value."""
@abstractmethod
def set(self... |
PHP | UTF-8 | 178 | 2.859375 | 3 | [] | no_license | <?php
namespace Help;
class Help {
public function checkNumber($num)
{
$result = false;
if(is_numeric($num) == true)
{
$result = true;
}
return $result;
}
}
|
C | UTF-8 | 8,045 | 2.515625 | 3 | [
"LicenseRef-scancode-mit-taylor-variant"
] | permissive | /*
* path.c
* filesystem path management
*
* Copyright (c) 2016 pkgconf authors (see AUTHORS).
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.... |
Java | UTF-8 | 889 | 1.921875 | 2 | [] | no_license | package com.scc.ticketmanagement.services;
import com.scc.ticketmanagement.Entities.MessageEntity;
import com.scc.ticketmanagement.exentities.Conversation;
import org.springframework.data.domain.Page;
import java.util.List;
/**
* Created by Thien on 11/2/2016.
*/
public interface MessageService {
List<MessageE... |
C | UTF-8 | 2,180 | 3.78125 | 4 | [] | no_license | #include "complex.h" //complex numbers
//initialize a complex number
complex *complex_init(complex *x, double real, double imag) {
x->real = real;
x->imag = imag;
return x;
}
//scale a complex number
//cmplx = cmplx * scale
complex *complex_scale(complex *x, double scale) {
static complex z;
z.re... |
JavaScript | UTF-8 | 519 | 3.390625 | 3 | [] | no_license | export class Matrix {
constructor(str) {
this.rows = str.split("\n").map((p) => {
let test = p.split(" ");
let result = [];
for (let i = 0; i < test.length; i++) {
result.push(parseInt(test[i]));
}
return result;
});
this.columns = [];
for (let i = 0; i < this.r... |
JavaScript | UTF-8 | 4,441 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | import storageBuilder from '../../lib/storageBuilder';
describe('storageBuilder', () => {
it('throws if a storagename is not provided', () => {
const fn = function() {
storageBuilder();
};
expect(fn).toThrowError('"storageName" is required');
});
it('Returns an interface around a storage obje... |
JavaScript | UTF-8 | 1,518 | 4.03125 | 4 | [
"MIT"
] | permissive | //Javascipt and Jquery for CalculatorApp
//Code inside the $(document). ready() function will only run once the page Document Object Model (DOM) is ready for Javascript code to execute.
$(document).ready(function (){
//Append method will run if the user clicks on any of the keys on the calculator except for the ... |
TypeScript | UTF-8 | 791 | 2.90625 | 3 | [
"MIT"
] | permissive | import React from 'react';
import { Component } from './types/component';
type Hooks<P, S> = {
componentDidMount?: (props: P) => S;
componentWillUnmount?: (props: P, lifeState: S) => void;
};
export function lifecycle<P, S = void>(hooks: Hooks<P, S>) {
return (Component: Component<P>) => {
return class Life... |
C++ | UTF-8 | 153 | 2.84375 | 3 | [] | no_license | #include<iostream>
using namespace std;
int main()
{
double radius,area;
cin>>radius;
area=3.14*radius*radius;
cout<<area<<endl;
return 0;
} |
TypeScript | UTF-8 | 1,313 | 2.703125 | 3 | [] | no_license | /**
* Service base on which all other services are based.
* Handles the boiler plate code for communicating with the server
*/
import { Injectable } from '@angular/core';
import { Headers, Http, Response, RequestOptions, Request } from '@angular/http';
import { Location } from '@angular/common';
import { Observable ... |
Ruby | UTF-8 | 1,139 | 2.734375 | 3 | [
"MIT",
"LicenseRef-scancode-public-domain"
] | permissive | # frozen_string_literal: true
gem 'minitest'
require 'minitest/autorun'
require_relative 'custom_assertions'
require_relative '../generator/question_writer'
class TestQuestionWriter < MiniTest::Test
def test_prologue_starts_with_title
prologue = QuestionWriter.write('Test PART TITle (FOO *)', '')
assert_sta... |
Python | UTF-8 | 4,502 | 3.015625 | 3 | [] | no_license | import random
import itertools
import math
import gym
import numpy as np
import torch
from collections import namedtuple
import torch.nn.functional as F
from pong_env import PongEnv
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
Transition = namedtuple('Transition',
(... |
C++ | UTF-8 | 1,169 | 2.984375 | 3 | [] | no_license | #ifndef UTIL_H
#define UTIL_H
#include "vec.h"
namespace Util
{
/**
* @brief 平移坐标点
* @param x0
* @param y0
* @param x1
* @param y1
* @param xDist
* @param yDist
*/
void movePointXY(double x0, double y0, double &x1, double &y1,double xDist, double yDist);
/**
* @brief 当前像素点映射到坐标轴上,xy直角坐标系
* @param x0 变... |
C | UTF-8 | 5,803 | 3.640625 | 4 | [] | no_license | #include "frame.h"
frameStruct* initFrameTable(int numEntries) {
frameStruct* frameTable = (frameStruct*) malloc(sizeof(frameStruct));
frameTable->numEntries = 0;
frameTable->firstEntry = NULL;
frameTable->lastEntry = NULL;
int i;
bool firstRun = true;
frameEntryStruct* tmp;
for(i=... |
Java | UTF-8 | 10,987 | 2.0625 | 2 | [
"Apache-2.0"
] | permissive | package scouter.plugin.server.reporting.service;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.SqlSession;
import scouter.plugin.server.reporting.vo.AgentInfo;
import scout... |
Swift | UTF-8 | 11,335 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | //
// MXAnimation.swift
// MXAlertView
//
// Created by 李茂轩 on 15/2/10.
// Copyright (c) 2015年 lee. All rights reserved.
//
import UIKit
public enum AnimationType{
case ElasticScale // This type can Elastic zoom in or Elastic zoom out
case NormalScale // This is a normal scale animation
case Nor... |
JavaScript | UTF-8 | 993 | 3.5625 | 4 | [
"MIT"
] | permissive | function cake(args){
let widthCake = Number(args[0]);
let lengthCake = Number(args[1]);
let cakeSize = widthCake * lengthCake;
let sum = 0;
let diff = 0;
let sumWithStop = 0;
let diffWithStop = 0;
let lastElement = "";
for(let i = 2; i < args.length; i++){
let currentPiec... |
Java | UTF-8 | 6,841 | 2.578125 | 3 | [] | no_license | package com.bookingsystem.entities;
import javax.persistence.*;
import java.time.LocalDate;
/**
* Created by vijay on 2/27/17.
*/
@Entity
@Table(name = "CUSTOMER")
final public class Customer extends BaseEntity implements Comparable<Customer> {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Colum... |
Rust | UTF-8 | 14,473 | 2.859375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | //! This transport sends emails using the SMTP protocol
use EmailTransport;
use SendableEmail;
use openssl::ssl::{SslContext, SslMethod};
use smtp::authentication::Mechanism;
use smtp::client::Client;
use smtp::error::{Error, SmtpResult};
use smtp::extension::{Extension, ServerInfo};
use std::net::{SocketAddr, ToSocke... |
Java | UTF-8 | 5,107 | 2.03125 | 2 | [] | no_license | package app.diary.advocates.advocatesdiary;
import android.app.FragmentManager;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
... |
C++ | UTF-8 | 634 | 3.65625 | 4 | [] | no_license | class MovingAverage {
public:
/** Initialize your data structure here. */
int max_size;
list<int> num_list;
int sum;
MovingAverage(int size) {
max_size = size;
sum = 0;
}
double next(int val) {
sum += val;
num_list.push_back(val);
if (num_list.siz... |
Java | UTF-8 | 9,313 | 1.710938 | 2 | [] | no_license | /*
*
* Moonzdream Confidential and Proprietary
*
* This work contains valuable confidential and proprietary information.
* Disclosure, use or reproduction outside of Moonzdream, Inc. is prohibited
* except as authorized in writing. This unpublished work is protected by
* the laws of ... |
C# | UTF-8 | 2,823 | 3.25 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Almacen
{
public class Almacen
{
private string nombre;
private string direccion;
private List <Inventario> inv;
private int... |
JavaScript | UTF-8 | 1,928 | 2.59375 | 3 | [] | no_license | import blogService from '../services/blogs';
import {setFulfilledMessage, setErrorMessage} from './notificationReducer';
const blogReducer = (state = [], action) => {
switch (action.type) {
case 'INIT_BLOGS': {
return action.data;
}
case 'CREATE_BLOG': {
return [...state, action.data];
}
case 'LIKE_BL... |
Java | UTF-8 | 3,895 | 2.625 | 3 | [] | no_license | package cn.zipper.framwork.canvas;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
public final class Pen {
// Bitmap logo = BitmapLoader.getBitmap(R.drawable.oxy_logo);
// logo = Graphics.rotate(logo, r, true);
//
// Shape shape = new ... |
JavaScript | UTF-8 | 2,873 | 2.5625 | 3 | [] | no_license | import axios from "axios";
import { getRedirectPath } from '../util';
const ERROR_MSG = 'ERROR_MSG';
const AUTH_SUCCESS = 'AUTH_SUCCESS';
const LOAD_DATA = 'LOAD_DATA';
const USER_LOGOUT = 'USER_LOGOUT';
const initState = {
redirectTo: '',
isAuth: '',
msg: '',
user: '',
type: ''
}
// reducer: 处理状... |
Java | UTF-8 | 567 | 2.140625 | 2 | [] | no_license | package com.alexspoonner.dao;
import com.alexspoonner.model.Student;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* Student Repo
*/
@Repository
@Transaction... |
Markdown | UTF-8 | 1,675 | 2.578125 | 3 | [
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | ---
title: LaTeX文档多图排版
date: '2022-02-14'
linkTitle: https://zll-blog.netlify.app/2022/02/index.en-us/
source: Homepage on Liangliang's Homepage
description: |-
<h2 id="简介">简介</h2> <p>这是关于 LaTeX 文档多图排版技巧笔记,内容来源于 Wei LI 的<a href="https://VVingerfly.github.io/2018/02-16-Tex-imageTypesetting/">博文</a>,这里做个笔记和分享。</p> <h2 ... |
PHP | UTF-8 | 7,715 | 3.546875 | 4 | [] | no_license | <?php
/**
* Node used for the priority queue
*
* @author Edward Rees
* @version 1.0
*/
class QueueNode
{
/**
* Priority for the individual node
*
* Must be an integer
*
* @var int $priority priority for the individual node, must be an integer
*/
private $priority;
/**
... |
PHP | UTF-8 | 1,124 | 2.59375 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class extframe extends frame {
function load_head($index = 0) {
$data = $this->CI->config->config;
switch($index) {
case 0:
$viewname = $this->CI->config->item('language').'/block/header';
... |
Markdown | UTF-8 | 7,885 | 3.078125 | 3 | [] | no_license | Title: Software development pipeline - Design performance
Tags:
- Delivering software
- Software development pipeline
- Pipeline design
- DevOps
---
The [second property](/posts/Software-development-pipeline-Design-introduction.html) to consider is
*performance*, which in this case means that the pipe... |
Python | UTF-8 | 3,328 | 3.40625 | 3 | [] | no_license | #!/usr/bin/env python
# coding: utf-8
# Like probably everyone else in this contest, I've been scratching my head: what to do about validation? The usual approaches don't work (obviously regular cross validation is a bad idea due to the time dimension, the score on last year of data is nowhere near the LB). Solution? ... |
Java | UTF-8 | 3,995 | 2.109375 | 2 | [] | no_license | package com.yyicbc.utils.freemarker.pdf.ctcc;
import com.yyicbc.beans.business.PO.CusetomerAgreementPO;
import com.yyicbc.beans.enums.FovaPayStatus;
import com.yyicbc.beans.enums.ServiceStatusEnums;
import com.yyicbc.beans.imports.PO.FovaUpdateDataPO;
import com.yyicbc.beans.utils.YyStringUtils;
import com.yyicbc.util... |
Java | UTF-8 | 2,174 | 2.09375 | 2 | [] | no_license | package com.julisha.afrisuser.julisha;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class LoginActivity extends AppCompatActivity implements View.OnClickListener ... |
Java | UTF-8 | 3,033 | 2.203125 | 2 | [] | no_license | /**
* Generated on Wed Feb 19 10:15:44 UTC 2020 by ObjGen 3.0
*/
package abhijit.osdm_wop.models;
/**
* Description for MyClass
*/
public class FlatOwner {
/** Property id */
int id;
/** Property ownername */
String ownername;
/** Property flatnumber */
String flatnumber;
/** Property... |
Python | UTF-8 | 2,618 | 4.0625 | 4 | [] | no_license | # 3. Elements counting. It refers to the sections 1.12 and 1.4-1.5 of the Python Cookbook. Implement the Counter class. It should only support operations like __iter__, __getitem__ and .most_common(n). Try to make it as efficient as possible in terms of performance. Think of an underlying data structure that should be ... |
Python | UTF-8 | 2,466 | 3.53125 | 4 | [
"Unlicense"
] | permissive |
#accessMode
# 0 - position mode
# 1 - immediate mode
def get_data(program, address, accessMode):
if accessMode == 0:
return program[program[address]]
elif accessMode == 1:
return program[address]
print("get_data() exception - unrecognized accessMode: " + accessMode)
ret... |
PHP | UTF-8 | 2,616 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/* Copyright (c) 2014 Karl-Edward F P Jean-Mehu
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use... |
JavaScript | UTF-8 | 9,108 | 2.65625 | 3 | [] | no_license | // component/vipTimeSlot/vipTimeSlot.js
let setDate = (i) => {
const currentDate = new Date()
const currentTime = currentDate.getTime()
currentDate.setDate(currentDate.getDate() + i)
let year = currentDate.getFullYear()
let month = currentDate.getMonth() + 1
let day = currentDate.getDate()
let time = `${y... |
C# | UTF-8 | 614 | 2.5625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
namespace Amethyst.Repositories.Interfaces
{
public interface IGenericRepository<T> where T : class
{
IQueryable<T> GetAll();
IQueryable<T> FindBy(System.Linq.Expressions.Expression<Func<T, bool>> predicate);
T Find(Sys... |
Java | UTF-8 | 1,680 | 2.296875 | 2 | [] | no_license | package com.online.solrj;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.HttpSolrServer;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.c... |
Python | UTF-8 | 330 | 3.4375 | 3 | [] | no_license | name = "Harry"
channel = "CodeWithHarry"
type = "Coding"
# a = f"This is {name}"
# a = "This is {}".format(name)
# a = "This is {} and his channel is {}".format(name, channel)
# a = "This is {0} and his {2} channel is {1}".format(name, channel, type)
a = "This is {} and his {} channel is {}".format(name, channel, type)... |
Java | UTF-8 | 5,249 | 3.4375 | 3 | [] | no_license | /*
* Name: Chris Dobbins
* Description: Game functionality here. Contains an IMaze and IDatabase and game logic to play through a game.
*/
package TriviaGame;
import java.io.FileOutputStream;
import java.io.ObjectOutputStream;
import java.util.Scanner;
public class TriviaGame {
private IMaze maze;
private ID... |
C# | UTF-8 | 653 | 3.171875 | 3 | [] | no_license | using System.Collections.Generic;
using Lexing.Tokens;
namespace Lexing
{
public class TokenReader
{
private readonly List<Token> _tokens;
private int _pos;
public TokenReader(List<Token> tokens)
{
_tokens = tokens;
}
public bool EndOfStream => _po... |
Java | UTF-8 | 354 | 1.6875 | 2 | [] | no_license | package shop.service;
import java.util.List;
import shop.pojo.ShopAddress;
public interface ShopAddressService {
List<ShopAddress> findAll(Integer userId);
void insert(ShopAddress shopAddress, Integer userId);
void delect(ShopAddress shopAddress);
ShopAddress findOne(Integer id);
void updat... |
Python | UTF-8 | 1,354 | 3.390625 | 3 | [] | no_license | """判断是否存在1-n的排列使得ai与bi相邻
所有点度数不超过2
不存在环
"""
from collections import deque
import sys
from typing import List
sys.setrecursionlimit(int(1e9))
input = lambda: sys.stdin.readline().rstrip("\r\n")
MOD = 998244353
INF = int(4e18)
if __name__ == "__main__":
def solve(n: int, edges: List[List[int]]) ->... |
Java | UTF-8 | 771 | 2.03125 | 2 | [] | no_license | package com.cltech.lis.api.rest.models.services;
import java.util.List;
import java.util.Optional;
import com.cltech.lis.api.rest.models.entity.Orden;
import com.cltech.lis.api.rest.models.entity.Paciente;
import com.cltech.lis.api.rest.models.entity.Tipo;
public interface IPacienteService {
public List<Paciente... |
Python | UTF-8 | 2,195 | 3.703125 | 4 | [] | no_license | class HashTable:
def __init__(self, sz, stp):
self.size = sz
self.step = stp
self.slots = [None] * self.size
def hash_fun(self, value):
"""
в качестве value поступают строки!
всегда возвращает корректный индекс слота
"""
str_sum = 0
for i ... |
Ruby | UTF-8 | 1,505 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | require 'sinatra/base'
require 'json'
class Produce < Sinatra::Base
_fruits = {
1 => {
:id => 1,
:type => 'apple',
:quantity => 12,
:price => 1.25
},
2 => {
:id => 2,
:type => 'pear',
:quantity => 10,
:price => 1.00
},
}
_purchases = {}
get '/f... |
Python | UTF-8 | 91 | 2.75 | 3 | [] | no_license | testVar = raw_input("Username")
testVar1 = raw_input("Password")
print(testVar1+testVar)
|
C# | UTF-8 | 891 | 2.5625 | 3 | [
"MIT"
] | permissive | namespace Protogame
{
using System.Linq;
using Microsoft.Xna.Framework;
public class VerticalContainer : FlowContainer
{
public override void Render(IRenderContext context, ISkinLayout skinLayout, ISkinDelegator skinDelegator, Rectangle layout)
{
skinDelegator.Render(con... |
Python | UTF-8 | 1,295 | 2.625 | 3 | [] | no_license | # import flask, blueprint, render template, request, url and redirect from flask
from flask import Flask, Blueprint, render_template, request, url_for, redirect
# import database from common file
import common.database as db
# name inhibitor blueprint route
inhibitor_blueprint= Blueprint('inhibitor', __name__)
@inh... |
Swift | UTF-8 | 3,730 | 3.375 | 3 | [
"MIT"
] | permissive | //
// StructViewController.swift
// TestProj21
//
// Created by Rahul Patel on 3/11/21.
//
import UIKit
struct MyStruct: Equatable {
var age: Int = 0
var name: String = "name"
var newname: String?
}
class MyClass {
var leadName = "Rahul"
var leadAge: Int = 10
var onePerson = MyStruct(age: 3... |
Java | ISO-8859-1 | 1,911 | 2.390625 | 2 | [
"MIT"
] | permissive | package fr.dawan.el.dao;
import javax.mail.Message;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex... |
Python | UTF-8 | 2,651 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | """
fs.tests.test_hadoop: TestCases for the HDFS Hadoop Filesystem
This test suite is skipped unless the following environment variables are
configured with valid values.
* PYFS_HADOOP_NAMENODE_ADDR
* PYFS_HADOOP_NAMENODE_PORT [default=50070]
* PYFS_HADOOP_NAMENODE_PATH [default="/"]
All tests will be executed wi... |
C | UTF-8 | 674 | 4.1875 | 4 | [] | no_license | #include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[]){
// Void type pointer, a generic pointer
int a = 1025;
int *p;
p = &a;
printf("The size of an integer is %li bytes.\n", sizeof(int));
printf("The address the pointer stores is %p, which has the value %d.\n", p, *p);
... |
Shell | UTF-8 | 394 | 3.234375 | 3 | [] | no_license | locale() {
require locale.gen
locale.gen() {
config_file=/etc/locale.gen
is_met() {
grep -F en_US.UTF-8 $config_file | grep -Ev '^#'
}
meet() {
sudo sed -i '/^.*en_US.UTF-8.*$/d' $config_file
sudo sh -c "echo 'en_US.UTF-8 UTF-8' >> $config_file"
}
}
is_met() {
local... |
C | UTF-8 | 2,598 | 2.546875 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* sti_operation.c :+: :+: :+: ... |
Java | UTF-8 | 101 | 1.984375 | 2 | [] | no_license | package src.decorator;
/**
* 流的抽象组件
*/
public interface Stream {
void option();
}
|
PHP | UTF-8 | 4,079 | 3.015625 | 3 | [] | no_license | <?php
/*
* Accounts model
*/
// Insert site visitor data to database
function regAdmin($adminfirstname, $adminlastname, $adminemail, $adminpassword){
// Create a connection object using the project connection function
$db = projectConnect();
// The SQL statement
$sql = 'INSERT INTO administrator (adminfirstname, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.