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 | 1,459 | 2.53125 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: "C28198 | Microsoft Docs"
ms.custom: ""
ms.date: 11/15/2016
ms.prod: "visual-studio-dev14"
ms.reviewer: ""
ms.suite: ""
ms.technology:
- "vs-devops-test"
ms.tgt_pltfrm: ""
ms.topic: "article"
f1_keywords:
- "C28198"
helpviewer_keywords:
- "C28198"
ms.assetid: 8bad4acb-712c-43f5-81d1-45d92092d4c5
cap... |
TypeScript | UTF-8 | 510 | 2.546875 | 3 | [] | no_license | import { Pipe, PipeTransform } from '@angular/core';
import { FriendRelationUnit } from '../Models/friend-relation-unit';
@Pipe({
name: 'search'
})
export class SearchPipe implements PipeTransform {
transform(items: FriendRelationUnit[], term: string): any {
if (items===undefined || term === undefined || term... |
JavaScript | UTF-8 | 577 | 2.6875 | 3 | [] | no_license | import React, { useState, useEffect } from "react";
import axios from "axios";
import Book from "./Book";
export default function ListBooks() {
const [bookList, setBookList] = useState([]);
useEffect(() => {
axios
.get("https://www.googleapis.com/books/v1/volumes?filter=free-ebooks&q=a")
.then((re... |
C++ | UTF-8 | 1,277 | 3.625 | 4 | [] | no_license | #include "trackingDeck.h"
//create a tracking deck
TrackingDeck::TrackingDeck(int a_size)
{
m_length = a_size;
m_data = new card [m_length];
for(int r = 0; r < m_length; ++r)
{
//make sure the tracking deck is empty
m_data[r].m_type = NULL;
m_data[r].m_color = NULL;
m_data[r].m_quantity = ... |
Java | UTF-8 | 2,409 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | package org.quicktheories.generators;
import static org.assertj.core.api.Assertions.assertThat;
import static org.quicktheories.impl.GenAssert.assertThatGenerator;
import org.junit.Test;
import org.mockito.Mockito;
import org.quicktheories.core.Gen;
import org.quicktheories.core.RandomnessSource;
import org.quicktheo... |
Rust | UTF-8 | 643 | 2.9375 | 3 | [
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | use std::time::Instant;
use std::cmp::{Ord, Ordering, PartialOrd, PartialEq};
#[derive(Debug, Clone, Copy)]
pub enum TaskType {
Resend,
}
#[derive(Clone)]
pub struct Task {
pub tasktype: TaskType,
pub time: Instant,
pub message_id: String,
}
impl Ord for Task {
fn cmp(&self, other: &Self) -> Orde... |
C# | UTF-8 | 889 | 2.90625 | 3 | [] | no_license | using System.Collections.Generic;
public class MultiTask : Task
{
private List<SingleTask> taskList;
private float createdAt;
private string id;
public MultiTask(List<SingleTask> taskList, float createdAt)
{
this.taskList = taskList;
this.createdAt = createdAt;
this.id = System.Guid.NewGuid().... |
Java | UTF-8 | 37,146 | 3.296875 | 3 | [] | no_license |
package uk.co.geolib.geopolygons;
import uk.co.geolib.geolib.*;
import java.util.ArrayList;
public class C2DHoledPolyBase {
/**
* Constructor.
*/
public C2DHoledPolyBase() {
}
/**
* Constructor.
*
* @param Other Other polygon to set this to.
*/
public C2DHoledPolyB... |
C++ | UTF-8 | 5,139 | 2.515625 | 3 | [] | no_license | #include <gui-engine/engine.hpp>
#include <istream>
#include <fstream>
#include <string.h>
#include <glm/mat4x4.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <stb/stb_image.h>
using namespace unibox::gui;
GuiEngine::GuiEngine(const RenderEngine& renderEngine) {
this->renderEngine = renderEngine;
nex... |
Java | UTF-8 | 3,643 | 2.125 | 2 | [] | no_license | package mobius.bmlvcgen.bml.bmllib;
import java.util.Enumeration;
import mobius.bmlvcgen.bml.ClassFile;
import mobius.bmlvcgen.bml.ClassVisitor;
import mobius.bmlvcgen.bml.InvExprVisitor;
import mobius.bmlvcgen.util.Visitable;
import org.apache.bcel.classfile.Field;
import org.apache.bcel.classfile.JavaCla... |
Java | UTF-8 | 2,793 | 3.78125 | 4 | [] | no_license | package com.ifeng.yanggz.day6;
import java.util.LinkedList;
import java.util.Queue;
/**
* 1、拓扑排序算法
* 2、深度优先算法
*
* 1-->3-->2-->5
* 3-->6-->4
* 0-->7
*/
public class TopoSort {
private int v;
private LinkedList<Integer>[] adj;
public TopoSort(int v) {
this.v = v;
adj = new LinkedLis... |
Java | UTF-8 | 5,371 | 1.929688 | 2 | [] | no_license | package com.example.sjyy_expert_android.activity.patient;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.Button;
import andro... |
Java | UTF-8 | 762 | 2.328125 | 2 | [] | no_license | package com.keven.springDemo.serviceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import com.keven.springDemo.service.PublishService;
@Service("publishService")
public class PublishServiceI... |
Swift | UTF-8 | 2,642 | 3.09375 | 3 | [] | no_license | //
// Adder
// sugarPackageDescription
//
// Created by Aidar Nugmanov on 1/22/18.
//
import Foundation
import Commander
import Files
// MARK: - AdderError
public enum AdderError {
case failedToLocatePodfile
case failedToReadContents
case corruptedStructureError
case failedToUpdatePodfile
}
exten... |
JavaScript | UTF-8 | 1,474 | 2.578125 | 3 | [] | no_license | import React from 'react';
import {
ScrollView,
View,
Text,
FlatList,
useWindowDimensions,
} from 'react-native';
const height = 200;
const data = new Array(10).fill(0);
const App = () => {
const {width} = useWindowDimensions();
const renderItem = ({index}) => {
return (
<View
style={... |
Python | UTF-8 | 2,150 | 4.46875 | 4 | [] | no_license | #Given an integer array, you need to find one continuous subarray that
#if you only sort this subarray in ascending order, then the whole array will be sorted in ascending order, too.
# O(N) O(1)
class Solution(object):
def findUnsortedSubarray(self, nums):
"""
:type nums: List[int]
:r... |
Markdown | UTF-8 | 3,167 | 2.75 | 3 | [] | no_license | # 第二章. 创建数据索引
本章覆盖了:
1. 索引PDF文件
2. 自动生成unique字段
3. 怎样正确配置JDBC数据导入
4. 使用数据导入工具从数据库创建数据索引
5. 怎样使用数据导入工具导入数据和delta查询
6. 怎样使用数据导入工具从URL数据源导入数据
7. 怎样在导入数据时对数据做修改
8. 更新文档中的一个简单的字段
9. 处理多个currencies
10. 检测文档语言
11. 优化主键索引
## 简介
在Solr和Lucene部署中创建数据索引是最重要的一步。配置不当的话搜索结果会很少。搜索结果很少的话,那么用户肯定会对应用不满,这就是为什么我们需要尽可能地准备和所... |
JavaScript | UTF-8 | 1,878 | 2.734375 | 3 | [
"GPL-3.0-only"
] | permissive | /*global alert, confirm, console, prompt, pageJson, window */
/*jslint es6 */
window.dataLayer = window.dataLayer || [];
const giftProcess = pageJson.giftProcess;
console.log("Looking for giftProcess...");
if (giftProcess) {
// If giftProcess has any value other than the boolean "false"
// window.dataLayer.p... |
Java | UTF-8 | 39,625 | 2.84375 | 3 | [] | no_license | package edu.cwru.sepia.agent.planner;
import java.util.ArrayList;
import java.util.List;
import edu.cwru.sepia.agent.planner.actions.CreateAction;
import edu.cwru.sepia.agent.planner.actions.DepositAction;
import edu.cwru.sepia.agent.planner.actions.HarvestAction;
import edu.cwru.sepia.agent.planner.actions.MoveActio... |
Markdown | UTF-8 | 1,934 | 3.359375 | 3 | [] | no_license | ---
title: Servlet表单数据
time: 2019-11-07
categories: Servlet
tags: Servlet
---
# Servlet表单数据
---
很多情况下,需要传递一些信息,从浏览器到 Web 服务器,最终到后台程序。浏览器使用两种方法可将这些信息传递到 Web 服务器,分别为 GET 方法和 POST 方法。
## GET 方法
GET 方法向页面请求发送已编码的用户信息。页面和已编码的信息中间用 ? 字符分隔,如下所示:
```
http://www.test.com/hello?key1=value1&key2=value2
```
GET 方法是默认的从浏览器向 Web ... |
Python | UTF-8 | 1,051 | 2.75 | 3 | [] | no_license | #!/usr/bin/env python
import os,sys,time
import Tkinter,subprocess
class PyRun():
def __init__(self):
self.root = Tkinter.Tk()
self.entry = Tkinter.Entry(self.root,width=20)
self.entry.pack(expand=1,fill=Tkinter.X,pady=10,padx=15)
#self.entry.bind("<Return>",self.ParseCmd)
s... |
Markdown | UTF-8 | 539 | 2.59375 | 3 | [
"MIT"
] | permissive | # Discretize

## Inputs
Port Name | Description
--- | ---
Source |
Step Count |
Min |
Max |
## Output
Port Name | Description
--- | ---
Out |
## Description
Discretize an image, rounding it's color components to make the specified number of steps in the i... |
Java | UTF-8 | 1,336 | 3.53125 | 4 | [] | no_license | package com.yy.thread.communication;
import java.util.concurrent.CountDownLatch;
/**
* 倒计时触发器Demo
* @author zhaoming@yy.com
*
*/
public class CountDownLatchDemo {
static final int countDownSize = 5;
public static void main(String[] args) throws InterruptedException {
CountDownLatch latch = new CountDownLatc... |
PHP | UTF-8 | 3,671 | 2.609375 | 3 | [] | no_license | <?php
// Name: Developer Working On Display
// Format: Custom Text
// Data Source: Fogbugz Working On data for each customer
$app->get('/developers', $apiAuthenticate(), $setFormat, function () use ($app) {
$fogbugz = new FogBugz(
$app->config->user,
$app->config->pass,
$app->config->url
... |
Java | UTF-8 | 4,305 | 1.84375 | 2 | [] | no_license | package cn.com.fubon.interceptors;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jodd.util.StringUtil;
import ... |
TypeScript | UTF-8 | 2,905 | 2.65625 | 3 | [] | no_license | import { Component } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { CardsService } from './app.CardsService';
import { Deck } from './deck.object';
import { Card } from './card.object';
import { stringify } from '@angular/core/src/util';
@Component({
template: `
<div *ngIf="cards">
... |
Python | UTF-8 | 1,478 | 2.515625 | 3 | [] | no_license |
import socket
from threading import *
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = "52.49.91.111"
port = 2019
print (host)
print (port)
serversocket.bind((host, port))
class client(Thread):
def __init__(self, socket, address):
Thread.__init__(self)
self.sock = socket
... |
Markdown | UTF-8 | 687 | 2.953125 | 3 | [] | no_license | # SASS-Project
### Improved the efficiency of SCSS (Sassy CSS) compiled into CSS accomplishing the following steps:
Incorporated variables;
Utilized the power of mixins;
Nested the mixins;
Created functions;
Improved the usage of Flexbox by creating a Flex container;
Added conditionals to di... |
JavaScript | UTF-8 | 1,134 | 3.078125 | 3 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | //the <GifListContainer /> will be responsible for fetching the data
//from the giphy api, storing the first 3 gifs from the response in it's
//component state, and passing that data down to it's child the <GifList>
//component as a prop.
//It will also render a <GifSearch /> component that renders the form.
//<GifList... |
C++ | UTF-8 | 1,168 | 2.734375 | 3 | [
"MIT"
] | permissive | #ifndef _Wire_h_
#define _Wire_h_
#include "Arduino.h"
#include "driver/i2c.h"
#include "Stream.h"
class TwoWire: public Stream
{
private:
i2c_port_t num;
gpio_num_t sda = GPIO_NUM_MAX;
gpio_num_t scl = GPIO_NUM_MAX;
i2c_cmd_handle_t cmd = nullptr;
bool init = false;
uint8_t rxBuffer[128];
... |
C# | UTF-8 | 889 | 3.4375 | 3 | [] | no_license | using System;
namespace LeetCode.Problems.Medium;
/// 数组中的最长山脉
/// https://leetcode-cn.com/problems/longest-mountain-in-array/
public class P0845_LongestMountainInArray
{
public int LongestMountain(int[] A)
{
if (A.Length < 3) return 0;
var ans = 0;
var start = -1;
var state =... |
Java | UTF-8 | 15,873 | 1.898438 | 2 | [] | no_license | //package com.example.avi.pecolx;
//
//import android.content.Intent;
//import android.os.Bundle;
//import android.os.Handler;
//import android.support.design.widget.NavigationView;
//import android.support.v4.view.GravityCompat;
//import android.support.v4.widget.DrawerLayout;
//import android.support.v7.app.ActionBar... |
Java | UTF-8 | 2,629 | 1.953125 | 2 | [] | no_license | package com.ctrip.train.kefu.system.job.worker.domain;
public class StaffPriority {
private String staffName;
private String staffNum;
private int envenType;
private int noticeProductLine;
private String noticeTypes;
private int noticeWaitLimit;
private long complainWaitLimit;
privat... |
Markdown | UTF-8 | 7,844 | 2.734375 | 3 | [] | no_license | ---
title: '2017年经历的那些灵异事件'
date: 2018-12-22 2:30:11
hidden: true
slug: muh28ezjeur
categories: [reprint]
---
{{< raw >}}
<p>2017年快要过去了,回顾这一年来,在业务代码里,开发新功能占据70%,修复BUG占了30%,在解决的这些BUG中,大部分都是代码级别的错误,使用 <code>Chrome Devtools</code> 基本都可以解决,但其中有三个比较神奇,算得上是灵异事件了。</p>
<h3 id="articleHeader0">鬼打墙</h3>
<... |
Python | UTF-8 | 791 | 2.515625 | 3 | [] | no_license | import urllib2
import re
class CheckUpdate():
def __init__(self, target_url):
self.url = target_url
def get_htmlContent(self):
try:
html_Context = urllib2.urlopen(self.url).read()
return unicode(html_Context, 'utf-8')
except IOError:
print 'Failed ... |
Markdown | UTF-8 | 1,562 | 2.53125 | 3 | [] | no_license | # Chapter 2: Battle in the King's Army or explore the caves unaided
Upon arriving at the castle entrance you find yourself in awe of the many colours and scents you could never dream of experiencing in Villa Pisci. Usually the castle entrance would be booming with peddlers trying to sell their wares to novice adventur... |
C# | UTF-8 | 1,387 | 3.265625 | 3 | [] | no_license | using System;
namespace Indexers
{
class Dictionary
{
const int size = 5;
private string[] ENG = new string[size];
private string[] RU = new string[size];
private string[] UA = new string[size];
public Dictionary()
{
RU[0] = "книга"; UA[0] = "книга... |
Markdown | UTF-8 | 1,513 | 2.84375 | 3 | [] | no_license | # Remote
Esto se refiere a repositorios remotos como Github, con remote podemos acceder a distintos repositorios no hay limite
- git remote
- Muestra que remotos tenemos
- git remote -v
- Muestra la URL de los remote
## Añadir remotos
- git remote add <nombre_repositorio> <URL>
- Ya con añadir el remoto, al... |
Java | UTF-8 | 1,764 | 3.125 | 3 | [] | no_license | package test;
/**
* 2020-06-22 11:21
*/
public class NewTest {
public static void main(String[] args){
System.out.println(Integer.toBinaryString(128));
System.out.println(128 << 1);
System.out.println(Integer.toBinaryString(128 << 1));
System.out.println(Integer.toBinaryString(... |
Markdown | UTF-8 | 2,217 | 2.859375 | 3 | [
"MIT"
] | permissive | # be-pretty

:lipstick: adds prettier to an existing project with all bells and whistles-including husky and pretty-quick.
Have you ever been bothered by all the steps you need to do in a legacy codebase to get prettier all set up? Well now you don't h... |
Java | UTF-8 | 359 | 1.976563 | 2 | [
"MIT"
] | permissive | package org.jmisb.st0808;
import org.jmisb.api.klv.IKlvValue;
/**
* ST 0808 metadata value.
*
* <p>All ST 0808 Ancillary Text Local Set values implement this interface.
*/
public interface IAncillaryTextMetadataValue extends IKlvValue {
/**
* Get the encoded bytes.
*
* @return The encoded byte ... |
Python | UTF-8 | 886 | 2.671875 | 3 | [] | no_license |
def main():
n,m=map(int,input().split())
h=list(map(int,input().split()))
w=list(map(int,input().split()))
h.sort()
h.append(h[n-1])
w.sort()
dim_h=[0 for i in range(n)]
for i in range(1,n):
dim_h[i]=h[i]-h[i-1]
# print(dim_h)
index=0
ansLeft=0
ansRight=sum([dim_... |
C# | UTF-8 | 5,387 | 2.84375 | 3 | [] | no_license | using System;
using ExpensesSplitter.WebApi.Algorithms;
using ExpensesSplitter.WebApi.Models;
using Xunit;
namespace ExpensesSplitter.WebApi.Tests.Algorithms
{
public class SettlementSolverTests
{
[Fact]
public void Solve_SimpleScenario()
{
var balances = new[]
{... |
Java | UTF-8 | 9,831 | 2.15625 | 2 | [
"MIT"
] | permissive | package com.knowyourknot.enderporter;
import net.minecraft.advancement.criterion.Criteria;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minec... |
PHP | UTF-8 | 4,320 | 3.203125 | 3 | [
"BSD-3-Clause",
"OFL-1.1",
"MPL-1.1",
"MIT",
"LGPL-2.1-or-later",
"GPL-2.0-or-later",
"GPL-2.0-only",
"LGPL-2.1-only",
"GPL-3.0-or-later",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Initialisation de mysqli
*
*
*
* Include this file after defining the following variables:
* - $dbHost = The hostname of the database server
* - $dbUser = The username to use when connecting to the database
* - $dbPass = The database account password
* - $dbDb = The database name.
* - Includin... |
PHP | UTF-8 | 639 | 2.59375 | 3 | [] | no_license | <?php
require('db_connect.php');
$query_statement = "SELECT id,name,hidden FROM keywords ORDER BY hidden, name";
$query = mysql_query($query_statement, $db_conn);
$response = "";
$already_hidden = 0;
while ($row = mysql_fetch_row($query)){
if ($row[2] == '1' && $already_hidden == 0){
$response .= "<h3... |
C++ | UTF-8 | 696 | 2.71875 | 3 | [] | no_license | #include <cstdio>
int main() {
int queryNum;
while (true) {
int divPointX, divPointY;
scanf("%d", &queryNum);
if (queryNum == 0) break;
scanf("%d%d", &divPointX, &divPointY);
for (int i=0; i<queryNum; i++) {
int x, y;
scanf("%d%d", &x, &y);
... |
Swift | UTF-8 | 3,566 | 2.765625 | 3 | [] | no_license | //
// MapViewController.swift
// CollegeBuilderApp
//
// Created by Samone on 7/27/16.
// Copyright © 2016 Simon Stephanos. All rights reserved.
//
import UIKit
import MapKit
class MapViewController: UIViewController, UITextFieldDelegate {
@IBOutlet weak var mapView: MKMapView!
@IBOutlet weak var map... |
Python | UTF-8 | 3,141 | 2.96875 | 3 | [
"MIT"
] | permissive | """
Represents the routes and controllers for authenthication
By: Tom Orth
"""
from app.auth.model import User
from app.auth.form import AuthForm
from app.setup import conn
from flask import Blueprint, render_template, request, current_app, redirect, url_for, flash
from flask_login import login_user, logout_user
impor... |
Go | UTF-8 | 1,019 | 3.578125 | 4 | [] | no_license | // Package menu provides a command-line menu interface.
package menu
import (
"fmt"
"strconv"
"strings"
"bufio"
"os"
)
type Option struct {
Choice string
Desc string
}
type Menu struct {
options []Option
}
func New(options []Option) *Menu {
return &Menu{
options: option... |
Ruby | UTF-8 | 1,001 | 2.5625 | 3 | [
"MIT"
] | permissive | require 'faraday'
module FaradayMiddleware
# Request middleware that signs the request with the signature gem.
#
# Adds authentication params based on a HMAC signature generated from a
# combination of the secret, token, and body supplied. See the signature
# gem for more information on how to verify the si... |
JavaScript | UTF-8 | 766 | 3.359375 | 3 | [] | no_license | const API_KEY = `fdf9257aafbed128dbd819a44a2f14d9`
const cityTemperture = () => {
const city = document.getElementById('city-name').value;
const url = `https://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${API_KEY}&units=metric`
fetch(url)
.then(res => res.json())
.then(dat... |
C++ | UTF-8 | 582 | 3.65625 | 4 | [] | no_license | #include<iostream>
#include<algorithm>
using namespace std;
void show(int a[], int array_size)
{
for(int i = 0; i < array_size; i++)
cout<<a[i]<<" ";
}
int main()
{
int a[] = { 1, 5, 8, 9, 6, 7, 3, 4, 2, 0 };
int asize = sizeof(a) / sizeof(a[0]);
cout << "The array before sorting is : \n";
... |
Markdown | UTF-8 | 12,975 | 2.625 | 3 | [] | no_license | # CSCI/CMPE 2333.01: Computer Organization and
# Assembly Language
## Carlos Pena
## Spring 2019
```
E-mail:carlos.penacaballero01@utrgv.edu
Class Hours: MW 1:40pm-2:55 pm Office Hours: MTWR 3:00pm-4:20pm
Class Room: IEAB 1.204 Office: IEAB 3.
```
## Textbooks
- Assembly Language for x86 Processors, 7th Ed., by Ki... |
Python | UTF-8 | 2,771 | 2.828125 | 3 | [] | no_license | ########################################################################################################
# 종목 일 - 시각 시세 추출.
# thistime=20210408153000. 추출 일자와 장 종료시각
# max page = 50
########################################################################################################
import datetime
# 라이브러리 로드
# reque... |
TypeScript | UTF-8 | 3,951 | 2.75 | 3 | [] | no_license | import { AnyAction } from 'redux';
import { BookResType, BookReqType } from '../../types';
import { getTokenFromState } from '../utils';
import { call, put, select, takeEvery } from 'redux-saga/effects';
import { push } from 'connected-react-router';
import BookService from '../../services/BookService';
import { create... |
C# | UTF-8 | 4,760 | 2.53125 | 3 | [
"MIT"
] | permissive | using System;
namespace Assembler.Frontend
{
internal interface ITypeRContext
{
string Operator { get; }
int RegisterD { get; }
int RegisterS { get; }
int RegisterT { get; }
}
internal static class TypeRHelper
{
public static int Serialize(this ITypeRContext... |
JavaScript | UTF-8 | 697 | 2.703125 | 3 | [] | no_license | import React from 'react';
const Balance = props => {
const getBalance = () => {
const balanceAmount = props.getTotals('income') - props.getTotals('savings') - props.getTotals('expense');
return balanceAmount.toFixed(2).toLocaleString();
}
return (
<div className="totalsContainer">
... |
Python | UTF-8 | 7,499 | 2.625 | 3 | [] | no_license |
import json ,urllib.request
import json
import time
import datetime
"""""
yesterday = datetime.datetime.now() - datetime.timedelta(days = 1)
dateTime = datetime.date(2019,1,25)
unixtime = str(int(time.mktime(dateTime.timetuple())))
"""""
def downloadStockData(array, minIndex):
counterStockSymbols = minI... |
C# | UTF-8 | 1,780 | 2.921875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WindowsFormsApp1
{
class Trainer : Employee
{
private PhysicalHealth Health;
private List<String> Proficiency;
private List<Customer> PersCustomers;
//... |
C# | BIG5 | 2,002 | 2.75 | 3 | [] | no_license | using UnityEngine;
/// <summary>
/// t
/// TqP
/// </summary>
public class AtackSystem : MonoBehaviour
{
#region :}
[Header("ѼƦW")]
public string praAttackPart = "qq";
public string parAttackGather = "";
[Header("s浥ݮɶ"), Range(0, 2)]
public float intervalBetweenAttackPart = 0.2f;
[Header... |
Rust | UTF-8 | 30,864 | 2.9375 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | #[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
#[doc = r" Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::CTRL {
#[doc = r" Modifies the contents of the register"]
#[inline]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut ... |
C | UTF-8 | 2,117 | 3.0625 | 3 | [] | no_license | /*------------------------------------------------*/
/*Maxime ESCOURBIAC */
/* */
/*Principe du tp: */
/*Version du motus a 5 lettres */
/*cette version utilisera un dico predefini ... |
Markdown | UTF-8 | 21,206 | 3.46875 | 3 | [] | no_license | ---
title: ADODB用法详解
tags:
- SQL
url: 115.html
id: 115
categories:
- SQL
date: 2017-08-10 17:19:43
---
1.GetAll方法 我们可以使用GetAll方法代替Execute()方法,该方法返回的结果为一个二维关联数据,这样可以使用foreach或for循环语句处理,非常方便。另外,GetAll取得的数组与Smarty模板的foreach配合得非常好。 我们一起看下面的脚本例子: <?php include\_once("libs/adodb/adodb.inc.php"); // 创建一个mysql连接实例对象 $db =... |
Java | UTF-8 | 9,193 | 1.921875 | 2 | [] | no_license | package com.hgsoft.carowner.action;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.apache.struts2.S... |
PHP | UTF-8 | 1,010 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class Color extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('color', function($table){
$table->integer('id');
... |
Java | UTF-8 | 7,121 | 2.03125 | 2 | [
"Apache-2.0"
] | permissive | /*
* JBoss, Home of Professional Open Source.
* Copyright 2014 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* 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 Licen... |
C | UTF-8 | 394 | 3.546875 | 4 | [] | no_license | /* Program to compute the size of int, float, double and char of Your System */
#include<stdio.h>
#include<conio.h>
int main(){
int a;
float b;
double c;
char d;
printf("Size of int: %d bytes\n",sizeof(a));
printf("Size of float: %d bytes\n",sizeof(b));
printf("Size of double: %d bytes\n",si... |
Markdown | UTF-8 | 477 | 2.84375 | 3 | [] | no_license | # Random-Number
The computer will think 3 digit number that has no repeating digitd.
You will then guess a 3 digit number.
The computer will then give back clues.
Based on these clues you will guess again until youu break the code with a match."\n"
The possible clues are :
Close : You've guessed a correct num... |
Shell | UTF-8 | 1,206 | 2.875 | 3 | [] | no_license | #!/bin/bash
export X509_USER_PROXY x509up_u46545
echo "Grid Init: "
ls -l -h x509up_u46545
JOB_NUMBER=$1
WORK_DIR=`pwd`
tar -xzf fileLists.tgz
export VO_CMS_SW_DIR=/uscmst1/prod/sw/cms
source $VO_CMS_SW_DIR/cmsset_default.sh
export SCRAM_ARCH=slc5_amd64_gcc462
scramv1 project CMSSW CMSSW_5_3_8_patch3
cd CMSSW_5_... |
Markdown | UTF-8 | 5,166 | 3.015625 | 3 | [] | no_license | ---
nav: blog
categories:
- Cinematography
comments: true
date: 2013-06-03T00:00:00Z
title: Stabilization
url: /2013/06/03/stabilization/
---
Cinematography is, first and foremost, an artform. That being said, I'd like to
also emphasize the caveat that it is a *technical* artform, and requires a
certain degree of skil... |
Markdown | UTF-8 | 1,635 | 2.703125 | 3 | [] | no_license | # Système expert - Classification des fruits
## Fonctionnalités
Le moteur demande à l'utilisateur des précisions sur le fruit à trouver.
A la fin, le moteur retournera le nom du fruit cherché.
## Lancer le programme
Il vous faut [CLisp 2.49](https://sourceforge.net/projects/clisp/) installé sur votre système.
Dans ... |
Java | UTF-8 | 797 | 1.609375 | 2 | [] | no_license | /***************************************************************************
* Product made by Quang Dat *
**************************************************************************/
package com.vtc.gateway.scoinv2api.common.dto.response;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsCo... |
C# | UTF-8 | 727 | 2.78125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bill_Manager_App
{
class BillDatabase
{
private static BillDatabase instance;
private List<BillData> database = new List<BillData>();
private BillDatabase() {}... |
C# | UTF-8 | 6,537 | 3.328125 | 3 | [
"Apache-2.0"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Security.Cryptography;
//using Message;
public static class Utilities
{
private static string titulo = "Apollo";
public static string Titul... |
JavaScript | UTF-8 | 3,221 | 2.640625 | 3 | [] | no_license | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
//var fs = require("fs");
//import './index.html';
var data = require('./la_fourchette_stars_deals.json'); // forward slashes will depend on the file location
var monjs=data.la_fourchette_deals;
/*var datatest = require('./test.json'); ... |
C++ | UTF-8 | 1,831 | 2.546875 | 3 | [] | no_license | //
// Created by wang yang on 2016/12/3.
//
#include "ELBoard.h"
#include "../core/ELGameObject.h"
ELBoard::ELBoard(ELVector2 size) : size(size) {
}
ELBoard::~ELBoard() {
delete vertexBuffer;
}
ELGeometryData ELBoard::generateData() {
vertexBuffer = new ELGeometryVertexBuffer();
ELGeometryRect rect = {... |
Python | UTF-8 | 2,533 | 3.546875 | 4 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Fri Feb 17 22:56:46 2017
@author: user
"""
import math
import numpy as np
## Reading in the atoms and their coordinates from a .xyz file
## The input file contains the number of atoms, their respective atomic coordinates
## and their 3D Cartesian coordinates.
class Molecule(o... |
JavaScript | UTF-8 | 612 | 2.703125 | 3 | [] | no_license | const Util = {
inherits(BaseClass, SuperClass) {
BaseClass.prototype = Object.create(SuperClass.prototype); // eslint-disable-line no-param-reassign
BaseClass.prototype.constructor = BaseClass; // eslint-disable-line no-param-reassign
},
randomVec(length) {
const deg = 2 * Math.PI * Math.random();
... |
PHP | UTF-8 | 1,456 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* Contains the HasImages trait.
*
* @copyright Copyright (c) 2020 Attila Fulop
* @author Attila Fulop
* @license MIT
* @since 2020-12-19
*
*/
namespace Vanilo\Support\Traits;
use Illuminate\Support\Collection;
trait HasImagesFromMediaLibrary
{
protect... |
Python | UTF-8 | 657 | 4 | 4 | [] | no_license | import math
# Exercise 26 - Months to Pay Off a Credit Card
# Assign variables: num_months, daily_rate(APR/365), bal, payment
bal = float(input('What is your balance (USD)?'))
apr = float(input('What is the APR on the card (as a percent)? '))
payment = float(input('What is the monthly payment you can make... |
Python | UTF-8 | 1,369 | 3.53125 | 4 | [] | no_license | from rbt import RedBlackTree
class BoundedPriorityQueue:
"""Simple bounded priority queue which uses a Red Black Tree as the underlying data structure."""
def __init__(self, k):
self.maxkey = -float('inf')
if k < 0:
raise ValueError("k should be larger than 0")
self.k = k
... |
Java | UTF-8 | 2,357 | 2.5 | 2 | [] | no_license | package co.onemeter.oneapp.ui;
import android.content.Context;
import android.media.AudioManager;
import android.media.SoundPool;
import java.util.HashMap;
/**
* Created with IntelliJ IDEA.
* User: xuxiaofeng
* Date: 13-8-5
* Time: 下午12:00
* To change this template use File | Settings | File Templates.
*/
publ... |
Python | UTF-8 | 1,479 | 3.78125 | 4 | [] | no_license | import math
func_glob = lambda x: 6*x**5 - 3* x**4 - x**3 + 9
func_first = lambda x: 30 * x**4 - 12 * x**3 -3* x**2
a = -2; b = -0.2; e = 1e-05
def secant_method(a, b, f):
y1 = f(a)
y2 = f(b)
if y1 * y2 >= 0:
print ('no roots')
else:
c = (y2*a - y1*b)/(y2 - y1)... |
Markdown | UTF-8 | 1,393 | 3.734375 | 4 | [
"MIT"
] | permissive | ---
layout: post
title: 360. Sort Transformed Array
category: [Leetcode]
description:
keywords: ['Math', 'Two Pointers', 'Leetcode', 'Medium']
---
### [360. Sort Transformed Array](https://leetcode.com/problems/sort-transformed-array)
#### Tags: 'Math', 'Two Pointers'
<div class="content__u3I1 question-content__JfgR... |
Python | UTF-8 | 2,723 | 2.96875 | 3 | [] | no_license | import numpy as numpy
from sklearn.model_selection import train_test_split
from sklearn.model_selection import cross_val_score
from sklearn import datasets
from sklearn import svm
from sklearn import neighbors
import csv
import time
import seaborn as sns
import pandas as pd
import matplotlib.pyplot as plt
t1=time.time... |
Java | UTF-8 | 37,095 | 2.421875 | 2 | [] | no_license | package UMS.service;
import UMS.dbHelper.DB;
import UMS.dto.*;
import UMS.util.MailUtil;
import com.itextpdf.text.*;
import com.itextpdf.text.Image;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;
import javafx.collections.FXCollections;
import jav... |
Java | UTF-8 | 1,810 | 2.109375 | 2 | [] | no_license | package com.pzj.core.trade.sms.engine.handle.saas;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.pzj.core.trade.sms.engine.common.SmsSendTypeEnum;
import com.pzj.core.trade.sms.engine.convert.SendSMSAroundConvert;
imp... |
Java | UTF-8 | 1,782 | 2.375 | 2 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.kasneb.util;
import java.util.Random;
/**
*
* @author jikara
*/
public class GeneratorUtil {
publi... |
Shell | UTF-8 | 4,169 | 2.671875 | 3 | [] | no_license | function createOrderer() {
infoln "Enrolling the CA admin"
mkdir -p organizations/ordererOrganizations/example.com
export FABRIC_CA_CLIENT_HOME=${PWD}/organizations/ordererOrganizations/example.com
set -x
fabric-ca-client enroll -u https://admin:adminpw@localhost:portca --caname ca-orderer --tls.certfiles $... |
JavaScript | UTF-8 | 437 | 2.609375 | 3 | [] | no_license | const select = (name) => {
return document.querySelector(name);
};
let ham = select('.ham');
let overlay = select('.overlay');
let mobileNav = select('.header__mobileNav');
ham.addEventListener('click', () => {
ham.classList.toggle("change");
overlay.classList.toggle("display");
mobileNav... |
PHP | UTF-8 | 1,700 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
namespace Opf\Validator;
class StringLength extends ValidatorAbstract implements ValidatorInterface
{
const TO_LONG = 'stringLengthToLong';
const TO_SHORT = 'stringLengthToShort';
protected $options = array(
'maxStringLength' => null,
'minStringLength' => 0
);
protected $er... |
Markdown | UTF-8 | 2,631 | 2.71875 | 3 | [] | no_license | # Deteksi Plat Nomor Kendaraan Indonesia
Deteksi Plat Nomor Kendaraan Indonesia dari potongan gambar plat nomor yang sudah di melewati proses Pengambilan *Region of Interest* (ROI) Plat nomor kendaraan dari penangkapan citra gambar di lapangan (proses pengambilan ROI tidak dilampirkan pada repository ini)
## Masters.i... |
Java | UTF-8 | 3,977 | 2.21875 | 2 | [] | no_license | package stellarium.stellars.background;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import net.minecraft.client.Minecraft;... |
Markdown | UTF-8 | 983 | 2.859375 | 3 | [] | no_license | # [React Portfolio](https://gidmp.github.io/react-portfolio/#/)
## Description
This is my deployed React portfolio. I am a full-stack coding bootcamp student from University of Washington hoping to
develop a career as a web developer. I built this portfolio using REACT, which I enjoy more than I expected.
Weary trave... |
C# | UTF-8 | 1,389 | 3.453125 | 3 | [] | no_license | using System;
namespace hash_table
{
class Program
{
static void Main(string[] args)
{
// chaining solution
Console.WriteLine("Chaining :");
Chaining sample = new Chaining();
sample.Add(10);
sample.Add(20);
sample.Add(30)... |
JavaScript | UTF-8 | 1,212 | 2.640625 | 3 | [] | no_license | 'use strict'
const datetime = require('node-datetime')
const StatByWeek = require('../models').StatByWeek
class StatByWeekController{
async addStatOnWeek(attraction){
var dateToday = new Date(Date.now());
var diff = dateToday.getDate() - dateToday.getDay() + (dateToday.getDay() === 0 ? -6 : 1)... |
Python | UTF-8 | 6,504 | 2.671875 | 3 | [] | no_license | import time
from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
from appium.webdriver.webdriver import WebDriver
from lxml.html import tostring
from lxml import etree
class BasePage(object):
def __init__(self, appium_driver):
self.driver: WebDriver = appium_driver
... |
Swift | UTF-8 | 1,222 | 2.703125 | 3 | [
"MIT"
] | permissive | //
// UILabelReactiveSpec.swift
// ReaktiveBoarTests
//
// Created by Peter Ovchinnikov on 3/22/19.
// Copyright © 2019 Peter Ovchinnikov. All rights reserved.
//
import Quick
import Nimble
import ReaktiveBoar
import ReactiveKit
class UILabelReactiveSpec: QuickSpec {
override func spec() {
describe("U... |
PHP | UTF-8 | 441 | 2.75 | 3 | [] | no_license | <?php
class master {
function __construct() {
$this -> mysqli = new mysqli('localhost', 'root', '', 'exam_system');
if ($this -> mysqli -> connect_error) {
die('Connect Error (' . $this -> $mysqli -> connect_errno . ') ' . $this -> $mysqli -> connect_error);
}
}
function echoFooter() {
ech... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.