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
Python
UTF-8
1,401
3.1875
3
[ "MIT" ]
permissive
""""Loader class that coordinates loading of data samples and converting them to XY array""" import os, fnmatch import numpy as np from preprocessor import DataPreprocessor from data.paths import Paths from data.features import Features class Loader: def load_data(self): warming_file_names = fnmatch.fil...
C#
UTF-8
5,076
2.921875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using OpenQA.Selenium; using OpenQA.Selenium.Support.Extensions; using OpenQA.Selenium.Support.UI; using Digital.Settings; using System.Drawing.Imaging; namespace Digital.ComponentHelper { ...
Markdown
UTF-8
977
2.6875
3
[]
no_license
# mvmoproject ## google oauth2 authorization using java This project used docker for contanerising Wildfly application server and postgreSQL database. I use google oauth 2 API and create new user into database if the user sign in with gmail for the first time. In addition,I configure dockerised wildfly with ssl certi...
C#
UTF-8
5,228
2.5625
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Net; using System.IO; using System.Diagnostics; using System.Text.RegularExpress...
Java
UTF-8
777
2.015625
2
[]
no_license
package com.zhanhong.wcs.entity.sys; import org.apache.ibatis.type.Alias; import com.zhanhong.wcs.entity.base.BaseWcs; /** * 菜单角色实体类 * @author Arvin_Li * */ @Alias(value="menuRole") public class WcsSysMenuRole extends BaseWcs{ private Integer mrId;//关系ID private Integer menuId;//菜单ID private In...
PHP
UTF-8
1,189
2.875
3
[]
no_license
<?php namespace App\Service; use App\Repository\GameModeRepository; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; /** * Service permettant de retourner des valeurs aléatoires */ class RandomService extends AbstractController { private $gameModeRepo; public function __construct(GameMod...
C#
UTF-8
3,394
3.875
4
[]
no_license
using System; namespace Sort { public class Sort { public static void SelectionSort(IComparable[] a) { Action<IComparable[], int, int> Switch = (arr, i, j) => { IComparable t = arr[i]; arr[i] = arr[j]; arr[j] = t; ...
Java
UTF-8
948
1.601563
2
[]
no_license
package com.facebook.graphql.model; import com.facebook.common.json.FbSerializerProvider; import com.facebook.graphql.deserializers.GraphQLStickerDeserializer; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider...
Go
UTF-8
1,434
2.515625
3
[]
no_license
package main import ( "context" "fmt" "github.com/INEFFABLE-games/Birds/config" "github.com/INEFFABLE-games/Birds/protocol" "github.com/INEFFABLE-games/Birds/repository" "github.com/INEFFABLE-games/Birds/server" "github.com/INEFFABLE-games/Birds/service" log "github.com/sirupsen/logrus" "go.mongodb.org/mongo-...
Java
UTF-8
1,867
2.484375
2
[]
no_license
package cn.wx.MyData; import java.nio.charset.Charset; import cn.wx.Utils.GetAccessToken; public class MyData { /** 用户自定TOKEN*/ public final static String TOKEN = "pppa20180608"; /** 管理员ID*/ public final static String AppID = "wxe127d9b9fe06cf6d"; /** 管理员密码*/ public final static String AppSecret = "f8593e6cdd...
C++
UTF-8
1,510
2.578125
3
[]
no_license
#include "Sprite2D.hpp" #include "../../../Ascii_Render_System/AsciiRenderer.hpp" Sprite2D::Sprite2D() { ascii_sprite=NULL; } Sprite2D::Sprite2D(std::string* asc) { setSprite(asc); } Sprite2D::~Sprite2D() { } void Sprite2D::setSprite(std::string* asc) { ascii_sprite=asc; } std::string* Sprite2D::getSpri...
C++
UTF-8
1,091
3.25
3
[]
no_license
//Author: Xujia Ji //Data: 03/28/2018 //Reference: https://www.geeksforgeeks.org/evaluation-of-expression-tree/ #include <iostream> #include <fstream> using namespace std; class node { private:; public: string info; node *left = nullptr, *right = nullptr; node(string x) { info = x; } }; int t...
Java
UTF-8
3,403
1.96875
2
[]
no_license
package com.yl.online.model.bean; import java.io.Serializable; import java.util.Date; import javax.validation.constraints.NotNull; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.yl.online.model.enums.BusinessType; import com.yl.online.model...
Java
UTF-8
708
2.453125
2
[]
no_license
package backup.model; public class Arquivo { private long id; private String nome; private String diretorio; private String diretorioCompleto; public long getId() { return id; } public void setId(long id) { this.id = id; } public String getNome() { return nome; } public void se...
Python
UTF-8
7,495
2.578125
3
[ "MIT" ]
permissive
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np def concat_x_c(x, c): # Replicate spatially and concatenate domain information. c = c.view(c.size(0), c.size(1), 1, 1) c = c.repeat(1, 1, x.size(2), x.size(3)) x = torch.cat([x, c], dim=1) return x class GatedBlo...
SQL
UTF-8
1,625
2.8125
3
[]
no_license
/* Tactical play */ UPDATE Units SET Range = 10 WHERE Range > 0 AND (CombatClass = 'UNITCOMBAT_SIEGE' OR CombatClass = 'UNITCOMBAT_NAVAL' OR CombatClass = 'UNITCOMBAT_ARCHER'); UPDATE Units SET Range = 50 WHERE Range > 0 AND (CombatClass = 'UNITCOMBAT_NAVAL') AND NOT (Class LIKE '%SUBMARINE%'); UPDATE Units ...
Swift
UTF-8
1,050
2.890625
3
[ "MIT" ]
permissive
// // UIExtensions.swift // PFactors_Example // // Created by Stephan Jancar on 23.10.17. // Copyright © 2017 CocoaPods. All rights reserved. // import Foundation import UIKit extension UIView { var x : CGFloat { get { return self.frame.origin.x} } var y : CGFloat { get { return self.frame.origin.y} } va...
C++
UTF-8
611
3.5625
4
[]
no_license
#include<iostream> #include<fstream> using namespace std; void perumtation(string a, int l, int r); int main() { string str = "ABC"; int n = str.length(); perumtation(str,0,n-1); return 0; } void perumtation(string a, int l, int r) { if(l == r) { cout<<a<<endl; } else ...
Java
UTF-8
142
1.726563
2
[ "Apache-2.0" ]
permissive
package com.airbnb.lottie; public interface LottieOnCompositionLoadedListener { void onCompositionLoaded(LottieComposition composition); }
Python
UTF-8
838
2.703125
3
[]
no_license
#!/usr/bin/python import socket import sys import os FILEPATH = sys.argv[1] SERVER_PORT = int(sys.argv[2]) def process_request(s): if not os.path.isfile(FILEPATH): send_not_exist(s) elif os.path.getsize(FILEPATH) == 0: send_empty(s) else: send_lines(s) def send_not_exist(s): send_line(s, '{"err": "FILE ON...
Swift
UTF-8
1,937
3.0625
3
[]
no_license
// // ViewController.swift // tic tac toe // // Created by Kevin Naik on 14/07/18. // Copyright © 2018 Kevin Naik. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var button: UIButton! @IBOutlet weak var output: UILabel! @IBAction func reset(_ sender:...
C
UTF-8
5,359
2.828125
3
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "Linux-syscall-note", "GPL-2.0-only", "GPL-1.0-or-later" ]
permissive
/* Integer base 2 logarithm calculation * * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Fo...
Python
UTF-8
2,351
3.015625
3
[]
no_license
import os from tqdm.notebook import tqdm as tqdm_notebook from tqdm import tqdm import requests def download_file_with_progress_bar(url, filename=None, download_dir=os.curdir, mkdir=True, redownload=False): # From https://stackoverflow.com/a/37573701/4228052 # Use the filename from the end of the URL by ...
Python
UTF-8
11,202
2.890625
3
[]
no_license
''' The HeightSelector module only contains the HeighSelector class. It is intended to create a dialog that gives suggestions to the user for collimation. I would highly suggest going to the tkdocs website (google it) for tutorials on widgets in ttk/tkinter. @author: Collin ''' from Tkinter import * import ttk from tk...
C++
UTF-8
531
3.109375
3
[ "MIT" ]
permissive
#pragma once #include <SFML/Graphics.hpp> namespace overmon { /// The variable type signifying unique sprites. typedef uint8_t AreaId; /// Loads and stores area metadata. template<typename T> class BaseAreaManager { public: /// Sets and loads the indicated area. void areaSet(AreaId id) { static_cast<T*>(this)-...
Java
UTF-8
2,172
2.265625
2
[ "BSD-3-Clause" ]
permissive
package org.ndexbio.cxio.aspects.readers; import java.io.IOException; import org.ndexbio.cxio.aspects.datamodels.ATTRIBUTE_DATA_TYPE; import org.ndexbio.cxio.aspects.datamodels.AbstractAttributesAspectElement; import org.ndexbio.cxio.aspects.datamodels.AttributesAspectUtils; import org.ndexbio.cxio.aspects.datamodels...
Python
UTF-8
3,964
3.375
3
[]
no_license
""" Sample script to parse xr and ct radiology notes. """ import re import numpy as np import pandas as pd import glob, os import timeit # Start timer start_time = timeit.default_timer() # Specify notes directory and columns to parse notes_dir = input("What is the path to the notes?") # feel free to replace with the ...
Python
UTF-8
7,808
3
3
[]
no_license
# # File: Contour_Detect_Drive # # Author: Jacob Gerecht and Austin Smith # # Created: 11-09-2018 # # Purpose: This code locates the orange circle that makes up our beacon and indicates # it with a bright green circle on the displayed image. The detected blob is also printed # to the console to provide feedback informa...
Java
UTF-8
302
1.765625
2
[]
no_license
package com.tortoise.control; import com.tortoise.bean.ResultBean; /** * @author pengli * @create 2021-08-05 17:30 * * 控制类 核心基类 */ public class BaseControl { public ResultBean getResultBean(){ ResultBean result= ResultBean.builder().build(); return result; } }
Shell
UTF-8
1,018
2.59375
3
[ "MIT" ]
permissive
#!/bin/sh echo "Download bundable opendjk" wget -c https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk11u-2019-10-16-10-43/OpenJDK11U-jdk_x64_linux_hotspot_2019-10-16-10-43.tar.gz tar xf OpenJDK11U-jdk_x64_linux_hotspot_2019-10-16-10-43.tar.gz echo "Download and build Newton Adventure" git clone ...
C++
UTF-8
251
2.609375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main(){ long long a, b; cin >> a >> b; if(a > 0 && b > 0){ cout << "I"; } else if(a > 0 && b < 0){ cout << "IV"; } else if(a < 0 && b > 0){ cout << "II"; } else cout << "III"; }
C++
UTF-8
3,023
3.015625
3
[]
no_license
#include <iostream> #include <fstream> #include <vector> #include <cstdlib> #include <sstream> using namespace std; void readData(const string &, vector<double> &, vector<double> &); double interpolation(double, const vector<double> &, const vector<double> &); bool isOrdered(const vector<double> &); void reorder(vect...
Markdown
UTF-8
2,398
2.84375
3
[]
no_license
#### Event loop https://github.com/nodejs/node/blob/master/lib/fs.js #### Signals A signal is a limited form of inter-process communication used in Unix, Unix-like and other POSIX-compliant operating systems. It is an asynchronous notification sent to a process, or to a specific thread, within the same process in o...
Ruby
UTF-8
864
3.0625
3
[]
no_license
class UnionFind def initialize(nodes) @leaders = Hash.new @leaders = nodes @changes = @leaders # array.each do |edge| # @leaders[edge[1]] = [edge[1]] unless @leaders.has_key?(edge[1]) # @leaders[edge[2]] = [edge[2]] unless @leaders.has_key?(edge[2]) # end # @changes = @leaders e...
PHP
UTF-8
165
2.921875
3
[]
no_license
<?php // 自分の得意な言語で // Let's チャレンジ!! $N = trim(fgets(STDIN)); for($i=$N;$i>0;$i--){ echo $i ."\n"; } ?>
Java
UTF-8
7,574
1.84375
2
[]
no_license
package com.example.tony.finalproject_plants; import android.Manifest; import android.app.Activity; import android.app.FragmentTransaction; import android.content.Context; import android.content.pm.PackageManager; import android.database.sqlite.SQLiteDatabase; import android.graphics.Bitmap; import android.graphics.Ty...
Python
UTF-8
3,151
2.796875
3
[]
no_license
#!/usr/bin/python # -*- coding: iso-8859-1 -*- # zululand/actor :: rev 21 :: MAY2014 :: msarch@free.fr ##---IMPORTS------------------------------------------------------------------- import os import sys from glob import glob from imp import load_source import pyglet.gl from debug import db_print ##---CLASS ACTOR--...
Java
UTF-8
649
2.4375
2
[]
no_license
package org.openjfx.model.vo; import java.io.Serializable; public class KontaktInformasjon implements Serializable { private String epost; private String telefonNr; public KontaktInformasjon(String epost, String telefonNr) { this.epost = epost; this.telefonNr = telefonNr; } publ...
PHP
UTF-8
5,793
2.53125
3
[]
no_license
<?php require_once(dirname(__FILE__) . "/../VidiunClientBase.php"); require_once(dirname(__FILE__) . "/../VidiunEnums.php"); require_once(dirname(__FILE__) . "/../VidiunTypes.php"); class VidiunAnnotationOrderBy { const CREATED_AT_ASC = "+createdAt"; const CREATED_AT_DESC = "-createdAt"; const UPDATED_AT_ASC = "+up...
Java
UTF-8
641
2.84375
3
[]
no_license
package com.example; import java.util.Arrays; import java.util.HashMap; import java.util.List; public class MemberService { //HashMap<String,List<String>> details; //by using book object class; HashMap<String,List<Book>> details; public MemberService() { details=new HashMap<>(); details.put("anil",Arrays.a...
Markdown
UTF-8
1,218
3.953125
4
[]
no_license
**Problem:** Given an integer array `nums` of **unique** elements, return *all possible subsets (the power set)*. The solution set **must not** contain duplicate subsets. Return the solution in **any order**. **Example 1:** ``` Input: nums = [1,2,3] Output: [[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]] ``` **Exampl...
Markdown
UTF-8
11,458
2.75
3
[ "MIT" ]
permissive
<!-- Titel på rapporten --> Färgval och typografi på kommunala webbplatser ======================= Introduktion ----------------------- <!-- Skriv en eller två rader om vad uppgiften handlar om. --> Anpassning av webbplats genom färgval och typografi är en viktig punkt för att locka besökare. Om färgvalen appliceras ...
Python
UTF-8
4,726
3.09375
3
[]
no_license
import numpy as np import sys sys.setrecursionlimit(1500) def read_input(filename, scoring_file): try: input_file = open(filename, "r") genome1 = input_file.readline().rstrip('\n') genome2 = input_file.readline().rstrip('\n') genome3 = input_file.readline().rstrip('\n') inpu...
C++
UTF-8
3,775
2.546875
3
[]
no_license
#include "hades/game_api.hpp" #include <type_traits> #include "hades/data.hpp" #include "hades/level_interface.hpp" namespace hades { namespace detail { template<typename T, typename GameSystem> T& get_level_local_ref_imp(unique_id id, extra_state<GameSystem>& extras) { auto val = extras.level_locals.try_...
TypeScript
UTF-8
730
2.859375
3
[ "MIT" ]
permissive
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm'; import TrackedAccount from '../tracked-account/trackedAccount.entity'; /** * Database representation of a ban */ @Entity() export default class Ban { /** * Primary key */ @PrimaryGeneratedColumn() id: number; /** ...
Python
UTF-8
940
2.59375
3
[ "MIT" ]
permissive
# # Copyright (C) 2019-2020 UAVCAN Development Team <info@zubax.com>. # Author: Pavel Kirienko <pavel.kirienko@zubax.com> # import os import glob import typing from .. import app _ADOPTERS_DIRECTORY_PATH = os.path.join(app.root_path, '..', 'adopters') class Adopter: def __init__(self, name: str, logo_file_name...
Java
UTF-8
2,515
2.390625
2
[]
no_license
package com.esprit.mycitymystory.Adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import com.esprit.mycitymystory.R; import com.espri...
Python
UTF-8
127
3.09375
3
[]
no_license
mylist=[10,2,3,4,4,4,3,3,3,56,7] mylist2=[] for i in mylist: if i not in mylist2: mylist2.append(i) print(mylist2)
TypeScript
UTF-8
1,807
2.65625
3
[ "MIT" ]
permissive
import { code as script } from 'code ./browser/dynamicImportWrapper.ts' import { relative } from 'path' import slash from 'slash' export function setupLoaderScript({ eventDelay = false, wakeEvents = [] as string[], }: { eventDelay?: number | false wakeEvents?: string[] noWakeEvents?: boolean }) { // FEATUR...
Python
UTF-8
286
4.21875
4
[]
no_license
#x = 0 #while x <= 5: #print(x) #x = x + 1 # Import the datetime class from the datetime module. import datetime # Use the now() attribute on the datetime class to get the present time. now = datetime.datetime.now() # Print the present time. print("The time right now is ", now)
C++
UTF-8
3,139
2.53125
3
[ "Apache-2.0" ]
permissive
#include <chrono> #include <iostream> #include <memory> #include <string.h> #include "WiringPiLcdDisplay.h" #include "../src2/HealthStatus.h" using namespace std; using namespace std::chrono; static inline void truncateName(string& name) { size_t length = name.length(); if(length > 8) { name.resize(8)...
Java
UTF-8
64,947
1.59375
2
[]
no_license
package com.jshx.ajxx.web; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; import java.text.SimpleDateFormat; i...
TypeScript
UTF-8
573
2.515625
3
[]
no_license
import validator from 'validator'; import { EmailValidatorAdapter } from './email-validator-adapter'; jest.mock('validator', () => ({ isEmail(): boolean { return true; } })); const makeSut = (): EmailValidatorAdapter => { return new EmailValidatorAdapter(); }; describe('EmailValidatorAdapter', () => { te...
TypeScript
UTF-8
1,374
2.765625
3
[]
no_license
import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { length=0; password=""; isUseLetters=false; isUseNumbers=false; isUseSymbols=false; onChangeLength(event: Event){ c...
Python
UTF-8
2,795
3.828125
4
[]
no_license
import pytest class game: def __init__(self): self.board = [[None]*3 for i in range(3)] self.X_won = None self.O_won = None def show_state(self): for x in self.board: print(x) print("========") def place_x(self, x, y): if self.board[x][y] == Non...
Python
UTF-8
421
2.640625
3
[]
no_license
import requests from bs4 import BeautifulSoup url='https://www.jumia.co.ke/apple-iphone-11-pro-max-with-facetime-256gb-midnight-green-25698946.html' headers={"User Agent":'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36'} page= requests.get( ...
Python
UTF-8
146
2.78125
3
[ "WTFPL" ]
permissive
class User: def __init__(self, username, email, token): self.username = username self.email = email self.token = token
Python
UTF-8
615
3.09375
3
[ "MIT" ]
permissive
def insert_shift_array(lst, val): midpoint = len(lst) // 2 if len(lst) % 2 == 0: # I'm trying to get it to not change the midpoint here. Not sure if I would just be able to leave this if statement blank or not midpoint = midpoint # This section varies slightly from my whiteboarding solu...
Markdown
UTF-8
4,583
3.046875
3
[]
no_license
# 데이터 모델의 이해 ## 데이터 모델의 이해 ### 모델링의 정의 현실 세계를 데이터로 단순화, 명확하, 추상화 하는것 ### 모델리의 특의 1. 추상화 2. 단순화 3. 명확하 ### 모델링의 세 가지 관점 - 데이터 관점 : 업무과 어떤 데이터와 관련 있는지 - 프로세스 관점 : 업무가 실제하고 있는 일은 무엇인지 또는 무엇을 해야 하는지 - 상관 과점 (데이터 + 프로세스 ) : 일의 방법에 따라 데이터는 어떻게 영향을 받고 있는지 ### 데이터 모델이 제공하는 기능 - 가시화 - 명세화 - 구조화된 틀을 제공 - 문서화 - 다양한 관점을 제...
Swift
UTF-8
3,141
3.328125
3
[]
no_license
// // Assignment2ViewController.swift // app-practice // // Created by Felicia Hou on 7/11/18. // Copyright © 2018 Felicia Hou. All rights reserved. // import UIKit class ViewController2: UIViewController { //MARK: Properties @IBOutlet weak var noRepeatLabel: UILabel! @IBOutlet weak var noRepeat...
Java
UTF-8
5,652
1.945313
2
[]
no_license
package com.example.llh_pc.it_support.utils.Events; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.support.v7.app.AlertDialog; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; import android.widget.EditTex...
Java
UTF-8
447
1.976563
2
[]
no_license
package com.test.promanage.po; public class TableRate { private Integer rateid; private String ratename; public Integer getRateid() { return rateid; } public void setRateid(Integer rateid) { this.rateid = rateid; } public String getRatename() { return ratename; ...
Python
UTF-8
7,653
3.140625
3
[]
no_license
import random from abc import ABCMeta from pathlib import Path from typing import List import matplotlib.image as mpimg import numpy as np from prrt.helper import INT_MAX from prrt.primitive import PoseR2S2, PointR2 class KDPair(object): """ K (PTG index) <=> Distance Pair """ def __init__(self, k: i...
PHP
UTF-8
3,467
2.625
3
[]
no_license
<?php use Silk\Post\PostTypeBuilder; class PostTypeBuilderTest extends WP_UnitTestCase { use PostTypeAssertions; /** * @test */ function it_can_be_constructed_with_a_slug() { new PostTypeBuilder('some-type'); } /** * @test */ function it_has_a_named_constructor_...
PHP
UTF-8
14,827
2.671875
3
[]
no_license
<?php require_once('Connections/unique.php'); ?> <?php $i=0; $error=array(); $message=''; ?> <?php if (!isset($_SESSION)) { session_start(); } $MM_authorizedUsers = "3"; $MM_donotCheckaccess = "false"; // *** Restrict Access To Page: Grant or deny access to this page function isAuthorized($strUsers, $strGroups, $Us...
Java
UTF-8
1,155
1.875
2
[]
no_license
package awd.cloud.suppers.interfaces.service.kss.imp; import awd.cloud.suppers.interfaces.api.KssBaseServersApi; import awd.cloud.suppers.interfaces.service.kss.SwqrService; import awd.cloud.suppers.interfaces.utils.PagerResult; import awd.cloud.suppers.interfaces.utils.QueryParam; import awd.cloud.suppers.interfaces....
C++
UTF-8
1,570
3.390625
3
[]
no_license
/** * @file 24_ReverseList.cpp * @brief Sample project head file * @detils The header file details * @auther Auther * @version 1.0.0.1 * @date 2018年08月08日 星期三 09时51分20秒 */ #include <iostream> #include <cstdio> #include "ListNode.h" using namespace std; void ReverseList_Error_Gai(ListNode **head) { if (head =...
C++
UTF-8
1,746
2.578125
3
[]
no_license
/*------------------------------------------------------------------------------ * Copyright © Portal Instruments – All Rights Reserved * Proprietary and Confidential * Copying of this file or use of code contained in this file via any * medium is strictly prohibited unless prior written permission is obtained * from P...
Python
UTF-8
3,960
3.84375
4
[]
no_license
import random from pokemon import * NOMES = ["João", "José", "Pedro", "Maria", "Mathes", "Matias", "Morais", "Mauro", "Marcio", "Beto", "Breno", "Brenda"] POKEMONS = [ PokemonFogo("Charmander"), PokemonFogo("Charmilion"), PokemonFogo("Charizard"), PokemonEletrico("Pikachu"), PokemonEletrico("Raic...
Markdown
UTF-8
885
3.125
3
[]
no_license
**线程封闭**:仅在单先内部访问数据,就不需要同步,即使被封闭对象不是线程安全的。如局部变量、ThreadLocal类 线程封闭技术:栈封闭、ThreadLocal类 **栈封闭** 基本类型局部变量:由于任何方法都无法或者对基本类型的引用,因此基本类型的局部变量始终封闭在线程内; 如果没有发生逸出,那么引用对象也在线程内部 **ThreadLocal** 使线程中某个值与保持值的对象关联起来。提供get\set方法,为每个使用该变量的线程都存有一份独立的副本。 通常用于放置对可变的单实例变量或全局变量进行共享。例如jdbc连接池; 使用场景“当某个频繁执行的操作需要一个临时对象,而同时又希望避免在每次执行时都会重新分...
C#
UTF-8
1,098
2.75
3
[]
no_license
namespace Tinyweather { using System; using System.Collections.Generic; using System.Linq; using System.Text; public class ForecastDay { private String _day; private String _date; private Int16 _low; private Int16 _high; private String _description; ...
PHP
UTF-8
2,295
2.71875
3
[]
no_license
<?php namespace App\Converter; use App\Repository\NewsRepository; use App\Repository\TagRepository; use App\Repository\UserRepository; use App\ValueObject\Filter; class FilterConverter implements Converter { /** @var NewsRepository */ protected $newsRepository; /** @var TagRepository */ protected $t...
Java
UTF-8
575
2.171875
2
[]
no_license
package ru.majestic.bashimreader.utils; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; import android.text.Html; import ru.majestic.bashimreader.data.Quote; public class BufferSaver { public static final void saveInBuffer(final Context context, final ...
Java
UTF-8
4,399
2.234375
2
[]
no_license
import java.io.IOException; import java.io.PrintWriter; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; public class compose extends HttpServlet { Connection con; PreparedStatement ps,ps1; ResultSet rs1; protected void processRequest(HttpServletRequest request, HttpServl...
Markdown
UTF-8
3,942
3.234375
3
[]
no_license
As I was driving to work and reflecting on my work experience thus far, I realized that I was still utilizing a problem-solving approach which I picked up during CS70, which actually revolutionized my CS70 career. I'm writing this advice from the perspective of both the student and the teacher, but also the employee ...
Python
UTF-8
2,043
2.8125
3
[ "BSD-3-Clause" ]
permissive
import numpy as np from fnmatch import fnmatch from astropy.table import Column, Table def scale_by_distance(_grid_name, _outputs, _models, scaling_factor, distance): """Scale external model fluxes and normalization value. Parameters ---------- _grid_name : str name of grid specified _out...
Java
UTF-8
375
1.632813
2
[]
no_license
package com.myke.common; import lombok.extern.slf4j.Slf4j; import org.springframework.context.annotation.Configuration; import javax.annotation.PostConstruct; /** * user: zhangjianbin <br/> * date: 2018/2/13 11:34 */ @Slf4j @Configuration public class CommonConfig { @PostConstruct public void run() { ...
C#
UTF-8
2,183
2.53125
3
[]
no_license
using UnityEngine; using UnityEngine.UI; public class ProfilePage : MonoBehaviour { public Text summaryText; public Text detailedText; Savefile playerData = SaveManager.currentSavefile; void OnEnable() { try { ShowInfo(); } catch { ...
Shell
UTF-8
458
3.421875
3
[ "Apache-2.0" ]
permissive
#!/bin/bash . /etc/sysconfig/heat-params DOCKER_DEV=/dev/disk/by-id/virtio-${DOCKER_VOLUME:0:20} attempts=60 while [[ ! -b $DOCKER_DEV && $attempts != 0 ]]; do echo "waiting for disk $DOCKER_DEV" sleep 0.5 udevadm trigger let attempts-- done if ! [ -b $DOCKER_DEV ]; then echo "ERROR: device $DOCKER_DEV does no...
Markdown
UTF-8
1,939
3.671875
4
[]
no_license
# Styling Links and Lists ## 1. Anchor Links * Links can take on all of the usual style as well as <font color="orange">_text-decoration_</font> ``` a { display: block; font-weight: bold; color: #FFFFFF; background-color: #0006CC; width: 200px; # Only works with inline and inline-block text-al...
Java
UTF-8
3,224
2.484375
2
[]
no_license
package app.localization; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.wi...
Shell
UTF-8
3,085
3.921875
4
[]
no_license
#!/bin/bash RED='\033[0;31m' GRN='\033[0;32m' NC='\033[0m' check_one () { if [ "$#" -ne 4 -a "$#" -ne 5 ]; then echo "Illegal number of parameters" echo "Usage : sh checker.sh [lines] [characters per line] [with (1) or without new line] [from file(1) or stdin(0)] [verbose]" exit fi S0="$(sh rungen.sh $1 $2 ...
C#
UTF-8
1,592
3.25
3
[]
no_license
using System; namespace Books { public class Book : BaseEntity { private Genre Genre { get; set; } private string Author { get; set; } private string Title { get; set; } private string Description { get; set; } private int Year { get; set; } private bool Deleted ...
Swift
UTF-8
4,803
2.75
3
[]
no_license
// // TwitchAPI.swift // TopGames // // Created by Eduardo Domene Junior on 27/06/18. // Copyright © 2018 Eduardo Domene Junior. All rights reserved. // import Foundation class TwitchAPI: NetworkAPIProtocol { let baseURL = "https://api.twitch.tv" let headers = ["Client-ID": "xzqsdxt247xi72kder6l57r0aksbsh...
Python
UTF-8
839
4.40625
4
[]
no_license
name = 'python' age = 22 # 打印 "我是python,今年27岁" # 第一个不建议使用,因为格式转换比较麻烦 new_str = '我是' + name + ',' + '今年' + str(age) + '岁了'; print(new_str) # python 2 里面这样转换,特别注意前面的%s和%d要和后面传入的数据类型一致 new_str1 = "我是%s,今年%d岁了" % (name , age) print(new_str1) # python 3格式转化 与2相比format不需要在意数据类型 还可以增加标识 new_str2 = "我是{name},今年{age}岁了".form...
C#
UTF-8
1,452
2.546875
3
[]
no_license
using System; using System.ComponentModel; using System.Runtime.InteropServices; using System.Threading; using Microsoft.Win32.SafeHandles; namespace TrainCommuteCheckService { public class WakeyWakey { [DllImport("kernel32.dll")] public static extern SafeWaitHandle CreateWaitableTimer(IntPtr ...
Markdown
UTF-8
3,164
2.9375
3
[]
no_license
⚠️ **Note: This project is a hobby, and is still in early development. It should probably not be used by anyone, for anything, yet.** --- A typeahead is a text input that displays suggestions as you type. It can be used for search, navigation, entity selection, and countless other things, and has become a ubiquitous ...
Java
UTF-8
3,066
2.21875
2
[]
no_license
/******************************************************************************* * * Project : Mirage V2 * * Package : * * Date : September 19, 2007, 8:27 PM * * Author : RangaRao Panda<rpanda@miraclesoft.com> * Rajasekhar Yenduva<ryenduva@miraclesoft.com> * * File : HibernateS...
C++
UTF-8
4,082
2.578125
3
[]
no_license
#ifndef MAIN_CYCLE_H #define MAIN_CYCLE_H #include <cmath> #include "functions.h" class GA { public: GA(const double& Pc, const int& numIt, const int& maxItReq) : record(new IndividualType), fitnessRecord(-1), Pc(Pc), // max or min maxNumItWithoutChanges(numIt), maxNumItForRequirements(maxItReq),...
Python
UTF-8
3,081
2.546875
3
[ "MIT" ]
permissive
''' - login and get token - process 2FA if 2FA is setup for this account - in case the login is authorized as a partner_admin then also list the users that partner_admin has access to ''' import requests import json get_token_url = "https://api.canopy.cloud:443/api/v1/sessions/" validate_otp_url = "https://api.cano...
Java
UTF-8
3,020
2.265625
2
[]
no_license
package com.ydw.myphone; import android.content.Context; import android.databinding.DataBindingUtil; 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 com.ydw.myphone.databinding...
PHP
UTF-8
362
2.8125
3
[]
no_license
<?php require_once("conexion.php"); class Usuario extends Conexion{ public function alta($nombre,$tipo,$password){ $this->sentencia = "INSERT INTO usuario VALUES (null,'$nombre','$tipo','$password')"; $this->ejecutarSentencia(); } public function consulta(){ $this->sentencia = "SELECT * FROM usuario"; r...
C++
UTF-8
13,016
2.765625
3
[ "BSD-2-Clause" ]
permissive
#pragma once //------------------------------------------------------------------------------ /// \file /// \ingroup math /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License /// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) //---------------------------------------...
Python
UTF-8
3,563
2.71875
3
[ "MIT" ]
permissive
import time import socket import struct import random import threading import traceback from endpoint import Endpoint class IcmpClient: def __init__(self): self.sourceIp = socket.gethostbyname(socket.getfqdn()) self.sourcePort = 0 self.protocol = "icmp" def __checksum(self, packet) -> ...
C++
UTF-8
660
3.40625
3
[]
no_license
/** * baekjoon online judge * No. 11650 좌표 정렬하기 * @date 2018.04.27 */ #include <iostream> #include <algorithm> using namespace std; // 좌표 구조체 struct xy { int x, y; }; // 배열 xy arr[100001]; // 비교 함수 bool compare(xy a, xy b) { if (a.x == b.x) return a.y < b.y; return a.x < b.x; } // main int main() { ios::syn...
Java
UTF-8
6,404
2.265625
2
[ "Apache-2.0" ]
permissive
/** * Copyright 2015 Expedia, Inc. All rights reserved. * EXPEDIA PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package com.expedia.echox3.internal.transport.request.source; import com.expedia.echox3.basics.configuration.ConfigurationManager; import com.expedia.echox3.basics.tools.pubsub.Publisher;...
Java
UTF-8
3,661
2.109375
2
[ "MIT" ]
permissive
package com.maryanto.dimas.example.controller; import com.maryanto.dimas.example.entity.Kecamatan; import com.maryanto.dimas.example.entity.Kelurahan; import com.maryanto.dimas.example.entity.KotaKabupaten; import com.maryanto.dimas.example.entity.Provinsi; import com.maryanto.dimas.example.repository.KecamatanReposit...
Python
UTF-8
1,444
3
3
[]
no_license
from sys import argv script, input_file = argv open_file = open(input_file) directions = open_file.read() houses = [(0,0)] robot_houses = [(0,0)] i = 0 for d in directions: if i%2 == 0: if d == '^': houses.append([houses[len(houses) - 1][0]+1, houses[len(houses) - 1][1]]) elif d == 'v'...
Python
UTF-8
144
2.6875
3
[]
no_license
import math def calcula_norma(n): s=0 i=0 while i <= len(n): s+=n[i]**2 i+=1 norma=math.sqrt(s) return norma
C++
UTF-8
315
2.9375
3
[]
no_license
#include <cassert> #include <iostream> #include "intcode.h" using namespace std; int main(int argc, char *argv[]) { assert(argc == 2); Intcode ic(argv[1]); for (auto &x : {1, 2}) { ic.push_input({x}); ic.run_program(); cout << "Part " << x << ": " << ic.get_output() << endl; } return 0; }