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 |
|---|---|---|---|---|---|---|---|
TypeScript | UTF-8 | 3,897 | 2.515625 | 3 | [] | no_license | import { BattleConst } from "../battle/BattleConst";
import Game from "./Game";
import Tile from "./Tile";
import GameStyle from "./GameStyle";
const {ccclass, property} = cc._decorator;
@ccclass
export default class Card extends cc.Component{
@property(cc.Node)
private board: cc.Node = null;
@propert... |
Java | UTF-8 | 2,033 | 2.453125 | 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 org.itsoftsolutions.controller.Services;
import javafx.concurrent.Service;
import javafx.concurrent.Task;
import javafx.scene.... |
Java | UTF-8 | 2,220 | 3.890625 | 4 | [] | no_license | import java.util.Arrays;
public class ArraySort {
public static void main(String[] args){
int[] array = { 14, 9, 28, 3, 7, 63, 89, 5};
sort(array);
System.out.print(Arrays.toString(array));
}
public static void sort(
int[] Array) {
//This ca... |
Java | UTF-8 | 2,773 | 2.53125 | 3 | [] | no_license | package util;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
import java.util.Properties;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.sel... |
C | UTF-8 | 2,087 | 3.390625 | 3 | [
"WTFPL"
] | permissive | #include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#define PORT 1234 //定义端口号
#define MAXDATASIZE 100 //定义接收缓冲区大小
main()
{
int sockfd;
struct sockaddr_in server;
struct sockaddr_in client... |
Shell | WINDOWS-1252 | 921 | 3.359375 | 3 | [
"Apache-2.0"
] | permissive | #!/bin/sh
#####################################################################
# Project:Easy Web Framework
#
# Description: This project is based on much more open source projects than ever before,
# and can be applied to mostly web development environment.
# Author:ľ 110476592@qq.com
#
#
#
# ========... |
Java | UTF-8 | 1,388 | 2.90625 | 3 | [] | no_license | package aufgabe.Personen;
import aufgabe.Termine.Veranstaltung;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Arrays;
public class Dozent extends Angestellter{
ArrayList<Veranstaltung> veranstaltung = new ArrayList<>();
Mitarbeiter mitarbeiter;
public Dozent(String name, Strin... |
Markdown | UTF-8 | 9,064 | 3.765625 | 4 | [] | no_license | % Complexidade de Algoritmos
% Paulino Ng
% 2020-04-03
## Plano da aula
Esta aula apresenta a análise assintótica de alguns algoritmos simples.
1. Análise do algoritmo de impressão recursiva dos valores de uma lista encadeada.
2. Busca em um vetor aleatório
3. Busca em um vetor ordenado
4. Divisão e conquista: soluç... |
C++ | UTF-8 | 1,065 | 3.015625 | 3 | [] | no_license | #ifndef MATH_CONSTANTS_H
#define MATH_CONSTANTS_H
#include "gltypes.h"
//#include "vec3.h"
namespace gsl
{
// Mathematical constants
constexpr double PI_D = 3.141592653589793238462643383279502884;
constexpr float PI = 3.14159265358979323846264338f;
constexpr float E = 2.71828182845904523536f;
cons... |
PHP | UTF-8 | 925 | 2.859375 | 3 | [] | no_license | <?php
namespace Stgen\Source;
use Stgen\Source\Item\ISourceItem;
class BlacklistSourceDecorator extends \FilterIterator implements ISource
{
/**
* @var array
*/
private $blacklist;
/**
* @var ISource
*/
private $decorated;
/**
* BlacklistSourceDecorator constructor.
... |
Markdown | UTF-8 | 444 | 3.15625 | 3 | [] | no_license | # 题目地址
<https://leetcode-cn.com/problems/number-of-good-pairs/>
# 解答
题目很简单,主要是关注 Rust 的用法。
```Rust
impl Solution {
pub fn num_identical_pairs(nums: Vec<i32>) -> i32 {
let mut count = 0;
for i in 1..nums.len() {
for j in 0..i {
if nums[i] == nums[j] {
cou... |
Java | UTF-8 | 1,416 | 3.671875 | 4 | [] | no_license | //Пользователь вводит размер массива и данные с клавиатуры в массив типа double.
//Посчитайте среднее арифметическое элементов массива.
//После этого произведите вывод массива на экран,
//где каждый элемент массива умножается на среднее арифметическое
import java.text.DecimalFormat;
import java.util.Arrays;
import jav... |
C++ | UTF-8 | 5,972 | 3.28125 | 3 | [] | no_license | /*!
\file
\brief String Array description
\author Yaroslav Pozndyak
File with a description of the class StringArray
*/
#include "StringArray.h"
/*!
\param [in] file pointer to used file
\return size of the file in bites
*/
long long get_file_size(FILE* *file) {
assert(file... |
Markdown | UTF-8 | 10,867 | 2.953125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive |
# Predicting NCAAM 2017-2019 First Round Matchups
(technical presentation can be found in index.ipynb file in project_files folder)
## Goal
In this notebook, we construct a classifier to attempt to forecast the outcomes of 2017-2019 NCAAM March Madness first round matchups. Although our goal is overall preditions ... |
Java | UTF-8 | 701 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | package deskplaner.commands;
import java.io.File;
import deskplaner.handler.CommandHandler;
import deskplaner.main.DeskPlaner;
import deskplaner.util.Command;
public class VersionCommand implements Command {
@Override
public boolean onCommand(String label, String args[], File directory) {
String strin... |
PHP | UTF-8 | 4,137 | 3.140625 | 3 | [] | no_license | <?php
/**
* Manage queries for a mysql db
*
*/
class database {
private $_host = "localhost";
private $_user = "LinkBiz";
private $_pass = "fzg60n82hc";
private $_base = "proj_LinkBiz_7isoybau";
private $_cursor = null;
private $_ressource = null;
private $_errorNum = 0;
private ... |
Go | UTF-8 | 766 | 3.09375 | 3 | [] | no_license | /**
@author ZhengHao Lou
Date 2022/06/08
*/
package main
import "fmt"
/**
https://leetcode.cn/problems/valid-boomerang/
*/
func isBoomerang(points [][]int) bool {
if (points[0][0] == points[1][0] && points[0][1] == points[1][1]) ||
(points[0][0] == points[2][0] && points[0][1] == points[2][1]) {
return false
... |
Swift | UTF-8 | 4,302 | 3.015625 | 3 | [] | no_license | //
// Currency.swift
// CurrencyCalculator
//
// Created by Jacob Aronoff on 7/17/15.
// Copyright (c) 2015 Jacob Aronoff. All rights reserved.
//
import Foundation
class Currency: Printable {
var symbol: String?
var name: String!
var code: String!
var formatter: NSNumberFormatter?
var myUSCurr... |
Java | UTF-8 | 629 | 2.890625 | 3 | [] | no_license | package com.example.spacetraders.data.entity;
public enum Weapons {
SONICRAY("Sonic Ray", 250, 5),
PLASMARAY("Plasma Ray", 500, 15),
MESONPHASER("Meson Phaser", 750, 25);
private final String name;
private final int cost;
private final int damage;
Weapons(String weaponName, int weaponCos... |
Python | UTF-8 | 2,775 | 2.796875 | 3 | [] | no_license | # -*- coding:utf-8 -*-
import sys
if sys.version_info[:2] > (3, 5):
import asyncio
import aiohttp
PY3 = True
else:
import grequests
PY3 = False
class RequestLeveFunError(Exception):
def __init__(self, result=None):
super(TimeOutError, self).__init__()
self.result = result
c... |
C | UTF-8 | 4,541 | 3.640625 | 4 | [] | no_license | /**
* \file gagne.c
* \brief C'est la fonction avec laquelle on vérifie si un joueur à gagné ou pas
*/
#include <stdio.h>
#include<stdlib.h>
#include"../Include/P4.h"
/**
* \fn int gagne(joueur_t * joueur, case_t mat[L][C])
* \brief fonction qui vérifie si 4 pièces sont alignées
* \param * joueur : un pointeur sur un... |
JavaScript | UTF-8 | 3,200 | 2.640625 | 3 | [] | no_license | /**
* Sample React Native App
* https://github.com/facebook/react-native
*/
/*
用户体验优化,数据加载完全前显示loading,加载完全后展示出来
1. 添加renderLoadingView方法,用于数据loading时,控件的外观
2. 给Status中添加loaded布尔型变量用来表示是否加载完成
3. 在render方法中首先判断loaded是否完成,已完成:填充ListView数据并渲染输出;未完成:执行renderLoadingView方法,提示用户loading中状态
*/
'use strict';
var React = ... |
Python | UTF-8 | 484 | 3.046875 | 3 | [] | no_license | from PIL import Image
img = Image.open('problem.png')
width, height = img.size
img_pixels = []
for y in range(height):
for x in range(width):
img_pixels.append(img.getpixel((x, y)))
num_list = []
for i in range(len(img_pixels)):
num = img_pixels[i][0]
num_list.append(num)
print(num_list)
gen_ht... |
C# | UTF-8 | 1,340 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | using System.Threading;
using System.Threading.Tasks;
using AutoMapper;
using Database.Entities.Nodes;
using MediatR;
using Neo4j.Driver;
namespace MediatorRequests.CreateIngredient
{
public class CreateIngredientHandler : IRequestHandler<CreateIngredientCommand, Ingredient>
{
private readonly IDriver ... |
C# | UTF-8 | 9,251 | 2.640625 | 3 | [] | no_license | using SUP_G6.DataTypes;
using SUP_G6.Interface;
using SUP_G6.Models;
using SUP_G6.Other;
using SUP_G6.ViewModels;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Media;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using Sys... |
C++ | UTF-8 | 9,640 | 2.890625 | 3 | [] | no_license | #include <gtest/gtest.h>
#include <memory>
#include "sic/Base/Tolerances.hh"
#include "sic/Model/ModelPortfolio.hh"
#include "sic/Portfolio/MockAsset.hh"
namespace {
class ModelPortfolioTest : public testing::Test {};
TEST_F(ModelPortfolioTest, CreateValid) {
auto assetWeightsMap =
std::make_unique<sic::Abstra... |
C++ | UTF-8 | 1,110 | 3.328125 | 3 | [] | no_license | /*
#include "..\heap.h"
void Heap::_push(int i_key)
{
m_heap.push_back(i_key);
int index = static_cast<int>(m_heap.size() - 1);
int tmp_key = m_heap[index];
int index_parent = (index - 1) / 2;
while (index > 0 && tmp_key >= m_heap[index_parent])
{
m_heap[index] = m_heap[index_parent];
index = index_parent;... |
C++ | UTF-8 | 564 | 3.296875 | 3 | [] | no_license | #include <iostream>
usando el espacio de nombres estándar ;
int main () {
int cantNumeros = 0 ;
int promedio = 0 ;
int suma = 0 ;
cout << " Ingrese la cantidad de numeros: " ;
cin >> cantNumeros;
int numeros [cantNumeros];
para ( int i = 0 ; i <cantNumeros; i ++) {
cout ... |
PHP | UTF-8 | 1,057 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
Class _netspeed {
public static function lookup($ip) {
$ch = curl_init();
// Notice: the request back to the Symphony services API includes your domain name
// and the version of Symphony that you're using
$version = Frontend::instance()->Configuration->get('version', 'symphony');
$domain =... |
Ruby | UTF-8 | 382 | 3.78125 | 4 | [] | no_license | # The guess API is already defined for you.
# @param num, your guess
# @return -1 if my number is lower, 1 if my number is higher, otherwise return 0
# def guess(num)
def guessNumber(n)
left, right = 0, n
loop {
mid = left + (right - left) / 2
case guess(mid)
when 0 then return mid
when -1 then r... |
Java | UTF-8 | 2,822 | 2.25 | 2 | [] | no_license | package com.leonardo.doctorsoffice.service;
import com.leonardo.doctorsoffice.DTO.MedicalConsultationDTO;
import com.leonardo.doctorsoffice.entity.MedicalConsultation;
import com.leonardo.doctorsoffice.entity.Patient;
import com.leonardo.doctorsoffice.repository.DoctorRepository;
import com.leonardo.doctorsoffice.repo... |
Java | UTF-8 | 2,044 | 1.671875 | 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 ... |
C++ | UTF-8 | 5,447 | 3.109375 | 3 | [] | no_license | #include<iostream>
#include<fstream>
#include<windows.h>
using namespace std;
void menu();
void name();
int Problem1(int a);//return value w arg
int Problem2(int a);
int Problem3(int a);
int Problem4(int a);
int Problem5(int a);//up to here
void Problem6();
void Problem7();
void Problem8();
void Problem... |
Markdown | UTF-8 | 618 | 2.890625 | 3 | [] | no_license | # `cores`
## Purpose
Summarizes output from the Linux `lscpu` command. I must confess that I don't often think of using this one but I probably need to get more into the habit of using it. I'm not crazy about the name `cores` - I wonder if `cpus` would be easier for me to remember, etc.
## Syntax
```
Syntax: cores
``... |
Java | UTF-8 | 371 | 1.804688 | 2 | [] | no_license | package com.murglin.consulting.roomoccupationservice.service;
import com.murglin.consulting.roomoccupationservice.model.BookingPlan;
import com.murglin.consulting.roomoccupationservice.model.dto.request.BookingPlanRequest;
public interface BookingPlanServiceI {
//TODO probably ACID transcation needed
BookingP... |
Java | UTF-8 | 330 | 1.84375 | 2 | [] | no_license | package br.com.fiap.ddd.ead.aula06.daoImpl;
import javax.persistence.EntityManager;
import br.com.fiap.ddd.ead.aula06.dao.AlunoDAO;
import br.com.fiap.ddd.ead.aula06.entity.Aluno;
public class AlunoDAOImpl extends GenericDAOImpl<Aluno, String> implements AlunoDAO {
public AlunoDAOImpl(EntityManager em) {
super(e... |
Shell | UTF-8 | 405 | 3.1875 | 3 | [
"Apache-2.0"
] | permissive | #!/bin/bash
prog="testOnDemandR"
#try to gracefully terminate the server first
pid1=$(ps aux | grep ${prog} | grep -v "color" | awk '{print $2}')
kill -SIGUSR1 $pid1 > /dev/null 2>&1
sleep 1
#if it is still alive because of some unknown reason, force to stop it
pid2=$(ps aux | grep ${prog} | grep -v "color" | awk '{p... |
Java | UTF-8 | 1,562 | 2.421875 | 2 | [] | no_license | package com.example.menufy.fragments;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.example.menufy.R;
import com.google.a... |
C++ | UTF-8 | 1,853 | 3.28125 | 3 | [
"LicenseRef-scancode-public-domain"
] | permissive | #pragma once
#include <SFML/Graphics.hpp>
#include <string>
#include <map>
#include "Config.hpp"
class TextureManager
{
private:
/* Array of textures used */
std::map<std::string, sf::Texture> textures;
public:
void load(std::string name, int w, int h)
{
if (this->textures.count(name) == 0... |
Swift | UTF-8 | 1,257 | 2.796875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | //
// WikipediaAPI.swift
// Brunel
//
// Created by Aaron McTavish on 29/01/2016.
// Copyright © 2016 ustwo Fampany Ltd. All rights reserved.
//
import Foundation
import Moya
enum WikipediaAPI {
case queryTitle(title: String)
}
extension WikipediaAPI: TargetType {
var baseURL: URL { return URL(st... |
Python | UTF-8 | 489 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | import matplotlib.pyplot as plt
def plot_augmentations(images, titles, sup_title):
fig, axes = plt.subplots(figsize=(20, 16), nrows=3, ncols=4, squeeze=False)
for indx, (img, title) in enumerate(zip(images, titles)):
axes[indx // 4][indx % 4].imshow(img)
axes[indx // 4][indx % 4].set_titl... |
Java | UTF-8 | 3,929 | 4.0625 | 4 | [] | no_license | package zhh.algorithm.lucifer.basic.day1.array;
import org.junit.Assert;
/**
* @author zhanghao
* @date 2021-05-03 09:00
* @desc 双指针
*/
public class DoublePointer {
/**
* 42. 接雨水
* https://leetcode-cn.com/problems/trapping-rain-water/
* 输入:height = [0,1,0,2,1,0,1,3,2,1,2,1]
* 输出:6
*
... |
Shell | UTF-8 | 610 | 2.75 | 3 | [] | no_license | #!/bin/bash
counts=`zcat query.uniprot20.hhr.gz | $PSSH/src/util/countHHblitsHits.pl`
stamp=`stat -c%Y query.uniprot20.hhr.gz`
md5=`fasta_to_md5 query.fasta`
DB.pssh2_local "insert into hhblits_family_counts set md5=\"$md5\" , $counts hh_stamp=$stamp ON DUPLICATE KEY UPDATE $counts hh_stamp=$stamp"
# to do this for ... |
Markdown | UTF-8 | 591 | 2.859375 | 3 | [] | no_license | # personal-profile-page
Description:
Creation of a personal profile page to showcase my personal and professional history
Structure:
This will include a main landing page with an introduction and contact information. It will also include a page for Work History (previous jobs, work acheivements, etc.) and Personal i... |
SQL | UTF-8 | 255 | 2.5625 | 3 | [] | no_license |
create or replace view `fishtown-interview-292223`.`dbt_atambay`.`my_second_dbt_model`
OPTIONS()
as -- Use the `ref` function to select from other models
select *
from `fishtown-interview-292223`.`dbt_atambay`.`my_first_dbt_model`
where id = 1;
|
PHP | UTF-8 | 859 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace Pinq\Iterators\Common;
use Pinq\Iterators\Standard\IIterator;
/**
* Common functionality for the adapter iterator
*
* @author Elliot Levin <elliotlevin@hotmail.com>
*/
trait AdapterIterator
{
/**
* @var \Traversable
*/
protected $source;
/**
* @var \Iterator
*/
... |
Java | UTF-8 | 2,911 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | package com.secuconnect.client.model;
import com.google.gson.annotations.SerializedName;
import java.util.Objects;
/**
* Bank details for withdrawals
*/
public class PaymentInformation {
@SerializedName("iban")
protected String iban = null;
@SerializedName("bic")
protected String bic = null;
@Serialized... |
C++ | UTF-8 | 2,520 | 3.3125 | 3 | [] | no_license | //============= Copyright Connor McLaughlan, All rights reserved. =============
//
// Purpose: Linear algebra classes.
//
// Notes:
// - [https://www.cprogramming.com/tutorial/3d/quaternions.html]
//
//=============================================================================
#pragma once
#include <cmath>
#... |
Python | UTF-8 | 202 | 2.703125 | 3 | [] | no_license | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# author:艾强云
# Email:1154282938@qq.com
# datetime:2019/4/5 01:56
# software: PyCharm
import numpy as np
x = np.random.rand(10)
print(x)
b = x[x > 0.5]
print(b)
|
C++ | UTF-8 | 433 | 3.0625 | 3 | [] | no_license | #include<iostream>
using namespace std;
void last_index(int arr[],int n,int m,int i,int k)
{
//base case
if(n==0)
{
cout<<k<<endl;
return;
}
//recursive case
if(arr[i]==m)
{
k=i;
last_index(arr,n-1,m,i+1,k);
//cout<<k<<endl;
}
last_index(arr,n-1,m,i+1,k);
}
int main() {
int n,*arr;
int m;
cin... |
Java | UTF-8 | 3,163 | 2.15625 | 2 | [] | no_license | package com.mockuai.data.check.canal;
import com.alibaba.otter.canal.protocol.CanalEntry;
import com.alibaba.otter.canal.protocol.FlatMessage;
import com.google.common.collect.Lists;
import com.mockuai.data.check.dto.DataEventType;
import com.mockuai.data.check.dto.DataStoreMappingUtils;
import com.mockuai.data.check.... |
Shell | UTF-8 | 2,855 | 2.796875 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env bash
set -e
if [[ -n "${DEBUG}" ]]; then
set -x
fi
varnish() {
docker-compose exec -T varnish "${@}"
}
docker-compose up -d
echo -n "Running check-ready action... "
varnish make check-ready max_try=10 -f /usr/local/bin/actions.mk
echo "OK"
echo -n "Running flush action... "
varnish make flu... |
Python | UTF-8 | 163 | 3.46875 | 3 | [] | no_license |
num = int(input())
while num != 0:
quadrados = 0
for i in range(1, num+1):
quadrados += i * i
print(quadrados)
num = int(input())
|
C# | UTF-8 | 1,920 | 2.859375 | 3 | [] | no_license | using Datos;
using Entity;
using System;
using System.Collections.Generic;
namespace Logica
{
public class DatosService
{
private readonly ConnectionManager _conexion;
private readonly DatosRepository _repositorio;
public DatosService(string connectionString)
{
_co... |
Python | UTF-8 | 339 | 3.703125 | 4 | [
"MIT"
] | permissive | #!/usr/bin/python3
def is_kind_of_class(obj, a_class):
"""checks if an object is sort of a class
-> through inheritance
"""
if not isinstance(a_class, type):
raise TypeError("a_class type must be 'type'")
if isinstance(obj, a_class) or issubclass(type(obj), a_class):
return Tru... |
C++ | UTF-8 | 424 | 3 | 3 | [] | no_license | #include <iostream>
#include <fstream>
using namespace std;
int main(int argc, char const *argv[])
{
//1. taking input from a text file
// freopen("input.txt", "r", stdin);
//2. printing output to text file
// freopen("output.txt", "w", stdout);
std::ios::sync_with_stdio(false);
int number;
while (true)
... |
Python | UTF-8 | 2,909 | 2.65625 | 3 | [] | no_license | import report_queries as rq
import codecs
import pdfkit
file_path = "output/kvalitet/"
index_path = file_path+"izvestaj_kvalitet.html"
def faculty_reports():
index.write("<h3>Opšta pitanja</h3>")
pitanja = rq.get_faculty_questions_reports()
for tekst_pitanja, ocene in ... |
C# | UTF-8 | 5,700 | 2.5625 | 3 | [] | no_license | using System;
using IMDBService;
using TechTalk.SpecFlow;
using IMDBRepository;
using System.Linq;
using TechTalk.SpecFlow.Assist;
using IMDBDomain;
namespace IMDBTests
{
[Binding]
public class application
{
private readonly ScenarioContext _scenarioContext;
public application(ScenarioCon... |
Java | UTF-8 | 248 | 1.515625 | 2 | [] | no_license | package br.com.l0k0s.portal.interfaces.repositorio;
import br.com.l0k0s.portal.interfaces.InterfaceGenericRepositorio;
import br.com.l0k0s.portal.model.Titulo;
public interface TituloRepositorio extends InterfaceGenericRepositorio<Titulo> {
}
|
Java | UTF-8 | 1,298 | 2.3125 | 2 | [] | no_license | package com.fancypants.websocket.app.controller;
import java.security.Principal;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.Message;
import org.springframework.messaging.simp.annotation.SubscribeMapping;
... |
Ruby | UTF-8 | 9,799 | 4.40625 | 4 | [] | no_license | # Today we'll be creating a Task List for an individual who has a lot of errands and tasks to complete and multiple locations or stores to go to in order to complete them.
# Release 1
# Create a class for a Task List.
# All TaskList instances should have an owner and a due date passed in on creation. For instance, o... |
Markdown | UTF-8 | 1,125 | 3 | 3 | [] | no_license | # Article 77
Le président de la Polynésie française, au moment de son élection, le vice-président et les ministres, au moment de leur désignation, doivent, lorsqu'ils se trouvent dans l'un des cas d'incompatibilité prévus aux articles 75 et 76, déclarer leur option au haut-commissaire dans le délai d'un mois suivant l... |
Markdown | UTF-8 | 1,398 | 3.359375 | 3 | [] | no_license | # Verify Account
If deployed: https://thedanitor.github.io/verify_account/
This project is from the Day 41 code along video from Udemy's 50 projects in 50 days series focused on web development. I have added some comments to the CSS and JavaScript to make notes to myself why certain choices are being made and what pa... |
PHP | UTF-8 | 1,645 | 2.78125 | 3 | [] | no_license | <?php
/**
* Date: 05.06.19
* Time: 16:06
* @author Konstantin Maruhnich <nocturneumbra@gmail.com>
* Iterios core team
*/
namespace Decadal\LiftTest\Zend;
use PHPUnit\Framework\TestCase;
use Decadal\Lift\Common\Enum\EnumInterface;
use Decadal\Lift\Common\Enum\EnumTrait;
use Decadal\Lift\Common\Zend\Validator\Enum... |
Markdown | UTF-8 | 662 | 2.828125 | 3 | [] | no_license | # todoapp-python-django
## This is the simple todo application in *Python* , *Django* , and *Bootstrap* with responsive UI.
#### It's a simple web app where you can add a bunch of task s, update or delete any tasks. All modifications are saved in the database.
### Home Page
;
let contact = document.getElementById('contact');
let businessHour = document.getElementById('businessHour');
let contactTitle = contact.getElementsByClassName('title');
let addressTitle = address.getElementsByClassName('title');
let BHTitle = businessHour.getElementsB... |
JavaScript | UTF-8 | 613 | 2.671875 | 3 | [] | no_license | // import $ from "jquery";
// import Rx from "rxjs/Rx";
// import { interval } from "rxjs/observable/interval";
// import { throttle } from "rxjs/operators";
// console.log("RxJS Basdoiler Running...");
// THROTTLE
// const input = $("#input");
// const output = $("#output");
// const inputSource$ = Rx.Observable.fro... |
Java | UTF-8 | 593 | 3.6875 | 4 | [] | no_license | package hello;
import java.util.ArrayList;
public class HelloWorld {
public static void main(String[] args) {
// System.out.println("Hello Bhushal Chushak !!!");
// ArrayList<Integer> arr =new ArrayList<>();
// arr.add(5);
// arr.add(55);
// arr.add(500);
// for (Integer i : arr) {
// System.out.print... |
Java | UTF-8 | 256 | 1.976563 | 2 | [] | no_license | package Annotation.AnnotationDemo03;
/**
* @Author: lxy
* @Date: 2020/12/21
* @Description: Annotation.AnnotationDemo03
* @Version: 1.0
*/
public class Ann03_Demo01 {
public void show(){
System.out.println("Ann03_Demo01 show..");
}
}
|
C# | UTF-8 | 508 | 2.65625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Text;
namespace Vehicles
{
public class Truck : Vehicles
{
public override double Consumption
{
get { return base.Consumption + 1.6; }
}
public Truck(double quantity, double consumption):base... |
C++ | UTF-8 | 373 | 2.859375 | 3 | [] | no_license | class Solution {
public:
void moveZeroes(vector<int>& nums) {
int pos = 0;
for(int i = 0;i<nums.size();i++)
{
if(nums[i]!=0)
{
nums[pos] = nums[i];
pos++;
}
}
for(;pos<nums.size();pos++)
{
... |
C | UTF-8 | 1,962 | 2.703125 | 3 | [] | no_license |
/*
* file: display.c
*
* Copyright (c) 1990 by John J. Grefenstette
*
* purpose: manages the display for interactive use
*
* modified: 10 sep 90
*/
#include "extern.h"
Dtrace(s)
char *s;
{
/* write currently executing function name to display */
if (Displayflag)
{
move(1,46);
clrtoeol();
pri... |
C++ | UTF-8 | 1,290 | 2.734375 | 3 | [] | no_license | #ifndef POINTSWIDGET_H
#define POINTSWIDGET_H
#include <QWidget>
namespace Ui {
class PointsWidget;
}
class PointsCollection;
/**
* @brief Widget displays table with plot's points
* Uses simple pagination
*/
class PointsWidget : public QWidget
{
Q_OBJECT
public:
explicit PointsWidget(QWidget *parent,... |
C# | UTF-8 | 2,172 | 2.6875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using CentralAtivos.Domain.Entities;
using CentralAtivos.Domain.Interfaces;
namespace CentralAtivos.Repository.Repositories
{
public class PlacaRepository : IPlaca
{
public void Delete(int id)
{
using (var ctx = new... |
Shell | UTF-8 | 1,872 | 3.65625 | 4 | [
"Apache-2.0"
] | permissive | #!/bin/bash
# This script parses in the command line parameters from runCust,
# maps them to the correct command line parameters for DispNet training script and launches that task
# The last line of runCust should be: bash $CONFIG_FILE --data-dir $DATA_DIR --log-dir $LOG_DIR
# Parse the command line parameters
# tha... |
C# | UTF-8 | 1,319 | 2.984375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
namespace L2L.WebApi.Utilities
{
public static class HelperUtil
{
public static int[] GetIntArrayFromString(string strArray)
{
int[] intArr = new int[0];
if (strArray... |
Java | UTF-8 | 2,750 | 2.203125 | 2 | [] | no_license | package com.drew.metadata.exif.makernotes;
import androidx.exifinterface.media.ExifInterface;
import com.drew.lang.annotations.NotNull;
import com.drew.lang.annotations.Nullable;
import com.drew.metadata.TagDescriptor;
public class LeicaMakernoteDescriptor extends TagDescriptor<LeicaMakernoteDirectory> {
public L... |
Java | UTF-8 | 1,988 | 3.5 | 4 | [] | no_license | package util;
import java.util.ArrayList;
import java.util.regex.Pattern;
import model.Example;
/**
* 工具类
*/
public class AlgorithmUtil {
/**
* 清洗数据,去掉非字母的字符,和字节长度小于2的单词
* @param info 一条样本
* @return info 清洗后一条样本
*/
public static String cleanData(String info) {
// 去标点
Pattern p = Pattern.compile("\\... |
C++ | UTF-8 | 503 | 2.890625 | 3 | [] | no_license | #include <iostream>
using namespace std;
class List {
private:
class Node {
public:
int data;
Node* link;
};
bool access_valid(int count);
Node* head = NULL;
int numbers;
public:
int tracking(int data); // find index
void add(int data); // add tail
void add(int index, int data);
void del(int index);
... |
Python | UTF-8 | 1,311 | 3.15625 | 3 | [] | no_license | from pathlib import Path
def find_context(sentence, path):
def _left_context(idx, sentence, text):
chunks = text[:idx].split(' ')
return ' '.join(chunks[-3:])
def _right_context(idx, sentence, text):
chunks = text[idx+len(sentence):].split(' ')
return ' '.join(chunks[:3])
... |
Java | UTF-8 | 275 | 2.1875 | 2 | [] | no_license | package src.fizzBuzz;
public class Buzz implements Elements {
public Buzz() {
}
@Override
public boolean isaBoolean(int input) {
return input % 5 == 0;
}
@Override
public String getString(int input) {
return "Buzz";
}
} |
Python | UTF-8 | 238 | 3.078125 | 3 | [] | no_license | '''
Question : You are given a complex z. Your task is to convert it to polar coordinates.
Link : https://www.hackerrank.com/challenges/polar-coordinates/problem
'''
import cmath
z = complex(input())
print(abs(z))
print(cmath.phase(z))
|
TypeScript | UTF-8 | 557 | 2.6875 | 3 | [] | no_license | import { Action } from '@ngrx/store';
export class ActionTypes {
static readonly LOADING_START = '[App] Loading start';
static readonly LOADING_END = '[App] Loading end';
}
export class StartAction implements Action {
readonly type = ActionTypes.LOADING_START;
public static of() {
return new StartAction()... |
Go | UTF-8 | 3,040 | 2.71875 | 3 | [] | no_license | package models
import (
"encoding/json"
"zonart/db"
"gopkg.in/go-playground/validator.v9"
)
// Opsi is class
type Opsi struct {
idOpsi int
namaGrup string
opsi string
harga int
berat int
perProduk bool
status bool
}
func (o *Opsi) MarshalJSON() ([]byte, error) {
return json.Marshal(st... |
Java | UTF-8 | 218 | 2.03125 | 2 | [] | no_license | package jlcAarray;
public class Lab483_2DArray_Length {
public static void main(String[] args) {
// TODO Auto-generated method stub
int []arr,arr1;
arr=new int[2];
System.out.println("hello raj");
}
}
|
C++ | ISO-8859-1 | 4,009 | 2.625 | 3 | [
"MIT"
] | permissive | // lusolver.cpp
//#include "lusolver.h"
#include "utils.h"
namespace Izm
{
namespace Numerics
{
namespace Solvers
{
template <class LinearType, class DomainType, class RangeType>
void LUSolver<LinearType,DomainType,RangeType>::LU(LinearType& A)
{
const int m = A.xDim();
const int n = A.yDim();
_Error = 0;
_Sw... |
Java | GB18030 | 19,271 | 2.484375 | 2 | [] | no_license | package com.jdd.powermanager.model.MeterSurvey;
import java.util.ArrayList;
import java.util.HashMap;
import com.jdd.powermanager.model.MeterSurvey.BoxSurveyForm.BoxSurvey;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatab... |
Java | UTF-8 | 418 | 2.65625 | 3 | [] | no_license | package question021;
/*
* See analysis: https://blog.csdn.net/qq_41231926/article/details/82250787
*/
public class Solution2 {
public ListNode mergeTwoLists(ListNode l1, ListNode l2) {
if(l1 == null) {
return l2;
}
if(l2 == null) {
return l1;
}
if(l1.val > l2.val) {
l2.next = mergeTwoLists(l1, ... |
Python | UTF-8 | 808 | 3.234375 | 3 | [] | no_license | import time
from turtle import Screen
from player import Player
from car_manager import CarManager
from scoreboard import Scoreboard
screen = Screen()
screen.setup(width=600, height=600)
screen.tracer(0)
player = Player()
carManager = CarManager()
scoreboard = Scoreboard()
screen.listen()
screen.onkey(player.goUp, "... |
Python | UTF-8 | 1,718 | 2.515625 | 3 | [] | no_license | #!/usr/bin/python
from optparse import OptionParser
import os
import threading
import sys
from lib import CMDUtils
from lib import ADBUtils
# ------------------------------------------- ARG PARSE -----------------------------------------------------#
CMDUtils.clear()
parser = OptionParser()
parser.add_option("-f"... |
C++ | UTF-8 | 1,142 | 2.96875 | 3 | [] | no_license | #include <cstdio>
#include <vector>
#include <cstring>
#include <algorithm>
struct node {
node* ch[26];
int ret, size;
bool root;
bool mark;
node() {
memset(ch, 0, sizeof(ch));
ret = 0;
size = 0;
root = 0;
mark = 0;
}
};
void ins(node* o, char *s) {
node* p = o;
for (int i = 0; s[i... |
C | UTF-8 | 678 | 3.390625 | 3 | [] | no_license | #include <stdio.h>
#include <time.h>
int main ()
{
int importancia;
time_t atual;
atual = time (NULL);
struct tm str_time;
time_t time_of_day;
str_time.tm_year = 2019-1900;
str_time.tm_mon = 6;
str_time.tm_mday = 5;
str_time.tm_hour = 10;
str_time.tm_min = 3;
str_time.tm_sec = 5;
str_... |
JavaScript | UTF-8 | 1,441 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | /**
* Scans all the glyphs in the range and returns a list with those available
*
* @requires jQuery, PubSub
* @author Cristian Dobre
*/
( function( $, d, w, s, r ){
var e, glyphs = false, st = [], empty, iv, not = i = 0;
/**
* Uses pubsub to trigger event after the search is finished
*/
... |
Python | UTF-8 | 4,926 | 2.53125 | 3 | [
"Unlicense"
] | permissive | import math
from collections import OrderedDict
from dataclasses import dataclass
from pathlib import Path
from typing import Dict, List, Tuple
import click
import click_pathlib
import dash
import dash_core_components as dcc
import dash_html_components as html
from flask import Flask
from plotly.graph_objs import Figu... |
Markdown | UTF-8 | 3,948 | 2.765625 | 3 | [] | no_license | #HSLIDE
##Writing Better Java Tests with Spock
[github.com/ssheftel/spock-demo](https://github.com/ssheftel/spock-demo)
#HSLIDE

#HSLIDE
Spock is a testing and specification framework for Java and Groovy apps
#HSLIDE
##History
- spock 2008 by Peter Niederwieser
- defaul... |
Rust | UTF-8 | 4,226 | 3 | 3 | [
"MIT"
] | permissive | //! The vector table.
use core::intrinsics::{offset, transmute, volatile_store};
use core::failure;
use core::fmt;
use platform::io;
static VIC_INT_ENABLE: *mut u32 = (0x10140000 + 0x010) as *mut u32;
static UART0_IRQ: u8 = 12;
static VT: *mut u32 = 0 as *mut u32; // WARNING verify should be mutable.
#[repr(u8)]
p... |
Java | UTF-8 | 1,758 | 2.34375 | 2 | [
"Apache-2.0"
] | permissive | package com.github.timpeeters.boot.logger;
import org.junit.Test;
import org.springframework.boot.logging.LogLevel;
import org.springframework.mock.web.MockHttpServletRequest;
import java.util.AbstractMap.SimpleEntry;
import static org.assertj.core.api.Assertions.assertThat;
public class HeaderLogLevelSourceTest {
... |
Java | UTF-8 | 455 | 2.859375 | 3 | [] | no_license |
public class k
{
static void main()
{
boolean x=false;
do
{
System.out.println("Good Work!");
}
while(x);
for(int i=1;i<=3;i++)
{
if(i==2)
{
continue;
}
System.out.println(i);
... |
Ruby | UTF-8 | 1,464 | 2.515625 | 3 | [] | no_license | class User < ApplicationRecord
has_secure_password
has_many :reservations, foreign_key: "guest_id", dependent: :destroy
has_many :kitchens, foreign_key: "owner_id"
has_many :kitchen_pictures, through: :kitchens
has_many :reviewed_kitchens, class_name: "KitchenReview", foreign_key: "guest_id", dependent: :dest... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.