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 |
|---|---|---|---|---|---|---|---|
Swift | UTF-8 | 385 | 2.703125 | 3 | [] | no_license | import Foundation
// MARK: - AuthToken
public protocol AuthToken {
func authenticationHeaders() -> [String: String]
}
extension AuthToken {
public func setAuthenticationHeaders(on request: inout URLRequest) {
let headers = authenticationHeaders()
headers.forEach { key, value in
re... |
Java | UTF-8 | 496 | 1.757813 | 2 | [] | no_license | package com.pointless;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
public class FlappyImpact extends Game {
AdHandler adha... |
PHP | UTF-8 | 6,246 | 2.796875 | 3 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | <?php
/**
* This file is part of JWT.
*
*/
namespace App\Models\Core\SMS;
use Qcloud\Sms\SmsSenderUtil;
/**
* 腾讯云短信模板
*
* @version 2018年03月29日
* @author JYS <272074691@qq.com>
* @copyright Copyright 2010-2016 Swoft software
* @license PHP Version 7.x {@link http://www.php.net/license/3_0.txt}
*/
cl... |
Markdown | UTF-8 | 4,035 | 2.984375 | 3 | [
"MIT"
] | permissive | # DeleteScalingGroup {#doc_api_1163781 .reference}
You can call this operation to delete a scaling group.
## Description {#description .section}
This operation deletes a specified scaling group.
- ForceDelete indicates whether to forcibly delete a scaling group and remove or release its associated ECS instances r... |
C++ | UTF-8 | 846 | 2.578125 | 3 | [] | no_license | #include "..\public\LightMgr.h"
#include "Light.h"
IMPLEMENT_SINGLETON(LightMgr)
LightMgr::LightMgr()
{
}
const LIGHTDESC * Engine::LightMgr::GetLightDesc(_uint iIndex)
{
LIGHTS::iterator iter = m_Lights.begin();
for (_uint i = 0; i < iIndex; ++i)
++iter;
return (*iter)->GetLightDesc();
}
... |
C++ | UTF-8 | 658 | 2.984375 | 3 | [] | no_license |
#ifndef PARSER_H
#define PARSER_H
#include <string>
#include <vector>
struct Transition
{
char readSym;
char writeSym;
char direction;
std::string nextState;
};
class State
{
public:
std::string getName() const;
const std::vector<Transition>& getTransitions() const;
void setName( std::string name );
void ad... |
Markdown | UTF-8 | 785 | 3.40625 | 3 | [] | no_license | # super-java_Interface
-Another way to achieve abstraction in Java is the Interface.
-An interface is a completely "Abstract class" that is used to group related methods with empth bodies.
-To access the interface method, the interface must be "Implemented" by another class with the implements keyword (Instead of ex... |
Swift | UTF-8 | 2,544 | 2.609375 | 3 | [] | no_license | //
// PlateNumberViewController.swift
// prndl
//
// Created by Jimmy Mkude on 5/24/17.
// Copyright © 2017 Jimmy Mkude. All rights reserved.
//
import UIKit
class PlateNumberViewController: UIViewController, UITextFieldDelegate {
var userInfo : UserInfo?
var plateNumber = ""
var nextClicked = false
... |
Markdown | UTF-8 | 638 | 2.734375 | 3 | [] | no_license | # FriendFinder
An application that matches users with their ideal friend via a personality survey. User's submitted survey answers are compared to the saved answers of others with a custom algorithm. The user will then be matched with the person whose answers most closely match their own.
The application was built u... |
Rust | UTF-8 | 321 | 2.578125 | 3 | [] | no_license | use proconio::input;
fn main() {
input! {
n: usize,
mut ab: [(i64, i64); n],
};
ab.sort_by_key(|&(a, b)| (b, a));
let mut c = 0;
for (a_i, b_i) in ab {
if c + a_i > b_i {
println!("No");
return;
}
c += a_i;
}
println!("Yes");
}... |
C# | UTF-8 | 6,530 | 3.53125 | 4 | [] | no_license | using System;
using System.Collections.Generic;
using System.Text;
namespace Algorithms.Algorithms.Cram.CTCI
{
/// <summary>
/// T9: On old cell phones, users typed on a numeric keypad and the phone would provide a list of
/// words that matched these numbers.Each digit mapped to a set of 0 - 4 letters.Im... |
C++ | UTF-8 | 826 | 2.8125 | 3 | [] | no_license | //
// Created by Денис Гребенюк on 10.09.2018.
//
#ifndef UNTITLED3_TREE_H
#define UNTITLED3_TREE_H
#include <clocale>
struct Tree{
int TreeElement;
Tree *left;
Tree *right;
};
class tree {
private:
Tree *TREE; //указатель на корень дерева
public:
tree() //иницилизируем конструктор
{
... |
TypeScript | UTF-8 | 3,398 | 3.1875 | 3 | [
"MIT"
] | permissive | import { altX, commentX, lineAttrX } from './regex';
import { isEmpty } from './isEmpty';
const capComment = 1;
const capSelector = 2;
const capEnd = 3;
const capAttr = 4;
/**
* Input is css string and current pos, returns JSON object
*
* @param cssString
* The CSS string.
* @param args
* ... |
Markdown | UTF-8 | 2,750 | 3.140625 | 3 | [] | no_license |
[back to README.md file](../README.md)
# User Stories
#### User category: _The User_
* As a user, I want to see all the available vintage earrings so that I can choose the ones I like.
* Complexity - 5
* Value - 5
* As a user, I want to buy the product that I added to the basket.
* Complexity - 5
* ... |
Python | UTF-8 | 1,500 | 2.609375 | 3 | [
"Unlicense"
] | permissive | import requests
import pandas
import geopandas
modes = {'Total': 'B08006_001E', 'Car, truck, or van': 'B08006_002E', 'Drove alone': 'B08006_003E', 'Carpooled': 'B08006_004E', 'In 2-person carpool': 'B08006_005E', 'In 3-person carpool': 'B08006_006E', 'In 4-o r-more-person carpool': 'B08006_007E', 'Public transporta... |
Markdown | UTF-8 | 411 | 2.84375 | 3 | [] | no_license | #### Interactive shell, datatypes and variables
| Concept | Best Video Resource | Best Text Resource | Duration | Prerequisites |
|:-------:| :-----------------: | :----------------: | :------: | :-----------: |
| Basics | [Interactive shell, datatypes and variables](https://www.youtube.com/watch?v=7qHMXu99d88) | [Do... |
Java | UTF-8 | 3,256 | 2.265625 | 2 | [] | no_license | package org.mule.tools.apikit.output.scopes;
import org.jdom2.Element;
import org.mule.tools.apikit.misc.APIKitTools;
import java.util.Arrays;
import java.util.List;
import static org.mule.tools.apikit.output.MuleConfigGenerator.XMLNS_NAMESPACE;
public class ExceptionStrategyScope implements Scope {
private f... |
Markdown | UTF-8 | 2,508 | 2.734375 | 3 | [
"MIT"
] | permissive |
Function memoization sulotion for Cumulo and Respo
----
> a memo library as a replacement for memoizations in Cumulo and Respo. It's mainly experimental.
### Usage
[](https://clojars.org/cumulo/memof)
```edn
[cumulo/memof "0.2.3"]
```
```clojure... |
C# | UTF-8 | 3,010 | 2.59375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.IO;
using System.IO.IsolatedStorage;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Anima... |
Java | UTF-8 | 594 | 3.390625 | 3 | [] | no_license | package oopsconcept;
public class Overloading1 {
public static void main(String args[]) {
System.out.println("main method");
Overloading1 obj = new Overloading1();
System.out.println(obj.add(5,7));
System.out.println(obj.add("nilesh","patel"));
System.out.println(obj.add(6,7));
System.out.println(obj.add... |
Markdown | UTF-8 | 1,262 | 2.703125 | 3 | [] | no_license | # spc-slack-rsvp
Slack で出欠を記録します。
毎日変わる4桁のキーワードを使います。
## 権限
ユーザーには3種類の権限があります。
| 種類 | 権限 |
|:--|:--|
| USER | 自分が出席していることを主張できる |
| OP | USER の権限 + 出欠確認を開始できる |
| ADMIN | OP の権限 + OP の付与・剥奪ができる |
## USER
OP の誰かにキーワードを伝えられたら、それを DM で bot に送信します。
例えばキーワードが `ACDE` なら
```
ACDE
```
と DM を送ります。
以下のコマンドが使えます。
| コマンド | 意... |
Markdown | UTF-8 | 7,475 | 2.78125 | 3 | [
"MIT"
] | permissive | ---
title: What is a shell? 🐚 adalah kerang ajaib?
date: 2020-01-25 11:58:47 +07:00
modified: 2020-02-02 16:49:47 +07:00
tags: [unix/linux, cli]
description: Shell adalah sebuah command-line interpreter; program yang berperan sebagai penerjemah perintah yang diinputkan oleh User yang melalui terminal, sehingga perinta... |
JavaScript | UTF-8 | 1,620 | 2.578125 | 3 | [
"MIT"
] | permissive | import React, { useEffect, useState } from "react";
import axios from "../../config/axios";
import request from "../../config/requests";
import "../../assets/css/Poster.css";
const base_url = "https://image.tmdb.org/t/p/original/";
function Poster() {
const [movie, setMovie] = useState([]);
function truncateStrin... |
C | UTF-8 | 1,497 | 3.484375 | 3 | [
"ISC"
] | permissive | #include "bug.h"
#include "direction.h"
#include "logging.h"
#include <stdlib.h>
#include <string.h>
static const int BUG_SIZE = 32;
static const int BUG_SPEED = 2;
static const Bug initialBug = {.x = 0,
.y = 0,
.w = BUG_SIZE,
... |
TypeScript | UTF-8 | 1,120 | 2.671875 | 3 | [] | no_license | export interface IBudgetRangeQuery {
start: Date;
end: Date;
}
export interface IBudgetLastNMonthsQuery {
months: number;
}
export type IBudgetQuery = IBudgetRangeQuery | IBudgetLastNMonthsQuery;
export interface IMintBudgetItem {
/** rollover spending */
ramt: number;
/**
* total spent... |
C# | UTF-8 | 2,396 | 2.96875 | 3 | [
"MIT",
"Intel"
] | permissive | // Copyright (c) Giovanni Lafratta. All rights reserved.
// Licensed under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Novacta.Analytics.Tests.TestableItems.Matrices
{
/// <summary>
/// Provides methods to test implementations of matrix
/// <para />
/... |
Java | UTF-8 | 7,623 | 1.828125 | 2 | [] | no_license | package org.fao.fenix.web.modules.amis.client.view.menu;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import org.fao.fenix.web.modules.amis.client.control.AMISLogInController;
import org.fao.fenix.web.modules.amis.client.control.history.AMISHistoryController;
import or... |
Markdown | UTF-8 | 18,635 | 2.875 | 3 | [] | no_license | ---
id: 104
title: "כמה מעלות טובות לרדיאן עלינו (דבר הסנגוריה: סינוסים וקוסינוסים)"
date: 2008-01-13 20:42:36
layout: post
categories:
- אנליזה מתמטית
---
<a href="http://www.gadial.net/2008/01/11/radians/">בפוסט הקודם</a> הצגתי את יחידת המידה ה"טבעית" ל<a href="http://he.wikipedia.org/wiki/%D7%96%D7%95%D7%95%D7%99... |
C# | UTF-8 | 1,225 | 2.625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
using SafeCloud.DAL.Contexts;
using SafeCloud.DAL.Entities;
namespace SafeCloud.DAL.Repositories
{
internal class UserRepository : Reposi... |
Java | UTF-8 | 1,135 | 2.296875 | 2 | [] | no_license | package pers.zyc.piglet.network.command;
import io.netty.buffer.ByteBuf;
import lombok.Getter;
import pers.zyc.piglet.ProducerId;
import pers.zyc.piglet.Serialization;
import pers.zyc.piglet.network.CommandFactory;
import pers.zyc.tools.network.Header;
import pers.zyc.tools.network.Request;
/**
* @author zhangyanche... |
Markdown | UTF-8 | 9,159 | 2.828125 | 3 | [
"MIT"
] | permissive | Bugsnag Notification Plugin Creation Guide
==========================================
Bugsnag.com can notify you when errors happen in your applications.
We've created a plugin architecture so you can contribute notification
plugins for services you use.
[Bugsnag](http://bugsnag.com) captures errors in real-time fro... |
Python | UTF-8 | 1,817 | 2.671875 | 3 | [] | no_license | import email
import smtplib
import imaplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
class MailSender:
def __init__(self, smtp_server, imap_server, login, password, smtp_port=587):
self._login = login
self._password = password
self._sm... |
Java | UTF-8 | 1,550 | 2.453125 | 2 | [] | no_license | package com.dc.common.base;
import com.dc.common.util.base.DataUtil;
/**
* @author wx
* @version v1.0.0
* @className BaseException
* @date 2019/12/14 19:29
* @Copyright: 2020 www.decheng1024.com.cn Inc. All rights reserved.
* 注意:本内容仅限于深圳得逞信息技术有限公司内部传阅,禁止外泄以及用于其他的商业目的
*/
public class BaseException {
/**
... |
Python | UTF-8 | 3,106 | 3.328125 | 3 | [] | no_license | # Explain the project file structure
# Importing the libraries
import numpy as np
import pandas as pd
# Pickle is used to serializing and de-serializing a Python object structure/data
import pickle
# copy and paste the data file onto the project folder, read the csv file using pandas, explore data and transform... |
C++ | UTF-8 | 2,815 | 3.40625 | 3 | [] | no_license |
#include <iostream>
using std::cout;
using std::endl;
#include "proxy.h"
/*********************************
* Name: ClientHandler
* Purpose: Handles a single web request
* Receive: The data socket pointer
* Return: None
*********************************/
void* connectionHandler(void *arg) {
TC... |
C# | UTF-8 | 2,924 | 2.921875 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Concurrent;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
namespace PoissonSoft.BinanceApi.Contracts.Serialization
{
/// <summary>
/// Конвертер из string в Enum с логгирование в случае ошибки конвертации
/// и возможностью испо... |
Java | ISO-8859-1 | 1,113 | 2.921875 | 3 | [] | no_license | package com.hemebiotech.analytics;
import java.util.ArrayList;
import java.util.TreeMap;
/**
* Classe du comptage du nombre d'occurence de symptoms qui implmente une
* interface SymptomReader
*
* @author JeanLuc
*
*/
public class AnalyticsCounter implements ISymptomCounter {
private int nbOccurence;
... |
Java | UTF-8 | 12,868 | 2.203125 | 2 | [] | no_license | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.lown.consultancy.accounts.dialog;
import java.awt.Cursor;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
import java.awt.even... |
Java | UTF-8 | 1,458 | 2.34375 | 2 | [
"Apache-2.0"
] | permissive | // Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.siyeh.ipp.forloop;
import com.intellij.psi.PsiForeachStatement;
import com.intellij.psi.PsiType;
public class ReplaceForEachLoopWithOptimizedIndexedForLoopIntention ... |
Python | UTF-8 | 3,184 | 3.171875 | 3 | [] | no_license |
# coding: utf-8
# In[ ]:
'''
from mrjob.job import MRJob
from mrjob.step import MRStep
import re
import heapq
WORD_RE = re.compile(r"[\w']+")
n = 5
class MRMostUsedWord(MRJob):
def steps(self):
return [
MRStep(mapper=self.mapper_get_words,
combiner=self.combiner_count_wo... |
Java | UTF-8 | 5,289 | 2.234375 | 2 | [] | no_license | package com.fr.api.team;
import com.fr.commons.dto.UserDTO;
import com.fr.commons.dto.security.AccountUserDetails;
import com.fr.commons.dto.sppoti.SppotiDTO;
import com.fr.commons.dto.team.TeamDTO;
import com.fr.commons.enumeration.GlobalAppStatusEnum;
import com.fr.commons.enumeration.TeamStatus;
import com.fr.commo... |
Markdown | UTF-8 | 36,774 | 2.90625 | 3 | [] | no_license | The Seventh Infallible: Fifth Imam Baqir (as) and his forty discourses
======================================================================
**The Seventh Infallible Imam Mohammad Baqir (as)**
Name: Mohammed Ibn Ali (as)
Title: Baqir
Sub Title: Abu Ja’far (as)
Father: Imam Zain Ul Abideen (as)
Mother: Fatima Bin... |
Shell | UTF-8 | 123 | 2.59375 | 3 | [] | no_license | exec {FD}< asterischi.txt
if(( $? == 0 )); then
while read -u ${FD} A B C D; do
echo "$D $C";
done;
exec {FD}>&-
fi;
|
Java | UTF-8 | 318 | 3.171875 | 3 | [] | no_license | package com.start.java;
public class Adder {
public void add(int a, int b) {
System.out.println(a+b);
}
public void add(int a,int b,int c) {
System.out.println(a+b+c);
}
public static void main(String[] args) {
Adder adition= new Adder();
adition.add(10, 20);
adition.add(20, 30,40);
}
}
|
Python | UTF-8 | 117 | 3.109375 | 3 | [] | no_license | for tmpVar in "Abcdefg":
print(tmpVar)
for tmpVar in ["Anton","Lobanov","Alexandrovich"]:
print(tmpVar)
|
PHP | UTF-8 | 405 | 2.625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Message extends Model
{
//--This fields tells us that, whether the message is our own
protected $appends = ['selfMessage'];
public function getSelfMessageAttribute()
{
return $this->user_id === auth()->user()->id;
}
//--get use... |
Java | UTF-8 | 1,077 | 3.03125 | 3 | [
"Apache-2.0"
] | permissive | package edu.bu.met.cs665;
import edu.bu.met.cs665.example1.Person;
import org.apache.log4j.Logger;
// import org.apache.log4j.PropertyConfigurator;
public class Main {
private static Logger logger = Logger.getLogger(Main.class);
/**
* A main method to run examples.
*
* @param args not us... |
PHP | UTF-8 | 681 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace ORIATEC\Components\Validation\Exceptions;
use Exception;
use ORIATEC\Components\Validation\Rule;
/**
* Class RuleException
*
* @package ORIATEC\Components\Validation\Exceptions
* @subpackage ORIATEC\Components\Validation\Exceptions\RuleException
*/
class RuleException... |
C# | UTF-8 | 876 | 3.40625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DesignPattern
{
public class AdapterPattern
{
public static void Excute()
{
ILogger adapter = new LoggerAdapter();
adapter.Log("我是採用Adapter,由Ada... |
Java | UTF-8 | 3,872 | 3.46875 | 3 | [] | no_license | package dom;
import org.w3c.dom.*;
import javax.xml.parsers.*;
/**
*
* @author fernando.martinez
*/
public class StudentDOM {
private String id;
private String name;
private int age;
public StudentDOM(String id, String name,int age){
this.id = id;
this.name = ... |
Markdown | UTF-8 | 1,949 | 3.015625 | 3 | [] | no_license | # :fire: week6
## :ballot_box_with_check: 백준 1992
#### 출력 초과
```python
import sys
board = []
def checkBoard(startRow, endRow, startCol, endCol):
check = board[startRow][startCol]
for r in range(startRow, endRow):
for c in range(startCol, endCol):
if not check == board[r][c]: return Fals... |
Shell | UTF-8 | 364 | 3.6875 | 4 | [
"MIT"
] | permissive | #!/bin/sh
set -e
if [ -z "${PREFIX}" ]; then
PREFIX="/usr/local"
fi
BIN_PATH="${PREFIX}/bin"
SHARE_PATH="${PREFIX}/share/elixir-build"
mkdir -p "${BIN_PATH}"
mkdir -p "${SHARE_PATH}"
for file in bin/*; do
cp "${file}" "${BIN_PATH}"
done
for file in share/elixir-build/*; do
cp "${file}" "${SHARE_PATH}"
done
... |
Python | UTF-8 | 686 | 3.546875 | 4 | [] | no_license | from turtle import Turtle
class Paddle(Turtle):
def __init__(self,x,y):
super().__init__()
self.paddle =Turtle()
self.shape("square")
self.color("white")
self.shapesize(stretch_wid=5, stretch_len=1)
self.penup()
self.goto(x, y)
self.position
... |
TypeScript | UTF-8 | 1,340 | 2.546875 | 3 | [
"MIT"
] | permissive | import URLLib = require("url");
import GrabModel, { attr, html, sel, text } from "webgrab";
import parseDescription from "./parse-description";
export const URL = `https://developers.facebook.com/docs/graph-api/reference`;
export const model = sel("h3 + div > table > tbody > tr", [{
name: sel("td > a", {
hr... |
PHP | UTF-8 | 2,416 | 2.8125 | 3 | [] | no_license | <?php
class Validator {
public $errors = [];
public $request = [];
public static function getBuilder(){
return require 'core/bootstrap.php';
}
public function validate($request, $validatedData)
{
$this->request = $request;
foreach($validatedData as $input => $rul... |
Markdown | UTF-8 | 5,604 | 3.28125 | 3 | [] | no_license | ---
title: "NestJS Request Logger"
date: 2021-05-22
tags: [nestjs]
---
Je partage ici un retour d'expérience que j'ai fait à mon travail chez [Koala](https://www.hikoala.co/).
## Les besoins
Je cherche à avoir un HTTP Logger qui trace les HTTP Requests et les HTTP Responses.
Je veux pouvoir logger aussi bien les re... |
C++ | UTF-8 | 770 | 3.109375 | 3 | [] | no_license | #include "TwoOperandInstruction.h"
TwoOperandInstruction::TwoOperandInstruction()
{
}
TwoOperandInstruction::~TwoOperandInstruction()
{
delete in1;
delete out;
}
void TwoOperandInstruction::Execute(DataMemory & mem, AddressOperand & counter) const
{
}
void TwoOperandInstruction::ParseOperands(std::string & str... |
C++ | UTF-8 | 15,371 | 2.53125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"BSD-3-Clause",
"CC-BY-4.0"
] | permissive | // SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenColorIO Project.
#include <OpenColorIO/OpenColorIO.h>
#include "ops/gradingrgbcurve/GradingRGBCurveOpGPU.h"
#include "utils/StringUtils.h"
namespace OCIO_NAMESPACE
{
// The curve evaluation is done using a piecewise quadratic polynomial... |
Markdown | UTF-8 | 8,198 | 3 | 3 | [] | no_license | # THE SWINEHERD
Once upon a time lived a poor prince; his kingdom was very
small, but it was large enough to enable him to marry, and marry he
would. It was rather bold of him that he went and asked the
emperor's daughter: "Will you marry me?" but he ventured to do so, for
his name was known far and wide, and there we... |
Java | UTF-8 | 744 | 2.109375 | 2 | [] | no_license | package com.main.dao;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.main.model.Benificiary;
import com.main.repository.BenificiaryRepository;
@Repository
public class BenificiaryDaoImpl implements Benific... |
Markdown | UTF-8 | 3,512 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | ---
id: syntax-highlighting
title: YAML Editor Syntax Highlighting
---
The *inspectIT Configuration Server* uses a custom Mode for [Syntax Highlighting in its Ace Editor](https://ace.c9.io/#nav=higlighter) based on the editor's default YAML Highlighting to help with writing your configurations.
## Additions to the st... |
Python | UTF-8 | 14,556 | 2.875 | 3 | [
"MIT"
] | permissive | import pandas as pd
import numpy as np
import seaborn as sns
import seaborn as sn
from training.config import Config
import matplotlib.pyplot as plt
from sklearn.metrics import confusion_matrix
from scipy.optimize import curve_fit
def get_heatmaps(data, no_pred=False):
"""
get_heatmaps(data, no_pr... |
Java | UTF-8 | 2,897 | 2.109375 | 2 | [] | no_license | package com.group.FRS.model;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
impor... |
Python | UTF-8 | 18,578 | 3.890625 | 4 | [] | no_license | #! /usr/bin/env python3
# -*- coding: UTF-8 -*-
from math import exp, log, sqrt
import re
from datetime import date, time, datetime, timedelta
from operator import itemgetter
import sys
import glob
import os
print("Output #1: I'm excited to learn Python.")
# 两个数值相加
x = 4
y = 5
z = x + y
print("Output #2: Four plus fi... |
Java | UTF-8 | 4,059 | 2.359375 | 2 | [
"Apache-2.0"
] | permissive | package com.alibaba.project.loadbalance;
import com.alibaba.fastjson.JSONObject;
import com.google.common.base.Strings;
import com.netflix.loadbalancer.Server;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileInputStream;
imp... |
Java | UTF-8 | 1,157 | 3.0625 | 3 | [] | no_license | package io;
import java.io.IOException;
import java.net.URI;
import java.nio.file.*;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
public class Search {
public List<Path> search(Path root, Predicate<Path> condition) {
Path start = root;
SearchFiles... |
Python | UTF-8 | 955 | 2.578125 | 3 | [] | no_license | import json
from service.messaging.receiver import XMPPReceiver
from service.messaging.sender import XMPPSender
from time import sleep
class Launcher:
def __init__(self):
pass
@classmethod
def launch(cls):
with open('sender_config.json', 'r') as configFile:
sender_config = js... |
Ruby | UTF-8 | 570 | 2.828125 | 3 | [
"Apache-2.0"
] | permissive | class ProjectFile
def self.from_hash(hash)
ProjectFile.new(hash['id'],hash['name'],hash['type'],hash['source'])
end
def initialize(id,name,type,source)
@id = id
@name = name
@type = type
@source = source
end
def type
@type
end
def name
@name
end
def id
@id
en... |
Java | UTF-8 | 430 | 2.203125 | 2 | [] | no_license | package onlyselenium;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
public class Notepadwrite {
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
FileWriter fw=new FileWriter("F:\\data.txt");
BufferedWriter br=new BufferedWrit... |
JavaScript | UTF-8 | 9,159 | 2.640625 | 3 | [
"MIT"
] | permissive | 'use strict';
const MAX_UART_LOG_LINES = 20;
const MENU_CONNECTION = 0;
const MENU_PROGRAMMING = 1;
let firmware_image;
let log_stdin_running = false;
let programming_active = false;
let is_connected = false;
let has_webserial = false;
let last_programming_failed = false;
let programmer;
const el = {};
el.menu_but... |
Java | UTF-8 | 167 | 2.328125 | 2 | [] | no_license | package hsMain;
public class CardWarrior extends Card {
public CardWarrior (String n,int m, int a, int l){
super(n,m,a,l);
super.faction=Faction.WARRIORS;
}
}
|
Python | UTF-8 | 5,325 | 2.640625 | 3 | [
"MIT"
] | permissive | import os
import pandas as pd
pd.options.mode.chained_assignment = None # default='warn'
from dc.utils.dbwrap import Dbwrap
from dc.utils.commun import Commun
class User:
func = Commun()
conf = func.config_info()
db = Dbwrap(conf["path_to_database"])
def add_user(self, username, userpass... |
JavaScript | UTF-8 | 203 | 2.765625 | 3 | [] | no_license | function criarProduto(nome, preco){
return {
nome: nome,
preco: preco,
desconto: 0.1
}
}
console.log(criarProduto("Iphone", 9999.99))
console.log(criarProduto("Samsung Galaxy", 8888.99)) |
Java | UTF-8 | 1,364 | 1.929688 | 2 | [] | no_license | package com.maple.pojo;
import java.io.Serializable;
public class Produc implements Serializable {
private Integer id;
private String compyid;
private String produname;
private String producontent;
private String produurl;
private String produpic;
public Integer getId() {
re... |
Java | UTF-8 | 1,922 | 3.484375 | 3 | [] | no_license | import java.io.File;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;
class six {
private static void multiply() throws Exception {
File file=new File("data.txt");
Scanner scan=new Scanner(file);
String num1=scan.nextLine();
String num2=scan.nextLine();
scan.close();
Array... |
Java | UTF-8 | 265 | 1.828125 | 2 | [] | no_license | package com.uprr.app.tng.spring.diagnosis.service;
import com.uprr.app.tng.spring.diagnosis.pojo.PatientHistory;
public class PatientHistoryService {
public PatientHistory getPatientHistory(final Long patientId) {
return new PatientHistory();
}
}
|
TypeScript | UTF-8 | 1,609 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | import { EndLexer } from "lexer/lexers/EndLexer";
import { LexerTokenTypes } from "token/types/LexerTokenTypes";
import { expectTokenType } from "../../helper/lexer/CompareTokenType";
import { createLexer } from "../../helper/lexer/CreateLexer";
import snapshot = require("snap-shot-it");
describe("EndLexer", function... |
C | UTF-8 | 440 | 3.640625 | 4 | [] | no_license | #include<stdio.h>
#include<string.h>
int main()
{
struct student
{
int number;
char name[20];
char sex;
int age;
char addr[20];
};
struct student s[3]={
{10000,"Zhang",'m',21,"Shang Hai"},
{10001,"Li",'f',20,"Bei Jing"}
};
s[2].number=10002;
s[2].sex='m';
s[2].age=22;
strcpy(s[2].name,"Liu");
s... |
Markdown | UTF-8 | 7,583 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | ---
slug: /en/operations/named-collections
sidebar_position: 69
sidebar_label: "Named collections"
---
# Storing details for connecting to external sources in configuration files
Details for connecting to external sources (dictionaries, tables, table functions) can be saved
in configuration files and thus simplify th... |
Java | UTF-8 | 588 | 2.421875 | 2 | [] | no_license |
class Student
{
private int year;
private String onoma;
private String epitheto;
private int sunoloPerasmenwn;
private int examhnoFoit;
private Date1 dateEisa;
public Student(int y, String o, String e, int sp, int ef, Date1 de)
{
year=y;
onoma=o;
epithe... |
Java | UTF-8 | 143 | 2.125 | 2 | [] | no_license | package UserModule;
import java.util.List;
public interface Sensor {
public List<Float> calculateValuesOfSensors(List<Float> sensorData);
}
|
PHP | UTF-8 | 5,772 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
class Noticia
{
//atributos da classe
private $codnoticia;
private $titulo;
private $autor;
private $data;
private $conteudo;
private $imagem;
private $codcategoria;
//métodos de acesso GET/SET
function __get($atributo){
return $this->$atributo;
}
function __set($atributo,$novovalor){
$this->$a... |
C++ | UTF-8 | 933 | 3.578125 | 4 | [] | no_license | #include<iostream>
using namespace std;
class node{
public:
int data;
node*next;
node(int d){
data=d;
next=NULL;
}
};
void insert(node*&head,node*&tail,int data){
node*n=new node(data);
if(head==NULL){
n->next=head;
head=n;
tail=n;
}
else{
... |
JavaScript | UTF-8 | 434 | 3.421875 | 3 | [] | no_license | const curry = (fn) => {
return (...args) => {
return fn.bind(null, ...args);
};
};
const pipe = (f) => f;
const split = curry((separator, string) => string.split(separator));
const join = curry((separator, arr) => arr.join(separator));
const map = curry((fn, arr) => arr.map(fn));
const toLower = (x) => x.toLo... |
JavaScript | UTF-8 | 1,207 | 2.6875 | 3 | [] | no_license | function init()
{
let scene = new THREE.Scene();
let camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.z = 10;
let renderer = new THREE.WebGL1Renderer({alpha: true, antialias: true});
renderer.setClearColor(0... |
C++ | UTF-8 | 1,097 | 2.765625 | 3 | [] | no_license | //Exercicios arvore
int soma(Apontador *no){
if(no != nullptr){
return no->item.chave +soma(no->esq) + soma(no->dir);
}
return 0;
}
int maiorBinario(Apontador *no){
if(no->dir != nullptr){
return maiorBinario(no->dir);
}
return no->item.chave;
}
int somaFolhas(Apontador *no){
... |
Java | UTF-8 | 7,122 | 2.375 | 2 | [] | no_license | package htw.GameUi;
import java.io.IOException;
import java.util.List;
import htw.ClientAdapter.PlayerClientAdapter;
import htw.GameManagmentInter.Game;
import htw.PlayerManagementInter.Player;
import htw.VocabularyManagmentInter.VocabularyListDTO;
import javafx.concurrent.WorkerStateEvent;
import javafx.event.Action... |
Java | UTF-8 | 2,789 | 2.15625 | 2 | [
"MIT"
] | permissive | package cat.xarxarepublicana.hashtagsxrep.infrastructure.security;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.authentication.Userna... |
Java | UTF-8 | 436 | 2.09375 | 2 | [] | no_license | import Attractions.Attraction;
import org.junit.Before;
import org.junit.Test;
import static junit.framework.TestCase.assertEquals;
//
//public class AttractionTest {
//
//
// Attraction rollercoaster;
// Attraction dodgems;
// Attraction park;
//
//
// @Before
// public void before(){
//
// }
//
// ... |
PHP | UTF-8 | 961 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php namespace AdammBalogh\Box\Command\Content\File;
use AdammBalogh\Box\Command\AbstractCommand;
use AdammBalogh\Box\GuzzleHttp\Message\PostRequest;
use GuzzleHttp\Post\PostBody;
use GuzzleHttp\Post\PostFile;
use AdammBalogh\Box\Request\ExtendedRequest;
class UploadNewFileVersion extends AbstractCommand
{
/**
... |
Markdown | UTF-8 | 5,836 | 2.546875 | 3 | [] | no_license | ---
author: cristim
comments: true
layout: post
categories:
- AWS
- EC2
- Spot
---
I was quite busy over the last couple of months and it's been a while since I
last blogged about [AutoSpotting](https://github.com/cristim/autospotting), but
since today I touched it in a meaningful but kind of trivial way after a numbe... |
Java | UTF-8 | 354 | 1.898438 | 2 | [] | no_license | package better.me.repositories;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import better.me.modelDB.AllergenDB;
@Repository
public interface IAllergenRepository extends JpaRepository<AllergenDB, Long> {
Optional<Allerg... |
Java | UTF-8 | 989 | 1.8125 | 2 | [] | no_license | package com.otoil.dbcomparator.client.resources.icons;
import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.ImageResource;
public interface DBComparatorResources extends ClientBundle
{
public static final DBComparatorResources INSTANC... |
Markdown | UTF-8 | 13,069 | 3.265625 | 3 | [] | no_license |
[TOC]
# Design Pattern in JS
## Singleton
> Ensure a class has only one instance, and provide a global point of access to it.
using a method to get the instance:
```js
const singleton = function(name) {
this.name = name
this.instance = null
}
singleton.prototype.getName = function() {
console.log(this.nam... |
TypeScript | UTF-8 | 1,407 | 2.75 | 3 | [] | no_license | import { Request, Response } from 'express';
import User, { IUser } from '../models/users';
import jwt from 'jsonwebtoken';
import config from '../config/config';
function createToken(user: IUser) {
return jwt.sign({ id: user.id, email: user.email }, config.jwtSecret, {
expiresIn: 84000
});
}
export... |
Python | UTF-8 | 1,487 | 2.875 | 3 | [
"MIT"
] | permissive | # -*- coding:utf-8 -*-
from time import strftime, localtime, time
# 功能:记录整理的文件夹、整理的时间
# 参数:错误信息
# 返回:无
# 辅助:os.strftime, os.localtime, os.time,
def record_start(root_choose):
msg = '已选择文件夹:' + root_choose + ' ' + strftime('%Y-%m-%d %H:%M:%S', localtime(time())) + '\n'
txt = open('【可删除】失败记录.txt', 'a', encodin... |
Markdown | UTF-8 | 4,988 | 2.75 | 3 | [] | no_license | # Article 228-9.05 quater
Installations d'antennes
1. Antennes VHF, MF, et HF. Elles doivent être installées dans des endroits dégagés situés dans les hauts du navire et de manière à éviter les interférences électromagnétiques entre elles.
Les récepteurs non spécifiquement dédiés à la veille ASN peuvent utiliser les... |
Go | UTF-8 | 1,328 | 3.203125 | 3 | [
"MIT"
] | permissive | package edtf
import (
"encoding/csv"
"fmt"
"io"
"os"
)
type row struct {
input string
err string
vals []string
}
type fixtureReader struct {
cols []string
csv *csv.Reader
}
func newFixtureReader(filename string, cols []string) (*fixtureReader, error) {
f, err := os.Open(filename)
if err != nil {
re... |
Java | UTF-8 | 29,353 | 1.625 | 2 | [] | no_license | package com.tenderWatch;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.InputType;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.method.HideReturnsTransformationMethod;
import android.te... |
Swift | UTF-8 | 369 | 2.53125 | 3 | [
"MIT"
] | permissive | //
// Abstraction.swift
// MyFancyWeatherApp
//
// Created by Sanad Barjawi on 28/11/2020.
//
import Foundation
protocol Configurable {
var cellIdentifier: String? {get}
}
extension Configurable {
var cellIdentifier: String? {get {"not implemented"} set{}}
}
protocol CellableDelegate: class {}
protocol C... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.