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
5,094
1.898438
2
[]
no_license
package com.bonelf.auth.config; import com.bonelf.auth.core.oauth2.granter.mail.MailAuthenticationProvider; import com.bonelf.auth.core.oauth2.granter.mobile.MobileAuthenticationProvider; import com.bonelf.auth.core.oauth2.granter.openid.OpenIdAuthenticationProvider; import lombok.extern.slf4j.Slf4j; import org.spring...
Java
UTF-8
2,505
2.453125
2
[]
no_license
package me.sheepyang.onlylive.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; im...
JavaScript
UTF-8
3,647
2.578125
3
[ "MIT" ]
permissive
app .controller('RunnerCtrl', function($scope, $state, $rootScope, $animate, $interval){ console.log("Runner"); //Time Calculator //TODO: This is a Directive $scope.time = "00:00:00"; var elapsedSeconds = 0; var timer = $interval(function(){ if(!$rootScope._RUNNING) return; elaps...
Java
UTF-8
1,397
1.875
2
[]
no_license
/******************************************************************************* * Copyright 2011, 2013 Model Driven Solutions, Inc. * All rights reserved worldwide. This program and the accompanying materials * are made available for use under the terms of the GNU General Public License * (GPL) version 3 that acc...
C++
UTF-8
986
2.671875
3
[]
no_license
#include "JanelaPrincipal.h" #include <iostream> JanelaPrincipal::JanelaPrincipal() : button01("OK"), button02("Close") { set_title("Analizar"); set_size_request(800, 600); set_border_width(2); add(frame01); frame01.set_shadow_type(Gtk::SHADOW_ETCHED_OUT); button01.signal_clicked().connect(sigc::mem_fun(...
Python
UTF-8
711
3.171875
3
[]
no_license
import matplotlib.pyplot as plt import numpy as np from scipy import stats currents = np.array([25.90,27.80,29.70,31.80,33.9,36,38]) # in mA power = ((20-0)/(currents[-1]-currents[0]))*(currents- currents[0]) # in mW print(power) coincidence_counts = np.array([1.22,7.28,14.98,24.26,29.5,38.68,42.6]) # in counts per ...
PHP
UTF-8
979
3.296875
3
[]
no_license
<?php // MySql i eh nativa do php class db{ //host - endereco que o MySql esta instalado private $host = 'localhost'; //usuario private $usuario = 'root'; //senha private $senha = ''; //banco de dados private $database = "twitter_clone"; ...
C#
UTF-8
5,091
2.65625
3
[ "MIT" ]
permissive
namespace Yfy.Api.ShareLink { using System; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel; using System.Collections.Generic; /// <summary> /// 通用分享链接对象 /// </summary> public class YfyShareLink : YfyObject { /// <summary> //...
Java
UTF-8
528
2.359375
2
[]
no_license
package org.study.commands; import javax.servlet.http.HttpServletRequest; public class Error404Command implements Command { /** * this command return error 404 page */ @Override public String execute(HttpServletRequest request) { return "jsp/404.jsp"; } /** * this method a...
Python
UTF-8
4,379
3.28125
3
[]
no_license
# 改变图片对比度 import cv2 import numpy as np def image_rename(old_name, output_path, operate_name, suq_number): """ :param old_name: 待水平移动的图形名称(完全路径) :param output_path: 水平移动后保存的文件夹路径 :param operate_name: 操作名称(用于图像命名) :param suq_number: 水平移动的序号 :return: 返回新的名称(包含完全路径) """ ima_nam...
Java
UTF-8
25,460
2.203125
2
[ "BSD-3-Clause", "Apache-2.0", "BSD-2-Clause" ]
permissive
/* * ScanCmd.java * * Copyright (c) 1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and * redistribution of this file, and for a DISCLAIMER OF ALL * WARRANTIES. * * RCS: @(#) $Id: ScanCmd.java,v 1.6 2009/07/23 10:42:15 rszulgo Exp $ * */ package tcl.lang.cmd; import t...
Java
UTF-8
5,989
2.984375
3
[]
no_license
package controllers; import java.util.LinkedList; import java.util.List; import models.Mate; import models.MatePostTable; import models.Seeker; import models.SeekerPostTable; import models.User; import play.mvc.Controller; public class ProfileController extends Controller { /* * This function maintains the profi...
C++
UTF-8
871
3.921875
4
[]
no_license
#include <iostream> #include <string> using namespace std; /** Chapter 1 Palindrome Permutation: Given a string, write a function to check if it is a permutation of a palindrome. A palindrome is a word or phrase that is the same forwards and backwards. A permutation is a rearrangement of letters. The palindrome does n...
Markdown
UTF-8
9,995
2.84375
3
[]
no_license
Putting empty filament spools to good use ============================================ **Table of Contents** 1. [Introduction](#introduction) 2. [Features](#features) 3. [Versions](#versions) 4. [Usage](#usage) 5. [Finishing off](#finishing-off) 6. [Pictures](#pictures) Introduction ------------ 3D printing has a ten...
Java
UTF-8
2,689
2.03125
2
[]
no_license
package ddw.com.richang.adapter; import android.content.Context; import android.content.Intent; import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import ...
C++
UTF-8
2,102
3.140625
3
[ "MIT" ]
permissive
#pragma once #include "ec3/graphics/geometry/static-geometry.h" namespace ec { /** * \brief Kind of static geometry that represents a cylinder. */ class CylinderGeometry : public StaticGeometry { public: /** * \brief CylinderGeometry constructor. * \param radius Top and bottom circle radii. * \param...
TypeScript
UTF-8
3,869
2.609375
3
[ "MIT" ]
permissive
module Fayde.WebGL { import ShapeArrangePipeDef = minerva.shapes.shape.arrange.ShapeArrangePipeDef; enum LoadStatus { NotLoaded = 0, Loaded = 1, LoadFailed = 2, Loading = 3, } export class ShaderBase extends DependencyObject implements IShader { static SourceProp...
Python
UTF-8
21,306
2.8125
3
[ "Apache-2.0" ]
permissive
import festim import fenics as f import pytest def add_functions(trap, V, id=1): trap.solution = f.Function(V, name="c_t_{}".format(id)) trap.previous_solution = f.Function(V, name="c_t_n_{}".format(id)) trap.test_function = f.TestFunction(V) def test_error_wrong_type_material(): """Checks that an e...
Java
UTF-8
472
2.5
2
[]
no_license
package vo; public class SeatVO { private String seatName,seatTf; public SeatVO() { super(); } public SeatVO(String seatName, String seatTf) { super(); this.seatName = seatName; this.seatTf = seatTf; } public String getSeatName() { return seatName; } public void setSeatName(String seatName) { t...
Java
UTF-8
206
1.859375
2
[]
no_license
package com.example.ferdy.birms.api; import com.example.ferdy.birms.model.ApiBerita; public class JSONBerita { ApiBerita[] data; public ApiBerita[] getDataBerita(){ return data; } }
Go
UTF-8
659
4.15625
4
[ "CC-BY-3.0" ]
permissive
package main import "fmt" import "math" // `const` declares a constant value. const s string = "constant" func main() { fmt.Println(s) // A `const` statement can appear anywhere a `var` statement can. const n = 500000000 // Constant expressions perform arithmetic with arbitrary precision. const d = 3e20 / n ...
Java
GB18030
4,507
2.078125
2
[]
no_license
package com.cx.controller; import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Contro...
Python
UTF-8
1,511
4.53125
5
[]
no_license
""" Let's learn about list comprehensions! You are given three integers x,y and z representing the dimensions of a cuboid along with an integer n. Print a list of all possible coordinates given by (i,j,k) on a 3D grid where the sum of i+j+k is not equal to n. Here, 0<=i<=x;0<=j<=y; 0<=k<=z. Please use list comprehensio...
Markdown
UTF-8
3,575
3.078125
3
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
# Output # Neptune's output directory contains the following items: | Item | Type | Description | |---|---|---| | candidates | directory | The directory containing signature candidates in extracted order. | | filtered | directory | The directory containing filtered signature candidates in extracted order. | | sorted ...
Python
UTF-8
617
3.671875
4
[ "MIT" ]
permissive
import random # Takes a number of vertices and a floating point number between 0 and 1 # and generates a weighted graph with distinct weights that has that many vertices and an edge between # any two given vertices with the given probability # vertices = int(input()) edge_prob = float(input()) graph = [] edges = 0 ...
Python
UTF-8
392
3.984375
4
[]
no_license
print("{0} is {1} years old".format("小王", 25)) print('{0:.3}'.format(1/3)) # decimal (.) precision of 3 for float #'0.333' print('{0:_^11}'.format('hello')) # fill with underscores (_) with the text #centered (^) to 11 width #'___hello___' print('{name} wrote {book}'.format(name='Swaroop', book='A Byte of...
Markdown
UTF-8
1,183
3.046875
3
[]
no_license
# Arcade Game Project ## Arcade Game Arcade Game is a game where users can earn more scores as they successfully move across the board to reach the water area without colliding with any enemies (as known as the bugs) with variety of speed depending on the levels. ## Basic Functionality In this game you have a Player...
C#
UTF-8
1,622
2.734375
3
[]
no_license
using System; using System.Collections.Immutable; namespace MechArena { [Serializable()] class Component_Position : Component { private int x, y; private bool blocksMovement; public int X { get { return this.x; } } public int Y { get { return this.y; } } public boo...
Python
UTF-8
969
3.265625
3
[]
no_license
class Solution(object): def romanToInt(self, s): """ :type s: str :rtype: int """ if not s: return 0 no = 0 i = 0 d = {'I':1,'V':5,'X':10,'L':50,'C':100,'D':500,'M':1000} #jump = False while i <= len(s)-1: #jump=False if i+1< len(s) and s[i]=='I' and s[i+1]=='V': no+=4 i+=2 #ju...
C++
UTF-8
1,297
2.859375
3
[]
no_license
#include <SPI.h> int hexDigitValue[] = {0x03, /* 0 */ 0x9F, /* 1 */ 0x25, /* 2 */ 0x0D, /* 3 */ 0x99, /* 4 */ 0x49, /* 5 */ 0x41, /* 6 */ 0x1F, /* 7 */ 0x01, /* 8 */ 0x09};/* 9 */ const int slaveSelectPin = 10; int button_number; void b...
PHP
UTF-8
3,447
2.59375
3
[]
no_license
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); //* @name profesor.php //* @author Prof. Ing. Pablo Eduardo Hernandez //* @Fecha: Octubre 2016 //* @Funcion: este controlador sirve para de las notas por el profesor //* @Perfiles: Profesor class Profesor extends CI_Controller { function ...
Swift
UTF-8
875
2.90625
3
[]
no_license
class RootPresenter: RootPresenterType { weak var controller: RootViewControllerType? private let repository: RepositoryType private var currentPage: Int = 1 init(repository: RepositoryType = Repository()) { self.repository = repository } func getRepositories(nextPage: Bool) { ...
Python
UTF-8
584
2.75
3
[]
no_license
from bs4 import BeautifulSoup import re from event import Event html = open('schedule.txt', 'r').read() soup = BeautifulSoup(html, 'html.parser') schedule = [] schedule_html = soup.find_all(class_=re.compile('^seasonRowItem')) for event in schedule_html: attributes = [] for element in event.find_all('p'): attrib...
Python
UTF-8
1,489
2.96875
3
[]
no_license
import random import math x = [-10.0, 15.0, 30.0] target = [ 14.0, 59.0, 86.0] # glorot_uniform fan_in = 1 # the number of input units in the weight tensor fan_out = 1 # the number of output units in the weight tensor limit = math.sqrt(6 / (fan_in + fan_out)) W1 = random.uniform(-limit, limit) # ~ [-1.73, 1.73] B1 ...
Markdown
UTF-8
2,264
3.859375
4
[ "MIT" ]
permissive
# 1. 两数之和(Two Sum) ## 描述 ![](../pictures/1.png) ## 解法分析 ### 解法1 求解的关键则是 $k = target - nums[i]$, k 是否在数组 $nums$ 中,且 k 的索引不等于 i。 先将数组 $nums$ 转化为字典 $ref$,其中字典的 key 为数组 $nums$ 存储的数据, 字典的 value 为数据对应在 $nums$ 中的 index。这样只需要遍历字典 $ref$的 key,计算 $searchback = target - some_key$, 并判断 $searchback$ 是否是不等于 some_key 的 key。 空间复...
Java
UTF-8
4,809
2.234375
2
[]
no_license
package com.focus.test1android; /** * Created by AdrianHsu on 15/8/3. */ import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.widget.TextView; import com.facebook.AccessToken; import com.facebook.GraphRequest; import com.facebook.GraphResponse; import com.facebook.HttpMetho...
Python
UTF-8
8,645
3.109375
3
[]
no_license
import sys class ConvertDatatypeDict(dict): """ A dict that converts values for certain keys. The keys for which the corresponding value should be converted can be specified via the attributes self.decs and self.hexs. The conversion must be done explicitly via convert_datatypes(self) self.d...
Python
UTF-8
791
2.921875
3
[]
no_license
line = lambda: map(int, raw_input().split()) def main(): for t in range(input()): points = [tuple(line()) for n in range(input())] print 'Case #{}:'.format(t + 1) solve(points) def solve(points): if len(points) == 1: print 0 return res = {} for p1 in range(len(p...
Swift
UTF-8
1,700
2.71875
3
[]
no_license
// // adf.swift // CustomPresentation // // Created by Nguyen, Cong on 2020/12/25. // import UIKit class AnimatedTransitioning: NSObject, UIViewControllerAnimatedTransitioning { let isPresenting: Bool init(isPresenting: Bool) { self.isPresenting = isPresenting super.init() } func transitionDurati...
C++
UTF-8
2,486
2.78125
3
[]
no_license
#include<iostream> #include<vector> #include<deque> #define MAXN 13 using namespace std; typedef unsigned long long int64; int p, r, n; inline void printSeq(const deque<int> &seq) { for (int i = 0; i < seq.size(); i++) cout << seq[i] << ' '; cout << endl; } inline int getData(const deque<int> &seq, const...
Java
UTF-8
338
1.851563
2
[ "Apache-2.0" ]
permissive
package main.model.db.dao.integrations.tts; import main.model.db.dao.DAO; import main.model.dto.integrations.tts.TestTrackingTypeDto; public class TestTrackingTypeDao extends DAO<TestTrackingTypeDto> { public TestTrackingTypeDao(){ super(TestTrackingTypeDto.class); select = "{call SELECT_INT_TTS_...
TypeScript
UTF-8
3,211
2.671875
3
[ "MIT" ]
permissive
import type { Consola, ConsolaLogObject } from 'consola'; import consola from 'consola'; // In ice.js, we use DEBUG_TAG instead of DEBUG to avoid other libs which use `DEBUG` as their flag log debug info. // eslint-disable-next-line camelcase const { DEBUG_TAG, npm_lifecycle_event } = process.env; function getEnableA...
Java
UTF-8
2,620
2.6875
3
[]
no_license
package org.apache.xalan.templates; import org.apache.xpath.XPathVisitor; /** * A derivation from this class can be passed to a class that implements * the XSLTVisitable interface, to have the appropriate method called * for each component of an XSLT stylesheet. Aside from possible other uses, the * main inte...
Markdown
UTF-8
8,184
3.40625
3
[]
no_license
# # 概述 文本在HTML页面中是最基本的表现形式,通过文本能最有效而详细的说明网页中的内容。但若不对页面中的文本做任何处理,那会给用户浏览带来一些不好的体验。如果通过CSS对文本进行设置后,不仅让用户浏览体验更佳的好,也会让页面的美观程度提升一个高度。 # # 文本设置 * ## 01. [text-align](https://developer.mozilla.org/zh-CN/docs/Web/CSS/text-align) 文本对其方式 ```css text-align: left | right | center; ``` ## 02. [text-indent](https://developer.m...
Python
UTF-8
196
3.4375
3
[]
no_license
import math for xp in range(30): lvl = math.sqrt(xp * 2 / 5.0) print lvl, xp for lvl in range(1, 20): xp = (lvl ** 2 / 2.0) * 5 xp2 = xp - ((lvl - 1) ** 2 / 2.0) * 5 print lvl, int(xp), xp2
Java
UTF-8
6,266
2.0625
2
[]
no_license
package com.dummy.myerp.consumer.dao.impl.db.dao; import com.dummy.myerp.consumer.dao.impl.DaoProxyImpl; import com.dummy.myerp.model.bean.comptabilite.CompteComptable; import com.dummy.myerp.model.bean.comptabilite.EcritureComptable; import com.dummy.myerp.model.bean.comptabilite.JournalComptable; import com.dummy.my...
C++
UTF-8
1,501
2.796875
3
[]
no_license
#include "async_io.h" #include <QThread> Async_IO::Async_IO(usb_dev_handle *_handle) : canceled(false), handle(_handle), rxactive(false), txactive(false), TxSize(0), RxSize(0) { /* Make the thread delete itself when it is finished */ QObject::connect( this, SIGNAL(finished()), this, SLOT(...
C
UTF-8
4,770
2.78125
3
[]
no_license
#include <linux/module.h> // Needed by all modules #include <linux/moduleparam.h> /* Needed for module parameters */ #include <linux/kernel.h> // Needed for KERN_* and printk #include <linux/init.h> // Needed for __init and __exit macros #include <linux/fs.h> /* Provides file ops structure */ #include <asm/...
C++
UTF-8
12,373
3.109375
3
[]
no_license
// // ParallelSearch.h // FinalProject // // Created by Matt on 12/5/15. // Copyright (c) 2015 Matt. All rights reserved. // #ifndef FinalProject_ParallelSearch_h #define FinalProject_ParallelSearch_h #include <vector> // std::vector, size_t #include <algorithm> // make_heap, push_heap, pop_heap,...
PHP
UTF-8
350
2.671875
3
[]
no_license
<?php namespace Example\Tests\Model; use Example\Model\ValueObject; class DummyValueObject implements ValueObject { /** * @param ValueObject $object * @return bool */ public function equals(ValueObject $object): bool { } /** * @return string */ public function __toS...
Markdown
UTF-8
1,191
3.234375
3
[]
no_license
# [剑指 Offer 53 - I. 在排序数组中查找数字 I](https://leetcode-cn.com/problems/zai-pai-xu-shu-zu-zhong-cha-zhao-shu-zi-lcof/) 统计一个数字在排序数组中出现的次数。 示例 1: 输入: nums = [5,7,7,8,8,10], target = 8 输出: 2 示例 2: 输入: nums = [5,7,7,8,8,10], target = 6 输出: 0 提示: 0 <= nums.length <= 105 -109 <= nums[i] <= 109 nums 是一个非递减数组 -109 <= targ...
Java
UTF-8
828
3.3125
3
[]
no_license
package offline; import java.util.Map.Entry; public class Line { private Dictionary dic; private String[] words; public Line(String[] split) { this.words = split; //fill the dictionary this.dic = new Dictionary(); for(int i = 0; i < words.length; i++) this.dic.put(words[i]); } public double sim...
C++
UTF-8
954
3.171875
3
[ "MIT" ]
permissive
//Analog Joystick Servo Example Code //by Kreezy(KRosa) 1.12.2018 //Example Video can be found @ https://youtu.be/b58vSDy8nB8 #include <Servo.h> // includes the Servo library Servo myservo; // create servo object to control a servo const int X_pin = 0; // analog pin connected to X output int val; // variable to...
Java
UTF-8
503
1.890625
2
[]
no_license
package csumbcapstonegroup22spring2019.demodb.linechart; import java.util.List; import org.springframework.data.mongodb.repository.MongoRepository; import org.springframework.data.mongodb.repository.Query; import org.springframework.stereotype.Repository; import csumbcapstonegroup22spring2019.demodb.entities.linecha...
C++
UTF-8
730
3.03125
3
[]
no_license
/* DwyaneTalk@gmail.com * by lutao * leetCodeC++ : Trapping Rain Water * : https://leetcode.com/problems/house-robber-ii/ */ #include <iostream> #include <algorithm> #include <cmath> #include <string> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <hash_set> usin...
C++
UTF-8
1,103
2.78125
3
[]
no_license
#include "Movie.h" #include <unordered_map> #include <unordered_set> #include <vector> #include <string> using namespace std; class MovieReader { public: vector<Movie> getMovies(); vector<string> getGenres(); MovieReader(); void readFile1(unordered_map<string, Movie> movieMap, unord...
Ruby
UTF-8
989
2.859375
3
[]
no_license
# == Schema Information # # Table name: rule_totals # # id :integer not null, primary key # challenge_id :integer # exercise_unit_id :integer # num_exercise_units :integer # time_period_id :integer # num_time_periods :integer # created_at :datetime not null ...
Java
UTF-8
4,771
2.328125
2
[]
no_license
package pl.timetable.service; import org.apache.log4j.Logger; import org.hibernate.Hibernate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import pl.timetable.api.CourseRequest; import pl.t...
Swift
UTF-8
2,545
2.71875
3
[]
no_license
// // Created by Pierluigi Cifani on 26/02/16. // Copyright © 2016 BlurSoftware. All rights reserved. // import Cocoa class RegionController: NSViewController { weak var pickerDelegate: RegionPickerObserver? { didSet { //Europe is the default region self.setSelectedRegion(.Europ...
Markdown
UTF-8
8,781
2.65625
3
[]
no_license
--- inFeed: true hasPage: true inNav: false inLanguage: null keywords: [] description: Analytics is so much more than just a chart depicting the trend in some data. datePublished: '2016-08-05T01:50:47.548Z' dateModified: '2016-08-05T01:50:18.537Z' title: '' author: [] via: {} authors: [] publisher: {} starred: false so...
JavaScript
UTF-8
1,417
2.96875
3
[]
no_license
const mySub = document.querySelector("form input[type=submit]"); const myNum = document.querySelector("form input[type=number]"); const myText = document.querySelector("form input[type=text]"); const myColor = document.querySelector("form input.bgCol"); const myTxtColor = document.querySelector("form input.teCol");...
Swift
UTF-8
3,637
2.96875
3
[]
no_license
// // PlaceManager.swift // Places // // Created by Shubhang Dixit on 21/10/19. // Copyright © 2019 Shubhang. All rights reserved. // import Foundation class PlaceManager { static let shared = PlaceManager() var places : [Place] = [] var dataDidChange = false func fetchPlaces(success: @escapi...
Java
UTF-8
1,772
2.15625
2
[ "MIT" ]
permissive
package net.tecgurus.banco.model.service; import java.util.Date; import java.util.List; import net.tecgurus.banco.model.dao.iface.ClienteDao; import net.tecgurus.banco.model.dao.impl.ClienteDaoMysql; import net.tecgurus.banco.model.dto.Banco; import net.tecgurus.banco.model.dto.Cliente; public final class ClienteSer...
Shell
UTF-8
2,660
3.0625
3
[]
no_license
#!/usr/bin/env bash set -x set -euo pipefail # TODO: maybe we need to upload our own AMI or something? REGION="us-west-2" #AMI_ID="ami-073449580ff8e82b5" #NixOS-20.03.2351.f8248ab6d9e-aarch64-linux #AMI_ID="ami-09d0dda914bed4052" # Amazon Linux 2 AMI_ID="ami-053c71bfc2f2ae88d" # NixOS-20.09alpha417.a780c60f9f7-aarch...
Java
UTF-8
11,357
1.664063
2
[]
no_license
package com.neteast.rmp.dao.domain; public class ScPortalGlobalParmsExample extends ScPortalGlobalParms { /** * This field was generated by Abator for iBATIS. * This field corresponds to the database table sc_portal_global_parms * * @abatorgenerated Mon Apr 08 20:00:15 CST 2013 */ publ...
Java
UTF-8
773
2
2
[]
no_license
package com.zdw.helloworld; import com.zdw.helloworld.api.HelloWorldInterfaces; import org.apache.servicecomb.provider.rest.common.RestSchema; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.web.bind.anno...
Java
UTF-8
5,719
1.90625
2
[]
no_license
package cn.cgnb.service.impl; import cn.cgnb.bean.DBSourceBean; import cn.cgnb.bean.DSBean; import cn.cgnb.bean.IdNameInfo; import cn.cgnb.bean.SyncTableInfo; import cn.cgnb.conf.PageParam; import cn.cgnb.conf.PageResult; import cn.cgnb.datasources.OracleClient; import cn.cgnb.datasources.OracleClientNew; import cn.cg...
Markdown
UTF-8
5,452
3.0625
3
[]
no_license
--- layout: page title: "Q168046: HOWTO: STL Sample for &#91;list::rbegin, rend, reverse, rev_iterator" permalink: /kb/168/Q168046/ --- ## Q168046: HOWTO: STL Sample for &#91;list::rbegin, rend, reverse, rev_iterator {% raw %} Article: Q168046 Product(s): Microsoft C Compiler Version(s): 4.2,5.0,6.0 Operating Sy...
Python
UTF-8
227
3.828125
4
[]
no_license
import turtle t = turtle.Turtle() t.pensize(5) t.rt(90) def square(): t.fd(100) for i in range(3): t.lt(90) t.fd(200) t.lt(90) t.fd(100) for i in range(5): square() t.lt(72) turtle.done()
Java
UTF-8
29,096
2.859375
3
[]
no_license
package cop5556sp17; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import cop5556sp17.Parser.SyntaxException; import cop5556sp17.Scanner.IllegalCharException; import cop5556sp17.Scanner.IllegalNumberException; public class ParserTest2 { @Rule public ExpectedException thr...
Python
UTF-8
2,081
2.9375
3
[]
no_license
from bottle import route, run, request import json import os """ curl -X PUT -d key=value -d key2=value2 localhost:8080/tokens/ curl -X GET localhost:8080/tokens/ """ boardTokens = {'0' : '', '1' : '', '2' : '', '3' : '', '4' : '', '5' : '', '6' : '', '7' : '', '8' : ''} X = "X" O = "O" isXAssigned = False isOAssign...
Markdown
UTF-8
3,087
2.546875
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: balloonUI element description: The optional balloonUI element is used to display a message balloon on the client computer. keywords: ["balloonUI element Print Devices"] topic_type: - apiref ms.topic: reference api_name: - balloonUI api_type: - Schema ms.date: 09/06/2022 --- # balloonUI element The optional...
JavaScript
UTF-8
714
2.5625
3
[]
no_license
const { USER_LOGGED_SUCCESS, FETCH_TODO_ITEMS } = require('./type'); const initialState = { user: {}, loading: false, error: '', logged: false, }; export const loggedReduce = (state = initialState, action) => { switch (action.type) { case USER_LOGGED_SUCCESS: console.log(action.payload); return { err...
Python
UTF-8
232
2.53125
3
[]
no_license
N=int(input()) W=list(map(int,input().split())) l=[] for i in range(1,N+1): S1=0 S2=0 for j in range(N): if (j+1)<=i: S1+=W[j] else: S2+=W[j] l.append(abs(S1-S2)) print(min(l))
C++
UTF-8
233
3.046875
3
[]
no_license
#include "animaux.h" //Constructeur Animaux::Animaux(std::string nom, double poids){ this->nom = nom; this->poids = poids; } //Affichage void Animaux::afficherInfos(){ std::cout<< nom <<" ("<<poids<<" kg)"<<std::endl; }
TypeScript
UTF-8
120
2.78125
3
[]
no_license
let idade : number = 18 if (idade >= 18 && idade <= 67){ console.log("sim") } else{ console.log("não") }
C++
UTF-8
9,847
2.734375
3
[ "MIT" ]
permissive
/*------------------------------------------------------------------------------ * CppToolbox: LuaWrapper * https://github.com/pirminschmid/CppToolbox * * Copyright (c) 2017, Pirmin Schmid, MIT license *----------------------------------------------------------------------------*/ #include <ctime> #include <iostr...
Markdown
UTF-8
16,566
2.796875
3
[]
no_license
--- layout: post category: product title: "Import AI 156: The 7,500 images that break image recognition systems; open source software for deleting objects from videos; and what it takes to do multilingual translation" date: 2019-07-22 17:56:29 link: https://vrhk.co/2y3ce2w image: domain: jack-clark.net author: "Jack ...
C#
UTF-8
435
2.6875
3
[]
no_license
using System; using System.Collections.Generic; using System.Text; namespace Robots { public class Robot { public Robot(string name, int maximumBattery) { Name = name; MaximumBattery = maximumBattery; Battery = maximumBattery; } public strin...
JavaScript
UTF-8
1,736
2.71875
3
[]
no_license
import * as PIXI from 'pixi.js'; function createCard(param) { let stage = param.stage; let screen = param.screen; let position = param.position; let stats = param.stats; let container = new PIXI.Container(); // Создаем карту let parity_of_parties = { radius: 1.25, ...
JavaScript
UTF-8
431
3.859375
4
[]
no_license
window.clear(); Array.prototype.myUsecase = function(){ var res = []; for (var i = 0; i < this.length; i++){ res.push(this[i] * 2); } return this.concat(res); } var arr = [1, 2, 4]; console.log((arr.myUsecase()).push(1234)); console.log(arr); String.prototype.ss = functio...
Markdown
UTF-8
1,705
2.5625
3
[ "BSD-3-Clause" ]
permissive
OX3-Ruby-API-Client =================== For OpenX API access using the Ruby API Client you will need: ### 1. Your credentials: - consumer_key, - consumer_secret, - email address and password for your user of your OpenX instance. #### To use Ruby API Client: - install ruby <code>$ sudo apt-get install ruby</code> ##...
Python
UTF-8
349
3.203125
3
[]
no_license
def formatsum(items): out = '' items = map(str, items) for i in items: if i == 'None' or i == '' or i[0] == '0': continue if i[0] == '-': if out == '': out += i else: out += ' - ' + i[1:] else: if i[0] == '+': i = i[1:] if out == '': out += i else: out += ' + ' + i return...
Java
UTF-8
752
2.90625
3
[ "MIT" ]
permissive
package com.jeromewagener.game.objects.producer; import com.jeromewagener.game.objects.GameObject; import com.jeromewagener.game.levels.Level; import com.jeromewagener.game.objects.particle.BloodParticle; import com.jeromewagener.game.objects.particle.Particle; public class Producer extends GameObject { public st...
PHP
UTF-8
5,008
3.34375
3
[ "MIT" ]
permissive
<!DOCTYPE html> <html> <head></head> <body> <input type="number" id="number-input" onchange="onInputChange()"> <p id="output-p"> <?php function convertNumberToWordsForIndia($number){ $words = array( '0'=> '' ,'1'=> 'one' ,'2'=> 'two' ,'3' => 'three','4' => 'four','5' => 'five', '6' => 'six','7' => '...
Go
UTF-8
562
2.828125
3
[]
no_license
package offer import ( "testing" ) func Test_peakIndexInMountainArray(t *testing.T) { tests := []struct { arr []int want int }{ {[]int{1, 2, 3}, 2}, {[]int{1, 2, 1}, 1}, {[]int{3, 2, 1}, 0}, {[]int{1, 3, 5, 4, 2}, 2}, {[]int{0, 10, 5, 2}, 1}, {[]int{3, 4, 5, 1}, 2}, {[]int{24, 69, 100, 99, 79, 7...
Python
UTF-8
2,250
3.109375
3
[]
no_license
import numpy as np import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt class damped_driven_pendlum(): def __init__(self): #Some useful constants self.c = 0.05 self.F = 0.3 self.w = 0.7 self.dt = 1e-6 self.x = [1.0] self.v = [0.0] self.a = [] self.t = [0.0] self.absTime = 0....
C++
UTF-8
1,008
2.90625
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<vector> #include<list> #include<utility> #include<cstdio> using namespace std; struct planet { long long int p; int no; }; int cmpfunc(const void *p, const void *q) { int l = ((struct planet *)p)->p; int r = ((struct planet *)q)->p; return (l - r); } int ma...
Markdown
UTF-8
4,656
3.28125
3
[]
no_license
Todays refactoring was first coined by the [GangOfFour](http://www.dofactory.com/) and has many resources on the web that have different usages of this pattern. Two different aims of the factory pattern can be found on the GoF website [here](http://dofactory.com/Patterns/PatternFactory.aspx) and [here](http://dofactor...
Java
UTF-8
2,372
2.390625
2
[]
no_license
package com.kamingpan.infrastructure.demo.entity.constant; import java.util.HashMap; import java.util.Map; /** * 示例常量 * * @author kamingpan * @since 2019-04-09 */ public class DemoConstant { private static Map<String, String> fieldMap; /** * 字段解析 * * @return 字段解析 */ public stati...
C++
UTF-8
4,455
3.1875
3
[ "Apache-2.0" ]
permissive
#pragma once #include <map> #include <list> #include <optional> #include <string> #include <set> #include <initializer_list> #include <DataTypes/IDataType.h> #include <Core/Names.h> namespace DB { struct NameAndTypePair { public: NameAndTypePair() = default; NameAndTypePair(const String & name_, const Data...
Java
UTF-8
1,338
3.34375
3
[]
no_license
package StructuralDP.CompositeDesign; import java.util.ArrayList; import java.util.Iterator; /** * Created by shalvi on 09/04/16. */ public class SongGroup extends SongComponent { ArrayList songComponents; String groupName; String groupDescription; public SongGroup(String newGroupName, String new...
Java
UTF-8
1,158
1.953125
2
[]
no_license
package cn.t09.auth.sys.controller; import cn.t09.auth.sys.entity.Role; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; import javax.annotation.Resource; import org.junit.Test; import org.springframework.http.MediaType; import org.springframework.test.web.servlet.req...
PHP
UTF-8
690
3.09375
3
[]
no_license
<?php /* * Logic to delete a product from the database is here */ require('database.php'); $productCode = $_POST['productCode']; if (isset($_POST['btnDeleteProduct'])) { //write the SQL to delete a product from the database\ $query = "delete from products where productCode='$productCode'"; // wrap it...
C
UTF-8
288
2.828125
3
[]
no_license
#include "libft.h" void *ft_memmove(void *s1, const void *s2, size_t n) { unsigned char *str; if (!s1 || !s2) return (NULL); str = (unsigned char*)malloc(sizeof(*str) * n); ft_memcpy(str, s2, n); ft_memcpy(s1, str, n); free(str); return (s1); }
C++
UTF-8
457
2.625
3
[]
no_license
/** * \file main.c * \brief Minecraft painting generator * \author Erik Le Normand * \version 1.0 * \date 29/07/2014 * * This program is a tool to create and edit the Minecraft image where are all paintings. * These tables are decorative objects that can be seen in game. **/ #include "mainwindow.h" #...
Java
GB18030
2,186
2.28125
2
[]
no_license
package com.hospital.servlet; import java.io.IOException; import java.io.PrintWriter; import java.util.List; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResp...
C++
UTF-8
1,815
2.921875
3
[ "MIT" ]
permissive
#include <gtest/gtest.h> #include <nlohmann/json.hpp> using json = nlohmann::json; TEST(Json_nlohman, parse) { json array1 = json::array(); json my_json = json::array ( { {"Si-9.15", "RTS-9.15", "GAZP-9.15"}, ...
PHP
UTF-8
813
2.90625
3
[]
no_license
<?php namespace App\Exceptions; use App\Models\User; use Exception; use App\Models\Slack\Messenger; use Illuminate\Support\Collection; class SlackableException extends Exception{ /** * @param User|Collection|string $users * @param string $message * @param integer $code * @param Exception $...
C++
UTF-8
1,212
2.546875
3
[]
no_license
#ifndef SIGNATURE_H #define SIGNATURE_H #include <QWidget> namespace Ui { class Signature; } class Signature : public QWidget { Q_OBJECT public: explicit Signature(QWidget *parent = nullptr); ~Signature(); void RecupererSignature(int &nbTempsT,int &nbMesureT); void NouvelleSignature(int newNbTem...