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
847
3.140625
3
[]
no_license
using System; using System.IO; namespace MultiFunctionalBot.Commands { class BroadcastCommand : ICommandHandler { public int Args { get { return 2; } } public string GetDescription() { return "Boradcast me...
Python
UTF-8
817
4.125
4
[]
no_license
''' Program has function which takes two arguments : 1) initial balanace and 2) No. of operations that you want to perform. which are deposit or withdraw This function adds the deposit amount to balance and deducts the withdrawal amount from balance ''' def main(bal,itr): for i in range(itr): j = list(map...
C#
UTF-8
2,337
2.828125
3
[]
no_license
namespace Application.Activities { using Application.DTO; using Application.Errors; using AutoMapper; using Domain; using MediatR; using Microsoft.EntityFrameworkCore; using Persistence; using System; using System.Threading; using System.Threading.Tasks; /// <summary> /...
PHP
UTF-8
161
2.671875
3
[]
no_license
<?php class Game extends Product { private $games=[]; public function addGames($games) { $this->games[] = $games; } }
C#
UTF-8
1,196
2.75
3
[]
no_license
using UnityEngine; public class LightController : MonoBehaviour { private Light theLight; public float maxInstensity; public float minInstensity; public Color dayTimeColor; public Color nightTimeColor; public float speed; private void Start() { theLight = gameObjec...
Markdown
UTF-8
3,863
2.828125
3
[ "MIT" ]
permissive
# data-frisk-reagent > "Get your facts first, then you can distort them as you please" - Mark Twain Visualize your data in your Reagent apps as a tree structure. Suitable for use during development. <img src="data-frisk.gif"> ## Install ![](https://clojars.org/data-frisk-reagent/latest-version.svg) Add `data-fri...
C#
UTF-8
7,493
3
3
[ "MIT", "BSD-3-Clause" ]
permissive
using System; using System.Diagnostics; using System.IO; using System.Text; namespace Mercurial { /// <summary> /// This class is responsible for decoding the output from the Mercurial /// instance running in Command Server mode. /// </summary> internal static class CommandServerOutputDe...
Markdown
UTF-8
3,210
2.703125
3
[]
no_license
# Objectifs pédagogiques session 4 ## Session 4 - Développement Front End professionnel ### Semaine 2 #### **Lun 6 et Mar 7 Jan :** Découverte d'Angular * **Notions :** [Découverte d'Angular](../cours/angular.md) * **Objectif•s :** * Comprendre les bases d'Angular (Components & Templates) * Interpolation `{{ ...
Shell
UTF-8
431
3.875
4
[]
no_license
#!/bin/bash #Finds active virtual machines and creates a folder where all block devices for each machine are kept #Ex.: timemcn03 block devices are kept in "/cloud/storage/timemcn03-mounts" list_vms=$(virsh list --all --name) path1=/cloud/storage for i in $list_vms; do path2="$path1/$i-mounts" if [[ -d "$path2" ]]...
Markdown
UTF-8
2,504
2.984375
3
[ "MIT" ]
permissive
Password Generator - https://github.com/SkinnySk8ter/homework3 assignment#3 Table Of Contents [General Info] [Assignment Deatails] [how to setup] [Look Out!] [General Info] - UPDATED This is the ReadMe File for Homework assignment #3. For this assignment we were tasked with promoting user interaction to store respons...
PHP
UTF-8
1,091
2.734375
3
[]
no_license
<?php namespace APP\Controllers; use APP\Core\Controller; use APP\Models\RegisterModel; class RegisterController extends Controller{ public function register() { $method = strtolower($_SERVER['REQUEST_METHOD']); if ( $method == 'get') { $this->render('register'); ...
Java
UTF-8
17,088
2.40625
2
[]
no_license
package com.daveclay.midi; import com.daveclay.midi.random.RandyTheRandom; import java.util.HashMap; import java.util.Map; import static com.daveclay.midi.NoteValueType.*; public enum NoteValue { C0("C", "C0", 0, NOTE), C_SHARP0("C#", "C#0", 1, NOTE), D_FLAT0("Db", "Db0", 1, NOTE), D0("D", "D0", 2, NOTE), D_S...
C#
UTF-8
9,258
2.734375
3
[]
no_license
//Start1.aspx.cs code behind for page start1.aspx. //Erik Drysén 2015-10-22. //Revised 2015-11-02 by Erik Drysén. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Web.UI.HtmlControls; using Npgsq...
Shell
UTF-8
406
3.078125
3
[]
no_license
#!/bin/sh cd /home/pi/openFrameworks/addons/ofxPiMapper/example_bareconductiveFinal/bin/data INPUT_FILE="presets.xml" OUTPUT_FILE="presetFinal.xml" TOKEN1="__PICTURE__.jpg" TOKEN2="__NAME__.jpg" length=12 rm -f $OUTPUT_FILE for i in $( seq 1 $length ) do echo "Copy calibration value in "$OUTPUT_FILE sed -- "s/$TO...
C#
UTF-8
518
2.5625
3
[]
no_license
using UnityEngine; using System.Collections; public class KeyboardPlayer : MonoBehaviour { float posY = 0; float speed = 0.7f; // Use this for initialization void Start () { } // Update is called once per frame void Update () { if (posY + (Input.GetAxis ("Vertical") * speed) <= 3.5 && posY + (Input.GetA...
Markdown
UTF-8
1,474
2.96875
3
[]
no_license
## Socket编程地址信息结构体 ``` struct sockaddr { uint16_t sa_family; char sa_data[14]; } ``` socket编程中比如bind, connect等函数均使用的是该结构体, 不过由于赋值问题, 通常使用的是`sockaddr_in`结构体(进行强制类型转换即可) ``` struct sockaddr_in { short sin_family; uint16_t sin_port; struct in_addr sin_addr; char sin_zero[8]; } ``` 在windows中和linu...
Java
UTF-8
1,077
2.34375
2
[]
no_license
package com.netcracker.odstc.logviewer.service; import com.netcracker.odstc.logviewer.models.User; import org.springframework.beans.factory.annotation.Value; import org.springframework.mail.SimpleMailMessage; import org.springframework.stereotype.Service; @Service public class MailService { @Value("${spring.mail...
PHP
UTF-8
954
2.734375
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php namespace Softonic\LaravelIntelligentScraper\Scraper\Models; use Illuminate\Database\Eloquent\Model; class Configuration extends Model { /** * Indicates if the IDs are auto-incrementing. * * @var bool */ public $incrementing = false; /** * The attributes that should be cas...
Java
UTF-8
2,198
2.109375
2
[]
no_license
package com.benz.user.model; import java.util.Date; public class UserResponse { private int userId; private String fname; private String lname; private String uniqueId; private String district; private String email; private String pnum; private String uPassword; private Date created_date; private Date mo...
Java
UTF-8
814
1.914063
2
[ "MIT" ]
permissive
package io.github.donggi.mvc.config; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; import org.springframework.web...
TypeScript
UTF-8
1,412
2.6875
3
[ "MIT" ]
permissive
import { InputType } from "@nestjs/graphql"; import { StringComparisonInput } from "../../../gql/string-comparison.input"; import { NumberComparisonInput } from "../../../gql/number-comparison.input"; import { DateComparisonInput } from "../../../gql/date-comparison.input"; /** * Input type for filtering Productions ...
Java
UTF-8
344
1.59375
2
[]
no_license
package com.Satish.Satish_firstspring; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SatishFirstspringApplication { public static void main(String[] args) { SpringApplication.run(SatishFirstspringApplicat...
Python
UTF-8
5,127
2.734375
3
[]
no_license
#!/usr/bin/env python3 # test_mailroom4.py - Lesson06 - Assignment 5 - Unittesting with Pytest from mailroom4 import * import sys from mock import patch from io import StringIO import pathlib import os import pytest # Data to check against expected_report = 'Donor Name | Total Given| Num Gifts| A...
Java
UTF-8
272
1.632813
2
[]
no_license
package com.graduation.mode; import lombok.Data; @Data public class Loginer { /** * 用户账号 */ private String id; /** * 用户密码 */ private String password; /** * 用户密角色 */ private String type; }
Markdown
UTF-8
1,233
2.78125
3
[]
no_license
# Modern Rhetoric - an NLP approach Project for Math/English 190S - Democracy, Game Theory, and Persuasion - at Duke University ## What did we do? We used Aristotle's modes of persuasion and sentiment analysis within Tweets related to current politics in the United States to understand the use of rhetoric in a moder...
PHP
UTF-8
4,540
3.4375
3
[]
no_license
<?php namespace App\Classes; use App\Exceptions\InstructionParseException; /** * Class InstructionHandler * @package App\Classes */ class InstructionHandler { private $output; private $dataMatrix; /** * InstructionHandler constructor. */ public function __construct() { $this...
Markdown
UTF-8
7,452
3.34375
3
[]
no_license
# MySQL日志 ​ 在任何一种数据库中,都会有各种各样的日志,记录着数据库工作的方方面面,以帮助数据库管理员追踪数据库曾经发生过的各种事件 ​ MySQL 也不例外,在 MySQL 中,有 4 种不同的日志,分别是错误日志、二进制日志(BINLOG 日志)、查询日志和慢查询日志,这些日志记录着数据库在不同方面的踪迹。 ## 错误日志 ​ 错误日志是 MySQL 中最重要的日志之一,它记录了当 mysqld 启动和停止时,以及服务器在运行过程中发生任何严重错误时的相关信息。当数据库出现任何故障导致无法正常使用时,可以首先查看此日志 ​ 该日志是默认开启的 , 默认存放目录为 mysql 的数据目录(`var/li...
Markdown
UTF-8
4,011
2.75
3
[ "MIT" ]
permissive
# Google Cloud Storage ## Using the Storage API ### Setting up StorageConfiguration To make GoogleCloudKit as flexible as possible to work with different API's and projects, you can configure each API with their own configuration if the default `GoogleCloudCredentialsConfiguration` doesn't satisfy your needs. For e...
Markdown
UTF-8
2,541
2.96875
3
[ "MIT" ]
permissive
--- title: The Business Plan description: A business plan outline slug: business-plan date: 2015-09-02 --- I am currently enrolled in the California Program for Entrepreneurs, and we recently discussed business plans and models. I figured I would share the business plan outline we received, and also digitize it for my...
Python
UTF-8
1,994
3.96875
4
[]
no_license
#define the question class class Question: #set class attributes def __init__(self,question,answer1,answer2,answer3,answer4,correctAnswer): self.__question = question self.__answer1 = answer1 self.__answer2 = answer2 self.__answer3 = answer3 self.__answer4 = answer4 ...
PHP
UTF-8
2,810
2.78125
3
[]
no_license
<?php namespace Pipa\Data; /** * Provides a way to add functionality on top of a DataSource-specific * Criteria implementation without losing low-level functionality */ class CriteriaDecorator extends Criteria { protected $criteria; protected static $passthough = array( 'collection', 'dataSource', 'distinct',...
Java
UTF-8
4,311
2.390625
2
[ "MIT" ]
permissive
package org.dnstv.botcontroller; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothSocket; import android.content.Intent; import android.os.Bundle; import android.os.Parcelable; import android.support.v7.app.AppCompatActivity; import android.view.Vie...
Swift
UTF-8
923
2.65625
3
[ "MIT" ]
permissive
import ArgumentParser import Foundation import TSCBasic import TuistSupport struct CloudOrganizationInviteCommand: AsyncParsableCommand { static var configuration: CommandConfiguration { CommandConfiguration( commandName: "invite", _superCommandName: "organization", abst...
Java
UTF-8
414
2.046875
2
[]
no_license
package tk.fishfish.admin.entity.enums; import lombok.Getter; import lombok.RequiredArgsConstructor; import tk.fishfish.enums.EnumType; /** * 审计类型 * * @author 奔波儿灞 * @version 1.5.0 */ @Getter @RequiredArgsConstructor public enum AuditType implements EnumType { LOGIN("登录", "0"), LOGOUT("登出", "1"), ...
Python
UTF-8
1,234
3.078125
3
[ "MIT" ]
permissive
#!/usr/bin/python3 from sorters.sort_base import sort_base from sort_util.data_tools import data_store class bucket_sort(sort_base): def __init__(self) -> None: super().__init__() def name(self) -> str: return 'Bucket' def __insertion_sort__(self, data: data_store, start: int, end: int)...
Markdown
UTF-8
25,002
2.53125
3
[]
no_license
# <a name="index"></a>ZEN MINING PROJECT WHITE PAPER ##### [Предпосылки](#background) ##### [Решение](#solution) ##### [Рынок](#market) ##### [Описание проекта](#description) ##### [Бизнес-модель](#model) ##### [Роадмэп проекта](#roadmap) ##### [Токены PRANA](#token-ico) ##### [Команда](#team) ##### [Условия](#agreeme...
Python
UTF-8
634
3.109375
3
[]
no_license
#Dojo Survey """ Build a new Flask project. The goal is to help you get familiar with sending POST requests through a form and displaying that information: You should have two routes: '/' and '/result' both of which render a template """ from flask import Flask,render_template,request,redirect app = Flask(__name__) ...
Java
UTF-8
6,577
1.976563
2
[ "Apache-2.0" ]
permissive
package com.yl.campus.app.activity; import android.content.DialogInterface; import android.content.Intent; import android.os.Handler; import android.support.annotation.NonNull; import android.support.design.widget.NavigationView; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayo...
C#
UTF-8
1,376
3.84375
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DelegateDemo { public class GenericDelegates { static void Main(string[] args) { //Encapsulates a method that has one or more parameter and returns a value ...
C#
UTF-8
4,475
2.828125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Timers; using System.Windows; namespace SymulatorSamochoduProjekt { public class Samochod { private Timer paliwoLicznik = new Timer(100); public Action paliwoZmieni...
Python
UTF-8
640
2.515625
3
[]
no_license
#!/usr/bin/env python from todolist import TodoList from todoitem import TodoItem from user import User from service import Service from datetime import datetime from config import STATE_UNDO, STATE_DONE service = Service() service.add_user('David') service.add_user('Tiiiiiiiiim') service.add_user('Jack') service....
C++
UTF-8
2,820
3.046875
3
[]
no_license
#ifndef _HuffmanCode_h_ #define _HuffmanCode_h_ #include "HuffmanNode.h" class HuffmanCode { /////////////////////////////////////////////////////////////////////////////// public: /////////////////////////////////////////////////////////////////////////////// HuffmanCode ( ) ...
Python
UTF-8
2,882
4.25
4
[]
no_license
# -*- coding:utf-8 -*- from sys import exit def gold_room(): print("This room is full of gold.How much do you take? 这里有一屋子的金子,你想拿走多少?") choice = input(">") if "0" in choice or "1" in choice: how_much = int(choice) else: dead("Man, learn to type a number. 你的数学是体育老师教的吗?写数字!!") ...
Shell
UTF-8
180
3.03125
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
_GET_TRACES=$(find -type f -iregex '.*trace_core.*\.log') for trace in $_GET_TRACES; do column -t -s $'\t' -o ' ' -R 1,2,3,4,5 $trace > $(dirname $trace)/trace_pretty.log done
JavaScript
UTF-8
1,308
2.5625
3
[]
no_license
import React, { useState } from 'react' import axios from 'axios' export const ProposalContext = React.createContext() const proposalAxios = axios.create() export default function ProposalProvider(props){ const initState = { proposals: [] } const [ propState, setPropState ] = useState(initState) ...
SQL
UTF-8
2,169
3.34375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- za 11 nov 2017 19:57:11 CET -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=...
C++
UTF-8
640
2.546875
3
[]
no_license
#include "AreaLighting.h" #include "../World/World.h" #include "../Utilities/ShadeRec.h" #include "../Materials/Material.h" #include <iostream> AreaLighting :: AreaLighting() : Tracer() {} AreaLighting :: AreaLighting( World* world_ptr ) : Tracer( world_ptr ) {} AreaLighting :: ~AreaLighting...
Java
UTF-8
4,291
2.265625
2
[]
no_license
package tr.com.khg.caching.domain; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.annotations.Cascade; import javax.persistence.*; import java.io.Serializable; import java.time.LocalDate; import java.util.HashSet; import java.util.Set; /** * ...
TypeScript
UTF-8
4,672
2.609375
3
[ "MIT" ]
permissive
import { Router, Request, Response } from "express"; import Playlist from "../../database/models/playlist"; import Song from "../../database/models/song"; import User from "../../database/models/user"; import authenticated from "../middleware/authenticated"; import validatePlaylist from "../middlew...
Markdown
UTF-8
18,246
2.765625
3
[]
no_license
![](EmotivSDK.png) ### TABLE OF CONTENTS #### [Emotiv Xavier Tools](#0) #### [1. Introduction to XavierEmoKey](#1) #### [1.1 Connecting XavierEmoKey to Emotiv EmoEngine](#1.1) #### [1.2 Configuring XavierEmoKey Rules](#1.2) #### [1.3 XavierEmoKey Keyboard Emulation](#1.3) #### [1.4 Configuring Xavi...
Java
UTF-8
1,235
2.125
2
[]
no_license
package hh.Harjotustyo.harjotustyo; import java.util.List; import static org.assertj.core.api.Assertions.assertThat; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; import org....
Java
UTF-8
1,315
2.34375
2
[]
no_license
package me.li2.android.photogallery.ui; import android.graphics.Bitmap; import android.os.Bundle; import android.support.v4.app.DialogFragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import me.li2.android.photogallery.util.Picture...
JavaScript
UTF-8
479
2.828125
3
[]
no_license
// Thanks AlexT var setting = function(r, g, b) { background(r, g, b); }; var word = function(string, x, y, xConstrain, yConstrain) { text(string, x, y, xConstrain, yConstrain); }; var wordSize=function(size) { textSize(size); }; var wordAlign = function(align, yAlign) { if(YAlign >= 0) { textA...
Markdown
UTF-8
528
2.515625
3
[]
no_license
# Dual Screen Video This template demonstrates one way to create a dual-screen video app for Apple TV. ## Core concepts * Using `bc.device.externalscreen` methods and events to handle communication between an iPad and Apple TV * Using the [Brightcove Video Cloud Media API][1] * Working with the HTML5 `<video>` eleme...
C++
UTF-8
4,165
2.515625
3
[ "MIT" ]
permissive
#ifdef WIN32 #include <sdl2.2.0.5\build\native\include\SDL.h> #include <sdl2_image.v140.2.0.1\build\native\include\SDL_image.h> #else #include <SDL2/SDL.h> #include <SDL2/SDL_image.h> #endif #include <iostream> #include <string> #include <cburggie.h> #include <EventHandler.h> /* static SDL_Window * window = NULL; st...
PHP
UTF-8
2,868
2.671875
3
[ "MIT" ]
permissive
<?php namespace Innerent\Contacts\Repositories; use Illuminate\Database\Eloquent\Model; use Innerent\Contacts\Contracts\Contact as ContactInterface; use Innerent\Contacts\Models\Address; use Innerent\Contacts\Models\Contact; use Innerent\Contacts\Models\Email; use Innerent\Contacts\Models\Phone; class ContactReposit...
TypeScript
UTF-8
4,399
2.5625
3
[ "MIT" ]
permissive
import { environment } from '../../environments/environment'; import DomMethods from '../shared/DomMethods'; /** * Creates HTML markups <script> and add Google Analytics source to it. */ class GoogleAnalytics { /** * Make GA send function available from class. */ public static sendGaData(hitType: string, e...
Java
UTF-8
241
1.664063
2
[]
no_license
package samples.demo; public class GitTest { @SuppressWarnings("unused") private String gigi; public void Gigi() { gigi = "git is fun"; } public static void main(String[] args) { // TODO Auto-generated method stub } }
JavaScript
UTF-8
2,442
2.59375
3
[]
no_license
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; function Task(props) { const divStyles = { // 'width': '20px', 'height': '20px', 'line-height': '20px', 'background-color': 'gray', 'border': '1px solid black', 'padding': '3px', ...
JavaScript
UTF-8
2,150
2.828125
3
[]
no_license
//// Paul Irish requestAnimationFrame Polyfill //// http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/ //window.requestAnimFrame = (function(){ // return window.requestAnimationFrame || // window.webkitRequestAnimationFrame || // window.mozRequestAnimationFrame || // ...
Ruby
UTF-8
1,999
2.5625
3
[]
no_license
require File.dirname(__FILE__) + "/ebay_items_details_parser_data" class EbayItemsDetailsParser include EbayItemsDetailsParserData def self.parse(xml) parsed_items = CobraVsMongoose.xml_to_hash(xml) items = parsed_items[GETMULTIPLEITEMSRESPONSE][ITEM] || [] items = ArrayUtil.arrayifiy(items) ebay_...
C
UTF-8
424
3.296875
3
[ "MIT" ]
permissive
#include<stdio.h> int main() { double n; scanf("%lf",&n); if(n<0 || n>100){ printf("Fora de intervalo\n"); } else if(n<=25.00){ printf("Intervalo [0,25]\n"); } else if(n<=50.0){ printf("Intervalo (25,50]\n"); } else if(n<=75.0){ printf("Intervalo (5...
JavaScript
UTF-8
895
2.5625
3
[]
no_license
import { FORM_TYPE} from './FormType'; const initialState ={ userData : {} // fname : '', // lname: '', // email : '', // password : '', // contact : '' } const formAppReducer= (state=initialState, action) => { switch(action.type){ /* case DETAILS: { ...
C#
UTF-8
246
3.078125
3
[]
no_license
public class Solution { public int Divide (int dividend, int divisor) { try { return dividend / divisor; } catch (OverflowException) { return int.MaxValue; } } }
C++
UTF-8
750
3.546875
4
[]
no_license
#include "misc.h" /* * Validate if a given string can be interpreted as a decimal number. Some examples: "0" => true " 0.1 " => true "abc" => false "1 a" => false "2e10" => true " -90e3 " => true " 1e" => false "e3" => false " 6e-1" => true " 99e2.5 " => false "53.5e93" => true " --6 " => false "-+3" => false "95a...
JavaScript
UTF-8
2,088
2.671875
3
[]
no_license
function closeDown () { document.querySelector('.bigCards') .style.display = "none"; document.querySelector('#basePrice') .style.display = "none"; document.querySelector('#proPrice') .style.display = "none"; document.querySelector('#betaProg') .style.display = "none"; ...
C
UTF-8
2,901
2.75
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* write_precisions.c :+: :+: :+: ...
Markdown
UTF-8
4,388
3.109375
3
[]
no_license
--- title: Nuxt Introduction description: Learn how Nuxt and Vue are related and how they work together. --- ## What is NuxtJS NuxtJS is a standardization tool that is built off of VueJS. The official [NuxtJS Website](https://nuxtjs.org/) will explain this in better detail, but here is a summary of what Nuxt standard...
JavaScript
UTF-8
1,580
3.125
3
[ "MIT" ]
permissive
window.onload = function() { var points = [], offset = 0, scaleFactor = .35; init(); function init() { chaos.init(); offset = chaos.height / 2; points.push({ x: 0, y: chaos.height / 2 }); points.push({ x: chaos.width, y: chaos.height / 2 }); drawCoast(); document.body.addEvent...
JavaScript
UTF-8
191
3.625
4
[]
no_license
function getLengthOfTwoWords(word1, word2) { // your code here return sum = word1.length + word2.length; } var output = getLengthOfTwoWords('some', 'words'); console.log(output); // --> 9
Python
UTF-8
1,366
2.625
3
[]
no_license
from tkinter import* import sys import random def rand_pass(): x=''.join(random.choices('asdfghjklçzxcvbnmqwertyuiop0123456789!@#$%*()',k=int(sb.get()))) y=e.get("1.0",END) with open("/home/loukis/D:/Desenvolvimento_de_sistemas/0/senhas.txt") as f: a=f.readlines() b=e.get("1.0",END)[:-1] ...
Markdown
UTF-8
688
2.59375
3
[]
no_license
这个脚本是最近写的比较长的脚本了,用python去查询、修改系统中json串,本质上就是: 1. 可执行文件的调用 2. json和字符串的处理 但是,写完这个总结几个之前没接触过的点: 1. 程序启动的参数解析,竟然有自带的库,而且还十分好用!!! 2. 调用可执行文件的传送,要注意使用多转译一次,我用了一个小技巧,借助json库进行 3. 调用可执行文件时,要根据的输出情况和是否同步等待,决定自己用os还是subprocess 4. 对python一切皆对象有了较多的认识,python一切皆对象的更彻底,看上去像基础类型的int其实也是对象
Python
UTF-8
1,800
3.640625
4
[]
no_license
class Solution: # my sol1, using dict # def __init__(self): # self.dic = set() # def isHappy(self, n): # """ # :type n: int # :rtype: bool # """ # if n == 1: # return True # if n in self.dic: # return False # else: # ...
PHP
UTF-8
586
2.796875
3
[]
no_license
<?php namespace amzeker\parser; class Parser implements ParserInterface { public function process(string $tag, string $url): array { $htmlpage = file_get_contents($url); if ($htmlpage === false ) { return ['Invalid URL']; } // Regular expression ...
Markdown
UTF-8
423
3.5625
4
[]
no_license
判断元素是否在列表 ```python nums = [1, 2, 3] if 0 in nums: print("True") else: print("False") ``` 判断子字符串是否在文本中 ```python sentence = "我爱天安门" if "天安门" in sentence: print("true") else: print("false") ``` 判断字典中是否含有某元素 ```python data = {"name": "li", "age": 3} if 'age' in data: print("True") else: ...
Python
UTF-8
2,704
3.4375
3
[]
no_license
''' Use case example: INPUT bmhnYnpuZ3ZiYXZmbmpyZmJ6cg== KEY 13 DECODED nhgbzngvbavfnjrfbzr DECRYPTED automationisawesome ''' import string import base64 import argparse from argparse import RawTextHelpFormatter # === GLOBAL VARS === useless_bar = 50 * "=" # === FUNCTIONS DEFINITI...
Python
UTF-8
223
3.359375
3
[]
no_license
class Abc(object): def __init__(self): self.s="" def getString(): self.s=input("Enter:") def printString(): print(self.s.upper()) obj = InputOutString() obj.getString() obj.printString()
Python
UTF-8
489
2.65625
3
[]
no_license
n=int(input()) li=list(int(i)for i in input().split()) p=int(input()) dp=[-1]*(n) s=set() for i in range(p): a,b=map(int,input().split()) a,b=a-1,b-1 if dp[a]==-1 and dp[b]==-1: s.add(a+1) s.add(b+1) dp[a] , dp[b] = li[a]+li[b] , li[a]+li[b] elif dp[a]==-1 and dp[b]>=0: ...
PHP
UTF-8
7,808
2.671875
3
[ "MIT" ]
permissive
<?php /** * OpenWebPresence Support Library - openwebpresence.com * * @copyright 2001 - 2017, Brian Tafoya. * @package OwpSettings * @author Brian Tafoya <btafoya@briantafoya.com> * @version 1.0 * @license MIT * @license https://opensource.org/licenses/MIT The MIT License * @category OpenWebPresenc...
Markdown
UTF-8
1,580
2.515625
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- TOCTitle: Zmienianie konta usługi programu RMS Title: Zmienianie konta usługi programu RMS ms:assetid: 'f257d66d-b823-41e4-bcb7-7c90eb295238' ms:contentKeyID: 18123501 ms:mtpsurl: 'https://technet.microsoft.com/pl-pl/library/Cc747736(v=WS.10)' --- Zmienianie konta usługi programu RMS ==============================...
PHP
UTF-8
4,824
2.515625
3
[]
no_license
<?php /** * Created by PhpStorm. * User: javaci * Date: 2020-08-30 * Time: 12:22 */ define("IPORDOMAIN",""); define("USERNAME", ""); define("PASSHASH", ""); define("PRTG_ENABLED",true); class Prtg { public $userName; public $objId; public function __construct($userName = "") { $this->user...
C++
UTF-8
4,480
2.796875
3
[ "BSD-3-Clause" ]
permissive
// Copyright 2013 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "sdk_util/thread_pool.h" #include <pthread.h> #include <semaphore.h> #include <stdio.h> #include <stdlib.h> #include "sdk_util/auto_lock.h" namespace sdk_util { #i...
C++
UTF-8
337
3.53125
4
[]
no_license
//(7.12)Implicit conversions of reference parameters #include <iostream> void double_it(double &it) { it *= 2; } void print_it(const double &it) { std::cout << it << std::endl; } int main() { double d{123}; double_it(d); print_it(d); int i{456}; // double_it(i); /* error, does not compile! */ ...
C++
UTF-8
1,218
3.734375
4
[]
no_license
#include<bits/stdc++.h> using namespace std; struct node { int data; node* next; }; node* head = NULL; void insert_end(int d) { node* new_node = new node; new_node -> data = d; new_node -> next = NULL; if(head == NULL) { head = new_node; } else { node* t = head; while(t -> next != NULL) { t = ...
Java
UTF-8
551
3.125
3
[]
no_license
public class Game{ private Prog06 word = new Prog06(); private Prog07 ball = new Prog07(); private Prog08 tic = new Prog08(); public void run(String i){ if (i.equals("Word Guess")) word.run(); else if (i.equals("Baseball")) ball.run(); else if (i.equa...
PHP
UTF-8
10,903
2.640625
3
[]
no_license
<?php //セッション開始 if(!isset($_SESSION)){ session_start(); } //XSS対策 function h($str) { return htmlspecialchars($str, ENT_QUOTES, "UTF-8"); } //性別 if($_SESSION["gender"]==0){ $genderWord = "男性"; }else{ $genderWord = "女性"; } //生活レベル switch($_SESSION["level"]){ case 0: ...
C#
UTF-8
4,088
2.578125
3
[]
no_license
 namespace ElTahmKench.Components.Spells { using System; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using ElTahmKench.Enumerations; using ElTahmKench.Utils; using Aimtec; using Aimtec.SDK; using Aimtec.SDK.Prediction; using Aimtec.SDK.Prediction.Skillshots...
Java
UTF-8
3,997
1.835938
2
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* * Copyright (c) 2016-2019 VMware, Inc. All Rights Reserved. * * This product is licensed to you under the Apache License, Version 2.0 (the "License"). * You may not use this product except in compliance with the License. * * This product may include a number of subcomponents with separate copyright notic...
C#
UTF-8
3,441
2.8125
3
[]
no_license
using HT.Framework.Contracts; using System; using System.Net.Http; using System.Threading.Tasks; namespace HT.Framework.MVC { /// <summary> /// ApiAiHttpClient /// </summary> public class ApiAiHttpClient : IHttpClient { /// <summary> /// HttpClient /// </summary> pr...
Shell
UTF-8
1,035
3.421875
3
[ "MIT" ]
permissive
#!/usr/bin/env sh set -e cd /etc/shlink initTables() { rm -f data/cache/app_config.php php vendor/doctrine/orm/bin/doctrine.php orm:schema-tool:create php vendor/doctrine/migrations/bin/doctrine-migrations.php migrations:migrate php vendor/doctrine/orm/bin/doctrine.php orm:generate-proxies shlink ...
Java
UTF-8
3,532
1.523438
2
[ "EPL-1.0", "Apache-2.0" ]
permissive
/* * Copyright 2013-2016 consulo.io * * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
Python
UTF-8
4,232
2.734375
3
[ "Apache-2.0", "MIT", "BSD-2-Clause" ]
permissive
# -*- coding: utf-8 -*- ''' Configuration of the kernel using sysctl ======================================== Control the kernel sysctl system. .. code-block:: yaml vm.swappiness: sysctl.present: - value: 20 ''' from __future__ import absolute_import, unicode_literals, print_function # Import python lib...
Java
UTF-8
325
2.71875
3
[]
no_license
package week3.day2.classroom; public class College extends University{ public static void main(String[] args) { College myColl = new College(); myColl.pg(); myColl.getug(); } @Override public void getug() { System.out.println("print unimplemented method of ug from the college"); } ...
Markdown
UTF-8
1,221
2.875
3
[ "CC-BY-4.0" ]
permissive
--- id: onRowMoved title: On Row Moved --- | Code | Peut être appelé par | Définition | | ---- | ------------------------------...
Markdown
UTF-8
934
2.90625
3
[]
no_license
#Codebook for data.csv **File-Type:** CSV, 15 rows (+ 1 header), 13 column, N=1046 `data.csv` *is a processed form of the raw dataset: I aggregated passengers to age categories and only kept variables for victims and all passengers (seperated by men and women).* ## Variables - **age_cat**: age categorie (ordinal) ...
JavaScript
UTF-8
1,399
3.046875
3
[ "MIT" ]
permissive
/*jshint esversion: 6 */ class Ball { constructor(x, y, vel) { this.pos = createVector(x, y); if (vel) this.vel = vel; else this.vel = createVector(random(-2, 2), random(-2, 2)); this.size = 8; this.alive = true; } update() { this.pos....
JavaScript
UTF-8
1,323
2.609375
3
[ "MIT" ]
permissive
import createReducer from '../../utils/createReducer' import ActionTypes from '../../constants/actionTypes' const initialState = { placesData: {}, placesResults: {}, searchTexts: {} } const handlers = { // Pattern: // [ActionTypes.ACTION_NAME]: actionFunction [ActionTypes.PLACES_UPDATE_DATA]: updateData, ...
C
UTF-8
2,164
3.71875
4
[ "MIT" ]
permissive
// Author: Trevor Martin // Date of Completion: 18 March 2019 // Language: C // Class: CSCI241 | Systems Programming | Oberlin College // Homework#: 4, tobinary.c //=================================================================================================== // DESCRIPTION //======================================...
Python
UTF-8
577
3.265625
3
[]
no_license
class ABBYYException(Exception): def __init__(self, code, message, *args, **kwargs): """ Initialize exception :param code: return code :type code: int :param message: message :type message: str """ self.code = code self.message = message ...
Java
UTF-8
3,280
2.265625
2
[]
no_license
package org.tarena.note.service; import javax.annotation.Resource; import org.springframework.dao.support.DaoSupport; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.tarena.note.da...