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
10,601
3.953125
4
[]
no_license
# Structural Pattens #### Adapter Pattern - interface of one class is transalated to another - this lets classes of incompatible interface work together - pattern often used to create wrappers for new refactored APIs so other old existing APIs can still work with them, this is normally done when new implementations r...
Markdown
UTF-8
1,027
3.46875
3
[]
no_license
## 字典树 1、字典树节点的声明 ``` class Trei{ // 其节点本身就是嵌套结构 Trei[] children; Trei(){ //构造方法直接命名即可 children = new Trei[26]; } public void get(char[] word){ Trei node = this; for(int i=word.length-1; i>=0; i--){ char c = word[i]; if(node.children[c-'a'] == null) { ...
Swift
UTF-8
4,897
2.59375
3
[]
no_license
// // ViewController.swift // SearchBarComponent // // Created by Alexandr on 06.11.2019. // Copyright © 2019 Alexandr. All rights reserved. // import UIKit class ViewController: UIViewController { //MARK: - Private Properties private let tableViewIdentifier = "cell" private var headerSearchView: Head...
Java
UTF-8
494
2.65625
3
[]
no_license
public class Cidade { private int idCidade; private String nomeCidade; private Estado estado = new Estado(); public Estado getEstado() { return estado; } public void setEstado(Estado estado) { this.estado = estado; } public int getIdCidade() { return idCidade; } public void setIdCidade(int idCidade) {...
PHP
UTF-8
4,847
2.953125
3
[]
no_license
<?php class User { private $conn; public $username; public $password; public $id; public $fullname; public $type; public $rate; public $address; public $gender; public $marital; public $email; public $mobile; ...
PHP
UTF-8
1,360
2.5625
3
[]
no_license
<?php namespace CG\ManageBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * Email * * @ORM\Table() * @ORM\Entity */ class Email { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** ...
Python
UTF-8
908
3.171875
3
[]
no_license
import unittest import morse import inspect import re class TestTranslationMaps(unittest.TestCase): def test_convert_twice(self): """We should be able to convert all charaters to morse and back""" alphabet_keys = morse.alphabet_to_morse.keys() for k in alphabet_keys: m = mo...
Shell
UTF-8
2,265
3.265625
3
[ "MIT" ]
permissive
# .bashrc # Source global definitions # Bash prompt becomes [user@machine ~]$ if [ -f /etc/bashrc ]; then . /etc/bashrc fi # Uncomment the following line if you don't like systemctl's auto-paging feature: # export SYSTEMD_PAGER= # User specific aliases and functions export JAVA_HOME=$(readlink -f /usr/bin/ja...
Python
UTF-8
452
3.453125
3
[]
no_license
def sort(nums): for i in range(len(nums)-1,0,-1): for j in range(i): if nums[j] > nums[j+1]: tmp = nums[j] nums[j] = nums[j+1] nums[j+1] = tmp nums=[5,3,8,6,7,2,1,22,34,34,25,675,88] nums1=nums print('Before Sort NUMS : ',nums) print('Befo...
Shell
UTF-8
325
3.234375
3
[]
no_license
#!/bin/bash -x count=0 for (( i=0;i<=100;i++ )) do num=$i sum=0 rem=0 if [[ $i -gt 10 && $i -lt 100 ]] then while [[ $num -ne 0 ]] do rem=$(($num%10)) sum=$(($sum*10+$rem)) num=$(($num/10)) done if [[ $i -eq $sum ]] then arr[((count++))]=$i fi fi done echo ${arr...
Markdown
UTF-8
7,332
2.578125
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: Suspended domains in Azure AD Domain Services | Microsoft Docs description: Learn about the different health states for an Azure AD DS managed domain and how to restore a suspended domain. services: active-directory-ds author: justinha manager: amycolannino ms.assetid: 95e1d8da-60c7-4fc1-987d-f48fde56a8cb m...
Python
UTF-8
4,841
3.125
3
[]
no_license
import numpy as np import scipy.sparse import numba as nb @nb.njit() def _top_k_dense(data, indices, indptr, k): # indptr holds pointers to indices and data # indices[indptr[0]:indptr[1]] -> index of nonzero items in 1st row # data[indptr[0]:indptr[1]] -> nonzero items in 1st row nrows = indptr.sh...
Java
UTF-8
409
2.515625
3
[]
no_license
package com.javarush.Examples; /** * Created by Alex on 04.04.2015 004. */ public class OverLoadTest { public void method(int a) {} public String method(int a, int b) {return "";}; private static void static_method(){} private void non_static_method(){ static_method(); } private ...
JavaScript
UTF-8
1,069
2.640625
3
[]
no_license
import { GET_ALL_SERIES, GET_SERIES, ADD_SERIES, DELETE_SERIES, SERIES_LOADING } from '../actions/series-types'; const initialState = { series: [], loading: false } export default function (state = initialState, action) { switch (action.type) { case GET_ALL_SERIES: return { ...
Markdown
UTF-8
2,421
2.796875
3
[ "MIT" ]
permissive
# Loft ## About This an app built as a way to show case things that I have learnt as part of **#31DaysOfKotlin** challenge by Google Developers. Though the challenge was for 31 days, I started out late and the app as effectively build in a week 😑, but the learning was continuous and will be so in future! **About Lof...
C#
UTF-8
1,418
2.546875
3
[]
no_license
using UnityEngine; using System.Collections; using System.Collections.Generic; using System; public class ItemDataComponent : MonoBehaviour { public Action<ItemData> onPickup; public bool addOnPickup = true; public bool pickupOnClick = true; public bool destroyOnPickup = true; [HideInInspector] ...
Java
UTF-8
4,445
1.992188
2
[]
no_license
/* * 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 ...
C++
UTF-8
1,996
3.84375
4
[ "MIT" ]
permissive
#include <iostream> using namespace std; template <class T> class node { public: node<T>() {} ~node<T>() {} T data; node<T> *next; }; template <class T> class linked_list { public: linked_list<T>() : head(NULL), tail(NULL) {} ~linked_list<T>() {} virtual void addFirst(T data) { node<T> *n = new n...
C++
UTF-8
509
3.078125
3
[ "Unlicense" ]
permissive
#include <iostream> using namespace std; void polowaString(); int main() { polowaString(); } void polowaString() { int liczba_iteracji, dlugosc, polowaDlugosci; string wers; cin >> liczba_iteracji; for(int i =0; i <= liczba_iteracji; i++) { getline(cin, wers); polowaDlugosci = w...
Java
UTF-8
1,847
2.03125
2
[]
no_license
package com.sugarcrm.test.teams; import org.junit.Test; import com.sugarcrm.candybean.datasource.DataSource; import com.sugarcrm.candybean.datasource.FieldSet; import com.sugarcrm.sugar.VoodooControl; import com.sugarcrm.sugar.VoodooUtils; import com.sugarcrm.test.SugarTest; public class Teams_26072 extends SugarTest...
Markdown
UTF-8
7,528
2.640625
3
[ "MIT" ]
permissive
# Audit Report ![Logo](https://alexandrebarros.com/global/audit-report/audit-report-2021-small.png?alt=audit-report) ## Disclaimer This Report is subject to the terms and conditions (including without limitation, de-scription of services, confidentiality, disclaimer and limitation of liability) se...
Java
UTF-8
197
1.6875
2
[]
no_license
package com.example.demo.service.dtoApi; import lombok.Builder; import lombok.Value; @Value @Builder public class BonusWinModel { String name; double value; double win; }
Java
UTF-8
1,435
2.578125
3
[]
no_license
/** * */ package com.zyhy.lhj_server.game.nnyy; import com.zyhy.common_lhj.Line; import com.zyhy.common_lhj.Window; /** * @author linanjun * 5轴中奖线路信息 */ public enum NnyyWinLineEnum implements Line{ WR1(1, NnyyWindowEnum.A2, NnyyWindowEnum.B2, NnyyWindowEnum.C2, NnyyWindowEnum.D2, NnyyWindowEnum.E2), WR2(...
JavaScript
UTF-8
1,519
2.515625
3
[]
no_license
var workspaceViewModel = function () { var myself = this; this.stream = null; this.imageData = ko.observable(); this.url = '/Home/Test/'; this.success = ko.observable(false); this.failure = ko.observable(false); this.loading = ko.observable(false); var json = new Object(); this.n...
Java
UTF-8
2,381
2.84375
3
[]
no_license
package com.smartycoder.visualisation; import java.awt.BorderLayout; import java.awt.Color; import java.awt.EventQueue; import java.awt.Graphics; import javax.swing.JFrame; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.GeometryFactory; import org.locationtech.jts.geom.Polygon; import...
JavaScript
UTF-8
2,382
2.890625
3
[]
no_license
const reviewList = [ { content: "'Loved our experience!' The staff was amazing and SO helpful.'", }, { content: "'The only place I'm ever adopting from again!", }, { content: "'Loved our new pup!'", }, { content: "'So happy we used Rescue Pet!'", }, ...
JavaScript
UTF-8
1,846
2.953125
3
[]
no_license
var should = chai.should(); var stringify = function(list) { var res = []; while(list !== null) { res.push(list.value); list = list.next; } return res.join(""); } describe('linkedListIntersection', function(){ it('should be exist', function(){ should.exist(linkedListIntersection); }); it('...
Java
UTF-8
569
2.703125
3
[]
no_license
package flexbox.box; public class BoxType4 extends BoxType3{ protected final boolean reinforcedBottom; public BoxType4(int width, int height, int length, int grade, int quantity, boolean sealableTops){ super(width, height, length, grade, quantity, sealableTops); ...
Java
UTF-8
457
2.453125
2
[ "MIT" ]
permissive
package org.influxdb.querybuilder.time; import org.influxdb.querybuilder.Appendable; public class TimeInterval implements Appendable { private final Long measure; private final String literal; public TimeInterval(final Long measure, final String literal) { this.measure = measure; this.literal = litera...
Java
UTF-8
3,954
3.421875
3
[]
no_license
package tutorialPackage; import java.util.Scanner; public class translatron { public static void main(String[] args) { // TODO Auto-generated method stub Scanner word = new Scanner(System.in); Scanner nums = new Scanner(System.in); int stay; int choice; String[] englishWords = {"friend", ...
Java
UTF-8
1,056
2.171875
2
[]
no_license
package SP_all.output; import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.F...
Java
UTF-8
171
2.03125
2
[]
no_license
package exceptions; public class MasterBranchExeption extends Exception { public MasterBranchExeption(String errorMessage) { super(errorMessage); } }
Ruby
UTF-8
127
3.390625
3
[]
no_license
ark = ['cat', 'dog', 'pig', 'goat'] =begin ark.each do |animal| puts animal end =end ark.each {|animal| puts animal}
JavaScript
UTF-8
1,541
2.96875
3
[]
no_license
export class Slider { constructor(speed, pos, color) { this.speed = speed; this.pos = pos; this.element = document.createElement("div"); this.element.classList.add("mainblock"); this.width = 15; this.element.style.backgroundColor = color; } drawSlider(host)...
JavaScript
UTF-8
1,487
2.515625
3
[]
no_license
const { Pokemon, conn } = require('../../src/db.js'); const { expect } = require('chai'); describe('Pokemon model', () => { before(() => conn.authenticate() .catch((err) => { console.error('Unable to connect to the database:', err); })); describe('Validators', () => { beforeEach(async () => await...
Java
UTF-8
1,752
3.296875
3
[]
no_license
package com.szl; import java.io.*; /** * Created by zsc on 2016/7/27. * 字符串分割 */ public class StreamTokenizerTest { public static void main(String[] args) { try { String s; String path = "E:\\test.txt"; InputStreamReader in = new InputStreamReader(new FileInputStrea...
C#
UTF-8
3,672
2.53125
3
[]
no_license
using System.Collections.Generic; using UnityEngine; namespace CrazyBox.Components { public class ReusableItemList<TItemView, TItemData> where TItemView : ReusableItem<TItemData> { Queue<TItemView> reusableItems; protected GameObject templateObject; Transform parent; p...
Markdown
UTF-8
2,661
2.9375
3
[ "MIT" ]
permissive
--- title: Linkify words in post author: Sam Saffron homepage: https://github.com/discourse/discourse-linkify-words download: https://github.com/discourse/discourse-linkify-words demo: thumbnail: /images/82193/thumbnail.png license: MIT License license_link: https://github.com/discourse/discourse-linkify-words/blob/ma...
C#
UTF-8
1,734
3.15625
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Word { public string latein; public string deutsch; public Word(string latein, string deutsch) { this.latein = latein; this.deutsch = deutsch; } } public class WordManager : MonoBehaviou...
Markdown
UTF-8
2,158
3.1875
3
[ "MIT" ]
permissive
--- title: mybatis处理日期的问题 tags: [mybatis] --- 1)保存对象时设置日期抛出异常信息 ``` Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect date value: '' for column 'createDate' at row 1 ``` 2)实体类 ``` @Setter @Getter @NoArgsConstructor @Accessors(chain=true) public class PageLog extends PageModel{ private St...
C
UTF-8
1,038
2.515625
3
[]
no_license
#include "clock.h" #include "rtkernel.h" #include <avr/io.h> #include <avr/interrupt.h> void worker1(void* arg) { uint32_t now = get_clock_ms(); for(;;) { PORTB |= (1<<5); sleep_until(now+=200); PORTB &= ~(1<<5); sleep_until(now+=800); } } void worker3(void* arg); struct w...
Markdown
UTF-8
1,164
2.9375
3
[]
no_license
GettingCleaningDataProject ========================== ##### My project code and documentation for my Coursera class: Getting &amp; Cleaning data ##### The uploaded tidy_data file is a comma separated file ##### For the codebook, please refer to Codebook.md. The R code file 'run_analyis.R' has code organized in the f...
Java
UTF-8
175
1.601563
2
[]
no_license
package cn.citytag.base.utils.ext; import java.io.Serializable; /** * Created by yangfeng01 on 2017/11/9. */ public interface Act0 extends Serializable { void run(); }
JavaScript
UTF-8
570
2.625
3
[ "MIT" ]
permissive
/*global define*/ define( function() { var update = false; function resize( canvas, size ) { if ( canvas.width !== size.width ) { canvas.width = size.width; update = true; } if ( canvas.height !== size.height ) { canvas.height = size.height; update = true; } if ( update ...
TypeScript
UTF-8
650
2.703125
3
[ "MIT" ]
permissive
/** * @license Use of this source code is governed by an MIT-style license that * can be found in the LICENSE file at https://github.com/cartant/ts-action */ import { Observable } from "rxjs"; import { filter } from "rxjs/operators"; import { Action, ActionCreator, ActionType } from "ts-action"; export function of...
Markdown
UTF-8
11,152
2.71875
3
[ "MIT" ]
permissive
--- title: Auxiliar date: 21/04/2023 --- #### PARTE I – VISÃO GERAL As três mensagens angélicas incluem, coletivamente, uma mensagem divina enviada do Céu, cujo propósito é preparar o mundo para a segunda vinda de Jesus. Essas mensagens são projetadas por Deus para ter um impacto prático em nossa vida. Elas revela...
C++
UTF-8
1,134
2.671875
3
[]
no_license
/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ #ifndef REC_PARTICLECELLINTERSECTION_H #define REC_PARTICLECELLINTERSECTION_H class CaloCell; namespace Rec { /** class storing information on the intersection of a track with a cell */ class ParticleCellIntersection { public: ...
SQL
UTF-8
2,349
2.8125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50137 Source Host : localhost:3306 Source Database : conferen_conferen Target Server Type : MYSQL Target Server Version : 50137 File Encoding : 65001 Date: 2010-07-19 17:39:50 */ S...
C++
UTF-8
2,627
2.96875
3
[]
no_license
/* * --------------------------------------------------------------------------- * * Boxland : un petit Boxworld * Copyright (C) 2005 Benjamin Gaillard & Nicolas Riegel * * --------------------------------------------------------------------------- * * Fichier : Point.h * * Description : Coordonnées à deu...
Python
UTF-8
20,739
2.6875
3
[]
no_license
# -*- coding: utf-8 -*- import sys import numpy from utils import * class RBM(object): def __init__(self, input=None, n_visible=2, n_hidden=3, \ W=None, hbias=None, vbias=None, rng=None): self.n_visible = n_visible # num of units in visible (input) layer self.n_hidden = n_hidde...
PHP
UTF-8
1,510
2.921875
3
[]
no_license
<?php declare(strict_types=1); namespace WandTa\Constraints\Html; use PHPUnit\Framework\Constraint\Constraint; use Symfony\Component\DomCrawler\Crawler; /** * The number of the node specified by given CSS selector * is equal to given value. */ class HtmlNodeCount extends Constraint { /** @var string $selecto...
Java
UTF-8
16,064
1.546875
2
[]
no_license
package com.example.mengqi.sportsdemo.Activity; import android.Manifest; import android.annotation.TargetApi; import android.content.pm.PackageManager; import android.os.Build; import android.os.Handler; import android.support.annotation.NonNull; import android.support.v7.app.AppCompatActivity; import android.os.Bundl...
Markdown
UTF-8
2,553
3.1875
3
[ "BSD-3-Clause" ]
permissive
XML String Interpolator for Scala (WIP) ================================= Basic macro-based XML string interpolator for Scala. Primarily intended as replacement for Scala XML Literals. Usage ================================= To try all the examples below, do `sbt console` and then import the required package. ```scal...
Java
UTF-8
804
2.859375
3
[]
no_license
package com.company; public class Oras { protected String nume; protected int nr_rute = 0; public Oras() { } public Oras(String nume) { this.nume = nume; } public Oras(String nume, int x) { this.nume = nume; this.nr_rute = x; } public ...
Java
UTF-8
2,642
2.15625
2
[]
no_license
/* * 版权信息:北京宇卫科技有限公司</br> * Copyright ©2016-2017. All rights reserved. 京ICP备120422号 */ package com.springboot.data.amqp; import java.util.HashMap; import java.util.Map; import org.springframework.amqp.support.converter.ClassMapper; import org.springframework.amqp.support.converter.DefaultClassMapper; import org.sp...
Java
UTF-8
240
1.570313
2
[ "Apache-2.0" ]
permissive
package com.zyplayer.doc.swagger.framework.constant; /** * 提示语常量类 * * @author x * @since 2018年8月21日 */ public class Toast { public static final String AUTOWIRED_ERROR = "暂未配置MgStorageService的实现类"; }
C++
GB18030
3,605
2.625
3
[]
no_license
#include "stdafx.h" #include "CImageProcess.h" cv::Mat CImageProcess::PicResize(cv::Mat srcImg, int width, int height) { IplImage * src = &IplImage(srcImg); IplImage * desc; float ratio_x = float(width) / float(srcImg.cols); float ratio_y = float(height) / float(srcImg.rows); float ratio = ratio_x < ratio_y ? ra...
Markdown
UTF-8
16,512
2.9375
3
[ "MIT" ]
permissive
--- layout: post title: "PHPExcel 导入导出" categories: PHPExcel tags: CodeIgniter PHPExcel --- * content {:toc} 本文主要讲解phpexcle的导入导出操作, phpexcle下载地址: [https://github.com/PHPOffice/PHPExcel](https://github.com/PHPOffice/PHPExcel) ,这里以CI 框架为例进行说明,其他框架类似。 ## php excel 导出操作 首先从数据库查询出要导出的数据,指定导出字段和标题的对应关系: ```php ...
C++
UTF-8
26,457
2.90625
3
[ "Apache-2.0" ]
permissive
// balst_stacktraceframe.h -*-C++-*- // ---------------------------------------------------------------------------- // NOTICE // // This component is not up to date with current BDE coding standards, and // should not be used as an example f...
Markdown
UTF-8
2,111
3.265625
3
[]
no_license
--- ## Infill Infill is the material used to fill the empty space inside the shell/skin (number of times the outline of a layer is retraced) of an object, it refers to the density. Infill is measured by percentage, so an object printed at 100% infill will be 100% solid. More infill will make an object stronger, heavier...
Python
UTF-8
9,169
3.609375
4
[]
no_license
""" Grace Michael DS2500: Programming with Data HW 4 """ import collections as col from graph import * import pandas as pd import networkx as nx import matplotlib.pyplot as plt class Node: # The constructor def __init__(self, name, category, props={}): self.name = name self.category = category ...
Ruby
UTF-8
1,936
3.671875
4
[]
no_license
require 'csv' #biblioteka obsługi plików csv require 'pry' class Products def initialize @products = [] end def products if @products == [] CSV.foreach("products.csv", headers: true) do |row| #pętla po pliku ? @products << parse_line(row) ...
SQL
UTF-8
236
2.546875
3
[]
no_license
CREATE TABLE departments( id int NOT NULL, department varchar(50) PRIMARY KEY(id) ); INSERT INTO departments VALUES(1,'Marketing'); INSERT INTO departments VALUES(2,'Consultancy'); INSERT INTO departments VALUES(3,'IT');
Java
UTF-8
4,376
2.8125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
package outputter.data; /** * For post-composition of qualities. * For example, an author may describe the frontal bone as having a "greater length relative to width". This requires post-composing the quality with the two PATO terms for length and width: E: frontal bone, Q: length^increased_in_magnitude_relati...
PHP
UTF-8
2,961
2.609375
3
[]
no_license
<?php //function to return nice url's for our pdf's function seoUrl($string) { //Lower case everything $string = strtolower($string); //Make alphanumeric (removes all other characters) $string = preg_replace("/[^a-z0-9_\s-]/", "", $string); //Clean up multiple dashes or whitespaces $string =...
C#
UTF-8
2,222
3.0625
3
[ "MIT" ]
permissive
using Microsoft.AspNetCore.Components; namespace Fomantic.Blazor.UI { /// <summary> /// Base interface for all fomantic component that has space around its content /// </summary> public interface IFomanticComponentWithContentSpacing : IFomanticComponentWithClass { /// <summary> //...
Java
UTF-8
1,231
3.21875
3
[]
no_license
package com.xiaoqiang.io; import java.io.*; public class InputStreamIo { public static void main(String[] args) throws IOException { InputStream inputStream= null; OutputStream out=null; BufferedInputStream bufferedInputStream=null; BufferedOutputStream bufferedOutputStream=null; ...
Java
UTF-8
888
1.953125
2
[]
no_license
package kr.or.klia.cal.user; public interface UserService { String getName(); void setName(String name); public String getDepartment(); public void setDepartment(String department); public String getPosition(); public void setPosition(String position); public int getEmployeeNo(); ...
C#
UTF-8
1,531
2.546875
3
[]
no_license
using System; using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; public class WormHoleBehaviour : MonoBehaviour { //休眠时间 经过休眠时间之后,虫洞开始生成怪物 public float sleepTime; private TextMeshPro tmp; private GameObject monster_1; // Use this for initialization void Start...
Java
UTF-8
860
2.453125
2
[]
no_license
package lv.kid.brcontrol.game; import lv.kid.brcontrol.ButtonListener; import lv.kid.brcontrol.BRController; /** * Created by IntelliJ IDEA. * User: Home * Date: 2009.7.10 * Time: 23:19:31 * To change this template use File | Settings | File Templates. */ public class TestingState extends State { ...
C++
UTF-8
1,640
3.25
3
[]
no_license
#include <iostream> #include <sstream> #include <iterator> #include <fstream> #include <vector> #include "WeightedGraph.h" using namespace std; template<class Container> void split1(const string& str, Container& cont){ istringstream iss(str); copy(istream_iterator<string>(iss), istream_iterator<stri...
Java
UTF-8
914
1.9375
2
[]
no_license
package com.test.practise.configuration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework....
C
UTF-8
670
3.609375
4
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <math.h> //============================================= // DPで解く。 // DPとは、漸化式のようなもの。 // 1つ前が決まっている前提で、次の項を決める //============================================= int main(void) { int n, i; scanf("%d", &n); int a[n]; for (i=0;i<n;i++) { scanf("%d", &a[i]); } if (n == ...
Java
UTF-8
3,361
1.960938
2
[]
no_license
package com.agehua.pictureviewer.activity; import java.util.ArrayList; import com.agehua.pictureviewer.CallBack; import com.agehua.pictureviewer.CommonAdapter; import com.agehua.pictureviewer.ImageFloder; import com.agehua.pictureviewer.R; import com.agehua.pictureviewer.ViewHolder; import android.app.Activi...
C++
UTF-8
544
2.984375
3
[]
no_license
#include <cstdio> #include <iostream> using namespace std; int main(){ ios::sync_with_stdio(false); int T; char ch; long long num, res; scanf("%d", &T); // used cin here. got WA -_- while(T--){ scanf("%lld", &num); res = num; while( scanf(" %c", &ch) ){ //dare to skip the space before %c :/ if(ch == '='...
Ruby
UTF-8
754
3.625
4
[]
no_license
require "yahoo_weatherman" def your_location(location) puts "Please insert your zip code:" @location = gets.chomp end def weather_forecast(location) client = Weatherman::Client.new weather = client.lookup_by_location(location) forecast = weather.forecasts forecast.each_index do |day| case d...
Markdown
UTF-8
1,335
2.578125
3
[]
no_license
# 2.14. Сделайте разметку Выполните разметку всей страницы и добавьте изображения. Важно: 1. Создайте в локальном репозитории файл index.html и работайте в нём 2. Ссылки на страницы, которых нет в макете, могут иметь любой вид, например: ```html <a> <a href=""> <a href="#"> ``` 3. Разметка должна удовлетворять треб...
Python
UTF-8
3,815
2.53125
3
[]
no_license
import sys, codecs, os reload(sys) sys.setdefaultencoding('utf-8') import jieba.posseg as pseg import codecs import numpy as np from gensim.models import Word2Vec from gensim.models.keyedvectors import KeyedVectors def get_sentence(train_data, test_data, dev_data, sentence_file, tag_embedding_file): fw = codecs...
Python
UTF-8
567
4.03125
4
[]
no_license
favorite_languages = { 'jen':'python', 'sarah':'C', 'jon':'ruby' } print('Jon favorite language is ', favorite_languages['jon']) friends = ['sarah'] #using a list to sort a dictionary's value for name in favorite_languages: print(name.title()) if name in friends: print('Hi', name.title()...
TypeScript
UTF-8
7,653
2.78125
3
[]
no_license
import { Type } from '@angular/core'; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * An interface implemented by all Angular type decorators, which allows ...
PHP
UTF-8
1,114
3
3
[]
no_license
<?php function yearDropdown($startYear, $endYear, $id="act_year"){ //start the select tag echo "<select class='form-control' id=".$id." name=".$id."><option value=''>Select Year of Act</option>"; //echo each year as an option for ($i=$startYear;$i<=$endYear;$i++){ ...
Python
UTF-8
671
3.25
3
[]
no_license
class Solution: def editDistence(self, s1, s2): n = len(s1) m = len(s2) if n == 0 and m == 0: return 0 if n == 0 or m == 0: return n if m == 0 else n return self.dis(s1, s2, n - 1, m - 1) def dis(self, s1, s2, n, m): if n == -1 or m == -1:...
Python
UTF-8
2,412
2.78125
3
[ "MIT" ]
permissive
import numpy as np import pylab as plt import mahotas as mh import sys sys.path.append('/home/kai/github-workspace/python-practice/CVlib/') import GaussianFilter as GF class CannyOperator(object): def __init__(self,img,threshold_H=None,threshold_L=None): self.img = mh.imread(img) self.M,self.N = se...
Java
UTF-8
1,480
1.890625
2
[]
no_license
package com.ideal.zsyy.entity; public class HospitalChargeInfo { private String id; private String itemType; private String itemName; private String itemGG; private String itemUnit; private String itemNum; private String itemPrice; private String totlePrice; private String addDate; public Strin...
C++
UTF-8
666
2.921875
3
[ "BSD-2-Clause" ]
permissive
#ifndef WALLE_WSL_CONTAINER_BUFFER_H_ #define WALLE_WSL_CONTAINER_BUFFER_H_ #include <walle/wsl/internal/basic_buffer.h> namespace wsl { template <typename Container> class container_buffer : public wsl::internal::basic_buffer<typename Container::value_type> { private: Container &_container; protected: void g...
TypeScript
UTF-8
2,412
2.953125
3
[ "MIT" ]
permissive
import { IResolvers, Maybe, mergeDeep } from '@graphql-tools/utils'; /** * Additional options for merging resolvers */ export interface MergeResolversOptions { exclusions?: string[]; } /** * Deep merges multiple resolver definition objects into a single definition. * @param resolversDefinitions Resolver definit...
JavaScript
UTF-8
1,443
2.53125
3
[]
no_license
function otHighlight(el, { value }) { if (!value) return; const { hljs, code } = value; if (!hljs) return; const blocks = el.querySelectorAll('pre code'); let len = 1; if (blocks) { blocks.forEach(block => { if (code) { block.innerText = code; } ...
C++
UTF-8
1,598
3.15625
3
[]
no_license
#include "AVLViolationDetector.h" BinarySearchTree* AVLViolationDetector::GetBST() { return this->bst; } AVLViolationDetector::AVLViolationDetector(BinarySearchTree* bst) { this->bst = bst; this->bst->SetMinNode(this->bst->head->GetKey()); this->bst->SetMaxNode(this->bst->head->GetKey()); } void AV...
Python
UTF-8
585
3.359375
3
[]
no_license
import tkinter import customtkinter customtkinter.set_appearance_mode("System") # Modes: system (default), light, dark customtkinter.set_default_color_theme("blue") # Themes: blue (default), dark-blue, green app = customtkinter.CTk() # create CTk window like you do with the Tk window app.geometry("400x240")...
C++
UTF-8
1,270
3.59375
4
[]
no_license
#include <iostream> #include <functional> #include <string> using namespace std; int func(int a, char b, double c, string d) { cout << a << ','<< b << "," << c << ','<< d.c_str() << endl; return 0; } class Test { public: Test() {}; ~Test() {}; public: static int staticFunc(int size, string name){ cout << "s...
Markdown
UTF-8
1,563
2.5625
3
[]
no_license
# Prerequisites * Mandatory: Linux or OSX with python * Optional: ROOT for generating JSON files from ROOT objects. In this repository we already provide example file c_1.json which represent canvas "c_1" in the selectedresults.root file # How to run `./scripts/server` - will open browser at http://localhost:8000 (y...
Java
UTF-8
4,333
2.609375
3
[]
no_license
package cz.cvut.dp.nss.controller.interceptor; import cz.cvut.dp.nss.context.SchemaThreadLocal; import cz.cvut.dp.nss.exception.UnauthorizedException; import cz.cvut.dp.nss.services.person.Person; import cz.cvut.dp.nss.services.person.PersonService; import cz.cvut.dp.nss.services.role.Role; import org.springframework....
Java
UTF-8
643
1.757813
2
[]
no_license
package com.example.rafacuevas.tarea2.com.example.rafacuevas.tarea2.fragments; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.example.rafacuevas.tarea2.R; public class comunidadFragment extends...
C#
UTF-8
2,706
2.671875
3
[]
no_license
using System; using System.Drawing; using System.Linq; using System.Windows.Forms; using PriceCompare.Calculations; using PriceCompare.Components; using PriceCompare.XmlManipulation; namespace PriceCompareUI { public partial class Form1 : Form { private readonly PriceCalculator PriceCaluclator = new P...
Markdown
UTF-8
825
2.859375
3
[]
no_license
# JS_Libraries Libraries written for the JavaScript. <br/> (Achieve more by typing less) ### Lib for DOM Manupulation and Extendig Functionality It contains all the required useful methods to maupulate the dom - getting Elements [Via CssSelector, XPaths] - action on Elements [Via CssSelector, XPaths] like: clicking, h...
JavaScript
UTF-8
3,123
2.515625
3
[]
no_license
const exprees = require('express'); const mysql = require('mysql'); //ponemos el server a la escucha const app = exprees(); // const cors = require('cors') app.use(cors()) app.listen('3000', () =>{ console.log('Server en puerto 3300'); }) //instanciamos la base de datos var mysqlConexion = mysql.create...
JavaScript
UTF-8
845
2.828125
3
[]
no_license
let updateBurger = id => { fetch(`/burger/:id`, { method: 'PUT' }) .then(_ => { location.reload() }) .catch(e => console.log(e)) } let addBurger = _ => { fetch('/burger', { method: 'POST', headers: { 'Content-Type': 'application/json' }, ...
Go
UTF-8
2,138
2.8125
3
[]
no_license
package main import ( "fmt" "time" "github.com/boni/golang-mongo/config" "github.com/boni/golang-mongo/src/module/profile/model" "github.com/boni/golang-mongo/src/module/profile/repository" ) func main() { fmt.Println("running") db, err := config.GetMongoDB() if err != nil { fmt.Println(err) } profile...
JavaScript
UTF-8
698
3.84375
4
[]
no_license
/** * Created by pbli on 8/31/16. */ //利用空对象作为中介 // 由于"直接继承prototype"存在上述的缺点,所以就有第四种方法,利用一个空对象作为中介。 function Animal() { } Animal.prototype.species = "动物"; function Cat(name, color) { this.name = name; this.color = color; } function extend(Child, Parent) { var F = function () { }; F.prototype = ...
Markdown
UTF-8
23,304
2.796875
3
[]
no_license
# 设备设置 (Device settings) ##### 设备云台转动 Equipment pan/tilt ```java //云台转动 参数1方向,参数2一次转动多少步 rotate the camera mCamera.setPtz(AVIOCTRL_PTZ_RIGHT, 30); mCamera.setPtz(AVIOCTRL_PTZ_LEFT, 30); mCamera.setPtz(AVIOCTRL_PTZ_UP, 30); mCamera.setPtz(AVIOCTRL_PTZ_DOWN, 30); ``` ##### 网络设置 Network settings ```java //设备周围...