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
Ruby
UTF-8
1,949
2.6875
3
[]
no_license
require "test_helper" class RealStateTest < ActiveSupport::TestCase test "validations" do model = RealState.new assert !model.valid? error_messages = model.errors.full_messages assert (error_messages.include? "Name is too short (minimum is 1 character)") assert (error_messages.include? "Real stat...
Markdown
UTF-8
2,385
2.578125
3
[]
no_license
--- ID: 2498 post_title: 'Infinio Accelerator v2 announced at #VMworld &#8211; Now with iSCSI and FC support' author: Jonathan Frappier post_date: 2014-08-25 09:14:34 post_excerpt: "" layout: post permalink: > http://www.virtxpert.com/infinio-accelerator-v2-announced-vmworld-now-iscsi-fc-support/ published: true dsq_...
Java
UTF-8
2,157
2.171875
2
[]
no_license
package com.skstructure.view; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import com.skstructure.SKHelper; import com.skstructure.core.SKIPre; import com.skstructure.modules.structure.SKStructureModel; import com.skstructure.utils.SKClassGenericTypeUti...
C++
UTF-8
453
2.875
3
[]
no_license
#include <cstdio> #include <cstring> char buf[2048]; int main() { int i, ans; gets(buf); ans = 0; for (i = 0; i < strlen(buf); ++i) { if ((buf[i] >= 'a') && (buf[i] <= 'z')) { ans += ((buf[i] - 'a') % 3) + 1; } else if (buf[i] == '.') { ans += 1; } else if (buf[i] == ',') { ans += 2; }...
Python
UTF-8
721
4.3125
4
[]
no_license
# a realistic example to add scala functionality in Python tuple """ In Scala, the element in tuple can be accessed like val a_tuple = ("z", 3, “Python”, -1) println(a_tuple._1) // “z” println(a_tuple._3) // “Python” """ class Tuple(tuple): def __getattr__(self, name): def _int(...
Java
UTF-8
1,069
3.34375
3
[]
no_license
package demo01; public class Top { static int x= 1; public Top(int y){ x *= 3; } } class Passer{ static final int x= 5; public static void main(String[] args) { new Passer().go(x); System.out.print(x); } void go(int x){ System.out.print(x++); } } clas...
Java
UTF-8
2,384
1.9375
2
[]
no_license
package tests.cloud.appium; import com.experitest.appium.SeeTestClient; import io.appium.java_client.android.AndroidDriver; import io.appium.java_client.android.AndroidElement; import io.appium.java_client.remote.AndroidMobileCapabilityType; import io.appium.java_client.remote.MobileCapabilityType; import org.junit.Af...
C++
UTF-8
1,240
2.609375
3
[]
no_license
/* AlturaPetiso * * Arduino Nano, 1 HC-SR04, 1 rele, * 1 pestillo * * * Sputnik Ar * 21/08/30 */ //INCLUDES #include <NewPing.h> //DEFINES #define ALTURA 160 //en cm #define TIEMPO 1 //en segundos #define CHANGUI 10 //en cm #define LED 3 #define RELE ...
C++
UTF-8
5,637
2.546875
3
[]
no_license
#include "flib.h" #include "flib_vec2.h" #include "transform.h" #include "hitbox.h" #include "functions.h" #include "scene.h" #include <math.h> #include "collision.h" TCollideResult CollideCircle(TTransform * tFirst, TTransform * tOther){ TGfxVec2 tFirstPos = tFirst->m_tHitBox->GetGlobalPos() ; TGfxV...
C#
UTF-8
1,723
3.5
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Lab1_2 { class BubbleSortFunction { //public static int[] input { get; private set; } //public static string rawinput { get; private set; } static int[] input =...
Markdown
UTF-8
5,134
2.78125
3
[]
no_license
![지뢰찾기](../img/지뢰찾기.PNG) 우리가 어린시절에 하던 지뢰찾기원리와 같습니다. 단지 난이도가 많이 쉽습니다. [지뢰찾기코드](../GamePrac/PyagameMine_sweeper.py) ### 코드알아보기 ```buildoutcfg while True: a = input("난이도를 몇으로 하시겠습니까? 1, 2, 3, 4:\n") if a == '1': WIDTH = 10 HEIGHT = 10 BOMBS = 10 break elif a == '2': ...
Python
UTF-8
8,190
3
3
[ "MIT" ]
permissive
import os import numpy as np # from scipy.signal import convolve2d import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec def visualize_HiC_epigenetics(HiC, epis, output, fig_width=12.0, vmin=0, vmax=None, cmap='Reds', colorbar=True, colorb...
Java
UTF-8
648
3.390625
3
[]
no_license
import java.util.Scanner; public class essayDeterminer1 { public static void main(String[] args) { int value = 0; do { System.out.println("Enter your email address:"); Scanner input = new Scanner (System.in); String email = input.nextLine(); String verifier = "."; System.out.println(em...
C++
UTF-8
1,158
2.75
3
[ "MIT" ]
permissive
#ifndef INPUT_MANAGER_H #define INPUT_MANAGER_H #define NUM_KEY_INFOS 256 #define KEY_PRESSED 1 // flag, indicating that key was pressed #define KEY_QUERIED 2 // flag, indicating that key was queried #define KEY_MULTI_PRESSED 4 // flag, indicating that key was pressed more than once // INPUT_MANAGER // ...
Markdown
UTF-8
4,001
3.0625
3
[]
no_license
--- author: hzmangel categories: - Happy coding date: '2007-06-14T09:37:03' tags: [] title: 说说回调 --- 最近做个项目,在设计的时候想到有可能要用到回调,对于这个东西已经弄不懂很久了,于是就上网找资料看,经过一个程序的磨炼后,差不多弄懂了,说说吧。<!--more-->默认情况下,函数调用的过程是这样的:程序中某懒人A想做件事,但是不想自己去做,于是用了个时髦的方法,外包给B(函数调用),然后B辛辛苦苦的把事情做完后,把结 果再恭恭敬敬的送给(return)一直在那等着(阻塞调用)的A,然后A把剩下的钱给B,两清了。经过了这次事情,这两人...
Python
UTF-8
5,543
2.9375
3
[]
no_license
import matplotlib.pyplot as plt from ClusteringAlgorithm.ABClustering import ABClustering from ClusteringAlgorithm.ABClassifier import ABClassifier from utils.ClusteringObjectiveFunction import * import numpy as np import pandas as pd from sklearn.datasets import load_iris from sklearn.preprocessing import MinMaxScaler...
Java
UTF-8
354
2.5
2
[]
no_license
import java.text.MessageFormat; public class MessageFormats { public static void main(String[] args) { // TODO Auto-generated method stub String 버뮤다="이름:{0},그레이드:{1},파워{2}"; String[] 피나= {"피나","3","13000"}; String b=MessageFormat.format(버뮤다, 피나); System.out.print(b); } }
Swift
UTF-8
6,160
3.609375
4
[ "Apache-2.0" ]
permissive
/// Witness for the `Trampoline<A>` data type. To be used in simulated Higher Kinded Types. public final class ForTrampoline {} /// Partial application of the Trampoline type constructor, omitting the last type parameter. public typealias TrampolinePartial = ForTrampoline /// Higher Kinded Type alias to improve reada...
Markdown
UTF-8
807
2.890625
3
[]
no_license
# NPM NPM comes shipped with an installation of Node.js Npm allows us to use third party packages The project will end up being a combination of code sources. --* <Developer> --* <Node Core Packages> --* <Dependencies> The dependencies are essentially the packages we install/manage via NPM and track with the pac...
Java
UTF-8
450
2.46875
2
[]
no_license
package com.cendric.ecs.systems; import java.util.List; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.cendric.ecs.Entity; public abstract class RenderSystem { public void render(List<Entity> entities, SpriteBatch spriteBatch, float stateTime) { for (Entity e : entities) { render(e, ...
Python
UTF-8
1,384
2.703125
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "LGPL-2.1-only", "Python-2.0", "GPL-3.0-only", "BSD-3-Clause", "MIT", "GPL-1.0-or-later", "LGPL-2.0-or-later", "GPL-2.0-only", "BSD-2-Clause" ]
permissive
# coding: utf-8 # Back to the main [Index](../index.ipynb) # ### Parameter scan # Perform a parameter scan. # In[1]: #!!! DO NOT CHANGE !!! THIS FILE WAS CREATED AUTOMATICALLY FROM NOTEBOOKS !!! CHANGES WILL BE OVERWRITTEN !!! CHANGE CORRESPONDING NOTEBOOK FILE !!! from __future__ import print_function import tell...
TypeScript
UTF-8
1,551
2.765625
3
[]
no_license
import Controller from './controller/controller' import LogicModel from './model/logicModel/logicModel' import Mediator from './model/logicModel/mediator/mediator' import UIModel from './model/uiModel/uiModel' import ImageLoader from './view/subrenderers/imageLoader/imageLoader' import View from './view/view' // ? Loa...
Python
UTF-8
1,053
4.15625
4
[]
no_license
#!/usr/bin/python3 # encoding:utf_8 # 第十五题 一个数如果恰好等于它的因子之和,这个数就称为“完数”。例如6=1+2+3。 # 首先,先设置1000以内的数循环 for wanshu in range(2,10001): a=0 yinzi=[] i=wanshu while (i!=1): for y in range(2, int(i + 1)): if i%y==0: i/=y yinzi.append(y) brea...
Java
UTF-8
1,026
3.90625
4
[]
no_license
package java0522_collection; /* * stack * 1 LIFO(Last In First Out) : 마지막에 저장된 요소를 먼저 꺼낸다. * 2 수식계산, 수식괄호검사, undo/redo, 뒤로/앞으로 */ import java.util.LinkedList; public class Java182_LinkedList { public static void main(String[] args) { LinkedList<String> nStack = new LinkedList<String>(); //추가 //stack을 사용하려면...
Java
UTF-8
887
2.578125
3
[]
no_license
package com.edu.upc.businessbook.models; import com.edu.upc.businessbook.R; import java.util.ArrayList; import java.util.List; public class LocalsRepository { private static LocalsRepository instance; private List<Local> locals; public static LocalsRepository getInstance(){ if(instance == null) ...
C#
UTF-8
3,176
2.5625
3
[]
no_license
namespace Shrinkr.Infrastructure.EntityFramework { using System; using System.Collections.Generic; using System.Data.Common; using System.Diagnostics; using System.Linq; using System.Data.Entity; using System.Data.Entity.ModelConfiguration; using System.Data.Entity.Infrastruct...
Java
UTF-8
5,315
1.921875
2
[ "Apache-2.0" ]
permissive
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Python
UTF-8
443
3.203125
3
[]
no_license
import json # using json library, open file tweetFile = open("../TwitterData/tweets_small.json", "r") # load file to new variable tweetData = json.load(tweetFile) tweetFile.close() print("Tweet id: ",tweetData[0]["id"]) print("Tweet text: ", tweetData[0]["text"]) # shortcut for idx in tweetData: print("Tweet ...
Java
UTF-8
7,177
1.8125
2
[ "Apache-2.0" ]
permissive
/* * #! * % * Copyright (C) 2014 - 2016 Humboldt-Universität zu Berlin * % * 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 * * U...
Python
UTF-8
1,232
2.578125
3
[]
no_license
from configparser import ConfigParser from pathlib import Path import getpass class GrenierRemote(object): def __init__(self, name, rclone_config_file): self.name = name self.is_directory = False self.is_disk = False self.is_cloud = False self.full_path = None if P...
C++
UTF-8
615
3.21875
3
[]
no_license
#ifndef __BUBBLE_H__ #define __BUBBLE_H__ #include "DynArray.h" template <class TYPE> class BubbleSort { public: DynArray<TYPE> data; int times = 0; BubbleSort(){} BubbleSort(DynArray<TYPE> A) { data = A; } int SortBigger() { int size = data.GetSize(); bool finished = false; while (!finished) ...
C
UTF-8
2,412
3.953125
4
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> // Функция -- сравнение 2-х символов // Возвращает число < 0 если символ, хранящийся по адресу p1 < символа, хранящегося по адресу p2 // (в кодировке ASCII) // Возвращает число > 0 если *p1 > *p2 // Возвращает 0 если *p1 == *p2 // Это означает, чт...
Java
UTF-8
2,276
2.15625
2
[]
no_license
package com.skillsmap.role.application.entity; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColum...
JavaScript
UTF-8
1,161
4.75
5
[]
no_license
// Write an algorithm to determine if a number is "happy". // A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cy...
JavaScript
UTF-8
1,988
2.703125
3
[]
no_license
const mock_zipobj = require("@littlezigy/zipobject"); const db = require("../../bin/database"); jest.mock("../../bin/database", () => ({ update: jest.fn(function(){ const data = mock_zipobj(arguments[1], arguments[2]) return { message: "Product updated!", data }...
Python
UTF-8
1,145
3.53125
4
[]
no_license
import numpy.random as npr import numpy as np import matplotlib.pyplot as plt import random nran = 1000 xvals = npr.random(nran) uniform = xvals radius = uniform radvals = np.sqrt(radius) n1, bins1, patches1 = plt.hist(radvals,bins=50,normed=1,histtype='stepfilled') plt.setp(patches1,'facecolor','g','alpha',0.75) tr...
C++
UTF-8
19,514
3.09375
3
[]
no_license
//PlayerTest.cpp // compile with g++ -std=c++11 -pedantic -Wall -Wextra -O PlayerTest.cpp Card.cpp Token.cpp // #include "Player.h" #include "Player.cpp" #include <stdio.h> #include <stdlib.h> #include <iostream> #include <assert.h> #include <map> using std::cout; using std::endl; using std::map; void createDeck(); ...
C#
UTF-8
1,778
3.328125
3
[]
no_license
using System.Text; namespace Ex03.GarageLogic { abstract class EnergySource { private protected readonly float r_MaxCapacity; private protected float m_CurrentCapacity; private protected float m_PrecentageFull; internal EnergySource(float i_MaxCapacity, float i_Rema...
Shell
UTF-8
1,250
3.578125
4
[ "Apache-2.0", "LicenseRef-scancode-dco-1.1" ]
permissive
#!/usr/bin/bash IMAGE_PATH="$1" if [ ! -f "$IMAGE_PATH" ]; then echo "vm image '$IMAGE_PATH' not found" exit 1 fi # USING 'set -e' error detection for everything below this point. set -e PORT=${PORT:-3260} WWN=${WWN:-iqn.2018-01.io.kubevirt:wrapper} LUNID=1 echo "Starting tgtd at port $PORT" tgtd -f --iscs...
Python
UTF-8
792
2.546875
3
[ "Apache-2.0" ]
permissive
library = """ ->(left:, right:) = {arg: left, value: right}; # All ORDER BY arguments are wrapped, to avoid confusion with # column index. ArgMin(a) = SqlExpr("ARRAY_AGG({arg} order by [{value}][offset(0)] limit 1)[OFFSET(0)]", {arg: a.arg, value: a.value}); ArgMax(a) = SqlExpr( "ARRAY_AGG({arg}...
C#
UTF-8
1,246
2.5625
3
[ "MIT" ]
permissive
using System; namespace JabbR.Infrastructure { public static class LoggingExtensions { public static void Error(this IRealtimeLogger logger, string message, params object[] args) { logger.Log(LogType.Error, String.Format(message, args)); } public static void Informa...
Java
UTF-8
1,117
1.976563
2
[]
no_license
package com.example.e_fordoapp.Service; import com.example.e_fordoapp.Model.Order; import com.example.e_fordoapp.Model.Product; import com.example.e_fordoapp.Model.ProductCategory; import java.util.List; import retrofit2.Call; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.POST; import ...
C#
UTF-8
846
2.984375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using LibreriaDeClases.Interfaces; namespace LibreriaDeClases { public class Nodo<T> : IComparable<T> { public T dato { get; set; } public int factorEquilibrio { get; set; } ...
Markdown
UTF-8
11,452
3.21875
3
[]
no_license
--- title: Huangshan (The Yellow Mountain) image: https://assets.goddamnyouryan.com/blog/asia/huangshan-mountains.jpg date: 2014-01-18 --- Huangshan is about a 5 hour bus ride west of Shanghai. But I took the overnight train, which was a 12 hour journey. The train was going really fast so it must have not been a very ...
C#
UTF-8
1,970
2.578125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Xamarin.Forms; using Xamarin.Forms.Maps; namespace LiveMapApp2 { public partial class MainPage : ContentPage { public MainPage() { InitializeComponent(); ...
Markdown
UTF-8
4,713
2.59375
3
[]
no_license
### 美国经济非常健康 近期股市为何下挫? ------------------------ <p> 【大纪元2018年11月23日讯】(大纪元记者林燕编译报导) <a href="http://www.epochtimes.com/gb/tag/%E7%BE%8E%E5%9B%BD%E7%BB%8F%E6%B5%8E.html"> 美国经济 </a> 非常健康,为何 <a href="http://www.epochtimes.com/gb/tag/%E7%BE%8E%E5%9B%BD%E8%82%A1%E5%B8%82.html"> 美国股市 </a> 近期却大幅下挫,最简单的答案是市场并非经济本身。《...
Java
UTF-8
1,983
2.25
2
[]
no_license
package com.epam.esm.dto.converter; import com.epam.esm.dto.impl.ShopUserDto; import com.epam.esm.model.ShopUser; import com.epam.esm.model.role.Role; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; impor...
Python
UTF-8
2,491
2.859375
3
[]
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' @file @brief pubg APIからtelemetryファイルを取得するスクリプト (アカウントIDで検索かけるメッソドもおまけ) @date 2018-09-04 ''' import requests import json API_KEY = "<自身のAPIキー>" SERVER = "<好きなShardidに変更>" ''' Player名と{アカウントID + 参加したマッチIDのリスト}を対応させたdictを返す @params {string list} 検索したいPlayer名のリスト @retu...
Java
UTF-8
1,369
1.992188
2
[]
no_license
package com.yunxi.stamper.service; import com.yunxi.stamper.entity.ApplicationKeeper; import com.yunxi.stamper.entity.ApplicationNode; import com.yunxi.stamper.entity.Signet; import com.yunxi.stamper.entity.User; import javax.validation.constraints.NotNull; import java.util.List; /** * @author zhf_10@163.com * @De...
Java
UTF-8
1,636
2.484375
2
[ "Apache-2.0", "MIT" ]
permissive
package com.springessentialsbook.chapter5.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.AuthenticationProvider; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.A...
SQL
UTF-8
11,313
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 02, 2016 at 08:05 PM -- Server version: 10.1.10-MariaDB -- PHP Version: 5.6.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
Python
UTF-8
2,489
2.671875
3
[ "MIT" ]
permissive
import cv2 import matplotlib.pyplot as plt import numpy as np from PIL import Image import os import shutil import sys import _global def cut_width(page, page_num, is_png=False): ''' Cut uncessery scanned page from left and right Note: there is a difference between pages ''' width, height = page.siz...
JavaScript
UTF-8
3,402
2.65625
3
[]
no_license
//------------------------------------------------- // Navegador Sticky //------------------------------------------------- window.onscroll = function () { myFunction() }; var navbar = document.getElementById("navbar"); var sticky = navbar.offsetTop; function myFunction() { if (window.pageYOffset >= sticky) {...
Java
UTF-8
759
1.953125
2
[]
no_license
package com.smartwifi.bean; import android.databinding.BaseObservable; import android.databinding.Bindable; import com.smartwifi.BR; /** * Created by Administrator on 2018/7/19. */ public class FootLoadMoreBean extends BaseObservable { public void setStatus(int status) { this.status = s...
C#
UTF-8
1,228
2.921875
3
[ "MIT" ]
permissive
using UnityEngine; using System.Collections; public class Select : MonoBehaviour { public RaycastHit hit; private GameObject selectedObject = null; // Use this for initialization void Start () { } // Update is called once per frame void Update () { Ray ray = Camera.main.ScreenPointToRay(new Vector3(Scr...
TypeScript
UTF-8
4,874
3.03125
3
[ "MIT" ]
permissive
import { expect } from "chai"; import { Texture2D } from "../../../../src/graphics/textures/texture2d"; import { TextureBindingCache } from "../../../../src/graphics/textures/textureBindingCache"; import { TextureNoHandle } from "../../_generators/graphics/textures/texture2d.gen"; import "mocha"; describe("TextureBind...
Java
UTF-8
1,145
3.796875
4
[]
no_license
package ds.algorithms.hackerRank; import java.util.HashMap; import java.util.Map; /** * Given a list of prices for the flavors of ice cream, select the two that will cost all of the money they have. * * For example, they have m = 6 and cost = [1,3,4,5,6] then 1+5 =8 index are 0 and 3 * crieria is 1 based indexin...
JavaScript
UTF-8
1,716
3.84375
4
[]
no_license
/* ------------------------------------------------------- description: 给定一个无重复元素的有序整数数组 nums 。 返回 恰好覆盖数组中所有数字 的 最小有序 区间范围列表。也就是说,nums 的每个元素都恰好被某个区间范围所覆盖,并且不存在属于某个范围但不属于 nums 的数字 x 。 列表中的每个区间范围 [a,b] 应该按如下格式输出: "a->b" ,如果 a != b "a" ,如果 a == b   示例 1: 输入:nums = [0,1,2,4,5,7] 输出:["0->2","4->5","...
Java
UTF-8
5,235
3.453125
3
[ "BSD-3-Clause" ]
permissive
package vg.civcraft.mc.civmodcore.util; /** * General math utility class that <i>may</i> exist elsewhere, but I have none the foggiest where. If any of y'all * figure out where, feel free to lodge an official complaint. * * @author Protonull */ public final class MoreMath { /** * Limits a value between and in...
Java
UTF-8
2,581
2.1875
2
[]
no_license
package de.fu_berlin.inf.dpp.activities.serializable; import org.apache.commons.lang.ObjectUtils; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamAsAttribute; import com.thoughtworks.xstream.annotations.XStreamConverter; import de.fu_berlin.inf.dpp.activit...
Java
UTF-8
618
2.46875
2
[]
no_license
package com.clomagno.codemapper.mapper.facades.dbf; import org.jamel.dbf.utils.DbfUtils; import com.clomagno.codemapper.mapper.ICell; public class DBFCellFacade implements ICell { private Object content; public DBFCellFacade(Object object) { this.content = object; } public void setCellValue(String value) { ...
PHP
UTF-8
1,137
3.03125
3
[]
no_license
<?php include_once "CRUD/CRUDOperate.php"; $obj = new CRUDOperate(); echo "1- Number of Sales by ABA method<br>"; $query = "SELECT count(method) as amount FROM sales WHERE method='ABA'"; $result = $obj->select($query); foreach ($result->fetchAll() as $row){ // echo $row->item."-".$row->...
Rust
UTF-8
2,048
2.703125
3
[]
no_license
use std::env; use std::path::PathBuf; use std::path::Path; use std::fs; const REBUILD_BLOCKLIST: &[&str] = &[".git", "build"]; fn visit_dir(dir: &Path) -> std::io::Result<()> { for entry in fs::read_dir(dir)? { let entry = entry?; let path = entry.path(); if path.is_dir() { if ...
Markdown
UTF-8
27,885
2.828125
3
[ "MIT" ]
permissive
### 1 Git简介 Git是一个开源的分布式版本控制系统,用以有效、高速的处理从很小到非常大的项目版本管理。 GitHub可以托管各种git库的站点。 GitHub Pages免费的静态站点,三个特点:免费托管、自带主题、支持自制页面和Jekyll。 ### 2 为什么使用Github Pages \1. 搭建简单而且免费; \2. 支持静态脚本; \3. 可以绑定你的域名; \4. DIY自由发挥,动手实践一些有意思的东西git,markdown,bootstrap,jekyll; \5. 理想写博环境,git+github+markdown+jekyll; ### 3 创建Github Pages ...
Java
UTF-8
2,705
2.875
3
[]
no_license
package atcoder.TDPC; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class TDPC_E { int d; int MOD = 1000000007; char[] cs; public static void main(String args[]) { new TDPC_E().run(); } void run()...
C#
UTF-8
4,220
2.765625
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LinearVisualEncoding { public delegate Color ColourSelection<T>(T obj); public delegate float ThicknessSelection<T>(T obj); public delegate void EndMarkerDra...
Java
UTF-8
1,732
2.578125
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 hilos; import java.util.logging.Level; import java.util.logging.Logger; import proyecto2.RecogeBloques; /** * * @author USU...
Markdown
UTF-8
1,016
2.671875
3
[]
no_license
# Helm Charts The canonical source for Helm charts is the [Helm Hub](https://hub.helm.sh/), an aggregator for distributed chart repos. This GitHub project is the source for Helm `stable` and `incubator` [Helm chart repositories](https://v3.helm.sh/docs/topics/chart_repository/), currently listed on the Hub. For more...
Markdown
UTF-8
6,709
3.140625
3
[]
no_license
# 敏感接口加固 &emsp;&emsp;目前前后端交互过程中没有考虑过敏感数据的安全问题,极易被攻击者利用,擅自篡改敏感数据使得接口被攻击。 ## 整改思路 1. 敏感数据存储后台,不允许直接使用前台的数据 2. 关联接口进行依赖校验,必须成功完成前置接口,才能调用下一个接口。 ## 接口整改 &emsp;&emsp;现在 wsg 中使用一个公共的 Controller 接受前端调用的接口,然后调用对应的 hsf 服务。现在需要将这部分逻辑提取出来形成单独的 Controller,并为其添加自己单独的逻辑。 ### 选号、选占接口 #### 选号接口修改 &emsp;&emsp;接口前端调用的文件为`op_web_...
TypeScript
UTF-8
1,772
2.59375
3
[]
no_license
import { Injectable } from '@angular/core'; import { environment } from '../../../../environments/environment'; import { HttpClient } from '@angular/common/http'; import { Tecnico } from './tecnico'; import {Observable} from 'rxjs'; const API_URL = environment.apiURL; const tecnicos = '/tecnicos'; @Injectable({ provi...
C
GB18030
3,899
3.84375
4
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #define N 10 #define NEW 1 #define USED 2 // ɾ () /*ҼҴ˵³ǰ һ˵³*/ //->car1->car2->car3->car4->car5 //for example if the car3 is the cheapeast new car ,we have to insert the newcar here //->car1->car2->car3->newcar->car4->car5 typedef struct ca...
C
UTF-8
3,491
2.953125
3
[]
no_license
#include <sys/socket.h> #include <sys/types.h> #include <sys/wait.h> #include <sys/stat.h> #include <fcntl.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> enum{ ONLINE, SEARCHING, REQUESTING, REQUESTED, PLAYING }; int main(){ char ...
C++
UTF-8
2,042
4.28125
4
[]
no_license
/** CS-11 Asn 6, loopychars.cpp Purpose: Loops and characters. @author Your Name @version 1.0 Date Completed */ #include <iostream> using namespace std; int main() { int n; // the integer number char ch; // the single character cout << "** Loopy Characters!**\n\n"; cout << "Enter an in...
C#
UTF-8
1,202
3.296875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Logs_Aggregator { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); var dict = new Dictionary<string, Dictionary<string, int>>(); ...
Markdown
UTF-8
3,103
3.078125
3
[]
no_license
# Disqover **Disqover** is a social networking site where users can discover others who share similar music and movie tastes, as well as a portal to discovering new music and movies. ### Disclaimer This project is created by Jeremy Velo, Aaron Neme, and Marcos Benedicto solely for the use and purpose of completing the ...
Markdown
UTF-8
2,131
3.046875
3
[]
no_license
# Requerimientos Composer PHP > 7.3 Node (nvm) > 7.1.1 # Instalacion Tener instalado los paquetes de [composer](https://getcomposer.org/) y [npm](https://www.npmjs.com/) para poder ejecutar los siguientes comandos (instalan todas las dependencias del proyecto): ```bash composer install && npm install ``` ## Configur...
JavaScript
UTF-8
1,041
2.96875
3
[ "MIT" ]
permissive
"use strict"; // Include our "db" const db = require("../db"); // Exports all the functions to perform on the db module.exports = { find, findOne }; /** * List products * @param {Object} options [Query options] * @return {Array} [Array of products] */ async function find(options = {}) { try { cons...
C
UTF-8
1,855
2.625
3
[ "MIT" ]
permissive
#include "window-private.h" #include "render-private.h" #include "render.h" void clear(Window* w) { glClearColor(0.0, 0.0, 0.0, 1.0); glClear(GL_COLOR_BUFFER_BIT); } void swapBuffers(Window* w) { SDL_GL_SwapWindow(w->window); } void drawRect( Window* window, float* mvp, float* c...
Java
UTF-8
2,713
3.34375
3
[ "MIT" ]
permissive
import java.util.*; //The loader that validates and places abilities into the storage public class AbilityLoader extends Loader{ //Implementation of template method protected void parse_line(String[] line_split){ int ab_type; int ab_tgt_type; int ab_num_dice; int ...
Java
UTF-8
7,305
1.984375
2
[]
no_license
package com.ametis.cms.datamodel; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name="benefit_category") public class BenefitCategory imp...
Java
UTF-8
7,466
2.25
2
[]
no_license
package com.cai310.lottery.entity.lottery; import java.math.BigDecimal; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import org.hibernate.annotations.Cache;...
Python
UTF-8
225
3.484375
3
[]
no_license
# coding: utf-8 remaining_questions = True while remaining_questions: try: value_a, value_b = map(int, input().split(" ")) print(len(str(value_a + value_b))) except: remaining_questions = False
C#
UTF-8
1,580
2.84375
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Xml; public class utils : MonoBehaviour { public static int LoadGameDataElementInt(string String, XmlDocument xmlDoc) { int ReturnInt = 0; try { ReturnInt = int.Parse(LoadGameData...
Java
UTF-8
3,078
3.546875
4
[ "MIT" ]
permissive
package HighConcurrency.CinemaTicket; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.concurrent.TimeUnit; /** * 通过卖票程序读懂多线程--单线程程序 * * @author zhuhuix * @date 2020-05-12 */ p...
Markdown
UTF-8
3,961
3.15625
3
[]
no_license
# Mentoring Workflow ## Navigating the Mentor Dashboard To get started with mentoring, log into your Exercism account and click on “Mentor Dashboard” in the main menu. ![menu](https://user-images.githubusercontent.com/5421823/42646491-efd24170-85f8-11e8-9284-87929f379f39.png) You will see your Mentor Dashboard which...
Java
UTF-8
4,291
2.3125
2
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
package cn.gdeiassistant.Service.Phone; import cn.gdeiassistant.Exception.VerificationException.SendSMSException; import cn.gdeiassistant.Exception.VerificationException.VerificationCodeInvalidException; import cn.gdeiassistant.Pojo.Entity.Phone; import cn.gdeiassistant.Pojo.Entity.User; import cn.gdeiassistant.Reposi...
Java
UTF-8
2,573
3.671875
4
[]
no_license
public class NQueens { private int num; private int[][] board; // public static void main(String[] args) throws Exception { //my main function to print to console // NQueens nq = new NQueens(8); // // if(nq.placeNQueens()) { // nq.printToConsole(); // } // // }...
Shell
UTF-8
229
2.640625
3
[]
no_license
run=$1 histo=$2 verbose=$3 sed -e "s/HISTO/$histo/g" FFT_3.c > FFT_3.tmp1 sed -e "s/RUN/$run/g" FFT_3.tmp1 > FFT.c rm FFT_3.tmp1 if [ "$verbose" == "v" ]; then root -l FFT.c else root -b -q -l FFT.c fi
Python
UTF-8
2,236
4.84375
5
[]
no_license
# print("hello world") # print("I am Kasey") # print("Nice to meet you") #functions, how to write a function # def introduction(): # print("hello world") # print("I am Kasey") # print("Nice to meet you") # introduction() # def introduction_specialized(name): # print("hello world") # print("I am", name) # ...
SQL
UTF-8
1,728
2.8125
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/View/V_OBPC_FILEP.sql =========*** Run *** = PROMPT ===================================================================================== PROMPT *** Create view V_OB...
C
UTF-8
6,258
2.953125
3
[]
no_license
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <stdbool.h> #include <gmp.h> #include "rsa.h" #include "prf.h" /* NOTE: a random composite surviving 10 Miller-Rabin tests is extremely * unlikely. See Pomerance et al.: * http://www.amps.org/mcom/1993-61-203/S0025-5718-1993-1189518-9/ * */ #defin...
TypeScript
UTF-8
462
2.640625
3
[]
no_license
export interface UserLocation { lat: number; long: number; } export interface WeatherProps { dt: number; name: string; main: { temp: number; feels_like: number; humidity: number; }; sys: { sunrise: number; sunset: number; }; weather: [ { description: string; } ]; }...
Java
UTF-8
599
2.46875
2
[]
no_license
package fr.marseille.formation.initiation.Entity; public class CompteCourant { public int nbComptesCourants = 3000; public int numero; public String intitule; public double solde; public double montantDecouvertAutorise; public CompteCourant(String numero, String intitule, double solde, double montantDecouvertA...
Markdown
UTF-8
3,380
2.78125
3
[ "MIT" ]
permissive
--- layout: post title: 与子说|关于钱的那些事儿(2) tags: [育儿育己] category: Education --- # <center> 一 <img width="398" alt="截屏2020-12-02 下午12 12 04" src="https://user-images.githubusercontent.com/23351109/100827635-2841b400-3498-11eb-99fa-f08318ab084f.png"> (四岁) 蹬蹬蹬——跑下琴行前的台阶,老母亲追随小童的身影,望了望远处的路灯。夏日的晚风,轻轻摩挲着裙裾,小童背上的小书包快活得摆来摆...
JavaScript
UTF-8
1,036
2.765625
3
[]
no_license
var engine, world; var paper; var left, bottom, right; var ground; const Engine = Matter.Engine; const World = Matter.World; const Bodies = Matter.Bodies; const Body = Matter.Body; function preload() { binImg = loadImage("images/dustbingreen.png"); } function setup() { createCanvas(1500, 700); bin = createSprite...
Java
UTF-8
1,357
3.296875
3
[]
no_license
package pack1; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.LinkedList; import java.util.List; public class Demo { public static void main(String[] args) { List<Integer> l1 = new LinkedList<>(); l1.add(0); l1.add(5); l1.add(null); l1.add(25); Syst...
C++
UTF-8
3,881
2.625
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/*----------------------------------------------------------- * 2c - Cross Platform 3D Application Framework *----------------------------------------------------------- * Copyright © 2010 - 2011 France Telecom * This software is distributed under the Apache 2.0 license, * see the "license.txt" file for more detai...
Java
UTF-8
7,370
2.171875
2
[]
no_license
package org.adscale.bragi.player.modules.pandora; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apa...
PHP
UTF-8
1,132
2.984375
3
[]
no_license
<?php namespace application\handbook; use common\libraries\Configuration; use common\libraries\Utilities; /** * This is a skeleton for a data manager for the Handbook Application. * Data managers must extend this class and implement its abstract methods. * * * @author Nathalie Blocry */ class HandbookDataManage...
C#
UTF-8
1,924
2.75
3
[]
no_license
using System.Collections.Generic; public class GeometryStage : IGeometryStage { private IVertexShade vertexShade; private IPrimitiveAssemble primitiveAssemble; private IClip clip; private ICull cull; public GeometryStage() { vertexShade = new VertexShade(); p...