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 |
|---|---|---|---|---|---|---|---|
SQL | UTF-8 | 683 | 3.0625 | 3 | [] | no_license | https://suporte.powertuning.com.br/kb/article/136456/tempdb-identificando-consumidores-de-espaco?preview=true&revisionId=469453
Alter Database TempDB
Modify File (
Name = 'TempDev',
Size = 1000 MB,
MaxSize = 4000 MB,
FileGrowth = 512 MB
);
USE tempdb;
SELECT
file_id
,name
,type_desc
,Ta... |
JavaScript | UTF-8 | 4,764 | 3.296875 | 3 | [] | no_license | var moves = 1, winStreak = 1;
function startListners(){
$('.box').on('click', checkRule);
$('#shuffle').on('click', shuffleBoard);
}
function refreshGrid(target, text){
$(target).text(text);
}
function isValidPattern(pattern){
var inversion = 0;
for (i=0; i<9;i++){
for (j=i+1;j<9;j++){
if(pattern[... |
Shell | UTF-8 | 585 | 2.515625 | 3 | [] | no_license | # Copyright (c) 2008-2009, the Flatsoft, LLC.
# All rights reserved
# include config
. `dirname $0`/configuration.sh
# create desc dir
mkdir -p /var/backups/mirror
mkdir -p /var/backups/files
# copy exclude
copy_file $sliceconfig/config/etc/rdup.exclude.conf /etc/rdup.exclude.conf
# copy sysconfig
copy_file $sl... |
Python | UTF-8 | 7,584 | 3.21875 | 3 | [] | no_license | """An online triplet loss implementation method"""
"""
Triplet Loss:
L = max(dis(anchor, positive) - dis(anchor, negative) + margin, 0)
"""
import tensorflow as tf
import numpy as np
# import tensorflow.keras as keras
def _pairwise_euclidean_distance(embeddings, squared=False):
"""Compu... |
Python | UTF-8 | 865 | 2.546875 | 3 | [] | no_license | from tkinter import *
from tkinter.ttk import *
import Patient
import Search
import COVID
master = Tk()
master.title("COVID 19 Test")
master.geometry("400x300")
#master.resizable(False, False)
label = Label(master,text ="Select Options")
label.pack(pady = 10)
btn1 = Button(master,text="Patient Regis... |
Java | UTF-8 | 163 | 2.78125 | 3 | [] | no_license | package training.patterns.strategy;
class MallardDuck extends Duck {
@Override
void display() {
System.out.println("display() Mallard");
}
}
|
C# | UTF-8 | 3,181 | 2.640625 | 3 | [] | no_license | using OpenCVForUnity.CoreModule;
using OpenCVForUnity.DnnModule;
using OpenCVForUnity.ImgprocModule;
using System.Collections.Generic;
using UnityEngine;
// model https://github.com/onnx/models/tree/master/vision/body_analysis/emotion_ferplus
public class OpenCVDnnEmotionFerPlusExample : OpenCVDnnModuleExampleBase
... |
JavaScript | UTF-8 | 2,813 | 2.8125 | 3 | [] | no_license | /**
* Created by muaazsalagar on 3/13/16.
*/
"use strict"
module.exports = function(app, colorModel, uuid) {
//creates a new color whose properties are the same as the color object embedded in the HTTP request's body and
//the color belongs to a user whose id is equal to the userId path parameter.
//T... |
Python | UTF-8 | 576 | 3.390625 | 3 | [] | no_license | from cs50 import get_string
import sys
key = int(sys.argv[1]) #store key from user input
plain_text = get_string("Please enter text to encipher: ") #prompt user for a string
print("ciphertext: ", end="")
for c in plain_text:
if c.isalpha() == True:
if c.isupper() == True:
d = chr(((ord(c)-65 ... |
Python | UTF-8 | 3,276 | 3.203125 | 3 | [] | no_license | import emoji
import regex
import pandas as pd
import re
from itertools import groupby
class textualInformation:
all_emojis = list(emoji.UNICODE_EMOJI.keys())
def __init__(self):
all_emojis = list(emoji.UNICODE_EMOJI.keys())
def countEmoticons(self,text):
emoji_counter = 0
da... |
C++ | UTF-8 | 4,030 | 2.71875 | 3 | [
"MIT"
] | permissive | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <sstream>
//for boost::tokenizer
#include <boost/tokenizer.hpp>
#include <boost/lexical_cast.hpp>
#include <cstdlib>
#include <algorithm>
#include "common.hpp"
#include "basis_set.hpp"
namespace MOSolver {
//=======================... |
PHP | UTF-8 | 3,341 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Auth;
use App\Helpers\JWTHelper;
use App\Http\Controllers\Controller;
use App\Models\Auth\Auth;
use App\Models\Auth\User;
use Firebase\JWT\ExpiredException;
use Firebase\JWT\JWT;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Carbon;
use Illu... |
PHP | UTF-8 | 1,120 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php namespace Vinelab\Api;
/**
* @author Mahmoud Zalt <mahmoud@vinelab.com>
*/
use Illuminate\Support\Facades\Response;
use Illuminate\Http\Request;
class Responder {
/**
* @param \Illuminate\Http\Request $request
*/
public function __construct(Request $request)
{
$this->request = ... |
Java | UTF-8 | 6,175 | 2.109375 | 2 | [
"MIT"
] | permissive | package de.adler.springboot_postgres.controller;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import de.adler.springboot_postgres.database.entity.Customer;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWi... |
Python | UTF-8 | 1,530 | 3.078125 | 3 | [] | no_license | from tkinter import *
from tkinter.ttk import Combobox
from tkinter import messagebox as mb
import GameField
darkMode = 0 # булечка для смены тёмной и светлой темы
mode = 1 # 1 - новичок(8х8), 2 - любитель(16х16), 3 - проффесионал(32х32)
def get_mode_value():
return mode
def create_new_game(event):
Game... |
C++ | UTF-8 | 1,173 | 3.5625 | 4 | [] | no_license | #include <iostream>
#include <vector>
using namespace std;
void zero_matrix(int **arr,int m,int n);
void make_zero(int **arr, int row, int col,int m, int n);
struct index {
int row;
int col;
};
void zero_matrix(int **arr,int m,int n) {
vector<index> indices;
for(int i=0;i<m;i++){
for(int j=0;j<n;j++) {
if(... |
C | UTF-8 | 5,588 | 2.515625 | 3 | [] | no_license | /**
*****************************************************************************
* @file vmlight.c
* Virtual machine functions for creating light source objects.
*
*****************************************************************************
*/
#include "local.h"
/********************************************... |
C++ | UTF-8 | 672 | 2.953125 | 3 | [] | no_license | #include "Texture2D.h"
void Texture2D::LoadTexture(const char* filename)
{
ILuint ImageName;
ilutRenderer(ILUT_OPENGL);
ilGenImages(1, &ImageName);
ilBindImage(ImageName);
ilLoadImage((ILstring)filename);
Texture = ilutGLBindTexImage();
}
//draws image in square. (x,y) is the bottom left corner
void Texture2... |
Java | UTF-8 | 289 | 1.734375 | 2 | [
"Apache-2.0"
] | permissive | package org.scadalts.e2e.page.core.pages;
import org.scadalts.e2e.page.core.utils.E2eWebDriverProvider;
interface Refreshable<T extends PageObject<T>> extends GetPage<T> {
default T refreshPage() {
E2eWebDriverProvider.navigate().refresh();
return getPage();
}
}
|
SQL | UTF-8 | 2,947 | 3.578125 | 4 | [] | no_license | --
-- Table structure for table `capability`
--
CREATE TABLE IF NOT EXISTS `av_capability` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`capability` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
-- --------------------------------------------------------
--
-- Table stru... |
Go | UTF-8 | 1,902 | 3.984375 | 4 | [] | no_license | package main
import (
"fmt"
"strings"
)
func main() {
str1 := "paraparaparadise"
str2 := "paragraph"
x := NewBigram(str1)
y := NewBigram(str2)
fmt.Println(x)
fmt.Println(y)
fmt.Println(x.Union(y))
fmt.Println(x.Intersect(y))
fmt.Println(x.Difference(y))
fmt.Println(x.Contains("se"))
fmt.Println(y.Contain... |
Markdown | UTF-8 | 530 | 2.84375 | 3 | [] | no_license | # Google homepage
The project's objective is to deconstruct the existing webpage and rebuilt it.
## Task
- [x] The goal is to start thinking about how elements get placed on the page and roughly how they get styled and aligned.
- [x] Add markup with HTML5 sementic
- [x] Style elements with CSS3
- [x] Must be mo... |
Markdown | UTF-8 | 577 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | # Countries
## Get All Countries
```json
[
{
"id": 1,
"name": "Brazil",
"nameForURL": "brazil",
"liveGames": 2,
"totalGames": 5,
"sportTypes": [1, 2, 8, 12, 13]
},
{
"id": 1,
"name": "Argentina",
"nameForURL": "argentina",
"li... |
Markdown | UTF-8 | 21,681 | 3.09375 | 3 | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | ---
title: 'Cloud Data Sync Methods and Benchmark: DVC vs Rclone'
date: 2020-11-26
description: |
DVC 1.0 optimized data synchronization to and from remote storage. Here's
how we did it.
descriptionLong: |
Synchronizing data to and from remote storage requires addressing an
often overlooked performance bottlene... |
Java | UTF-8 | 3,715 | 2.5 | 2 | [] | no_license | package com.koreait.cobox.model.movie.service;
import java.io.File;
import java.util.HashMap;
import java.util.List;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import... |
C# | UTF-8 | 1,574 | 2.515625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Breackgame
{
public class ControlBar
{
public ControlBar()
{
}
public void GetPressKeyOnGameC... |
Python | UTF-8 | 2,736 | 2.8125 | 3 | [] | no_license | import json
import datetime
from copy import deepcopy
from PyLX_16a.lx16a import *
class Recorder():
LX16A.initialize("/dev/ttyUSB0")
motor_numbers = [11, 12, 13,
21, 22, 23,
31, 32, 33]
motors = [LX16A(motor_num) for motor_num in motor_numbers]
clean_sequen... |
C# | UTF-8 | 16,885 | 2.765625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Text;
using Log4Simple.Core;
using Log4Simple.Layout;
using Log4Simple.Util;
using System.Collections;
using System.IO;
namespace Log4Simple.Appender
{
/// <summary>
/// Abstract base class implementation of <see cref="IAppender"/>.
/// </summa... |
Java | UTF-8 | 9,769 | 1.851563 | 2 | [] | no_license | package edu.cs.fsu.gibbens.collaborativewriting;
import android.R.bool;
import android.os.Bundle;
import com.parse.Parse;
import com.parse.ParseAnalytics;
import com.parse.ParseObject;
import com.parse.ParseUser;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
impor... |
Java | UTF-8 | 2,659 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | /**
* Opensec UTIL - https://nakamura5akihito.github.io/
* Copyright (C) 2015 Akihito Nakamura
*
* 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/... |
Java | UTF-8 | 4,661 | 1.9375 | 2 | [] | no_license | /*
* Copyright (c) 2004 Auster Solutions. All Rights Reserved.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLA... |
C# | UTF-8 | 4,856 | 3.21875 | 3 | [] | no_license | using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JetBrains.Annotations;
namespace TerrainDemo
{
/// <summary>
/// Collection of all zones influences for some point
/// </summary>
public struct ZoneRatio : IEnumerable<ZoneValue>
{... |
C++ | UTF-8 | 2,229 | 2.640625 | 3 | [] | no_license | //
// buildProblem.cpp
// exampleNonlinearProgramming
//
// Created by Angelo Bonzanini on 12/10/20.
//
#include "buildProblem.hpp"
void FG_eval::operator()(ADvector & fg, const ADvector & x){
// Objective function f(x)
fg[0] = x[0]*x[3]*(x[0]+x[1]+x[2])+x[2];
// Constraints
// g_1(x)
... |
Markdown | UTF-8 | 5,799 | 2.921875 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: Creare una chiave di partizione sintetica in Azure Cosmos DB per distribuire uniformemente dati e carico di lavoro.
description: Informazioni su come usare le chiavi di partizione sintetica nei contenitori di Azure Cosmos
author: rimman
ms.service: cosmos-db
ms.topic: conceptual
ms.date: 05/21/2019
ms.author... |
Swift | UTF-8 | 2,966 | 2.796875 | 3 | [
"MIT"
] | permissive | //
// UIColor + Extension.swift
// BBS-iOS
//
// Created by pengpeng on 16/6/1.
// Copyright © 2016年 swift520. All rights reserved.
//
import UIKit
extension UIColor {
//
static var randomColor: UIColor{
let red = CGFloat(arc4random_uniform(255)) / 255.0
let green = CGFloat(arc4random_... |
C# | UTF-8 | 647 | 3.328125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DiceGame
{
class BasicCells
{
private int value;
private List<BasicCells> connected;
public BasicCells(int val)
{
Value = val;
... |
JavaScript | UTF-8 | 599 | 3.53125 | 4 | [] | no_license | /**
* @param {number[]} height
* @return {number}
*/
var trap = function (height) {
let max = 0;
let volumn = 0;
const leftMax = [];
const rightMax = [];
for (let i = 0; i < height.length; i++) {
leftMax[i] = max = Math.max(height[i], max);
}
max = 0;
for (let i = height.length - 1; i >= 0; i-... |
C | UTF-8 | 1,037 | 2.859375 | 3 | [] | no_license | #include <gdt.h>
struct gdt_entry_t
{
uint16_t limit_low;
uint16_t base_low;
uint8_t base_mid;
uint8_t access;
uint8_t granularity;
uint8_t base_high;
} __attribute__((packed));
struct gdt_ptr_t
{
uint16_t limit;
uint32_t base;
} __attribute__((packed));
struct gdt_entry_t gdt[3];
str... |
Java | UTF-8 | 6,395 | 1.992188 | 2 | [] | no_license | package com.netx.api.controller.shoppingmall.back;
import com.netx.common.vo.business.*;
import com.netx.fuse.biz.shoppingmall.business.SellerFuseAction;
import com.netx.fuse.biz.shoppingmall.product.ProductFuseAction;
import com.netx.shopping.biz.business.SellerAction;
import com.netx.shopping.biz.product.ProductActi... |
PHP | UTF-8 | 748 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
use Carbon\Carbon;
use Auth;
class TrialCheck
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
... |
Python | UTF-8 | 5,198 | 2.578125 | 3 | [] | no_license | import tensorflow
from tensorflow import keras
from tensorflow.keras import Model, layers
from tensorflow.keras.layers import Dense, Dropout, Conv2D
from tensorflow.keras.layers import LSTM, TimeDistributed, Bidirectional
from tensorflow.keras.constraints import max_norm
class CNN_BLSTM(object):
def __init__(... |
SQL | UTF-8 | 2,892 | 3.828125 | 4 | [
"MIT"
] | permissive | -- migrate:up
alter table job_results modify type varchar(64) not null;
drop procedure add_job_result;
create definer = 'insert_objects'@'localhost'
procedure add_job_result (auth0id varchar(32), jobid char(36),
new_schema_path varchar(128), new_type varchar(64),
... |
JavaScript | UTF-8 | 5,293 | 2.515625 | 3 | [] | no_license | import React, {Component} from 'react';
import {BrowserRouter as Router, Route, Switch} from "react-router-dom";
import {ApiConnector} from "./components/api/apiConnector";
import {TasksView} from "./components/views/tasksView";
import {LoginView} from "./components/views/loginView";
import {LocalStorage} from "./compo... |
Python | UTF-8 | 2,336 | 2.8125 | 3 | [] | no_license | from django.urls import reverse
from rest_framework import status
from rest_framework.test import APITestCase
from .models import Pizza, Order
class SimpleAPITests(APITestCase):
"""
Simple API test cases for create, list, update and delete endpoints.
"""
def setUp(self):
veggie_pizza = Pizza.... |
Markdown | UTF-8 | 1,394 | 2.65625 | 3 | [] | no_license | # Well Hello There
This is a little template builder for Hubspot using MJML. Really Simple to use. Let's get started.
### First Time Here?
1. Clone Repo
2. Run `npm install`
3. Start building!
### Wanna build some templates? Alright, I guess you can...
1. Run `npm run email`
2. This will watch `_src/email_markup/`
... |
Markdown | UTF-8 | 678 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | # monte-carlo-rust
Visualization of Monte Carlo made with amethyst
## How to install
Clone the repository.
To run the game, run the following command on the directory where you cloned the repository, which defaults to the `vulkan` graphics backend:
```bash
cargo run
```
Windows and Linux users may explicitly choos... |
Markdown | UTF-8 | 1,301 | 2.515625 | 3 | [] | no_license | Third-party contributed code for ORSEE
======================
This repository contains the third-party contributed code related to ORSEE, such as scripts, utilities and tools designed to simplify developer or maintainer's tasks. This code is not a part of ORSEE core due to specific nature of cases where it can be impl... |
Java | UTF-8 | 329 | 2.71875 | 3 | [] | no_license | package 设计模式.观察者模式.interfaces;
/**
* @author chenh
* @date 2019-08-23
*/
public interface Subject {
/**
* 注册
*/
void registerObServer(Observer observer);
/**
* 注销
*/
void removeObserver(Observer o);
/**
* 刷新
*/
void notifyObservers();
}
|
Java | UTF-8 | 1,016 | 2.6875 | 3 | [] | no_license | package swea_p;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Swea5658_R {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int TC = sc.nextInt();
for(int tc=1; tc<=TC; tc++) {
... |
Python | UTF-8 | 1,970 | 3 | 3 | [] | no_license | #coding:utf-8
import os
import scipy as sp
import numpy as np
from sklearn.datasets import load_files
from sklearn.cross_validation import train_test_split
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import precision_recall_curve
... |
JavaScript | UTF-8 | 1,235 | 4.46875 | 4 | [] | no_license | /*
create a longest phrase function that takes an array as a parameter
iterate through the array and check length of each string
create longest default to zero
IF string is larger than longest set that string to longest
*/
function longestPhrase(array) {
longest = 0
for(var i = 0; i < array.length; i++) {
if(ar... |
Java | UTF-8 | 143 | 1.789063 | 2 | [] | no_license | package gui;
import java.util.List;
public class DisplayGameConfig {
public List<String> playerTypes;
public Runnable playHandler;
}
|
Ruby | UTF-8 | 3,886 | 3.578125 | 4 | [] | no_license | require 'pry'
# def fizzbuzz(value)
# output = ""
# output << 'fizz' if value % 3 == 0
# output << 'buzz' if value % 5 == 0
# output.empty? ? value : output
# end
# def fizzbuzz_v2(value)
# case
# when value % 3 == 0 && value % 5 == 0
# 'fizzbuzz'
# when value % 3 == 0
# 'fizz'
# when value % ... |
TypeScript | UTF-8 | 8,780 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive |
module mod1 {
var mod1var = 1;
function mod1fn() {
var bar = 1;
function foob( ){ }
static foovar;
static foosfunc( ) { }
} // Not fully implemented yet: static get fooGet( ); static set fooSet( bar )
class mod1cls {
public cFunc() { }
public... |
Java | UTF-8 | 474 | 1.976563 | 2 | [] | no_license | package com.service;
import java.util.List;
import com.model.ExpenseApplayTrain;
public interface IExpenseApplayTrainService {
//根据StaffID查询对应的所有火车票报销记录
public List<ExpenseApplayTrain> selectByStaffId(String staffId);
//根据Id查询单条报销记录
public ExpenseApplayTrain selectById(int id);
//根据ID值是否为空新增或者更新数据库报销信息
publi... |
Java | UTF-8 | 5,884 | 2.015625 | 2 | [] | no_license | package cn.gdeng.paycenter.admin.controller.right;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.springframework.s... |
PHP | UTF-8 | 978 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Leaf;
/**
* Leaf View Engine
* -----------
* View engine manager for Leaf.
*
* @author Michael Darko <mickdd22@gmail.com>
* @since v2.4.4
*/
class View
{
public static $engines = [];
/**
* Attach view engine to Leaf view
*
* @param mixed $classN... |
C++ | UTF-8 | 2,613 | 2.515625 | 3 | [] | no_license | #include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
counter = 0;
ofSetCircleResolution(50);
ofBackground(255,255,255);
bSmooth = false;
ofSetWindowTitle("ofxVLCVideoPlayer example");
ofSetFrameRate(60); // if vertical sync is off, we can go a bit fast.... |
Python | UTF-8 | 1,198 | 3.109375 | 3 | [] | no_license | from selenium import webdriver
from time import sleep
class TestCase(object):
def __init__(self):
self.driver = webdriver.Chrome()
self.driver.get("https://www.baidu.com")
def jsAlert(self):
self.driver.execute_script("alert('test')")
sleep(2)
self.driver.switch_to.aler... |
Java | UTF-8 | 168 | 1.976563 | 2 | [] | no_license | package com.alvinsvitzer.flixbook.logger;
/**
* Created by alvin.svitzer on 30/03/2017.
*/
public interface Logger {
void logd(String tag, String message);
}
|
Java | UTF-8 | 409 | 1.992188 | 2 | [] | no_license | package org.jboss.soa.qa.security;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@Path("/service")
public interface MyServiceResource {
@GET
@Path("/permit-all")
@Produces(MediaType.TEXT_PLAIN)
Response get();
... |
Markdown | UTF-8 | 2,545 | 3.375 | 3 | [] | no_license | # b3sol_dance
Planteamiento del problema:
-Dado que los alumnos no pueden ir vestidos al baile del mismo color que sus rivale, podemos abstraer el problema como un problema de grafos, donde cada alumno es un Nodo y su rivalidad con otro alumno es una arista, de tal forma que tenemos que colorear todos los nodos de gr... |
JavaScript | UTF-8 | 266 | 2.984375 | 3 | [] | no_license | let link = document.getElementById('google-link');
link.addEventListener('mouseenter', function(event) {
console.log('Hover on link: ', event.target.text);
});
link.addEventListener('mouseenter', function() {
console.log('Hover once');
},
{ once: true }
); |
Java | UTF-8 | 1,795 | 2.4375 | 2 | [] | no_license |
package model.visitor;
import persistence.*;
public abstract class ShopkeeperCommandStandardVisitor implements ShopkeeperCommandVisitor {
public void handleChangeProductGroupCommand(PersistentChangeProductGroupCommand changeProductGroupCommand) throws PersistenceException{
this.standardHandling(chan... |
Markdown | UTF-8 | 3,798 | 3.859375 | 4 | [] | no_license | ### 知识回顾
#### undefined和null的区别
* undefined代表的是定义的而没有赋值
* null表示定义的对象赋值了,但是值为null
#### 什么时候给变量赋值为null
* 初始赋值,表明我要将这个变量赋值为对象的引用地址
* 结束前,让对象成为垃圾对象,被垃圾回收器回收
#### 区分变量类型和数据类型
* 数据的类型
* 基本类型
* 对象类型
* 变量的类型,根据变量内存值得类型(typeof的实现原理)
* 基本类型:变量内存值保存的是基本类型的数据
* 引用类型:变量保存的是地址值
#### 内存分类
* 栈:全局变量/局部变量(变量名+基本数据类型/地址)... |
C | UTF-8 | 453 | 3.6875 | 4 | [] | no_license | #include <stdio.h>
//void print_arr(int array[], int len)
void print_arr(int *array, int len)
{
int i;
array[0] = 23;
for(i = 0; i < len; i++)
{
printf("%d ", array[i]); // *(array + i)
}
printf("\n");
}
int main(void)
{
int i;
int arr[7];
int arr1[10] = {};
for(i = 0; i < 7; i++)
{
arr[i] = 2 * i +... |
Java | UTF-8 | 535 | 1.898438 | 2 | [] | no_license | package hu.psprog.leaflet.bridge.client.domain.error;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Builder;
import lombok.extern.jackson.Jacksonized;
import java.io.Serializable;
/**
* Validation error message list response model.
*
* @author Peter Smith
*/
@Builder(setterPrefix = ... |
Python | UTF-8 | 5,013 | 2.578125 | 3 | [] | no_license | # -*- coding: utf-8 -*-
from django.shortcuts import render
from django.http import HttpResponse
import json
from .duanju import *
def layout(request):
return render(request, 'layout.html')
def get_user(request):
user_id = request.GET['user_id']
password = request.GET['password']
log_success = 'no'
... |
Java | UTF-8 | 596 | 3.234375 | 3 | [] | no_license | package com.j2.w11;
import java.util.ArrayList;
import java.util.Arrays;
public class DuckSortTestDrive{
public static void main(String[] args){
Duck[] ducks={
new Duck("Daffy",8),new Duck("Dewey",2),
new Duck("Haward",7),new Duck("Louie",2),
new Duck("Donald",10),new Duck("Huey",2)};
System.out.p... |
PHP | UTF-8 | 1,192 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Carbon\Carbon;
class VehiculeSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('vehicules')->insert([
... |
Python | UTF-8 | 1,209 | 2.59375 | 3 | [] | no_license | import itertools
import random
from abc import abstractmethod
from typing import Tuple
import numpy as np
from evobench.benchmark import Benchmark
from evobench.model import Population, Solution
from bike.ga.operator.operator import Operator
class Crossover(Operator):
def __init__(
self,
benchm... |
Markdown | UTF-8 | 12,732 | 3.640625 | 4 | [] | no_license | ### Welcome To Software Engineering Practices Part II
In part 2 of software engineering practices, you'll learn about the following practices of software engineering and how they apply in data science.
* Testing
* Logging
* Code reviews
### 2. Testing
Testing your code is essential before deployment. It helps ... |
Python | UTF-8 | 397 | 3.375 | 3 | [] | no_license | #!/usr/bin/python
from project_euler_lib import factoring
def main():
"""Find the sum of primes below 2 million."""
pgen = factoring.PrimeGenerator()
next = pgen.next_prime()
sum = 0
while next < 2000000:
sum += next
next = pgen.next_prime()
print 'The sum of pr... |
JavaScript | UTF-8 | 750 | 2.546875 | 3 | [] | no_license | export const utilsService = {
makeId
}
function makeId(length = 5) {
var txt = '';
var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
for (var i = 0; i < length; i++) {
txt += possible.charAt(Math.floor(Math.random() * possible.length));
}
return txt;
}
// ... |
Java | UTF-8 | 2,654 | 2.0625 | 2 | [
"Apache-2.0"
] | permissive | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
Markdown | UTF-8 | 1,502 | 2.828125 | 3 | [
"Apache-2.0"
] | permissive | ---
category: Components
subtitle: 标签
type: Data View
noinstant: true
title: Tag
tag:
- test
---
# Tag 标签
进行标记和分类的小标签。用于标记事物的属性和维度。
## 基础用法
标签
::: demo
基本标签的用法,设置color决定tag的颜色。color可以是单词,比如:red, orange,也可以是Hex值,比如:#f50,#2db7f5。
```html
<template>
Color:
<bc-tag color="orange">orange</bc-tag>
<bc-tag col... |
Markdown | UTF-8 | 1,745 | 2.625 | 3 | [
"CC-BY-3.0"
] | permissive | # Short Stories For Adult Children
## Chapters
### 1. "🍕-gate Has [No Basis](https://www.youtube.com/watch?v=yP1MtaSIePk) [In Reality](https://www.thedailybeast.com/the-billionaire-pedophile-who-could-bring-down-donald-trump-and-hillary-clinton)"
*1-6 suggested by [@taoeffect](https://twitter.com/taoeffect/status/9... |
C++ | UTF-8 | 848 | 2.953125 | 3 | [] | no_license | class Solution {
public:
int findBottomLeftValue(TreeNode* root) {
queue<TreeNode*> q;
q.push(root);
int ans = root->val;
while(!q.empty())
{
queue<TreeNode*> t;
bool f = true;
while(!q.empty())
{
... |
JavaScript | UTF-8 | 686 | 3.234375 | 3 | [] | no_license | var pasta = "Spaghetti"; // ES5 syntax
const meat = "Pancetta"; // ES6 syntax
let sauce = "Eggs and cheese"; // ES6 syntax
// Template literals, like the one below, were introduced in ES6
const carbonara = `You can make carbonara with ${pasta}, ${meat}, and a sauce made with ${sauce}.`;
/*Install command can be use... |
JavaScript | UTF-8 | 620 | 2.75 | 3 | [] | no_license | const isAlternative = require("./isAlternative");
const DIGITS = {
" _ \n| |\n|_|\n": '0',
" \n |\n |\n": '1',
" _ \n _|\n|_ \n": '2',
" _ \n _|\n _|\n": '3',
" \n|_|\n |\n": '4',
" _ \n|_ \n _|\n": '5',
" _ \n|_ \n|_|\n": '6',
" _ \n |\n |\n": '7',
" _ \n|_|\n|_|\n": '8',
... |
Java | UTF-8 | 997 | 3.5625 | 4 | [] | 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 com.foehn.lambda.buildin;
import java.util.function.BiFunction;
import java.util.function.Function;
/**
*
* @au... |
C | UTF-8 | 1,004 | 3.1875 | 3 | [] | no_license | /*
* 007SVC.c
*
*/
#include <stdio.h>
#include <stdint.h>
int main(void)
{
// Calling the SVC exception
__asm("SVC #8");
// assigning the contents of R0 to data variable
uint32_t data;
__asm volatile("MOV %0,R0":"=r"(data) ::);
printf(" New svc number = %d ", data);
for(;;);
}
__attribute__((naked)) void SVC_... |
Markdown | UTF-8 | 2,407 | 3.25 | 3 | [] | no_license | ## How to configure Tomcat to always require HTTPS
[Source](http://www.itworld.com/development/79351/how-configure-tomcat-always-require-https)
**First**, make sure that you have configured and enabled both the HTTP and HTTPS elements in your conf/server.xml file:
~~~~
<Connector port="8080" protocol="HTTP/1.1"
... |
Python | UTF-8 | 61 | 3.171875 | 3 | [] | no_license | string2=input()
str1=list(string2)
print(*str1[::-1],sep="")
|
PHP | UTF-8 | 1,129 | 2.578125 | 3 | [] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "inventaris".
*
* @property string $id_invent
* @property string|null $nama_brg
* @property float|null $harga
* @property string|null $keterangan
* @property string|null $timestamp
*/
class DataInventaris extends \yii\db\ActiveRecor... |
Java | UTF-8 | 19,133 | 2.3125 | 2 | [] | no_license | package com.wadesi.codespeak;
import android.content.Context;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.AsyncTask;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;
im... |
Markdown | UTF-8 | 3,205 | 3 | 3 | [] | no_license | # Getting to our Wedding Party
## What to expect
The party starts at 1pm at Oddfellows on the Park Bruntwood Park, Cheadle, SK8 1HX and runs until 11pm. There will be a canape lunch, lots of board games, a buffet dinner service, and drinks available at a private bar.
... |
Java | UTF-8 | 2,179 | 2.5 | 2 | [
"Apache-2.0"
] | permissive | package br.com.edu.zup.ecommerce.user;
import br.com.edu.zup.ecommerce.auth.Role;
import org.hibernate.annotations.CreationTimestamp;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import javax.persistence.*;
import javax.validation.constra... |
C++ | UTF-8 | 654 | 2.640625 | 3 | [] | no_license | #ifndef SHOP_H
#define SHOP_H
using namespace std;
class Shop {
private:
int potions;
int supplies;
int currGold;
int boughtP;
int boughtS;
//int upgrade[10]; //scrapped
//int upgradeNum;
public:
//Shop(); no default constructor... |
C++ | UTF-8 | 393 | 3.171875 | 3 | [] | no_license | #pragma once
#include <utility>
#include <cmath>
using namespace std;
class Point
{
public:
double x, y;
Point();
Point(pair<double, double> p);
Point operator +(Point P);
Point operator -(Point P);
Point operator *(double d);
Point operator /(double d);
friend double distance(Point A, Point B);
... |
PHP | UTF-8 | 4,834 | 2.84375 | 3 | [] | no_license | <?php require_once "includes/connectdb.inc.php";
$default_date = date("Y-m-d");
//if form has been submitted process it
if(isset($_POST['submit'])){
$_POST = array_map('stripslashes', $_POST );
//collect form data
extract($_POST);
//very basic validation
if($startDate ==''){
$error[] = 'Pl... |
Python | UTF-8 | 342 | 3.796875 | 4 | [
"Apache-2.0"
] | permissive | #Script: calculadora
""" Operaciones basicas con 2 numeros
"""
n1=5
n2=6
suma=n1+n2
resta=n1-n2
multiplicacion=n1*n2
division=n1/n2
print ("el resultado de la suma es ", suma)
print ("el resultado de la resta es ", resta)
print ("el resultado de la multiplicacion es ", multiplicacion)
print ("el resultado de la divisi... |
JavaScript | UTF-8 | 900 | 2.53125 | 3 | [] | no_license | import Axios from "axios";
const url = "/projects/";
class ProjectService {
async getAll() {
try {
const res = await Axios.get(url);
return await res.data;
} catch (e) {
throw new Error(e);
}
}
async create(newProject) {
try {
const res = await Axios.post(url, newProject... |
JavaScript | UTF-8 | 723 | 3.40625 | 3 | [] | no_license | var xvals = [];
var yvals = [];
var bvals = [];
function setup()
{
createCanvas(1920, 800);
strokeWeight(2);
}
function draw()
{
background('rgba(0,0,0,0)');
for(var i = 1; i < width; i++) {
xvals[i-1] = xvals[i];
yvals[i-1] = yvals[i];
bvals[i-1] = bvals[i];
}
// Add the new values to the en... |
JavaScript | UTF-8 | 2,359 | 2.75 | 3 | [] | no_license | const express = require('express');
const app = express();
//mongoose database
const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/employeeData', { useNewUrlParser: true, useUnifiedTopology: true });
const path = require('path');
const bodyParser = require('body-parser');
app.u... |
C++ | UTF-8 | 4,793 | 2.75 | 3 | [] | no_license | //
// Created by oetch on 16/09/2018.
//
#ifndef TRABALHO_1_CLION_ACOMODACAO_H
#define TRABALHO_1_CLION_ACOMODACAO_H
#include "../../Headers/Dominios/Identificador.h"
#include "../../Headers/Dominios/Tipo_Acomodacao.h"
#include "../Dominios/Capacidade_De_Acomodacao.h"
#include "../../Headers/Dominios/Data.h"
#include ... |
Java | UTF-8 | 905 | 3.453125 | 3 | [] | no_license | package com.github.lightvelocity.j01.nio.block;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
public class BlockFileChannel {
public static void main(String[] args) throws IOException {
RandomAccessFile srcFile = new RandomAccessFil... |
Python | UTF-8 | 434 | 3.328125 | 3 | [] | no_license |
class AlreadyLoadedError(Exception):
def __init__(self, already_loaded):
super().__init__("%s already loaded!" %(already_loaded))
class NotFoundError(Exception):
def __init__(self, item_not_found):
super().__init__("%s does not exist!" %(item_not_found))
class SubgroupError(Exception):
... |
C# | UTF-8 | 14,869 | 2.640625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sam.XmlDiffPath
{
internal class MinimalTreeDistance
{
/// <summary>
/// MinimalTreeDistanceAlgo.Distance
/// </summary>
priva... |
Markdown | UTF-8 | 8,657 | 2.828125 | 3 | [] | no_license | [Clearing an Isekai with the Zero-Believers Goddess – The Weakest Mage among the Classmates (WN) c211](https://isekailunatic.com/2021/01/21/wm-chapter-211-the-moon-oracle-furiae-is-in-shambles/)
<br/><br/>
TLN: Hey guys, Reigokai here!<br/>
Sponsored Chapters on days other than sunday are back! After a lot of mess in t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.