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
C#
UTF-8
1,100
3
3
[]
no_license
public class Sender { public Sender() { Messenger.Default.Register<NotificationMessage>(this, message => { if ((Type)message.Target == typeof(Sender)) GotResponse(message.Notification); }); } ...
PHP
UTF-8
1,423
2.8125
3
[ "Apache-2.0" ]
permissive
<?php namespace duncan3dc\LaravelTests; use duncan3dc\Laravel\ConditionHandler; use PHPUnit\Framework\TestCase; class ConditionHandlerTest extends TestCase { /** @var ConditionHandler */ private $handler; public function setUp(): void { $this->handler = new ConditionHandler(); } p...
Java
UTF-8
414
1.820313
2
[ "MIT" ]
permissive
package com.primeradiants.oniri.novent.dto; import java.util.List; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; /** * Simple bean representing a list of novents * @author Shanira * @since 0.1.0 */ @AllArgsConstructor @NoArgsConstructor @Getter @Se...
C#
UTF-8
3,021
2.609375
3
[ "MIT" ]
permissive
namespace Molten.Graphics { public class ShaderCompilerContext { /// <summary> /// HLSL shader objects stored by entry-point name /// </summary> public Dictionary<string, ShaderCodeResult> Shaders { get; } internal ShaderCompileResult Result { get; } internal ...
C#
UTF-8
612
2.578125
3
[]
no_license
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WordpressAutomation.Util { public class FileLogger { public static string logPath = @"C:\iCode\Selenium\Wordpress\WordpressAutomation\WordpressAutomation\Log"...
JavaScript
UTF-8
1,767
2.6875
3
[]
no_license
import React, {Component, useState, useEffect} from 'react' // export default function PhotoInfo({photo}) { class PhotoInfo extends Component { state = { id: 0, albumId: '', title: '', thumbnailUrl: '' } // let obj = {} // const obj = { // url : '', // i...
Java
UTF-8
1,932
2.015625
2
[]
no_license
/******************************************************************************* * Copyright (c) 2016, Huawei Technologies Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *...
Python
UTF-8
1,654
3.609375
4
[]
no_license
from collections import defaultdict import sys #Class to represent a graph class Graph: def __init__(self,vertices): self.V= vertices self.graph = [] def addEdge(self, u, v, w): self.graph.append([u,v,w]) def find(self, parent, i): if parent[i] == i: return i ...
PHP
UTF-8
2,854
2.859375
3
[]
no_license
<?php /** * FileMaker PHP API. * * @package FileMaker * * Copyright � 2005-2006, FileMaker, Inc.� All rights reserved. * NOTE:� Use of this source code is subject to the terms of the FileMaker * Software License which accompanies the code.� Your use of this source code * signifies your agreement to such license...
PHP
UTF-8
3,189
2.53125
3
[]
no_license
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Login</title> <link rel="stylesheet" h...
PHP
UTF-8
870
2.796875
3
[]
no_license
<?php /** * @file FrxHtmlDoc * Straight html document with no wrapping theme. * @author davidmetzler * */ class FrxHtmlDoc extends FrxDocument { public function render($r, $format, $options = array()) { $css = $this->loadCSSFiles($format); $output = '<html><head>'; $output .= '<meta http-equiv="Conte...
C
UTF-8
800
3.375
3
[]
no_license
int is_space(char c) { if (c == ' ' || (c >= '\t' && c <= '\n')) return (1); return (0); } int is_valid(char c, int base) { char hexL[16] = "0123456789abcdef"; char hexU[16] = "0123456789ABCDEF"; while (base-- > 0) { if (c == hexL[base] || c == hexU[base]) return (1); } return (0); } int convert_n...
PHP
UTF-8
766
2.578125
3
[]
no_license
<?php /** * 输出url * * @param array $params 参数 * @param Smarty $template 模板实例 * @return string 地址 */ function smarty_function_url ($params, $template) { $host = Url::getInstance()->getHost($params['host']); $proxy = isset($params['proxy']) ? trim($params['proxy']) : PROX...
Markdown
UTF-8
38,951
2.75
3
[]
no_license
# mysql命令总结 本文档在CentOS 6.9操作系统下,基于yum安装的mysql5.1版本完成。 ## 数据库操作 ### 指定字符集创建数据库 create database python default character set utf8 collate utf8_general_ci; ``` mysql> create database python default character set utf8 collate utf8_general_ci; Query OK, 1 row affected (0.00 sec) ``` **说明:** 1. python是我创建的数据库名称,下文会多次使用或出现...
SQL
UTF-8
475
2.859375
3
[]
no_license
CREATE TYPE category AS ENUM( 'Tea', 'Pills', 'Counseling', 'Plant-based', 'Body-care', 'Recipes' ); CREATE TABLE holistic_users_inventory( id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, user_id INTEGER REFERENCES holistic_users(id), service_name TEXT NOT NULL, price N...
TypeScript
UTF-8
434
2.5625
3
[ "Apache-2.0" ]
permissive
import { fmod as _fmod } from "@thi.ng/math"; import { ARGS_VV, defHofOp } from "./internal/codegen"; import { FN2 } from "./internal/templates"; /** * This version of mod uses the same logic as in GLSL, whereas `mod` * merely uses JavaScript's `%` modulo operator, yielding different * results for negative values. ...
C++
UTF-8
796
2.578125
3
[]
no_license
#include <iostream> #include <ctime> // Header files #include "weather.h" #include "io_control.h" using namespace std; int main(int argc, char *argv[]) { flags *f = update_flags(argc, argv); init_io(); char weather[20]; bool pressed = false; // While the exit button has not been pressed w...
Java
WINDOWS-1252
544
3.15625
3
[]
no_license
package patterns.builder.case1; public class TextBuilder extends Builder { @Override public void setTitle(String title) { getStr().append("========================\n"); getStr().append("[" + title + "]\n"); } @Override public void addItems(Student[] items) { for(Student s:items) { getStr...
JavaScript
UTF-8
1,249
2.65625
3
[]
no_license
import React, { Component } from 'react'; import Header from './components/Header'; import Present from './components/Present'; import './App.css'; class App extends Component { constructor(props) { super(props) this.state = { presents: [] } }; addItem = ( id ) => { const { presents } = this....
Java
UTF-8
2,642
3.296875
3
[]
no_license
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.StringTokenizer; public class Main { public static void main(String[] args) { // AtCoder Beginner Contest 038 // https://atcoder.jp/contests/abc038/tasks/ FastReader sc = ne...
Python
UTF-8
958
4.4375
4
[]
no_license
""" Write a function that calculates overtime and pay associated with overtime. * Working 9 to 5: regular hours * After 5pm is overtime Your function gets a list with 4 values: * Start of working day, in decimal format, (24-hour day notation) * End of working day. (Same format) * Hourly rate * Overtim...
C#
UTF-8
2,354
2.65625
3
[]
no_license
using GraphQLDemo.Data.Models; using Microsoft.Data.SqlClient; using Microsoft.Extensions.Logging; using Polly; using Polly.Retry; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GraphQLDemo.Data.Context { public class CourseManagementS...
C++
UTF-8
1,360
3.484375
3
[]
no_license
#include "Mat4.hh" mat4::mat4(float val){ for (int i = 0; i < 4; i++){ matrix[i][0] = val; matrix[i][1] = val; matrix[i][2] = val; matrix[i][3] = val; } } mat4::mat4(float a1, float a2, float a3, float a4, float b1, float b2, float b3, float b4, float c1, float c2, float c3, float c4, float d1, fl...
Markdown
UTF-8
3,075
3.109375
3
[]
no_license
* 介绍如何配置组件,使其能够最大化地利用浏览器的缓存能力来改善页面的性能。 * 长久的Expires头最常用于图片,但应该将其用在所有组件上,包括脚本、样式表和Flash。 ## Expires ## Max-age和mod_expires * Expires头使用一个特定的时间,它要求服务器和客户端的时钟严格同步。另外,过期日期需要经常检查,并且一旦未来这一天 到来了,还需要在服务器配置中提供一个新的日期。 * Cache-Control * 使用带有max-age的Cache-Control可以消除Expires的限制,但对于不支持HTTP1.1的浏览器(尽管这个只占你的访问量的1%), 你可能仍然希望提供Expires...
C++
UTF-8
679
3.03125
3
[]
no_license
#include <iostream> using namespace std; struct ListNode { int val; ListNode* next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode* oddEvenList(ListNode* head) { if (!head || !head->next) return head; ListNode odd(0), even(0); odd.next = even.next ...
PHP
UTF-8
1,181
2.546875
3
[]
no_license
<?php use PHPMailer\PHPMailer\PHPMailer; if (isset($_POST['from']) && isset($_POST['to'])){ $from = $_POST['from']; $to = $_POST['to']; $message = $_POST['message']; require_once "PHPMailer/PHPMailer.php"; require_once "PHPMailer/SMTP.php"; require_once "PHPMail...
Java
UTF-8
7,028
1.875
2
[]
no_license
package com.greit.weys.mypage; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.collections.MapUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springfra...
C#
UTF-8
2,617
2.6875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using TareaTICurso1.Models; using Newtonsoft.Json; namespace TareaTICurso1 { class Program { static void Main(string[] args) { dbPruebaCursoEntities db = new dbPrueba...
Python
UTF-8
8,009
3.3125
3
[ "MIT" ]
permissive
import time from ..storage_managing.storage import Storage from .exceptions.wrongloglevelerror import WrongLogLevelError class BotLogger: """ Telegram bot logger writing into DB ... Attributes --- levels: dict, static available log levels enum current_level: str current l...
Markdown
UTF-8
3,035
2.53125
3
[ "MIT" ]
permissive
snooper-config(7) - Configure for Espionage =========================================== ## DESCRIPTION Configuration of `snooper` is controlled through a YAML file. ## FORMAT snooper(1) expects a YAML document of key-value pairs; each pair specifies an option. Unknown options are ignored. Options that can contain a...
Java
UTF-8
1,985
3.328125
3
[]
no_license
/** * This class contains the data for each phone book person and * setter and getter method for them */ package Assignment; import java.util.Date; public class PhoneBookPerson { private String name; private Date birthday; private long phone; private String address; private String email; /** * Constr...
C++
UTF-8
11,135
3.03125
3
[]
no_license
#ifndef LIST_TEST_H #define LIST_TEST_H #include <test/UnitTest.h> #include <test/UnitTestRunner.h> #include <util/containers/Node.h> #include <util/containers/List.h> using namespace Util; class ListTest : public UnitTest { private: const static int n = 10; typedef int Data; List<Data> list; ...
Markdown
UTF-8
1,992
3.015625
3
[ "MIT" ]
permissive
# TogglePvP v1.0 ## A Spigot Plugin to Toggle PvP per player. ## Commands * `/togglepvp [player] [on/off] <duration>` - Description: Toggles PvP on/off for a player, with an optional duration. * Example: `/togglepvp Worf2340 off 30m` would disable PvP for Worf2340 for 30m. * `/pvpstatus <player>` - Descriptio...
Java
UTF-8
2,731
1.835938
2
[]
no_license
package com.kasite.core.serviceinterface.module.order.resp; import com.kasite.core.common.resp.AbsResp; /** * @author linjf * TODO */ public class RespQueryInHospitalCostType extends AbsResp{ private String date; private Integer fee; private String doctor; private String dept; private String deptStat...
C#
UTF-8
19,034
3.015625
3
[]
no_license
using System; namespace Lesson03 { class Ships { public string Shot(string str) { string result = null; return result; } static public string[,] GetField(out bool[,] bfld) { char letter = 'A'; int x = 11, y = 11; ...
Java
UTF-8
3,340
2.171875
2
[]
no_license
package com.infomancers.collections.yield.asmbase; import com.infomancers.collections.yield.Yielder; import com.infomancers.collections.yield.asm.TypeDescriptor; import org.objectweb.asm.Opcodes; /** * Copyright (c) 2007, Aviad Ben Dov * * All rights reserved. * * Redistribution and use in source and binary form...
C
UTF-8
1,208
4.09375
4
[]
no_license
#include "linkedList.h" #include <stdlib.h> /* Linked list data structure (Singly linked list). Used to store the tasks which are currently waiting. */ /* Initialisation function. */ void linked_list_init(linked_list_t* linked_list) { linked_list->head = NULL; } /* Returns the head of the linked list and upd...
C#
UTF-8
1,887
3.1875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Markdown { public static class TagsConverter { public static string ConvertToNewSpecifications(StringBuilder sourceStrings, IReadOnlyCollection<TagSpecification> currentSpecifications, IReadOnlyCollection<T...
TypeScript
UTF-8
560
2.75
3
[ "MIT" ]
permissive
import { delay } from '../utils'; export interface UserState { dataSource: { name: string; }; todos: number; auth: boolean; } const model = { state: { dataSource: { name: '', }, todos: 0, auth: false, }, reducers: { setTodos(state: UserState, todos: number) { state.to...
Java
UTF-8
10,358
2.265625
2
[]
no_license
import java.util.concurrent.*; import java.util.Random; import java.math.BigInteger; import java.math.BigDecimal; import java.awt.Graphics; import java.util.concurrent.atomic.AtomicInteger; import java.awt.Color; import java.awt.Graphics; class Celular_automata implements Runnable{ int[] anterior_,siguien...
JavaScript
UTF-8
1,638
3.671875
4
[]
no_license
/* * @lc app=leetcode id=1138 lang=javascript * * [1138] Alphabet Board Path * * https://leetcode.com/problems/alphabet-board-path/description/ * * algorithms * Medium (51.51%) * Likes: 568 * Dislikes: 130 * Total Accepted: 35.5K * Total Submissions: 68.2K * Testcase Example: '"leet"' * * On an al...
Java
UTF-8
891
3.390625
3
[]
no_license
package Cap5; public class Ex5_24Diamond { public static void main(String[] args) { int counter2 = 1; for(int counter = 1; counter < 5; ++counter) { for(int space = 5; space > counter; --space) { System.out.print(" "); } for(int asterisk = 1; asterisk <= counter2; ++asterisk) { ...
PHP
UTF-8
1,252
2.65625
3
[]
no_license
<?php include "connection.php"; session_start(); $email = ""; $password = ""; if($_SERVER["REQUEST_METHOD"]=="POST"){ $email = $connection->real_escape_string($_POST['email']); $password = $connection->real_escape_string($_POST['password']); $hashedpassword = sha1($password); $sql = "SELECT * FROM user WH...
Java
UTF-8
1,009
2.390625
2
[]
no_license
/* package com.panda.exception; import com.panda.common.util.Result; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; */ /** * 类功能简述: * 类功能详述: * * @author fanxb * @date 20...
Java
UTF-8
1,257
3.15625
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package datejunit; import org.junit.Test; import static org.junit.Assert.assertEquals; /** * * @author tue51138 */ p...
Swift
UTF-8
1,136
3.140625
3
[]
no_license
// // ShortestPathQ1334.swift // Algorithms // // Created by Uji Saori on 2021-04-18. // import Foundation class Solution { func findTheCity(_ n: Int, _ edges: [[Int]], _ distanceThreshold: Int) -> Int { let inf = 10001 var d = [[Int]](repeating: [Int](repeating: inf, count: n), count: n) ...
C#
UTF-8
3,018
2.53125
3
[]
no_license
using System; using System.Collections.Generic; using RegType = MTUComm.MemoryMap.MemoryMap.RegType; namespace MTUComm.MemoryMap { public class MemoryRegisterDictionary { Dictionary<RegType,dynamic> dictionary; public MemoryRegisterDictionary () { this.dictionary = new Di...
Python
UTF-8
4,843
3.765625
4
[]
no_license
#!/usr/bin/python # -*- coding: iso-8859-15 -*- import os, sys # Quiz lists: quiz_level =[ "easy", "intermediate", "hard"] quiz_q = [" 3 + 5 = __1__ | 3*5= __2__ | 4/2 = __3__ | 5*4= __4__", "(2+4)*10= __1__ | (0+1)*100= __2__ | (3+6)*10=__3__ | (7*8)+5= __4__ " , "9-3 / 1/3 + 1 =__1__ | (3 + 3 * 3 – 3 + 3) =__2_...
JavaScript
UTF-8
257
3.5
4
[]
no_license
// Set default value using || Operator var fullName = function (firstName, lastName) { var firstName = firstName || 'john'; var lastName = lastName || 'smith'; console.log(firstName + ' ' +lastName); } fullName('rahul', 'hirve'); fullName();
Java
UTF-8
5,241
2.9375
3
[]
no_license
package be.robbevanherck.javafraggenescan.transitions; import be.robbevanherck.javafraggenescan.entities.*; /** * Represents a transition to an M (forward or reverse) state */ public abstract class MatchTransition extends Transition { /** * Create a new MatchTransition * * @param toState The stat...
C++
UTF-8
1,154
3
3
[]
no_license
/************************************************************** NAME : SWATI BOTUWAR Z-ID : Z1828087 CSCI/689/Section 1 TA NAME : NITHIN DEVANG ASSIGNMENT NUMBER : 2 DUE DATE : WEDNESDAY, 8th FEBRUARY 2017 ************************************************************/ /** This function contains the formula for calc...
Java
UTF-8
540
2.078125
2
[]
no_license
package com.etap.production.metier; import com.etap.production.entity.Lieu; import org.springframework.http.ResponseEntity; import java.net.URISyntaxException; import java.util.Collection; public interface InterfaceLieu { public Collection<Lieu> getAllLocation(); public ResponseEntity<?> getLocationBYId(Lon...
Java
UTF-8
933
2.28125
2
[]
no_license
package com.gaospot.cms.domain; import java.sql.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToOne; @Entity public...
C++
UTF-8
956
3
3
[]
no_license
#include<iostream> #include<cstdio> #include<stack> #include<vector> #include<algorithm> using namespace std; stack<int> st; vector<int> v; int peekMedian(int m) { stack<int> s; v.clear(); while(!st.empty()) { s.push(st.top()); v.push_back(st.top()); st.pop(); } while(!s.empty()) { st.push(s.top()); s....
Markdown
UTF-8
5,209
2.78125
3
[]
no_license
+++ date = "2017-03-11T10:37:20Z" title = "Recycling rates" draft = false categories = ["data", "analysis"] description = "" featuredpath = "date" linktitle = "" type = "post" +++ [An article about my local council’s worsening recycling rate](http://www.hampshirechronicle.co.uk/news/15132003.Winchester_civ...
Python
UTF-8
4,782
3.34375
3
[ "Apache-2.0" ]
permissive
#!/usr/bin/python import os import shutil from contextlib import contextmanager from salve.filesys.abstract import Filesys from salve.util import hash_from_path class ConcreteFilesys(Filesys): def lookup_type(self, path): """ Lookup the type of a given path. Args: @path ...
Ruby
UTF-8
399
2.53125
3
[]
no_license
class ExpectedEvent < ActiveRecord::Base validates :title, presence: true, format: { with: /\A[a-z0-9\s]+\Z/i } validates_uniqueness_of :title has_many :alarms has_many :incoming_events before_save :delete_white_spaces_from_title def alarm! alarms.each do |alarm| alarm.run end end private def ...
C++
UTF-8
679
2.71875
3
[]
no_license
//https://www.hackerrank.com/challenges/even-tree #include <bits/stdc++.h> using namespace std; vector<int> edges[1000006]; int depth[1000056]; bool vis[10000006]; int dfs(int u){ vis[u] = true; depth[u] = 1; for(int i = 0 ; i < (int)edges[u].size() ; i++) if(!vis[edges[u][i]]) depth[u] += dfs(...
JavaScript
UTF-8
5,689
2.859375
3
[]
no_license
/* eslint-disable no-undef */ const sliderImage = document.querySelector(".double-part-section__img"); const glitch = sliderImage.querySelector(".glitch"); const nextArrow = document.querySelector(".facilities-slider__arrows .next"); const prevArrow = document.querySelector(".facilities-slider__arrows .prev"); con...
Java
UTF-8
294
2.078125
2
[]
no_license
package com.luisaraujo.app.exceptions; /** * @author Luis Araujo * */ public class MessageLimitException extends Exception { private static final long serialVersionUID = 1L; /** * @param message Exception Message */ public MessageLimitException(String message) { super(message); } }
TypeScript
UTF-8
875
3.359375
3
[]
no_license
// cart helpr fn that calculates total of cart export const calculateTotal = ( products: any ): { cartTotal: string; stripeTotal: number } => { if (!products) { return { cartTotal: '0', stripeTotal: 0 }; } const total = products.reduce((accumulator, item) => { return accumulator + item.product.price * i...
C++
UTF-8
3,722
2.640625
3
[]
no_license
#include "HelloWorldScene.h" #include "Ball.h" USING_NS_CC; Scene* HelloWorld::createScene() { // 'scene' is an autorelease object auto scene = Scene::create(); // 'layer' is an autorelease object auto layer = HelloWorld::create(); // add layer as a child to scene scene->addChild(layer);...
C++
UTF-8
207
2.5625
3
[]
no_license
class Solution { public: int hammingWeight(uint32_t n) { // Returns the number of 1's in the two's complement binary // representation of n. return __builtin_popcount(n); } };
Java
UTF-8
4,239
2.3125
2
[]
no_license
package com.carnnjoh.poedatatool.services; import com.carnnjoh.poedatatool.db.inMemory.dao.UniqueDao; import com.carnnjoh.poedatatool.db.model.User; import com.carnnjoh.poedatatool.model.*; import com.carnnjoh.poedatatool.schedulers.SchedulerUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sp...
Python
UTF-8
8,635
3.015625
3
[]
no_license
import Tkinter from Tkinter import * import tkMessageBox import PIL from PIL import Image import tkFont a=Tkinter.Tk() a.title("CAR COMPARE") tkMessageBox.showinfo("Welcome","Welcome to AUTOMOTO \n Compare cars \nEnjoy ;-)") """===================================================================================...
Markdown
UTF-8
1,421
2.53125
3
[ "MIT" ]
permissive
# Hybrid-Cloud-Automation-Using-Ansible-ManageIQ- Now a days, Automation is the mother of all the inventions, that give rise to all the new technologies. Most of the latest technologies are the reason to automation. This project is one of our try to automate hybrid cloud using ManageIQ and Ansible. A hybrid cloud is t...
TypeScript
UTF-8
1,193
2.59375
3
[]
no_license
var glob = require( "glob" ); function getIncludeFiles ( include: Array<string>, exclude: Array<string> ): any { let includeCheckFiles: number[] = []; let excludeCheckFiles: number[] = []; // 包含文件 if ( include && include.length != 0 ) { for ( let i = 0; i < include.length; i++ ) { ...
Markdown
UTF-8
4,169
2.59375
3
[]
no_license
--- layout: default --- ## Be Awesome to Each Other The mission of [The London Django Meetup Group](http://www.djangolondon.com/) is to provide fun, welcoming and professional environments so that diverse groups of people - regardless of age, race, gender identity or expression, background, disability, appearance, se...
Swift
UTF-8
5,112
2.8125
3
[]
no_license
// // SceneDelegate.swift // UITabBarControllerDemo // // Created by Trista on 2021/2/10. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptio...
Python
UTF-8
630
3.375
3
[]
no_license
def day9_a(input): new_input = input while "!" in new_input: index = new_input.find("!") new_input = new_input[:index] + new_input[index+2:] while "<" in new_input: start = new_input.find("<") end = new_input.find(">") new_input = new_input[:start] + new_input[en...
Markdown
UTF-8
1,267
2.734375
3
[ "MIT" ]
permissive
# HttpErrorCats Replace your HTTP error codes with cats As seen here https://www.flickr.com/photos/girliemac/sets/72157628409467125/ ## Installation Add this line to your application's Gemfile: gem 'http_error_cats' And then execute: $ bundle Or install it yourself as: $ gem install http_error_cats ...
PHP
UTF-8
4,121
2.625
3
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php /** * This file is part of the Zimbra API in PHP library. * * © Nguyen Van Nguyen <nguyennv1981@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Zimbra\Mail\Request; use Zimbra\Common\TypedSequence; use ...
Python
UTF-8
1,283
3.203125
3
[ "MIT" ]
permissive
#!/bin/python import sys import notify2 import subprocess from time import sleep def notification(message: str): """ Display notification to the desktop Task: 1. show() -> it will generate a complete new pop 2. update() -> it will update the payload part of same notification pop-up, not is...
Markdown
UTF-8
4,065
2.796875
3
[]
no_license
--- id: 220 title: 'My Steam Box - PVR power management' date: 2014-05-07T20:00:50+00:00 author: mark layout: post guid: https://barrenfrozenwasteland.com/?p=220 permalink: /2014/05/my-steam-box-pvr-power-management/ categories: - HTPC --- **Update:** Updated post-record bash script for Ubuntu 16.04, and re-wrote rub...
Java
UTF-8
3,098
2.140625
2
[]
no_license
package com.zjtc.model; import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatispl...
Markdown
UTF-8
2,700
3.140625
3
[]
no_license
# project-basement Personal project, just fun for author. ## Version 1. 2017/07/10:发布1.0版本 2. 2017/07/14:发布2.0版本 3. 2017/07/17:发布3.0/3.1版本 4. 2017/07/19:发布3.2版本 5. 2017/07/31:发布4.1版本 ## 1.StringUtils.isEmpty() 与 StringUtils.isBlank()区别 1.1 isEmpty() : 判断字符串是否为空,当字符串为null、""时返回为true,当字符串为" "、"abc"时返回为false;<br/> 1.2 i...
Java
UTF-8
530
1.8125
2
[]
no_license
package com.dp.nlp.review.udf; /** * Created by qiangwang on 15/3/13. */ public class ShopCategory { private static final int BEAUTY = 50; private static final int HAIR = 157; private static final int DANCE = 149; private static final int MANICURE = 160; private static final int YOGA = 148; p...
C#
UTF-8
2,396
2.71875
3
[ "MIT" ]
permissive
using System.Diagnostics; using System.IO; using Microsoft.VisualStudio.TestTools.UnitTesting; using SharpLearning.CrossValidation.TrainingTestSplitters; using SharpLearning.DecisionTrees.Learners; using SharpLearning.Examples.Properties; using SharpLearning.InputOutput.Csv; using SharpLearning.Metrics.Regression; na...
Markdown
UTF-8
367
2.671875
3
[]
no_license
## shell编程中的函数 --- ### 函数的定义 - 定义方式1 ```sh function name { commands return #可选 } ``` - 定义方式2 ```sh name() { commands return #可选 } ``` >注意:若函数体和花括号在一行中,则{和第一个命令,最后一个命令和}之间都需要一个空格 ### 函数中变量的作用域
C++
UTF-8
2,520
3.0625
3
[]
no_license
// Edge.cpp: implementation of the Edge class. #include <stdio.h> #include <math.h> #include <cstdlib> #include "Edge.h" #include "mEntity.h" #include "Vertex.h" Edge::Edge(Vertex *v1, Vertex *v2, gEntity *classification) //older function. { //currently being kept to keep splitting//refinement compatible...
Java
UTF-8
516
2.6875
3
[]
no_license
package kit.pse.hgv.controller.commandController.commands; /** * This class manages the commands that register an extension */ public class RegisterExtensionCommand extends ExtensionCommand { private final String path; /** * The constructor creates an element of this class * * @param path Pat...
Markdown
UTF-8
2,433
2.984375
3
[]
no_license
# BGA Style Guide ## Github pages The BGA Style Guide runs on a github pages hosting platform, this means that the website is written in html, scss, markdown and liquid, and uses jekyll to compile into a site. The website can be compiled locally using jekyll, or can be pushed to a github repository using the branc...
Ruby
UTF-8
225
2.9375
3
[]
no_license
def mydecorator(f): def swrap_f(*args, **kw): print(__name__) print('function will be called') return f(*args, **kw) return swrap_f @mydecorator def hello_decorator(): print('be called') hello_decorator()
Python
UTF-8
363
3.28125
3
[]
no_license
def print_formatted(number): # your code goes here #Octal i=1 l=''; while i<=number: o=str(oct(i));h=str(hex(i));b=str(bin(i)); o1=str(o[2:]);h1=str(h[2:]);b1=str(b[2:]); l=l+str(i)+' '+o1+' '+h1+' '+b1+'\n' i+=1 print(l) return if __name__ == '__main__': ...
C++
UTF-8
686
3.1875
3
[]
no_license
#include <vector> #include <iostream> #include <algorithm> using namespace std; void partition(vector <int> ar) { int pivot = ar[0]; int i=0, j=1; int t = 0; for(; j<ar.size(); j++) { if(ar[j] < pivot ) { i++; int temp = j; int value = ar[j]; for(; temp>i; temp-- ) swap(ar[temp] , a...
SQL
UTF-8
769
3.390625
3
[ "Apache-2.0" ]
permissive
use ejercicio1; create table medico ( id int primary key auto_increment, nombre varchar(10) not null, apellidos varchar(20) not null, telefono int not null, especialidad varchar(20) ); create table paciente ( id int primary key auto_increment, codigo_postal int not null, telefono int, fecha_nacimiento datetime not nul...
SQL
UTF-8
2,259
2.875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `bdeducacio` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_spanish_ci */; USE `bdeducacio`; -- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86) -- -- Host: 127.0.0.1 Database: bdeducacio -- ------------------------------------------------------ -- Server version 5.6.14 /*!...
Java
UTF-8
2,791
2.34375
2
[]
no_license
package com.mtuci.bsu1701.is.controllers; import com.mtuci.bsu1701.is.configs.JwtTokenUtil; import com.mtuci.bsu1701.is.entities.dtos.RegistrationUserRequestDto; import com.mtuci.bsu1701.is.entities.dtos.securityDtos.JwtRequest; import com.mtuci.bsu1701.is.entities.dtos.securityDtos.JwtResponse; import com.mtuci.bsu17...
C#
UTF-8
687
3.21875
3
[ "MIT" ]
permissive
namespace AnimalKindom.Models { using AnimalKindom.Interfaces; public class PetHamster : Hamster, IPet { public PetHamster() { this.Owner = "Pesho"; } public string Owner { get; private set; } public decimal Price { get { throw new ...
Java
UTF-8
16,671
2.0625
2
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package clinicadesktop; import DOA.PacienteDao; import DOA.RastreioDao; import MODEL.PacienteModel; import MODEL.RastreioModel; import...
Markdown
UTF-8
1,150
2.890625
3
[]
no_license
# SpringBootLog O objetivo foi criar uma aplicação em Java para fazer o upload de um arquivo de logs populando o banco de dados. Para isso, será necessário uma interface para o upload do arquivo de logs e uma para inserir/editar/listar/consultar/pesquisar (CRUD). Implementar o back-end com (Spring ou JavaEE/MicroProfi...
Markdown
UTF-8
1,809
2.671875
3
[]
no_license
# Irregularly Clipped Sparse Regression Codes [arXiv](https://arxiv.org/abs/2106.01573), [PDF](https://arxiv.org/pdf/2106.01573.pdf) ## Authors - Wencong Li - Lei Liu - Brian M. Kurkoski ## Abstract Recently, it was found that clipping can significantly improve the section error rate (SER) performance of sparse r...
Markdown
UTF-8
1,142
2.875
3
[]
no_license
# Quete_Entity_Framework_LINQ La protection de la faune La diversité de la faune terrienne est en chute libre. Cela est principalement du à nos actes en tant qu'humains mais aussi à cause des lois de l'évolution. Quoiqu'il en soit, en tant qu'association de protection de la faune, nous désirons pouvoir mettre au poin...
JavaScript
UTF-8
360
2.6875
3
[]
no_license
export const heroes = [ {id:1, name: 'Batman', owner: 'DC'}, {id:2, name: 'Spiderman', owner: 'Marvel'}, {id:3, name: 'Peter Stancheck', owner: 'Valiant'} ] export const getHeroeById = (id) => heroes.find( (heroe) => heroe.id === id ); // find?, filter export const getHeroesByOwner = ( owner ) => hero...
Python
UTF-8
3,139
2.578125
3
[]
no_license
import pyaudio from aip import AipSpeech from xpinyin import Pinyin def RecodeSound(): import wave CHUNK = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 2 RATE = 8000 RECORD_SECONDS = 10 WAVE_OUTPUT_FILENAME = "audio.wav" APP_ID='19165306' API_KEY='F0NWZzLVAnModNc6OG820Gu7...
Python
UTF-8
645
2.53125
3
[]
no_license
import numpy as np round_to = 5 r = np.array([11,16,5]) C_1 = np.array([40,38,22]) C_s = 28371 T = 42 def task2(r, C_1, C_s, T, t_s=None, if_print=True): if t_s is None: t_s = round(np.sqrt((2*C_s)/sum(C_1*r)), round_to) q = r*t_s D = round(sum(C_1*r)*t_s*T/2 + C_s*T/t_s, round_to) else:...
Markdown
UTF-8
1,189
2.984375
3
[]
no_license
# 网络图片批量下载 当我在写 [36Photo](https://github.com/dolphin836/36Photo) 项目时,需要从网络上下载一些免费的图片,于是就有了这个项目。 目前已经支持的网站 | 名称 | 地址 | 存储目录 | 命令 | | -------- | :----- | :----- | :----- | | Unsplash | [https://unsplash.com](https://unsplash.com) | /Photo/Unsplash | php unsplash.php | | Awesome Wallpapers | [https://alpha.wallhav...
PHP
UTF-8
1,371
2.734375
3
[]
no_license
<?php /** * BaseModel, EVERY model extends form this * * @author Flavio Kleiber <flaverkleiber@yahoo.de> * @copyright 2016-2018 Flavio Kleiber */ namespace Solaria\Framework\Application\Mvc; use Solaria\Framework\Core\Application; class BaseModel { public function save($obj) { $entityManager = Applicati...
Swift
UTF-8
1,045
2.6875
3
[]
no_license
// // SettingVC.swift // WeatherAppDemo // // Created by vivek G on 13/09/21. // import UIKit class SettingVC: UIViewController { @IBOutlet weak var txtCelcious : UITextField! @IBOutlet weak var txtFarenhite : UITextField! @IBOutlet weak var lblCelConvResult : UILabel! @IBOutlet weak var lblF...
Ruby
UTF-8
524
3.5
4
[]
no_license
def is_palindrome (instr) return instr == instr.reverse end def find_palindromes (input) print input, ": " seen = {} for start in 0 .. input.length - 1 do for endstr in start .. input.length - 1 do cand = input[start .. endstr] if is_palindrome(cand) and not seen[cand] t...