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 |
|---|---|---|---|---|---|---|---|
Python | UTF-8 | 502 | 2.90625 | 3 | [] | no_license | import datetime
import os
import sys
today_date = datetime.datetime.now()
dir_path = os.getcwd()
if (not os.path.exists(dir_path)) and os.path.isfile(dir_path):
sys.exit()
for file in os.listdir(dir_path):
complete_path = os.path.join(dir_path, file)
if os.path.isfile(complete_path):
... |
Python | UTF-8 | 3,527 | 3.015625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | import tkinter as tk
from tkinter.filedialog import askopenfilename
from tkinter import messagebox, filedialog
from saturn_routes.run import run_analysis
import pathlib
root = tk.Tk()
root.title("Strategic route mapper")
BACKGROUND_COLOUR = "#d6d6d6"
FOREGROUND_COLOUR = "#512d6d"
class RouteMapper:
def __init_... |
Java | UTF-8 | 4,221 | 2.953125 | 3 | [] | no_license | package it.unibo.infomanager.infomng.model;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import it.unibo.infomanager.infomng.controller.DataBaseSearch;
import it.unibo.infomanager.infomng.controller.TableRow;
/***
* interfaccia per la ... |
SQL | UTF-8 | 791 | 3.609375 | 4 | [] | no_license | /*3-3 問2 店舗テーブル(shop)からすべての店舗コードを抜き出し、月間売上テーブル(sales)に対して挿入してみましょう。
その際、売上対象年月には今日の日付(YYYY-MM)を、売上高には0を固定値でセットするものとします。*/
--挿入を行う対象
INSERT INTO
--月間売上テーブル
sales
--挿入対象
(
--店舗コード
s_id,
--売上対象年月
s_date,
--売上高
s_value
)
--挿入値
SELECT
--店舗コードには店舗テーブルの値を代入
ShopTable.s_id,
--売上対象年月には今... |
C# | UTF-8 | 1,185 | 2.65625 | 3 | [] | no_license | using UnityEngine;
using UnityEngine.Events;
namespace Velocity
{
[RequireComponent(typeof(Rigidbody))]
public class VelocityDetector : MonoBehaviour
{
[Tooltip("Minimum velocity which registers events")]
public float minVelocity = 0.01f;
[Tooltip("Called when current velocity is ... |
C | UTF-8 | 332 | 2.921875 | 3 | [] | no_license | // Автор:
// Владимир: https://vk.com/yapoxe
#include <stdio.h>
enum{
BUF_SIZE = 10000
};
int main(void){
int a[BUF_SIZE], n, i=0;
scanf("%i", &n);
while(n!=0){
a[i]=n;
i++;
scanf("%i", &n);
}
for(int j=0; j<i; j++){
printf("%i ", a[i-j-1]);
}
return 0;
} |
PHP | UTF-8 | 2,563 | 2.546875 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace Manu\AsgttBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="adresse",options={"engine":"MyISAM"})
*/
class Adresse extends RootObject
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @O... |
PHP | UTF-8 | 1,468 | 2.875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>lol</title>
</head>
<body>
<?php
include("conexiones.php");
$conexion = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
// verificamos la conexion
if (!$conexion) {
die("Connection failed: " . mysqli_connect_error());
}
$email = $_POST['email'];
/... |
C++ | UTF-8 | 4,392 | 2.90625 | 3 | [] | no_license | #ifndef STATYSTICAL_ANALYSIS_CHOLESKY_DECOMPOSITION_H_INCLUDED
#define STATYSTICAL_ANALYSIS_CHOLESKY_DECOMPOSITION_H_INCLUDED
#ifdef _MSC_VER
#pragma once
#pragma warning(push,1)
#pragma warning(disable : 4267 4702)
#endif
#include "DesignByContract.h"
namespace mr
{
namespace statistical_analysis
{
... |
Java | UTF-8 | 567 | 1.851563 | 2 | [] | no_license | package com.cyc.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
@Controller
@RequestMapping(value = "/index")
public class BlogController {
@RequestMapping(value = "/index.html")
... |
Java | UTF-8 | 580 | 1.726563 | 2 | [
"Apache-2.0"
] | permissive | package com.ssy.petition.dao.petition;
import com.ssy.petition.dao.base.BaseMapper;
import com.ssy.petition.dto.petition.params.PetitionCompanyParams;
import com.ssy.petition.dto.petition.result.PetitionCompanyResult;
import com.ssy.petition.entity.petition.PetitionCompany;
import org.apache.ibatis.annotations.Param;
... |
Swift | UTF-8 | 987 | 2.546875 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | //
// UIViewController+Navigation.swift
// Core
//
// Created by Kamil Tustanowski on 03/08/2019.
// Copyright © 2019 Kamil Tustanowski. All rights reserved.
//
import UIKit
import RxSwift
extension UIViewController {
func replaceBackButtonWithBackArrow(theme: Theme = ThemeFactory.make()) {
let backAr... |
SQL | UTF-8 | 751 | 3.40625 | 3 | [] | no_license | create database if not exists bzwbk;
use bzwbk;
-- target table
CREATE TABLE karty (
klient_id int,
karta_id int,
typ string,
data_otw date,
limit double)
PARTITIONED BY (okres string)
STORED AS ORC;
-- interim table
CREATE EXTERNAL TABLE karty_in(
klient_id int,
karta_id int,
typ string,
data_ot... |
Shell | UTF-8 | 516 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | #!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# deps
if [ -n "$(command -v apt-get)" ]
then
apt-get install -y wget unzip >/dev/null 2>&1
elif [ -n "$(command -v yum)" ]
then
yum install -y wget unzip >/dev/null 2>&1
fi
wget -O sharelist-master.zip https://github.com/penjune/share... |
Python | UTF-8 | 576 | 2.640625 | 3 | [] | no_license | import matplotlib.pyplot as plt
import numpy as np
data = np.loadtxt("/home/argo/Desktop/For-PenzGTU/S-E-M-E-S-T-R-O-V-I-E/semestrovaya4c/size.dat")
plt.plot(data[:,0], data[:,1],'go-', label='Матрица 3x3')
plt.plot(data[:,0], data[:,2],'bo--', label='Матрица 4x4')
plt.plot(data[:,0], data[:,3],'ro:', label='Матрица 5... |
Java | UTF-8 | 3,725 | 2.03125 | 2 | [
"MIT"
] | permissive | package com.braintreepayments.api.dropin;
import android.support.annotation.Nullable;
import com.braintreepayments.api.interfaces.HttpResponseCallback;
import com.braintreepayments.api.internal.BraintreeHttpClient;
import com.braintreepayments.api.models.CardBuilder;
import java.io.IOException;
import java.net.HttpU... |
C# | UTF-8 | 3,780 | 2.953125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using CloneDB.DAL;
using CloneDB.Entities;
using Microsoft.EntityFrameworkCore.Internal;
namespace CloneDB.BAL
{
public class Movies : IMovies
{
private readonly IMoviesRepository _movieRepo;
public Movies(IMoviesRepository movieRepo)
... |
Java | UTF-8 | 7,163 | 2.0625 | 2 | [
"Apache-2.0"
] | permissive | package com.douwe.notes.resource.impl;
import com.douwe.notes.resource.IRapportResource;
import com.douwe.notes.service.IDocumentFacadeService;
import java.io.IOException;
import java.io.OutputStream;
import javax.ejb.EJB;
import javax.ws.rs.Path;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Res... |
Markdown | UTF-8 | 669 | 2.65625 | 3 | [] | no_license | # Real-Time-Calculator
A real time calculator that allows multiple users to simultaneously perform dynamic calculations with logging that can be seen across all users accessing the website. The application is developed using MEAN stack and Socket.io, and is deployed on Heroku.
Link to the application: https://tranqui... |
C++ | UTF-8 | 325 | 2.71875 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> roads(N);
for (int i = 0; i < M; i++) {
int x, y;
cin >> x >> y;
roads[x - 1] = roads[x - 1] + 1;
roads[y - 1] = roads[y - 1] + 1;
}
for (int i = 0; i < N; i++) {
cout << roads[i] << endl;
... |
Java | UTF-8 | 1,345 | 4.28125 | 4 | [
"MIT"
] | permissive | /**
* Given an array of ints, compute recursively the number of times that the value 11 appears in the array.
* We'll use the convention of considering only the part of the array that begins at the given index.
* In this way, a recursive call can pass index+1 to move down the array. The initial call will pass in ind... |
Python | UTF-8 | 6,638 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | # Copyright (c) OpenMMLab. All rights reserved.
import numpy as np
try:
from sklearn.gaussian_process import GaussianProcessRegressor as GPR
from sklearn.gaussian_process.kernels import RBF
HAS_SKIKIT_LEARN = True
except ImportError:
HAS_SKIKIT_LEARN = False
from mmdet.registry import TASK_UTILS
@TA... |
Java | UTF-8 | 2,876 | 1.9375 | 2 | [] | no_license | package com.ub.kloudsync.activity;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class TeamSpaceBean implements Serializable {
private int itemID;
private String name;
private int companyID;
private int type;
private int parentID;
private String create... |
Java | GB18030 | 1,603 | 2.140625 | 2 | [] | no_license | package com.testng;
import java.lang.reflect.InvocationTargetException;
import org.testng.annotations.Test;
import java.util.ArrayList;
import com.test.configure.Variable;
import com.test.control.Control;
import com.test.bean.TestCaseBean;
public class NewTest {
@Test
public void f() throws SecurityException, ... |
Markdown | UTF-8 | 4,020 | 3.171875 | 3 | [
"MulanPSL-2.0",
"LicenseRef-scancode-mulanpsl-2.0-en",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | ---
---
---
title: 五
---
鲁迅先生吾师左右:
今日接读先生十九日发的那信,关于“兄”字的解释,敬闻命矣。二年受教,确不算“生疏”,师生之间,更无须乎“客气”,而仍取其“略胜一筹”者,岂先生之虚己以待人,抑社会上之一种形式,固尚有存在之价值欤?敬博一笑。但既是先生“自己制定的,沿用下来的例子”,那就不必他人多话的了。现在且说别的罢。
如果现世界的教育“是制造许多适应环境的机器的方法”,那么,性非如桮棬[25]的我,生来崛强,难与人同的我,待到“将来”走到面前变成“现在”时,在这之间——我便是一个时代的落伍者。虽然将来的状态,现在尚不可知,但倘若老是这样“品性难移”,则经验先生告诉我们,事实一定如此的... |
C++ | UTF-8 | 1,352 | 2.828125 | 3 | [] | no_license | /**
******************************************************************************
* @addtogroup pin
* @{
* @file pin
* @author Samuel Martel
* @brief Header for the pin module.
*
* @date 9/11/2020 3:04:43 PM
*
******************************************************************************
*/
#ifndef _p... |
Python | UTF-8 | 771 | 3.375 | 3 | [] | no_license | r"""Segmenting a text using probabilities.
:mod:`py_segment` exposes an API to segment text (such as hashtags)
into its most probable segmented words
For example::
>>> from py_segment import Segmenter
>>> s = Segmenter('en', case_folding=True)
>>> s.segment("#ilovenewyork"
["#", "i", "love", "new", "... |
Shell | UTF-8 | 662 | 2.8125 | 3 | [] | no_license |
pkgname=squashfs-tools
pkgver=4.2
pkgrel=2
pkgdesc="Tools for squashfs, a highly compressed read-only filesystem for Linux."
url="http://squashfs.sourceforge.net"
license=("GPL")
arch=('x86_64')
depends=('zlib' 'glibc' 'lzo2' 'xz')
source=("http://downloads.sourceforge.net/sourceforge/squashfs/squashfs${pkgver}.tar.gz... |
Go | UTF-8 | 1,060 | 3.8125 | 4 | [] | no_license | package main
import "golang.org/x/tour/tree"
import "fmt"
// Walk walks the tree t sending all values
// from the tree to the channel ch.
func Walk(t *tree.Tree, ch chan int) {
if t == nil {
return
}
Walk(t.Left, ch)
ch <- t.Value
Walk(t.Right, ch)
}
/*
func Walk(t *tree.Tree, ch chan int) {
defer close(c... |
SQL | UTF-8 | 549 | 3.328125 | 3 | [] | no_license | -- auto gen by bruce 2016-09-12 10:43:25
DROP VIEW IF EXISTS v_rakeback_set;
CREATE OR REPLACE VIEW v_rakeback_set AS
SELECT
rs.id,
rs.name,
rs.create_time,
rs.status,
rs.audit_num,
rs.remark,
(SELECT count(1) FROM user_player WHERE user_player.rakeback_id = rs.id) AS player_count,
(SE... |
PHP | UTF-8 | 2,657 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\CommentRepository")
*/
class Comment
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column... |
Ruby | UTF-8 | 4,323 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | module Tilia
module CalDav
module Schedule
# The SchedulingObject represents a scheduling object in the Inbox collection
class SchedulingObject < CalendarObject
include ISchedulingObject
# @!attribute [r] caldav_backend
# @!visibility private
# The CalDAV backend
... |
PHP | UTF-8 | 1,707 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace Flatten;
use Illuminate\Container\Container;
/**
* Handles the caches of the various pages
*/
class CacheHandler
{
/**
* The current cache hash
*
* @var string
*/
protected $hash;
/**
* The IoC Container
*
* @var Container
*/
protected $app;
/**
* Build a new CacheHandler
... |
Markdown | UTF-8 | 2,294 | 2.53125 | 3 | [] | no_license | # Very Deep Convolutional Networks For Large-Scale Image Recognition
vgg网络研究了卷积网络深度在大规模的图像识别环境下对准确性的影响,在网络中使用的是非常小的 3*3 卷积滤波器.本仓库是对论文中网络的代码实现,使用框架为 Tensorflow,数据格式为 TFRecord.
# Environment
Cuda 9.0
Cudnn 7.4
python 3.5
Tensorflow 1.12.0
# Content
1. VGG网络结构图
2. 仓库文件解析
3. 制作训练数据集
4. 使用本仓库
#### 1.网络结构图
下图描述了论文中... |
Java | UTF-8 | 4,025 | 3.6875 | 4 | [] | no_license | package com.raj.leetcode.google;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.Map;
import java.util.Queue;
import java.util.Set;
/**
*
* @author Raj
*
* There is a new alien language which uses the latin alphabet. Howeve... |
PHP | UTF-8 | 1,412 | 2.625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Pobyt extends Model
{
//definovanie tabulky spojenej s modelom (implicitne k nazvu sa prida s a vyhlada tabulka)
protected $table = 'pobyty';
public static function getPobytyByDatumPrichodu($datum){
return Pobyt::where('datum_pri... |
JavaScript | UTF-8 | 2,713 | 2.59375 | 3 | [] | no_license | import React from 'react';
import unsplash from '../src/api/unsplash';
import 'bootstrap/dist/css/bootstrap.css';
import {apiUrl} from "./defVars";
const GET_PLANET = `
{
allPlanets{
planets {
name
}
}
}
`;
class App extends React.Component {
state = {
planets: [... |
C++ | ISO-8859-1 | 1,146 | 2.53125 | 3 | [] | no_license | /* Furz BastienB */
#ifndef FURZ_H
#define FURZ_H
#include "IABase.h"
#include "Pathfinding.h"
#include "engine\timer.h"
class Furz : public IABase
{
public:
Furz(NYWorld *pWorld, NYVert2Df pos);
~Furz();
virtual void Draw();
virtual bool States(StateMachineEvent event, MSG_Object *msg, int state);
virtual v... |
PHP | UTF-8 | 2,203 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Entity\Enum\VehicleType;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\VehicleRepository")
*/
class Vehicle
{
/**
* @ORM\Id()
* @ORM\Ge... |
Shell | UTF-8 | 286 | 3.578125 | 4 | [] | no_license | #!/bin/sh
INDEX=docs/external/index.txt
if [ ! -r "$INDEX" ] ; then
echo "Missing $INDEX" 1>&2
fi
cd $(dirname "$INDEX")
grep -v "^ *#" $(basename "$INDEX") | while read line; do
read DNAME DURL <<< "$line"
if [ ! -f "$DNAME" ] ; then
curl -O "$DURL";
fi
done
|
Markdown | UTF-8 | 1,637 | 2.546875 | 3 | [] | no_license | # Article R525-11
Les recours devant la Cour sont formés par requêtes rédigées sur papier libre et signées par les parties ou un mandataire.
Celui-ci doit justifier d'un mandat spécial et écrit s'il n'est ni avocat au Conseil d'Etat et à la Cour de cassation, ni
avocat régulièrement inscrit à un barreau, ni avoué.
La... |
Java | UTF-8 | 1,042 | 2.46875 | 2 | [
"BSD-2-Clause"
] | permissive | package h2o.jenkov.container.script;
import h2o.jenkov.container.TestProduct;
import junit.framework.TestCase;
import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
/**
*/
public class FieldGenericTypeTest extends TestCase {
public void testGenericType() th... |
C++ | UTF-8 | 871 | 2.828125 | 3 | [] | no_license | #include "variable.h"
#include <vector>
using namespace std;
Variable :: Variable(){
this->value=0;
this->derivative=0;
this->from= nullptr;
this->id=0;
this->name="";
}
Variable::Variable(int _id, string _name, double _value) {
this->id=_id;
this->name=_name;
this->value=_value;
}
void ... |
C# | UTF-8 | 711 | 2.765625 | 3 | [
"MIT"
] | permissive | namespace JoinRpg.Helpers.Web;
/// <summary>
/// Marker class (requires HTML sanitize)
/// </summary>
public class UnSafeHtml
{
/// <summary>
/// Value that requires validation
/// </summary>
public string UnValidatedValue { get; }
private UnSafeHtml(string value) => UnValidatedValue = value;
... |
Java | UTF-8 | 1,217 | 2.203125 | 2 | [
"Apache-2.0"
] | permissive | package com.omnicrola.voxel.ui.builders;
import com.omnicrola.voxel.ui.UiAdapter;
import com.omnicrola.voxel.ui.UiScreen;
import com.omnicrola.voxel.ui.controllers.MultiplayerCreationScreenController;
import de.lessvoid.nifty.builder.LayerBuilder;
import de.lessvoid.nifty.builder.ScreenBuilder;
import de.lessvoid.nift... |
TypeScript | UTF-8 | 4,569 | 2.65625 | 3 | [
"MIT"
] | permissive | import PnpmError from '@pnpm/error'
import { win32 as path } from 'path'
import execa from 'execa'
import { BadEnvVariableError } from './errors'
type IEnvironmentValueMatch = { groups: { name: string, type: string, data: string } } & RegExpMatchArray
const REG_KEY = 'HKEY_CURRENT_USER\\Environment'
export async fun... |
Java | UTF-8 | 1,384 | 2.15625 | 2 | [] | no_license | package org.jtheque.primary.utils.views.components;
/*
* This file is part of JTheque.
*
* JTheque is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License.
*
* JTheque ... |
Markdown | UTF-8 | 730 | 2.875 | 3 | [
"MIT"
] | permissive | # div1 250 DucksAlignment
- 問題
- R\*Cの盤面上(ともに50以下)にアヒルがいる。ただし、同じ行・列にいるアヒルは高々1匹とする。アヒルを移動させて盤面上のどこかにアヒルを1列に並べたとき、移動距離の最小値を求めよ。
- 解法
- 行ごとに上の行から順番にアヒルのいる位置を調べ、その後、縦一列に並べる場合の移動距離を全探索する。並べる場所が決まったとき、一番上側にあるものから当てはめていくのがよい。列についても同じことを行う。O(RC√max(R,C))
- 実は列だけについて行えばよかったりする。
- タグ: 全探索
- レベル: 2
|
Java | UTF-8 | 1,161 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | package com.ra4king.gameservers.multiplayershooter.server;
import java.net.InetSocketAddress;
import java.nio.channels.ServerSocketChannel;
import java.util.Date;
import com.ra4king.gameutils.networking.SocketPacketIO;
public class MultiplayerShooterServer {
public static String codeBase;
public static void main... |
Python | UTF-8 | 578 | 3.59375 | 4 | [] | no_license | class Solution(object):
def reverseVowels(self, s):
"""
:type s: str
:rtype: str
"""
s = list(s)
vowel = "aeiou"
left, right = 0, len(s)-1
while left < right:
if s[left].lower() not in vowel:
left += 1
elif s[rig... |
Python | UTF-8 | 742 | 3.5 | 4 | [] | no_license | import json
with open('quotedata.json') as json_data:
data = json.load(json_data)
quote_list = []
for i in data:
quote_list.append(i['Quote'])
new_list = []
for i in range(len(quote_list)):
val = quote_list[i]
new_list.append(val[1:(len(val) - 1)])
words = []
for i in new_list:
words.append(... |
C | UTF-8 | 2,355 | 3.03125 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_next_line.c :+: :+: :+: ... |
Java | UTF-8 | 313 | 1.96875 | 2 | [] | no_license | /**
*
*/
package com.product.inventory.web.exception;
/**
* @author tvelk
*
*/
public class InvalidProductIdException extends Exception {
/**
*
*/
private static final long serialVersionUID = 1L;
public InvalidProductIdException() {
super("Invalid Product Id has given in the request");
}
}
|
C++ | UTF-8 | 992 | 2.84375 | 3 | [] | no_license | // ==================================
//
// itemTooltip.h
//
// HUD element that displays
// information about a specific
// item.
//
// ==================================
#pragma once
class Item;
#include <memory>
#include <string>
#include <SFML/Graphics.hpp>
#include "richText.h"
typedef std::shared_ptr<Item> ... |
Markdown | UTF-8 | 1,937 | 2.9375 | 3 | [] | no_license | #Out
Helper pour regrouper ces propres les baliles html de bas niveau de type :
> imgZoom, inputDate, inputAjax, nav-bar
Ce qui permet de plus réutiliser son travail et devrais permettre une plus grande indépendance vis a vis des frameworks css.
-----
##Inclus
* helper class Out
* vue de test
* Modeles de micro te... |
C# | UTF-8 | 713 | 3.15625 | 3 | [] | no_license | namespace Macsauto.Domain.Sales.Entities
{
/// <summary>
/// Represents an actual vehicle brand / dealer
/// Examples : Toyota, Honda, Daihatsu
/// </summary>
public class VehicleBrand : Entity
{
private string _name;
/// <summary>
///
/// </summary>
//... |
JavaScript | UTF-8 | 419 | 4.03125 | 4 | [
"MIT"
] | permissive | let num = [5,3,2,5,4];
console.log(`Nosso vetor é ${num}.`)
console.log(`Nosso vetor tem ${num.length} posições.`)
num[5] = 8 // inserindo um valor dendro do vetor.
num.push(7) // inserindo um valor sem precisar dizer o indice.
console.log(num)
num.length // conta o tamanho do vetor.
num.sort()
console.log(num)
console... |
PHP | UTF-8 | 18,217 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
require_once $_SERVER['DOCUMENT_ROOT'] . "sistema/clases/db.class.php";
class Usuario
{
public $idUsuario;
public $userName;
public $usuarioNombre;
public $usuarioApellido;
public $usuarioDni;
public $usuarioCel;
public $usuarioEmail;
public $usuarioRol;
public $usuarioTema;
public $usuari... |
Python | UTF-8 | 3,264 | 2.703125 | 3 | [] | no_license | from pyspark import SparkContext, SQLContext
from pyspark.ml.classification import DecisionTreeClassifier
from pyspark.ml.evaluation import BinaryClassificationEvaluator
from pyspark.ml.feature import RegexTokenizer, StopWordsRemover, HashingTF, IDF
from pyspark.sql.functions import UserDefinedFunction
from pyspark.sql... |
TypeScript | UTF-8 | 1,720 | 2.609375 | 3 | [
"MIT"
] | permissive | import { Command, flags } from '@oclif/command'
import * as Conf from 'conf'
import * as os from 'os'
export default class ConfCommand extends Command {
static description = 'manage configuration'
static flags = {
help: flags.help({ char: 'h' }),
key: flags.string({ char: 'k', description: 'key of the con... |
Shell | UTF-8 | 1,264 | 2.859375 | 3 | [] | no_license | #!/bin/bash -exu
cd $(dirname $BASH_SOURCE)
rm -rf output
mkdir output
PASSWORD="$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 32)"
keytool -genkey \
-v \
-keystore output/release-key.keystore \
-storepass "${PASSWORD}" \
-dname "CN=reddit.news-patched" \
-alias reddit.news-patched \
-keyalg RSA \
-keys... |
Java | UTF-8 | 1,589 | 2.296875 | 2 | [
"Apache-2.0"
] | permissive | /**
* Copyright (C) 2019-2025 Braisdom Wang (www.joowing.com)
* wangyonghe@msn.com
*
* 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... |
JavaScript | UTF-8 | 680 | 2.921875 | 3 | [] | no_license | import axios from "axios"
/**
* ACTION TYPES
*/
const GET_HUNTS = "GET_HUNTS"
/**
* INITIAL STATE
*/
const hunts = [{ id: null, name: "" }]
/**
* ACTION CREATORS
*/
const getHunts = gotHunts => ({ type: GET_HUNTS, gotHunts })
/**
* THUNK CREATORS
*/
export const fetchAllHunts = () => async dispatch => {
t... |
Shell | UTF-8 | 1,833 | 3.65625 | 4 | [
"MIT"
] | permissive | #! /bin/bash
#
. ~/etc/funcs.sh
U_MSG="usage: $0 [ -help ] data-dir"
if [ -z "$DM_HOME" ] ; then
LOG ERROR "DM_HOME not defined"
exit 1
fi
DM_ADDRS=$DM_HOME/addrs
DM_ETC=$DM_HOME/etc
DM_LIB=$DM_HOME/lib
DM_SCRIPTS=$DM_HOME/scripts
TMP_RFILE=/tmp/runs.$$
TMP_TS_FILE=/tmp/top_srcs.$$
DIR=
while [ $# -gt 0 ] ; do
... |
TypeScript | UTF-8 | 951 | 2.921875 | 3 | [] | no_license | import { AbstractControl, ValidatorFn } from '@angular/forms'
export class CustomValidators {
public static matchValueWith(val: string) {
return (control: AbstractControl): { [key: string]: any } | null =>
control.value === control.parent.controls[val].value ? null : { valuesMissmatch: control... |
Java | UTF-8 | 3,807 | 2.25 | 2 | [] | no_license | package com.google.android.gms.flags.impl;
import android.content.SharedPreferences;
import com.google.android.gms.internal.zzua;
import java.util.concurrent.Callable;
public abstract class zza<T> {
public static class zza extends zza<Boolean> {
class C06591 implements Callable<Boolean> {
fi... |
JavaScript | UTF-8 | 1,808 | 2.59375 | 3 | [] | no_license | $(document).ready(function () {
$('#mainTable').DataTable();
});
// Modal Call Details Dialog
$(document).on('click', '.callDetails', function () {
var callId = $(this).attr('rel');
$.post("showCallIdAction", {callId: callId}, function (data) {
var newRes = JSON.parse(data);
var result = ... |
JavaScript | UTF-8 | 963 | 2.59375 | 3 | [] | no_license | // déclarer express
var express = require('express');
// la fct suivante Router() permet de définir des routes
// dans une application express -
var router = express.Router();
var personController = require('../controllers/person.controller');
// router.get('/add', function(req, res){
// res.send('Ajout personne'... |
Markdown | UTF-8 | 1,191 | 3.03125 | 3 | [] | no_license | # spitter
### Simple Django Twitter Clone
##### _Aaron Trim 2017_
###### App Specification
Spitter is a Python + Django web application. It contains some basic social media functionalities, namely:
* User registration and login
* Ability to customise profile with username, biography, and uploaded profile image
* View o... |
SQL | UTF-8 | 256 | 3.234375 | 3 | [] | no_license | create table if not exists "medical_record"
(
id serial not null,
patient_id serial not null,
added_at date not null,
comment text not null,
primary key (id),
foreign key(patient_id) references "patient"(id)
); |
Java | UTF-8 | 830 | 2.59375 | 3 | [] | no_license | package edu.ufp.esof.projecto.services.filters.Componente;
import edu.ufp.esof.projecto.models.Componente;
import edu.ufp.esof.projecto.services.filters.FilterI;
import java.util.HashSet;
import java.util.Set;
public class ComponenteFilterByTipo implements FilterI<Componente>{
private String tipo;
public C... |
C++ | UTF-8 | 1,774 | 3.078125 | 3 | [] | no_license | #include "Squad.hpp"
Squad::Squad() {
this->numberOfMarines = 0;
this->marinesList = NULL;
}
Squad::Squad(const Squad &src) {
this->copyUnits(src);
this->numberOfMarines = src.numberOfMarines;
}
Squad::~Squad() {
this->destroyUnits();
}
Squad &Squad::operator= (const Squad &rhs) {
if (this != &rhs) {
this->... |
Swift | UTF-8 | 2,601 | 2.515625 | 3 | [] | no_license | //
// ProjectAPIHelper.swift
// WatchTODO
//
// Created by Liu, Naitian on 2/2/16.
// Copyright © 2016 naitianliu. All rights reserved.
//
import Foundation
protocol ProjectAPIHelperDelegate {
func didAddProject()
func failAddProject()
}
class ProjectAPIHelper: CallAPIHelperDelegate {
let apiURL... |
PHP | UTF-8 | 1,752 | 2.515625 | 3 | [] | no_license | <?php
include_once '../model/CalzadoHombre/CalzadoHombreModel.php';
class CalzadoHombreController
{
public function getInsert(){
include_once '../view/CalzadoHombre/tenis.php';
//include_once '../view/CalzadoMujer/Botín.php';
}
public function postInsert(){
... |
C# | UTF-8 | 1,426 | 2.53125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using TodoApp.ClientLocalDb.Models;
namespace TodoApp.ClientLocalDb
{
public abstract class LocalDbContext... |
Java | UTF-8 | 6,160 | 2.09375 | 2 | [] | no_license | package com.example.chatapp;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.os.Bundle;
import android.text.TextUtils;
import a... |
Java | UTF-8 | 1,724 | 2.890625 | 3 | [] | no_license | import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JProgressBar;
import javax.swing.JTextField;
public class WorkerFrame extends JFrame {
public static JLabel txtResultadoWorker;
... |
Markdown | UTF-8 | 14,058 | 3.078125 | 3 | [] | no_license | # Supervisely JSON Annotation Format Objects
## Supported Shapes
Supervisely Annotation Format supports the following figures:
- point
- rectangle
- polygon
- line / polyline
- bitmap
- keypoint structures
- cuboid
## Coordinate System
For two-dimensional mediums (images and videos) we use the following coordinat... |
Java | UTF-8 | 4,490 | 1.90625 | 2 | [] | no_license | package com.example.authlib.ui;
import android.content.Context;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.support.design.widget.TextInputLayout;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
impo... |
TypeScript | UTF-8 | 2,259 | 2.609375 | 3 | [] | no_license | import { injectable, inject } from 'tsyringe';
import AppError from '@shared/errors/AppError';
import IUsersRepository from '@modules/users/repositories/IUsersRepository';
import IPartiesRepository from '@modules/parties/repositories/IPartiesRepository';
import IPartiesUsersRepository from '@modules/parties/repositor... |
Java | UTF-8 | 907 | 2.3125 | 2 | [] | no_license | package com.min.edu.commons.utils;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Image;
import com.itextpdf.text.Rectangle;
import com.itextpdf.text.pdf.PdfContentByte;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPCellEvent;
import com.itextpdf.text.pdf.PdfPTab... |
Markdown | UTF-8 | 1,143 | 2.796875 | 3 | [
"MIT"
] | permissive | # Notes
We should put whatever we don't know where to put it but seems important (or not).
## AST
How do we find out how to make the **AST** and why do we think it's ok?
> - What if *I need ASTs* not parse trees for a compiler, for example?
>
> For writing a compiler, either generate [LLVM-type static-single... |
Shell | UTF-8 | 2,433 | 4.1875 | 4 | [] | no_license | #!/bin/bash
# Description:
# Downloads the human protein-protein-interaction pairs in PSI-MITAB format
# and parses it for protein names in pairwise interactions.
# Output:
# - homo_sapiens.mitab.interaction.txt (from Reactome website)
# - prot_interaction.tsv (pairwise prot-prot interactions)
# - all_uniqu... |
Python | UTF-8 | 2,330 | 3.375 | 3 | [] | no_license | #!/usr/bin/env python3
import matplotlib.pyplot as plt
import matplotlib.colors
import numpy as np
#import sys
from progressbar import progressbar
class Mandelbrot_slow():
def __init__(self, xmin: float, xmax: float,
ymin: float, ymax: float,
res: (int, int), escape_time: int = 1000):
self.xmin = xmin
... |
Python | UTF-8 | 640 | 3.3125 | 3 | [] | no_license | from telebot import types
def make_word_in_list_predicate(lst):
return lambda message: message.text is not None and message.text.lower() in lst
# делаем из списка слов кнопки и добавляем их в markup
def fill_markup_with_words(markup, lst):
list_of_buttons = []
for word in lst:
list_of_buttons.ap... |
PHP | UTF-8 | 2,905 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
class ProtocolAdapter {
const MINIMUM_PLAYER_THRESHOLD = 2;
const INITIAL_CARD_COUNT = 7;
const UNO_PUNISH_CARDS = 2;
public function __construct($server){
$server->onSessionInit(function ($socket, $name) use ($server){
if($server->getClientByName($name) != null){
$server->se... |
Java | UTF-8 | 4,595 | 2.0625 | 2 | [] | no_license | /*
* @(#)ProfileActivity.java
*
* (c) COPYRIGHT 2010-2011 MOTOROLA INC.
* MOTOROLA CONFIDENTIAL PROPRIETARY
* MOTOROLA Advanced Technology and Software Operations
*
* REVISION HISTORY:
* Author Date CR Number Brief Description
* ------------- ---------- ----------------- ------------------... |
Markdown | UTF-8 | 3,175 | 3 | 3 | [] | no_license | ## Computer Graphics and Visualization Lab (VTU 10CSL67)
Design, develop, and implement the following programs in C / C++
.
1. Program to recursively subdivide a tetrahedron to from 3D Sierpinski gasket. The number of recursive steps is to be specified by the user.
2. Program to implement Liang-Barsky line clip... |
Python | UTF-8 | 5,944 | 3.03125 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Wed Jan 3 09:46:07 2018
@author: lcristovao
Objective of this program is to make a function that does all the machine learning Work
I mean it returns the best predictor ready to work. It must be capable to work on multiclass
datasets. The Values of data set must be numeric or ... |
C++ | UTF-8 | 5,448 | 2.921875 | 3 | [] | no_license | /*
* jcPixel.h
*
* Created on: 2012/07/29
*/
#ifndef JCPIXEL_H_
#define JCPIXEL_H_
#include "jc/system/Macro.h"
/**
* ピクセルフォーマットについての定義を設定する
*/
namespace jc {
/**
* ピクセルフォーマットを指定する
*/
enum PixelFormat_e {
/**
* 2byte
* GL_UNSIGNED_SHORT_5_6_5
*/
PixelFormat_RGB565,
/**
*... |
Python | UTF-8 | 943 | 3.75 | 4 | [
"Apache-2.0"
] | permissive | import random
def monte():
square_size = int(input("What should the size of the square be?: "))
r = square_size / 2
left_bottom = [0,0]
left_top = [0,square_size]
right_bottom = [square_size,0]
right_top = [square_size,square_size]
print(left_top[0],left_top[1],
"------",right_top[0],right_top[1])... |
Markdown | UTF-8 | 431 | 3.484375 | 3 | [] | no_license | ####Problem
Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nums[2] <= nums[3]....
Example:
Input: nums = [3,5,2,1,6,4]
Output: One possible answer is [3,5,1,6,2,4]
#####Note
- - -
####Solution
for i in nums:
i가 2의배수인지, 아닌지에 따라
i와 i + 1 값을 비교
- - -
####Analysis
Time comp... |
Ruby | UTF-8 | 2,162 | 2.53125 | 3 | [] | no_license | class Room < ApplicationRecord
belongs_to :language
has_many :messages, dependent: :destroy
has_many :room_users, dependent: :destroy
has_many :users, through: :room_users
has_many :games
enum mode: ['free_for_all']
enum status: ['pending','playing']
enum difficulty: ['beginner', 'easy', 'medium', 'har... |
Markdown | UTF-8 | 935 | 2.875 | 3 | [] | no_license | # QIF to CSV
Simple Ruby script allowing me to convert from [QIF][qif] to [CSV][csv].
## Usage
$ ruby qif-to-csv.rb /path/to/file.qif > output.csv
## Motivation
I wanted to be able to import the transactions from my Santander 123 account to a spreadsheet. The transactions are available in QIF, XLS, text, QIF, ... |
Markdown | UTF-8 | 3,289 | 2.96875 | 3 | [] | no_license | import pygame
import math
import random
# username setup
name = input("enter the username: ")
print("welcome to lingoman game", name)
# setup display
pygame.init()
WIDTH, HEIGHT = 800, 500
win = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("LINGOMAN GAME")
# button variables
RADIUS = 20
GAP = ... |
Python | UTF-8 | 172 | 3.03125 | 3 | [] | no_license | # 67. Add Binary
class Solution:
def addBinary(self, a: 'str', b: 'str') -> 'str':
answer = int("0b" + a, 2) + int("0b" + b, 2)
return format(answer, 'b') |
Java | UTF-8 | 2,257 | 2.28125 | 2 | [] | no_license | package controllers;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.input.MouseEvent;
import javafx.stage.Stage;
import utils.Utils;
import java.io.IOException;
imp... |
JavaScript | UTF-8 | 1,729 | 3.1875 | 3 | [
"MIT"
] | permissive | 'use strict';
var isNumber = require('101/is-number');
var isString = require('101/is-string');
var isBuffer = Buffer.isBuffer;
module.exports = createFrame;
/**
* create a docker frame (header and payload)
* @param {number} ioConnectionType - 2=stderr, 1=stdout, 0=stdin
* @param {string|buffer} payloadData
* @re... |
C | UTF-8 | 8,559 | 2.5625 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include <string.h>
#include <sys/time.h>
#include "cnn.h"
// OpenCL includes
#include <CL/cl.h>
#include "kernel_cl.h"
// Sequential CNN implementation
void CONV(float Cout[NUM][IMROW][IMROW], float Cin[NUM][INIMROW][INIMROW],
float... |
Java | UTF-8 | 2,774 | 2.078125 | 2 | [] | no_license | package it.ltc.database.model.centrale;
import java.io.Serializable;
import javax.persistence.*;
/**
* The persistent class for the feature database table.
*
*/
@Entity
@Table(name="feature")
@NamedQuery(name="Feature.findAll", query="SELECT f FROM Feature f")
public class Feature implements Seriali... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.