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
JavaScript
UTF-8
677
3.328125
3
[]
no_license
/* * @lc app=leetcode id=563 lang=javascript * * [563] Binary Tree Tilt */ /** * Definition for a binary tree node. * function TreeNode(val) { * this.val = val; * this.left = this.right = null; * } */ /** * @param {TreeNode} root * @return {number} */ const findSum = node => { if (!node) return 0...
C
UTF-8
740
3.609375
4
[]
no_license
#include <stdio.h> int main(){ int i, j, n=0, tmp, A[7]; for(i=0; i<7; i++){ printf("A[%d] : ", i+1); scanf("%d", &tmp); if(tmp == 0) break; else A[i] = tmp; n++; } if(n==0) printf("\nThe array A has no element!!!"); else{ printf("\nThe array A is : "...
Java
UTF-8
115
1.882813
2
[]
no_license
package org.acouster.data.GraphLogic; public interface IFsmInputListener { void handleCommand(String command); }
JavaScript
UTF-8
2,179
2.59375
3
[ "MIT" ]
permissive
import _ from 'lodash'; import * as firebase from 'firebase'; import events from 'events'; import Heatmap from './heatmap'; class Hotometer extends events.EventEmitter{ constructor(token) { super(); this.token = token; this.state = 'home'; this.heatmap = new Heatmap(this.display)...
Python
UTF-8
2,742
3.4375
3
[]
no_license
import numpy as np import tensorflow as tf corpus_raw = 'He is the king . The king is royal . She is the royal queen ' # convert to lower case corpus_raw = corpus_raw.lower() words = [] for word in corpus_raw.split(): if word != '.': # because we don't want to treat . as a word words.append(word) words =...
PHP
UTF-8
2,867
2.875
3
[]
no_license
<?php /* * Githeri.com Copyright 2013. All Rights Reserved. */ include_once "./resources/php/functions/sqlconnectandselect.php"; session_start(); $username = dbSanitise($_SESSION["user_name"]); $getuserid = "SELECT user_id FROM users WHERE user_name = '".$username."'"; $result = selectFromDB($getuser...
Swift
UTF-8
2,736
2.578125
3
[ "Apache-2.0" ]
permissive
// // ChoosePhotoFromAlbumViewController.swift // Pictureagram // // Created by Kymberlee Hill on 3/23/18. // Copyright © 2018 Kymberlee Hill. All rights reserved. // import UIKit class ChoosePhotoFromAlbumViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate { ...
Go
UTF-8
384
3.71875
4
[ "MIT" ]
permissive
package main import "fmt" // 定义结构体 type Student struct { id int name string score float64 } func main() { students := []Student{ Student{ 101, "张三", 100, }, Student{ 102, "李四", 96, }, Student{ 103, "王五", 91, }, } fmt.Println(students) for i := 0; i < len(students); i...
C
UTF-8
1,152
3.484375
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #defineMAX_SIZE10 typedef struct { int key; }element; elementheap[MAX_SIZE]; void insert(elementitem,int*n) { int i; if((*n)==MAX_SIZE-1) { printf("HeapFull\n"); return; } i=++(*n); while(i!=1&&item.key>heap[i/2].key) { heap[i]=heap[i/2]; i/=2; } heap[i]=item; } elementdeleteHeap(i...
C
UTF-8
574
2.921875
3
[]
no_license
#include<stdio.h> int main() { int n,i,temp,j,a[1000],b[1000],c[1000]; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d %d",&b[i],&c[i]); if(i==0) { a[i]=c[i]; // printf("%d\n",i); } else if(i!=0) { a[i]=a[i-1]-b[i]+c[i]; ...
C
UTF-8
1,911
4.53125
5
[]
no_license
/* Author is : Ibrahim Halil GEZER 5.32 (Guess the Number) Write a C program that plays the game of “guess the number” as follows: Your program chooses the number to be guessed by selecting an integer at random in the range 1 to 1000. The program then types: I have a number between 1 and 1000. Can you guess my ...
PHP
UTF-8
1,262
2.546875
3
[ "MIT" ]
permissive
<?php namespace PhpDesignPatternsCheatsheet\Tests\Behavioral\State; use PhpDesignPatternsCheatsheet\Behavioral\State\EntityInterface; use PhpDesignPatternsCheatsheet\Behavioral\State\BreakState; use PHPUnit\Framework\TestCase; class BreakStateTest extends TestCase { public function testChangeEntity() { ...
Python
UTF-8
958
3.265625
3
[ "Apache-2.0" ]
permissive
from typing import Optional import numpy as np import pandas as pd TRANSFORMATION_METHODS = {'log10', 'squareroot', 'cuberoot', 'log2'} def transform(method: Optional[str], table: pd.DataFrame) -> pd.DataFrame: table = table.astype(np.float64) if method is None: table = table elif method == 'log...
Python
UTF-8
136
3.046875
3
[]
no_license
def reverse_odd(string): words = string.split(" "); return " ".join(word[::-1] if len(word) %2 != 0 else word for word in words);
Markdown
UTF-8
879
2.96875
3
[]
no_license
# Como manejar la asincronia ## [Promesas](./Promises.js) * > Para hacer uso de las promesas debemos crear una funcion la cual retorne una instancia de una promesa, esta va a recibr uns funcion con dos parametros `resolve` y `reject`. * >`resolve`: se va encargar de ejecutar las funciones que ejecutar las funcio...
Python
UTF-8
259
3.515625
4
[]
no_license
p=int(input("Enter Principal Amount : ")) r=float(input("Enter Rate of Interest p.a. : ")) t=float(input("Enter Number of years : ")) i=(p*r*t)/100 print ("Interest will be :", i) a=p+i print ("Amount will be :", a) input("Press ENTER to Exit....")
Go
UTF-8
10,515
2.71875
3
[ "Apache-2.0" ]
permissive
package main import "github.com/sybrexsys/RapidKV/datamodel" import "strconv" func hdelCommand(db *Database, key string, command datamodel.DataArray) datamodel.CustomDataType { hkey, err := getKey(command, 0) if err != nil { return datamodel.CreateError("ERR Unknown parameter") } return db.ProcessValue(key, tru...
Markdown
UTF-8
4,112
3.015625
3
[ "Apache-2.0" ]
permissive
# Advent of Code 2020 :santa: :christmas_tree: :snowman: :sparkles: [Advent of Code](https://adventofcode.com/) using TypeScript. There's no need to *build* anything. Source files are transpiled and cached on-the-fly using [esbuild-runner](https://github.com/folke/esbuild-runner/) with pretty much **zero overhead**....
Python
UTF-8
527
3.28125
3
[]
no_license
import sys def counting_sheep(N): res = set() if N == 0: return 'INSOMNIA' num = N while True: [res.add(c) for c in str(num)] if len(res) == 10: return num num += N def main(): filename = sys.argv[1] with open(filename, 'r') as f: count = in...
Python
UTF-8
11,148
2.65625
3
[ "MIT" ]
permissive
# coding=utf-8 __author__ = 'kdq' from gbm import LeastSquaresLoss, LogisticLoss, PairwiseLoss import numpy as np # logistic function from scipy.special import expit from mla.base import BaseEstimator from mla.ensemble.base import mse_criterion from mla.ensemble.tree import Tree from sklearn.tree import DecisionTreeCla...
JavaScript
UTF-8
1,540
2.84375
3
[ "MIT" ]
permissive
import { useState, useEffect } from "react" import { getPos, calcDistance } from '../utils/location' const funcs = { alphabetically: async arr => { return arr.sort((a, b) => String(a.name).localeCompare(b.name)) }, "delivery price": async arr => { return arr.sort((a, b) => a.delivery_price ...
Markdown
UTF-8
1,721
3.71875
4
[ "MIT" ]
permissive
# Chemical-Unscrambler This python program outputs a list of the possible words that could be made with the symbols of input chemicals. # How to use 1. Open the IDE: [https://Chemical-Unscrabler.nexussi14.repl.run/](https://Chemical-Unscrabler.nexussi14.repl.run/) 2. Wait for the Prompt 3. Enter a list of element nam...
Python
UTF-8
4,040
2.75
3
[]
no_license
import getpass import os import textwrap import pandas as pd from constants import ACTION_PROMPT from constants import CURRENT_WORKING_DIRECTORY from constants import DEFAULT_FILEPATH from constants import FILENAME_PROMPT from constants import FILENAME_PROMPT_ERROR from constants import FILENAME_PROMPT_EXPLANATION fr...
Java
UTF-8
535
1.875
2
[ "MIT" ]
permissive
package fr.laposte.sv.project.back.repository; import fr.laposte.sv.project.back.model.SvSuivi; import fr.laposte.sv.project.back.model.WebService; import org.springframework.data.jpa.repository.JpaRepository; import java.time.LocalDate; import java.util.Set; public interface SvSuiviRepository extends JpaRepository<...
Java
GB18030
1,574
2.640625
3
[]
no_license
package util; import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Properties; import java.util.ResourceBundle; /** * @author : yyh * @date ʱ䣺201876 10:28:50 * @version 1.0 */ public class DBUtil { ...
C
UTF-8
2,989
2.765625
3
[ "MIT" ]
permissive
/* * Program: Software Renderer * File: win32_main.c * Lesson: 1.1 * Description: example of creating a basic window in win32. * */ #include <windows.h> #include <stdint.h> #define global_variable static typedef int8_t int8; typedef int16_t int16; typedef int32_...
Python
UTF-8
1,635
2.59375
3
[]
no_license
import base64 from typing import Any import lz4 import numpy as np def dict_to_ndarray(d: dict): if d is None: return None else: b = base64.b64decode(d["ndarray"]) if d["compression"] == "lz4": b = lz4.frame.decompress(b) return np.frombuffer( b, ...
Python
UTF-8
880
3.859375
4
[]
no_license
class Solution: def letterCombinations(self, digits: str) -> List[str]: if len(digits) == 0: return [] combs = [] letters = {"2": "abc", "3": "def", "4": "ghi", "5": "jkl", "6": "mno", "7": "pqrs", "8": "tuv", "9": "wxyz"} def backtrack(...
Markdown
UTF-8
1,248
2.578125
3
[]
no_license
## 操作场景 堡垒机系统具备统一管理用户功能,下面将为您详细介绍如何在堡垒机创建用户。 ## 操作步骤 1. 登录腾讯云 [堡垒机控制台](https://console.cloud.tencent.com/dsgc/bh),并使用管理员账号登录堡垒机。 2. 单击【用户管理】,进入用户管理页面。 3. 单击【新建】,进入添加添加用户页面,配置如下用户信息。 - 用户 ID:输入用户 ID,即用于登录堡垒机的账号。 - 用户名称:输入用户名称。 - 口令:输入用户的密码。 - 确认口令:确认用户密码。 - 用户类型:默认为其他,并勾选“运维用户”。若您需更换类型,请先创建用户类型,详细配置请查看 [添加用户类型...
Markdown
UTF-8
1,161
2.53125
3
[]
no_license
# Tutorial 13) Grasping objects ## Prerequisites - Tutorial 6, 7 9, 12 ## Tutorial Combining all previous tutorials allows us to manipulate objects with use of the world model. A motion planner for manipulation, e.g. MoveIt! can create a `trajectory_msgs/JointTrajectory` messages that can be used by the low level ...
Markdown
UTF-8
578
2.984375
3
[]
no_license
#Shamir's Secret Sharing Algorithm I wanted to learn a Haskell without doing any great amount of good, so I decided to try my hand at a random cryptographic algorithm. [Shamir's Secret Sharing](https://en.wikipedia.org/wiki/Shamir's_Secret_Sharing) was just what the doctor ordered. This is one of the first things I ev...
C
UTF-8
201
3.15625
3
[]
no_license
#include <stdio.h> int main(){ int i; for(i=0;i<=4;i++){ pstar(i*2+1); } } pstar(num) int num; { int i; for(i=1;i<=num;i++){ printf("*"); } printf("\n"); }
Java
UTF-8
1,880
1.578125
2
[]
no_license
package net.f; import java.util.Iterator; import net.xn; import net.cp.v; import net.f.l; import net.nb.f; import net.nn.j; import net.y.p; import net.y.r; import net.y.u; import net.yy.g; public class o implements l.g { private final j k; public o(j var1) { this.k = var1; } public void X(float va...
Markdown
UTF-8
43,860
2.9375
3
[]
no_license
--- jupyter: jupytext: formats: ipynb,md text_representation: extension: .md format_name: markdown format_version: '1.2' jupytext_version: 1.4.0 kernelspec: display_name: Python 3 language: python name: python3 --- *by Guillaume Le Fur, Abderrahmane Lazraq and Leonardo N...
C
UTF-8
6,812
2.65625
3
[]
no_license
#include "enemi.h" #include "../definitions.h" #include <math.h> void init_enemi(Enemi enemi[]) { int i; for(i=0; i<NBENEMIS; i++) { enemi[i].type=INCONU; enemi[i].active= NULL; enemi[i].bis=NULL; enemi[i].bgX=0; enemi[i].dir=RIGHT; } } void move_enemi(Enemi e...
Java
UTF-8
1,154
3.828125
4
[]
no_license
package sorting; public class HeapSort { public static void main(String[] args) { int[] input = {9,5,8,10,4,2,56,87}; DoHeapSort(input); print(input); } static void DoHeapSort(int[] input){ int heapSize = input.length; for (int i = heapSize/2-1; i >= 0; i--) { MaxHeapify(input,heapSize, i); } ...
Java
UTF-8
699
3
3
[]
no_license
package formatting.Date; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; /** * Created by nbkf on 27/12/2559. */ public class Date2 { public static void main(String args[]) { Date dNow = new Date( ); SimpleDateFormat ft = //EE = วันย่อ EEEE วันเต็ม ...
Python
UTF-8
481
3.140625
3
[]
no_license
# Why scrapping # Have access to information on the web #Can be done using a Library called beautiful soup # If you're looking for an update on the information import urllib.parse,urllib.request, urllib.error from bs4 import BeautifulSoup import ssl url = input('Enter -->:') html = urllib.request.urlopen...
Java
UTF-8
767
2.015625
2
[]
no_license
package com.airbnb.p027n2.primitives; import com.airbnb.p027n2.primitives.TriStateSwitchHalf.OnCheckedChangeListener; /* renamed from: com.airbnb.n2.primitives.TriStateSwitch$$Lambda$1 */ final /* synthetic */ class TriStateSwitch$$Lambda$1 implements OnCheckedChangeListener { private final TriStateSwitch arg$1; ...
Markdown
UTF-8
16,168
3.015625
3
[ "MIT" ]
permissive
--- layout: post title: Block subtitle: date: 2020-07-27 author: LML header-img: img/post-bg-ios9-web.jpg catalog: true tags: - 内存 --- # 前言 本系列是 iOS Memory 相关内容作为主题的第二篇。本篇主要介绍 Block 内存原理、循环引用的原理。在看本文之前,可以先思考一下一个问题,然后在文中找到答案。 + 如何定义一个 Block? + Blcok 到底是什么? + Block 有几种类型,有什么区别 + __block 修饰符的原...
Java
UTF-8
3,180
1.96875
2
[]
no_license
package annotator.tuke.urbansensing.org.POJO; import java.util.HashMap; import java.util.Map; import javax.annotation.Generated; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import org.codehaus.jackson.annotate.JsonAnyGetter; import org.codehaus.jackson.annotate.JsonAn...
Markdown
UTF-8
538
2.84375
3
[]
no_license
# Snake-Game A small JavaScript game Title : Snake-Game Author : Clément Landais (while following apprendre-a-coder.com JavaScript formation) Used Languages : JavaScript, HTML, CSS To play : Download all files and open index.html in your Web browser Rules : A classic snake game. Try to eat as many apples as you ca...
Java
UTF-8
1,203
2.1875
2
[]
no_license
package fr.eisti.gsi2.repositories; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import fr.eisti.gsi2.entities.AnnonceEntity; public interface AnnonceRepository exten...
Java
UTF-8
604
3.3125
3
[]
no_license
import java.util.*; public class derived extends base { Scanner sc = new Scanner(System.in); derived() { System.out.println("Enter the width"); int w = sc.nextInt(); // sc.nextLine(); System.out.println("Enter the height"); int h = sc.nextInt(); width...
Swift
UTF-8
2,938
2.59375
3
[]
no_license
// // LoginViewController.swift // OpenWeatherAPI // // Created by Mac on 11/21/17. // Copyright © 2017 Mobile Apps Company. All rights reserved. // import UIKit import CoreData class LoginPage: PageView, UITextFieldDelegate { @IBOutlet weak var zipcode:UITextField! override func viewDidLoad() {...
PHP
UTF-8
1,302
2.625
3
[]
no_license
<?php require 'config.php'; ?> <?php if(isset($_POST['login'])) { $userName=$_POST['userName']; $password=$_POST['password']; $query="select * from fileuploadtable WHERE username='$userName' AND password='$password'"; $query_run = mysqli_query($con,$query); if(mysqli_num_rows($query_run)>0) ...
Java
UTF-8
293
2.5
2
[]
no_license
package main.java.com.lemsviat.javacore.chapter18; import org.jetbrains.annotations.NotNull; import java.util.Comparator; public class ComparatorFirstName implements Comparator<String> { public int compare (@NotNull String a, String b){ return a.compareToIgnoreCase(b); } }
TypeScript
UTF-8
249
2.796875
3
[]
no_license
export class Recipe{ public name:string; public description :string; public imagePath : string; constructor(name : string,description: string,imagePath:string){ this.imagePath=imagePath; this.name=name; this.description=description; } }
Rust
UTF-8
2,660
2.515625
3
[ "MIT" ]
permissive
/* Copyright (C) 2018-2019 de4dot@gmail.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
TypeScript
UTF-8
1,326
2.6875
3
[ "MIT" ]
permissive
import { Injectable } from '@angular/core'; import { Subject } from 'rxjs'; import { DateRange } from '../model/DateRange'; const reducer = (map:Map<string, string[]>, currentValue:string) => { var arr = currentValue.split('.'); var key = arr[0]; var value = arr[1]; if(!map.has(key)) { map.set(key, [val...
Java
UTF-8
2,377
2.875
3
[]
no_license
package model; import java.sql.Date; public class Product { private int product_Id; private String product_Name; private Date manufacture_Date; private char category; private int price; private int discount; private int total_quantity; private int available_quantity; public Product() { this.product_Id ...
C
UTF-8
2,013
3.15625
3
[]
no_license
/* 013.c COPYRIGHT FUJITSU LIMITED 2018 */ /* util_indicate_clone use pthread_create */ #include <pthread.h> #include "test_mck.h" #include "testsuite.h" SETUP_EMPTY(TEST_SUITE, TEST_NUMBER) TEARDOWN_EMPTY(TEST_SUITE, TEST_NUMBER) static void *child_thread_local(void *arg) { int ret; ret = get_system(); if (ret =...
Java
UTF-8
6,097
2.53125
3
[ "MIT" ]
permissive
package seedu.momentum.model.project.predicates; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static seedu.momentum.testutil.TypicalProjects.ALICE; import java.util.Arrays; import java.util.Collections; import java.util.List; import org...
Markdown
UTF-8
2,943
3.65625
4
[]
no_license
## Island Perimeter > You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. > > Grid cells are connected horizontally/vertically (not diagonally). The grid is completely surrounded by water, and there is exactly one island (i.e., one or more connected land cells)...
Ruby
UTF-8
22,424
3.25
3
[]
no_license
#!/usr/bin/env ruby boardwidth = 54 # board width in millimeters boardlength = 33 # board length in millimeters inset = 4 # screw hole distance from edges (also sets corner radii) horizontal = true # horizontal layout # XML class that can print itself out with indenting, attributes, and children class Xml ...
Shell
UTF-8
1,369
2.71875
3
[]
no_license
#!/bin/sh export subject_dir=nanoxml_v5 export version=3 echo copying to coverage_info cp -r ${subject_dir}/result/v${version}/componentinfo.txt Coverage_Info cp -r ${subject_dir}/result/v${version}/covMatrix.txt Coverage_Info cp -r ${subject_dir}/result/v${version}/error.txt Coverage_Info echo excuting python CAN.p...
Python
UTF-8
461
2.84375
3
[]
no_license
def binar(): for A in range(8): if A&4==0: continue for B in range(8): if B&2==1: continue for C in range(8): if C&1==0: continue X=(A&4)+((B&4)>>1)+((C&4)>>2) Y=((A&2)<<1)+(B&2)+((C&2)>>1) Z=((A&1)<<2)+((B&1)<<...
Java
UTF-8
5,596
2.75
3
[]
no_license
package com.musala.simple.students.spring.web.helper; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Properties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.gson.Gson; import com.musala.simple.students.spring.web.database.AbstractDatabase; imp...
Python
UTF-8
1,118
2.640625
3
[]
no_license
import os #Main Menu def mainMenu(): os.system("tput setaf 1") print(""" \t 1 : Basic Operation \t 2 : Package Management \t 3 : User Management \t 4 : Networking \...
C
UTF-8
1,385
3.015625
3
[]
no_license
/*====================================================== > File Name: write.c > Author: lyh > E-mail: > Other : > Created Time: 2016年03月20日 星期日 19时41分56秒 =======================================================*/ #include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<sys/types.h> #inc...
Markdown
UTF-8
7,111
2.609375
3
[]
no_license
# three js # 1. 添加材质和灯光 * new THERE.SpotLight()创建光源, * spotLight.position.set()设置光源位置 * scene.add(spotlight) 场景中加入光源 * 添加阴影-阴影效果会浪费较多资源, 一般默认不添加阴影: renderer.shadowMap.enabled = true; 默认false; * 对平面添加阴影: plane.receiveShadow = true * 对立方体添加阴影: cube.castShadow = true; * 打开球体阴影: sphere.castShadow = true; * 指定阴影可以生成光源sp...
Markdown
UTF-8
5,836
3.140625
3
[]
no_license
###The Council of Librarians ####Problem: The Decentralized Library of Alexandria is designed to avoid all central points of failure. The application itself is able to do this by relying on decentralized technology, but there still exists a central point of failure in the entity responsible for its future developmen...
Markdown
UTF-8
2,219
2.6875
3
[]
no_license
--- layout: post title: "Connect TomTom Runner to Vitality Health" permalink: "/blog/connect-your-tomtom-runner-to-vitality/" date: 2018-04-08 13:00:00 +0000 categories: blog author: Adam Moss comments: true body_class: blog reading-time: 5 mins photo: "/assets/featured/sync.png" --- ![Finished](/assets/posts/sync....
C#
UTF-8
362
2.578125
3
[ "MIT" ]
permissive
using System; namespace Tweezers.Schema.Exceptions { public sealed class ItemNotFoundException : Exception { private string Id { get; set; } public ItemNotFoundException(string id = null) { Id = id ?? string.Empty; } public override string Message => $"Cou...
C#
UTF-8
1,868
3.890625
4
[]
no_license
///Anton Brottare 13/9-2017 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace PetApplication { class Pet { /// Declaring the variables that will be used private string name; private int age; p...
Ruby
UTF-8
672
2.578125
3
[]
no_license
module AkerPermissionClientConfig def has_permission?(username_and_groups, role) permissions.any? do |permission| username_and_groups.include?(permission.permitted) && permission.attributes["permission-type"].to_s==role.to_s end end def self.included(base) base.instance_eval do |klass| d...
PHP
UTF-8
12,386
2.515625
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use DB; use App\SatelliteBranch; use Illuminate\Http\Request; use App\Http\Controllers\Controller; class SatelliteBranchController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function i...
C
IBM852
3,519
3.984375
4
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <math.h> float Somar (float, float); float Subtrair (float, float); float Multiplicar(float, float); float Dividir(float, float); float Raiz(float, float); float Potencia(float, float); float Seno(float); float Cosseno(float); int main () { int op; floa...
Java
UTF-8
186
1.585938
2
[]
no_license
package com.android.salesapp.bean; public class FollowUpCallBean { public int FCID; public int ProjectID; public String Date; public String Time; public int Reminder; }
PHP
UTF-8
3,297
2.734375
3
[ "Apache-2.0" ]
permissive
<?php namespace YBL\Kernel\Traits; use YBL\Kernel\Crypto\Keccak; use YBL\Kernel\Crypto\Signature; use YBL\Kernel\Support\Arr; use YBL\Kernel\Types\Byte; /** * Trait Metadata * @package YBL\Kernel\Traits */ trait MetadataTrait { /** * @var Byte */ private $privateKey; /** * @var Byte ...
Python
UTF-8
388
3.484375
3
[]
no_license
# Teste seu código aos poucos. # Não teste tudo no final, pois fica mais difícil de identificar erros. # Use as mensagens de erro para corrigir seu código. from math import* r = float(input("raio do tanque: ")) h = float(input("altura da coluna: ")) n = int(input("opcao: ")) if n == 1: v = (pi*h**2 * (3*r - h))/3 else...
Markdown
UTF-8
5,733
2.5625
3
[ "MIT", "Apache-2.0" ]
permissive
# 분산 및 다중 처리 시스템 ## 분산시스템 ________ ### 네트워크와 분산 시스템의 개념 - 컴퓨터 사용자 간 데이터 교환을 위해 네트워크로 상호 연결 - 분산 시스템과 다중 처리 시스템으로 구분 - 분산 시스템 - 메모리와 클록을 공유X - 지역 메모리를 유지하는 프로세서로 구성 - 서로 독자적으로 동작 - 다중처리 시스템 - 하나 이상의 프로세스로 구성 - 프로세스들이 메모리와 출력을 공유 ### 네트워크의 개념 ​ 서로 독립된 시스템 몇 개가 적절한 영역 안에서 속도가 빠른 통신 채널을 이용하여 ...
Java
UTF-8
9,139
1.90625
2
[]
no_license
package com.fiserv.CFCreateUserOrgSpacePermissions.controller; import static com.fiserv.CFCreateUserOrgSpacePermissions.CfCreateUserOrgSpacePermissionsApplication.getHttpClient; import static com.fiserv.CFCreateUserOrgSpacePermissions.CfCreateUserOrgSpacePermissionsApplication.localhost; import com.google.gson.Gso...
Java
UTF-8
1,024
2.53125
3
[]
no_license
package models; import com.fasterxml.jackson.annotation.JsonProperty; import javax.validation.constraints.NotNull; /** * Created by Laufey on 31/10/2016. */ public class ChangePasswordModel { public final static String mediaType = "application/json"; @NotNull @JsonProperty("oldPassword") String ...
Python
UTF-8
149
3.546875
4
[]
no_license
x = 5 y = 3 print(x * y) x = 10 y = 4 print(x // 4) x = 5 x /= 3 print(x) y = 3 y += 3 print(y) x = 5 y = 3 print(x<y) x = 10 y = 11 print(x==y)
Java
UTF-8
3,575
3.21875
3
[]
no_license
package ml.vandenheuvel.ti1216.data; import org.json.JSONObject; /** * Instances of this data class represents a chat message. */ public class ChatMessage { /** * Class-instances/variables. */ private int id; private String sender; private String message; private String receiver; private boolean seen; ...
Markdown
UTF-8
1,033
2.8125
3
[]
no_license
--- date: 2005-10-26 17:21:51 layout: post title: Lesser Evil --- One of the things I hear pretty often is "sometimes you just have to go with the lesser evil". Now, granted, I probably tend to get myself into situations that would spark that remark more often than is normal. But I'm sure most of you have heard it som...
JavaScript
UTF-8
1,932
2.703125
3
[]
no_license
const express = require('express'); const bcrypt = require('bcryptjs'); const db = require('./database/dbConfig.js'); const generateToken = require('./functions/generateToken.js'); const protected = require('./functions/protected'); const server = express(); server.use(express.json()); const PORT = 3300; server.post("...
JavaScript
UTF-8
1,890
3.25
3
[]
no_license
/** * Returns the midpoint between two points. * @param point1 First point. * @param point2 Second point. * @returns {[*,*,*,*]} Mid point */ function midPoint(point1, point2) { return [(point1[0] + point2[0]) / 1.5, (point1[1] + point2[1]) / 1.5, (point1[2] + point2[2]) / 1.5, (point1[3] + point2[3]) / 1.5]...
JavaScript
UTF-8
2,278
3.8125
4
[]
no_license
var garage = []; var splitCommand = new Array(); function handleCommand(command) { splitCommand = command.split(" "); if (command.includes("create") || command.includes("Create")) createCar(splitCommand[2], splitCommand[3], splitCommand[4], splitCommand[5]); else if (command.includes("check in") || command....
Java
UHC
927
3.828125
4
[]
no_license
package day9; import java.util.Scanner; public class ExamMethod2 { public static int scan1(int num1, int num2) { int bigger=0; if(num1>num2) { bigger = num1; }else { bigger = num2; } return bigger; } public static int scan2(int num1,int num2) { int res = num1%num2; return res; } public s...
Java
UTF-8
3,745
2.09375
2
[]
no_license
/* * Copyright 2013-2016 Emmanuel BRUN (contact@amapj.fr) * * This file is part of AmapJ. * * AmapJ is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License,...
Markdown
UTF-8
871
2.6875
3
[ "MIT" ]
permissive
--- layout: post title: "2022年前端大方向" date: 2022-06-15 tags: [note] --- 简述一下目前前端可能的各个领域方向。 ## 前端大方向 * Web体系:融合跨端以及标准化,在债务逐年积累之后,能看到标准化已日趋成为共识。 * 中后台:成熟场景下,对效率的极致追求,包括低代码工具,上下游研发流程,以及框架的融合(跨框架)。 * Serverless:前端向后的延展,NodeJS 的新代名词,处于基建发展阶段。 * 体验系统:与业务最具结合性,前端角色最具优势的用户行为分析,以及切入数据最佳的角度。 * 智能化:最具创新性的领域,但角色优势、业务落地场景待探索。 *...
Markdown
UTF-8
3,847
2.8125
3
[]
no_license
'''顺阳郡''',[[中国|中国]][[西晋|西晋]]时时设置的[[郡|郡]]。 == 历史 == [[太康_(西晋)|太康]]十年(289年)改[[南乡郡|南乡郡]]为顺阳郡,郡治在南乡县(今[[河南省|河南省]][[淅川县|淅川县]][[滔河乡|滔河乡]]老人仓一带)。统领八县,[[酂县|酂县]]、[[顺阳县|顺阳县]]、[[南乡县|南乡县]]、[[丹水县|丹水县]]、[[武当县|武当县]]、[[阴县|阴县]]、[[筑阳县|筑阳县]]、[[析县|析县]],共二万一百户。<ref>晋书/卷015/志第五/地理志下</ref>辖境约当今河南省[[西峡|西峡]]、淅川、[[老河口|老河口]]、[[丹江口|丹江口]]等市县和[[湖...
Python
UTF-8
7,848
3.375
3
[]
permissive
#!/usr/bin/env python2 """ lazylex/html.py - Low-Level HTML Processing. See lazylex/README.md for details. TODO: This should be an Oil library eventually. It's a "lazily-parsed data structure" like TSV2. """ from __future__ import print_function import re import sys def log(msg, *args): msg = msg % args print...
Python
UTF-8
139
4.34375
4
[]
no_license
# On the next line, use Python's print function to say `Hello World` in the console (this exercise is case-sensitive!) print("Hello World")
Markdown
UTF-8
581
3.15625
3
[]
no_license
# restapp - spring boot Movie : Long id; Sring tittle; String director; int yearOfProduction; Get: /movies/{id} ->get film by Id /movies -> get list of film Post: /movies -> add film Sample request: curl -i -H "Content-Type: application/json" -X ...
JavaScript
UTF-8
1,874
4.0625
4
[]
no_license
// A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). // The robot can only move either down or right at any point in time. The robot is trying to // reach the bottom-right corner of the grid (marked 'Finish' in the diagram below). // How many possible unique paths are ...
Java
UTF-8
929
2.84375
3
[]
no_license
package ac.za.cput.cardealership.domain.vehicle; public class Manufacturer { private String name; private String address; public Manufacturer(String name, String address) { this.name = name; this.address = address; } public String getName() { return name; } publi...
C#
UTF-8
6,075
2.71875
3
[]
no_license
using System; using System.Collections; using System.Collections.Generic; using System.Linq; namespace arookas { interface sunTerm { sunExpressionFlags GetExpressionFlags(sunContext context); } class sunExpression : sunNode, sunTerm { public sunExpression(sunSourceLocation location) : base(location) { } ...
JavaScript
UTF-8
4,798
2.59375
3
[]
no_license
import React, { Component } from "react"; //import { Carousel } from 'react-responsive-carousel'; //require ('react-responsive-carousel/lib/styles/carousel.css'); // import burger from './images/burger.jpg'; // import nachos from './images/nachos.jpg'; // import chinese from './images/chinese.jpg'; import axios from 'a...
C#
UTF-8
2,136
3.21875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Bug { class Nodo { // Esta clase crea nodos fijos // Se conectan a otros nodos con la lista de vecinos // No se utilizan objetos para las aristas publi...
PHP
UTF-8
2,506
3
3
[ "MIT" ]
permissive
<?php if (!function_exists('getSheetHeaderChar')) { /** * @param int $index * @return mixed */ function getSheetHeaderChar(int $index) { $key = $index; static $columnHeader = []; if (!isset($columnHeader[$index])) { $chars = ''; $asciiNumber =...
Java
UTF-8
382
1.789063
2
[]
no_license
package com.huawei.cloud; import org.ini4j.Config; import org.ini4j.Configurable; public class SettingsComponent implements Configurable { @Override public Config getConfig() { Config global = Config.getGlobal(); global.setGlobalSectionName("ServiceStage"); return global; } ...
C#
UTF-8
2,417
2.515625
3
[ "MIT" ]
permissive
using System.Collections.Generic; using System.Linq; using TravellerTracker.Models; using TravellerTracker.Support; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Media.Imaging; // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236 namespace T...
JavaScript
UTF-8
3,674
2.53125
3
[]
no_license
class Protocol{ on_connected(){} on_disconnected(){} on_message(message){} send(message){} } class IdentityProtocol extends Protocol { constructor(){ super() this.client_id=null; } on_message(message){ if(message.hasOwnProperty('unique_client_id')){ if(this.client_id==null){ ...
C++
UHC
1,410
2.703125
3
[]
no_license
#include "ChatServer.h" #include "LogicProcess.h" #include "UserManager.h" #include "RoomManager.h" #include <string> #include <iostream> #include <memory> void ErrorExit(const char* msg) { printf("%s\n", msg); exit(1); } int main() { const int SERVER_PORT = 9898; std::unique_ptr<LogicProcess> logicProces...
Markdown
UTF-8
5,873
3.25
3
[ "WTFPL" ]
permissive
--- title: Geek’s Guide to Menstrual Cups date: 2015-11-29 --- <img src="https://i.imgsafe.org/2380ccd.png" class="scaling left" alt="Geeks Guide to Menstrual Cups"/> #### What is a Menstrual Cup? A menstrual cup is a small cup (usually made of silicone) that sits in the vaginal canal to collect menstrual fluid. Th...
Markdown
UTF-8
1,972
2.546875
3
[]
no_license
# CARL The implementation of “A Context-Aware User-Item Representation Learning for Item Recommendation”, Libing Wu, Cong Quan, Chenliang Li, Qian Wang, Bolong Zheng, Xiangyang Luo, https://dl.acm.org/citation.cfm?id=3298988 ## Requirements Tensorflow 1.2 Python 2.7 Numpy Scipy ## Data Preparation To run CARL, 6 ...
C#
UTF-8
1,026
2.734375
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml.Linq; namespace Datengenerator.Kern { class FeldVsTage : Feld { public readonly Random Prop; public FeldVsTage(XElement xml, Random r, Random prop) : base(xml, ...