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 |
|---|---|---|---|---|---|---|---|
Markdown | UTF-8 | 544 | 2.515625 | 3 | [] | no_license | # Article 227-15
Le fait, par un ascendant ou toute autre personne exerçant à son égard l'autorité parentale ou ayant autorité sur un mineur de quinze ans, de priver celui-ci d'aliments ou de soins au point de compromettre sa santé est puni de sept ans d'emprisonnement et de 100 000 euros d'amende.
Constitue notammen... |
Java | UTF-8 | 547 | 3.03125 | 3 | [] | no_license | package model.items;
/**
* This class represents a Safari Ball object and it a child of the Item class.
* The Safari Ball is used to catch Pokemon in the Safari Zone.
*
* @author Alan D., Paria K., Samantha F., Rajeev R., Scrum Master: Niven
* Francis, CSC 335 Final Project
*/
public class Safa... |
Shell | UTF-8 | 484 | 3.125 | 3 | [] | no_license | #!/bin/bash
set -e
HERE="$( readlink -f "$( dirname "$BASH_SOURCE" )" )"
WORKDIR="$PWD"
PM="${WORKDIR}/venv/bin/password_manager"
export GNUPGHOME="${WORKDIR}/gnupghome-2"
git clone ./passwords ./passwords-2
cd ./passwords-2
echo "Secret4" | ${PM} secret put PW4
${PM} key regen
git add -A
git commit -m 'Changes b... |
Go | UTF-8 | 547 | 2.578125 | 3 | [
"MIT"
] | permissive | package formats
import (
"bytes"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
)
func TestWriteDOT(t *testing.T) {
net := buildNetwork()
net.Name = "TestNN"
b := bytes.NewBufferString("")
err := WriteDOT(b, net)
require.NoError(t, err, "failed to DOT encode")
t.Log(b)... |
JavaScript | UTF-8 | 2,238 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | function urlB64ToUint8Array(base64String) {
const padding = '='.repeat((4 - base64String.length % 4) % 4);
const base64 = (base64String + padding).replace(/-/g, '+').replace(/_/g, '/');
const rawData = window.atob(base64);
const outputArray = new Uint8Array(rawData.length);
for (let i = 0; i < rawDat... |
Java | UTF-8 | 1,611 | 2.3125 | 2 | [
"MIT"
] | permissive | package org.frekele.fiscal.focus.nfe.client.enumeration;
import org.frekele.fiscal.focus.nfe.client.testng.InvokedMethodListener;
import org.testng.annotations.Listeners;
import org.testng.annotations.Test;
import java.util.List;
import static org.testng.Assert.*;
/**
* @author frekele - Leandro Kersting de Freita... |
Java | UTF-8 | 1,750 | 3.296875 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.mycompany.fieldday;
import java.util.Scanner;
/**
*
* @author ajplarson
*/
public class App {
public static void m... |
Python | UTF-8 | 4,043 | 2.65625 | 3 | [] | no_license | #!/usr/bin/env python
from history import History
from bs4 import BeautifulSoup
from urllib.request import Request, urlopen
import datetime
import os
import time
import sys
import subprocess
import re
import urllib.parse
import urllib.request
debug = False
class AppURLopener(urllib.request.FancyURLopener):
versio... |
Markdown | UTF-8 | 640 | 3.890625 | 4 | [] | no_license | 给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。
示例 1:
输入: "babad"
输出: "bab"
注意: "aba" 也是一个有效答案。
示例 2:
输入: "cbbd"
输出: "bb"
思路:
使用暴力法,对每个字符求回文子串的长度,统计最大长度即可。
此时应注意奇回文(如aba)和偶回文(如bb)的处理方式不同,为了统一进行处理,给原字符串增加占位符。
如原字符串“aba”,增加占位符后变为“#a#b#a#”,占位符可以为任意字符。
得到最长回文子串后再将占位符去掉即可。
|
Java | UTF-8 | 5,092 | 2.046875 | 2 | [] | no_license | package com.mclr.mini.riesgosmovil.fragmentos;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import andr... |
Java | UTF-8 | 877 | 2.015625 | 2 | [] | no_license | package com.dao;
import com.model.Order;
import com.model.Praise;
import com.model.PraiseExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PraiseMapper extends BaseDao<Praise>{
long countByExample(PraiseExample example);
int deleteByExample(PraiseExample example);
... |
Java | UTF-8 | 720 | 3.671875 | 4 | [
"Apache-2.0"
] | permissive | //Write a function that takes a string as input and returns the string reversed.
//
//Example 1:
//
//Input: "hello"
//Output: "olleh"
//Example 2:
//
//Input: "A man, a plan, a canal: Panama"
//Output: "amanaP :lanac a ,nalp a ,nam A"
package wenxinjie3;
public class leetcode344_Reverse_String {
public String re... |
Markdown | UTF-8 | 16,629 | 3 | 3 | [
"MIT"
] | permissive | ---
title: '#DearID Episode 54: Building a Network'
path: "/blog/dearid-episode-54-building-a-network"
date: '2018-09-27'
featured: "../featured/Building-a-network.png"
categories: ["Dear ID Show", "elearning"]
tags: ["freelancing", "freelance", "DearID", "network", "networking"]
---
This episode I wanted to talk a bi... |
C# | ISO-8859-3 | 1,419 | 2.625 | 3 | [] | no_license | using System;
using System.Reflection;
using NTools.Logging.Log4Net;
namespace NTools.Core.Reflection {
/// <summary>
/// Klasse zur Serialisierung von Membern, die eigentlich nicht serialisierbar sind.
/// Die Serialisierung erfolgt ber Reflection.
/// </summary>
[Serializable]
public class FieldReflector : Me... |
C++ | UTF-8 | 1,668 | 2.515625 | 3 | [] | no_license | #pragma once
#include "../Include/Interface.hxx"
struct TemporalMedian final {
static constexpr auto Name = "TemporalMedian";
static constexpr auto Parameters = "clip:clip;radius:int:opt;";
self(InputClip, Clip{});
self(Radius, 1);
auto Initialize(auto Arguments, auto Console) {
InputClip = Arguments["clip"];
... |
C# | UTF-8 | 3,772 | 3.109375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace InvoiceTotal
{
public partial class frmInvoiceTotal : Form
{
public frmInvoice... |
Python | UTF-8 | 2,517 | 2.859375 | 3 | [] | no_license | import tkinter
class LoginScreen:
Frame=None
UsernameTextBox=None
PasswordTextBox=None
SubmitButton=None
ButtonHeight=3
ButtonWidth=10
TextBoxHeight=3
TextBoxWidth=50
root=None
invalidText=None
emailID=""
def __init__(self,root):
self.root=root
... |
PHP | UTF-8 | 1,856 | 3.078125 | 3 | [] | no_license | <?php
/**
*
*/
class DataValidator {
public function __construct() {
}
private function TestMinimalLength($length, $string = "") {
echo'validator';
if (strlen($string) < $length) {
return FALSE;
} else {
return TRUE;
}
}
... |
C# | UTF-8 | 1,039 | 2.609375 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
// QUI16000158 | James Quinney
public class DisplayStats : MonoBehaviour
{
[SerializeField]
TMP_Text displayText;
// This will fill in a text box with the player's stats
public void UpdateDisplay()
{
... |
C# | UTF-8 | 1,269 | 3.25 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
namespace WebShop.Models
{
// Class to simplify work with paginated results (since we could have quite a lot of imported items)
public class PaginatedList<T> : List<T>
... |
C# | UTF-8 | 487 | 2.640625 | 3 | [] | no_license | if(items.SelectedItem== null)
{
item.BList.Add(AllList.Where(x => x.Id == id).FirstOrDefault());
item.Blist.RemoveAll(i => i == null); // You donn't have to iterate the list to do this
foreach (var dep in item.Blist)
{
// Do whatever you want with your items... |
Java | UTF-8 | 524 | 2.4375 | 2 | [] | no_license | package edu.cs.birzeit.assignment1;
public class detailsForLogin {
public String name, password;
public detailsForLogin(String name, String password) {
this.name = name;
this.password = password;
}
public String getName() {
return name;
}
public void setName(String n... |
C++ | UTF-8 | 1,376 | 2.90625 | 3 | [] | no_license | struct node
{
int val, i, j;
};
struct comp
{
bool operator()(node a, node b)
{
return a.val > b.val;
}
};
class Solution
{
public:
vector<vector<int>> kSmallestPairs(vector<int> &a, vector<int> &b, int k)
{
priority_queue<node, vector<node>, comp> q;
vector<vector<int>> ... |
C++ | UTF-8 | 130 | 2.640625 | 3 | [] | no_license | #pragma once
class Edge
{
public:
int from = 0;
int to = 0;
int weight = 0;
Edge(int from, int to, int weight);
~Edge();
};
|
Java | UTF-8 | 1,493 | 2.5625 | 3 | [] | no_license | package com.niit.goonline.DAOImpl;
import java.util.List;
import javax.transaction.Transactional;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com... |
PHP | UTF-8 | 502 | 2.859375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace CloudDfe\Sdk;
class Base
{
protected $client;
public function __construct(Client $client)
{
$this->client = $client;
}
protected static function checkKey(array $payload): string
{
$key = preg_replace("/[^0-9]/", "", $payload['chave'])... |
Markdown | UTF-8 | 469 | 2.8125 | 3 | [
"MIT"
] | permissive | 1. git clone repository
2. masuk ke folder
3. Berikan perintah berikut:
```$ composer install ```
4. Pada folder bisa ditemukan sebuah file .env-example, copy isi dari file tersebut lalu buat file dengan nama ".env" dan paste ke file ".env" tersebut.
5. setelah selesai perintah sebelumnya, berikan perintah berikut... |
PHP | UTF-8 | 2,416 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Vainyl
*
* PHP Version 7
*
* @package Core
* @license https://opensource.org/licenses/MIT MIT License
* @link https://vainyl.com
*/
declare(strict_types=1);
namespace Vainyl\Core\Comparator\Decorator;
use Vainyl\Core\AbstractIdentifiable;
use Vainyl\Core\Comparator\ComparatorInterface;
us... |
PHP | UTF-8 | 2,837 | 2.59375 | 3 | [] | no_license | <?php
namespace Walterra\J4p5Bundle\j4p5\parse;
use \Walterra\J4p5Bundle\j4p5\parse\Bug;
use \Walterra\J4p5Bundle\j4p5\parse\Helpers;
use \Walterra\J4p5Bundle\j4p5\parse\token;
class Helpers {
public static $FA_NO_MARK = 99999;
static public function bug_unless($assertion, $gripe='Bug found.') { if (!$asser... |
Java | UTF-8 | 12,511 | 1.8125 | 2 | [
"MIT"
] | permissive | package fi.solita.utils.api;
import static fi.solita.utils.functional.Collections.emptyList;
import static fi.solita.utils.functional.Collections.newList;
import static fi.solita.utils.functional.Collections.newMutableList;
import static fi.solita.utils.functional.Collections.newSet;
import static fi.solita.utils.func... |
Java | UTF-8 | 2,526 | 1.953125 | 2 | [] | no_license | package com.shangde.edu.feed.service;
import com.shangde.edu.feed.condition.QueryStatCommonCondition;
import com.shangde.edu.feed.domain.UserUse;
public interface IUserUse {
/**
* 添加
*
* @param userUse
* @return
*/
public int addUserUse(UserUse userUse);
/**
* 条件查询
*
* 需要三个参数 ... |
C# | UTF-8 | 5,043 | 2.59375 | 3 | [
"MIT"
] | permissive | using System;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using ClientFramework;
namespace ClientPlatform
{
public sealed class WebClient : IWebClient
{
private readonly HttpClient httpClient;
private readonly IStringSerializer str... |
C++ | UTF-8 | 595 | 2.921875 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
class A
{
public:
int a, b;
A(int k)
{
a = 0, b = k;
}
A() {}
void setData(int a, int b)
{
this->a = a;
this->b = b;
}
void getData()
{
cout << "a= " << a << " b= " << b << endl;
}
};
int main()
{
... |
C++ | UTF-8 | 1,890 | 2.59375 | 3 | [] | no_license | #include "proceduralgrass.h"
#include <random>
const GLuint ATTRIBINDEX_VERTEX = 0;
ProceduralGrass::ProceduralGrass() {
initializeOpenGLFunctions();
glGenVertexArrays(1, &vao);
glBindVertexArray(vao);
glGenBuffers(1, &posVbo);
glEnableVertexAttribArray(ATTRIBINDEX_VERTEX);
glBindBuffer(GL_AR... |
Python | UTF-8 | 1,030 | 4.125 | 4 | [] | no_license | class OrcRace:
def __init__(self, name, damage, health):
self.name = name
self.damage = damage
self.health = health
def deal_damage(self):
print(f"Unit {self.name} dealt {self.damage} damage")
def goto(self, x, y):
print(f"Unit {self.name} went to {x} {y}")
class ... |
JavaScript | UTF-8 | 3,845 | 2.6875 | 3 | [
"MIT"
] | permissive | import React, { useState } from 'react';
import { Nav } from 'react-bootstrap';
import Header from './common/header.js';
import Button from 'react-bootstrap/Button';
import { useDispatch } from 'react-redux';
import { searchTweets } from "./../features/twitter";
import InputGroup from 'react-bootstrap/InputGroup';
impo... |
Ruby | UTF-8 | 1,342 | 2.546875 | 3 | [
"MIT"
] | permissive | # frozen_string_literal: true
require 'lighthouse/audit_service'
RSpec.describe AuditService do
let(:runner) { double }
let(:url) { 'example.com' }
let(:audit) { :performance }
let(:score) { 75 }
subject { described_class.new(url, audit, score) }
before do
Lighthouse::Matchers.lighthouse_cli = ... |
Python | UTF-8 | 1,800 | 3.6875 | 4 | [] | no_license |
from string import punctuation, digits, printable
import csv
def extract_words(input_string):
"""
Helper function for bag_of_words()
Inputs a text string
Returns a list of lowercase words in the string.
Punctuation and digits are separated out into their own words.
"""
f... |
Python | UTF-8 | 1,222 | 2.71875 | 3 | [] | no_license | from __future__ import print_function
from nltk.stem import PorterStemmer
from nltk.tokenize import word_tokenize
import pandas as pd
import sys
ps = PorterStemmer()
sentiment = open("C:\\Users\\teja\\Documents\\1.MS\\1.Masters\\Semester-2\\800-AdvancedMachineLearning\\Twitter\\sentiments1000_byProf.csv", "w+")
ip_fi... |
C# | UTF-8 | 243 | 2.609375 | 3 | [] | no_license | public class MyCustomLogger : ISuperLogger
{
public void Log(string toLog)
{
UnityEngine.Debug.Log(toLog);
}
~MyCustomLogger()
{
UnityEngine.Debug.Log("MyCustomLogger was destroyed from the GC");
}
} |
Java | UTF-8 | 193 | 1.835938 | 2 | [] | no_license | package com.example.radiobe.database;
import com.example.radiobe.models.RadioItem;
import java.util.List;
public interface DatabaseReaderListener {
void done(List<RadioItem> streams);
}
|
Markdown | UTF-8 | 8,616 | 2.734375 | 3 | [] | no_license | # 2018公益演講心得文之一BY李兄
# 績優股夢想家
加入社團剛好滿一年了,因為工作的關係,很多社團辦的活動無法參與。這次尼莫大和麥克風大辦的投資公益講座是第一次參加。時間安排上也是排除很多困難才好不容易來參與這次的講座。因為個人較懶惰且文筆不好,本來不好意思來發上課心得,在社團黃大的鼓勵下厚著臉皮來發一篇上課心得,寫的不好請多多指教,希望可以鞭小力一點。
本人追蹤尼莫大的部落格與粉絲頁大概有6-7年了,這次是第一次看到本人,尼莫給人一種文人氣息與`儒生’風範,覺得非常客氣與和善。貓大是最近這一年加入社團後才開始接觸他的投資方法與理念,這次上過貓大的課之後也要將貓大的粉絲頁與部落格做為長期追蹤的目標。
以下為上課心得... |
Python | UTF-8 | 1,811 | 2.96875 | 3 | [
"CC0-1.0"
] | permissive | # This is just an example how to use faker
# faker is extrimly slow.
# check out data_gen_saprk for fas code
import csv
from faker import Faker
import datetime
def datagenerate(records, headers):
fake = Faker('en_US')
fake1 = Faker('en_GB') # To generate phone numbers
with open("People_data.csv", 'wt') a... |
Markdown | UTF-8 | 19,609 | 2.59375 | 3 | [] | no_license | <p class="channel-type">(Carla channeling)</p>
<p>[I am Laitos,] and I greet you, my friends, in the love and the light of our infinite Creator. We thank you for the great blessing you have offered us in asking us to come and work with those who have gathered here in the name of the Creator, the Source. We attempted fo... |
JavaScript | UTF-8 | 1,685 | 3.34375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | var cart = [];
function setCart(newCart) {
cart = newCart;
}
// done
function getCart() {
return cart;
}
// done
function addToCart(item_name) {
var price = Math.floor(Math.random() * 100)
var object = { [item_name]: price}
cart.push(object)
console.log(`${item_name} has been added to your cart.`)
retu... |
Java | UTF-8 | 4,769 | 1.890625 | 2 | [
"CC-BY-4.0",
"Apache-2.0"
] | permissive | /* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.accessservices.dataengine.model;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation... |
C# | UTF-8 | 666 | 3.25 | 3 | [
"MIT"
] | permissive | using System;
interface I
{
void f();
}
class B : I
{
public virtual void f()
{
Console.WriteLine("B::f()");
}
void I.f()
{
Console.WriteLine("B::I.f()");
}
}
class A : B, I
{
public override void f()
{
Console.WriteLine("A::f()");
}
void I.f()
{
Console.WriteLine("... |
Java | UTF-8 | 988 | 3.53125 | 4 | [] | no_license | package com.hd520.thinking_in_code.dynamic_pro;
/**
* @Description 删除字符使得两个字符串相等, 最少需要多少步
* @Author xierishi
* @Date 2020-12-22 16:27:04
*/
public class MiniDeleteDistance {
public int minDistance(String s1, String s2) {
int len1 = s1.length();
int len2 = s2.length();
Integer[][] dp = new Integer[len1 + 1... |
Python | UTF-8 | 3,408 | 2.515625 | 3 | [] | no_license | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
import sys
import time
import couchdb
import logging
from twython import Twython
from twython import TwythonError
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
sys.path.append('/usr/local/lib/python3.4/dist-packages')
##Assigns sentiment score... |
PHP | UTF-8 | 4,577 | 2.828125 | 3 | [] | no_license | <?php
class CompraEstadoTipo {
private $idcompraestadotipo;
private $cetdescripcion;
private $cetdetalle;
private $mensajeoperacion;
public function getIdcompraestadotipo()
{
return $this->idcompraestadotipo;
}
public function setIdcompraestadotipo($idcompraestadotipo)
... |
Java | UTF-8 | 235 | 2.578125 | 3 | [] | no_license | package sistemacarro;
import java.util.Comparator;
public class ComparatorCarro implements Comparator<Carro> {
@Override
public int compare(Carro o1, Carro o2) {
return (int) (o1.getValorAluguel() - o2.getValorAluguel());
}
}
|
PHP | UTF-8 | 2,009 | 2.8125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Europa;
use Europa\Fs\Locator;
/**
* Handles class loading.
*
* @category Fs
* @package Europa
* @author Trey Shugart <treshugart@gmail.com>
* @license Copyright (c) 2011 Trey Shugart http://europaphp.org/license
*/
class ClassLoader
{
/**
* The locator to use for locating class f... |
Java | UTF-8 | 2,921 | 2.4375 | 2 | [] | no_license |
package uk.ac.birmingham;
import org.renjin.invoke.codegen.scalars.ByteType;
import org.scijava.ItemIO;
import org.scijava.command.Command;
import org.scijava.plugin.Parameter;
import org.scijava.plugin.Plugin;
import org.scijava.ui.UIService;
import net.imagej.Dataset;
import net.imagej.ImageJ;
import net.imagej.op... |
Java | UTF-8 | 513 | 3.0625 | 3 | [] | no_license | package com.company.stocks;
/**
* Created by manisharana on 5/5/15.
*/
public class Employee {
private String name;
private Company company;
Employee(String name, Company company) {
this.name = name;
this.company = company;
company.addEmployees(company.getName(), this);
}
... |
Python | UTF-8 | 2,609 | 3.09375 | 3 | [] | no_license | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
import unicodedata
import re
# In[2]:
standard_header = ['bairros', 'rotas']
zonas = pd.read_excel('zonas_bairros.xlsx', names=standard_header)
print(zonas.columns)
# In[3]:
def RemoverCaracteresEspeciais(palavra):
# Unicode normalize tr... |
C++ | UTF-8 | 4,349 | 2.765625 | 3 | [] | no_license | /*
* Connection.cpp
*
* Created on: Dec 13, 2011
* Author: NGUYEN Hong San
*/
#include "Connection.h"
#include <glog/logging.h>
#include "Message.h"
#include <boost/make_shared.hpp>
#include "commons/SocketUtil.h"
#include "Server.h"
#define MAXTRIES 100
Connection::Connection(int fd)
{
this->fd = fd;
re... |
Python | UTF-8 | 222 | 2.765625 | 3 | [] | no_license | def interseccao_chaves (dic_1, dic_2):
lista = []
for chave_1, indice_1 in dic_1 .items():
i = 0
if chave_1 == dic_2[i]:
lista.append(chave_1)
i += 1
return lista |
TypeScript | UTF-8 | 5,280 | 2.546875 | 3 | [
"ISC"
] | permissive | import discord from "discord.js";
import logging from "../logging";
import { TinyEmitter } from "tiny-emitter";
import {
Interaction,
SlashCommandListener,
} from "./slash-commands/api/listen-to-commands";
import {
SlashCommand,
SlashCommandName,
} from "./slash-commands/api/SlashCommand";
import { registerComm... |
Go | UTF-8 | 5,691 | 3.015625 | 3 | [
"MIT"
] | permissive | package transfig_test
import (
"encoding/json"
"io/ioutil"
"os"
"reflect"
"testing"
"github.com/sironfoot/transfig"
)
type complex struct {
StringValue string `json:"stringValue"`
IntValue int `json:"intValue"`
FloatValue float64 `json:"floatValue"`
BoolValue bool `json:"boolValue"`
SliceVa... |
TypeScript | UTF-8 | 1,142 | 2.53125 | 3 | [] | no_license | import { Component, OnInit } from '@angular/core';
import {HttpClient} from "@angular/common/http";
@Component({
selector: 'app-address',
templateUrl: './address.component.html',
styleUrls: ['./address.component.css']
})
export class AddressComponent implements OnInit {
model : AddressModel={
... |
JavaScript | UTF-8 | 2,378 | 2.515625 | 3 | [
"MIT"
] | permissive | import uuidv4 from 'uuid/v4';
import Filesystem from '../src/filesystem';
describe('new Filesystem()', () => {
it('creates a new filesystem', () => {
const filesystem = new Filesystem({ name: uuidv4() });
expect(!!filesystem).toBe(true);
});
});
describe('async new Filesystem().isMaster', () => {
it('fi... |
Python | UTF-8 | 490 | 3.890625 | 4 | [] | no_license | #!/usr/bin/python3
"""function that finds a peak in a list of unsorted integers"""
def find_peak(list_of_integers):
"""function thats finds a peak in a list of unsorted integers"""
l_int = list_of_integers
length = len(l_int)
if l_int == []:
return None
if length == 0:
return
... |
Python | UTF-8 | 580 | 2.796875 | 3 | [] | no_license | from option import Option
import argparse
parser = argparse.ArgumentParser()
group = parser.add_mutually_exclusive_group()
group.add_argument( "--word", "-w", help="Find score for word", type=str)
group.add_argument( "--file", "-f", help="Find score for given word", action='store_true')
group.add_argument( "--score", ... |
PHP | UTF-8 | 556 | 2.953125 | 3 | [] | no_license | <?php
foreach ($data as $row)
{
foreach ($row['Person'] as &$value)
{
$value = '"' . $value . '"';
}
foreach ($row['Course'] as &$value)
{
$value = '"' . $value . '"';
}
foreach ($row['DesembarqueIdaPoint'] as &$value)
... |
C++ | UTF-8 | 713 | 2.984375 | 3 | [] | no_license | //
// insertion sort
// Created by taha nebti.
// Copyright (c) 2019. All rights reserved.
//
#include <bits/stdc++.h>
using namespace std;
template<typename T>
void insertion_sort(vector<T>& a) {
int n = a.size();
for (int i = 0; i < n; i++) {
int id = i;
for (int j = i-1; j ... |
Markdown | UTF-8 | 2,595 | 3.78125 | 4 | [] | no_license | # CSS padding 属性
## 实例
设置 p 元素的 4 个内边距:
```
p
{
padding:2cm 4cm 3cm 4cm;
}
```
## 浏览器支持
所有浏览器都支持 padding 属性。
注释:任何的版本的 Internet Explorer (包括 IE8)都不支持属性值 "inherit"。
## 定义和用法
padding 简写属性在一个声明中设置所有内边距属性。
### 说明
这个简写属性设置元素所有内边距的宽度,或者设置各边上内边距的宽度。行内非替换元素上设置的内边距不会影响行高计算;因此,如果一个元素既有内边距又有背景,从视觉上看可能会延伸到其他行,有可... |
Java | UTF-8 | 367 | 1.679688 | 2 | [] | no_license | package com.sanguine.webclub.dao;
import com.sanguine.webclub.model.clsWebClubProfessionMasterModel;
public interface clsWebClubProfessionMasterDao {
public void funAddUpdateWebClubProfessionMaster(clsWebClubProfessionMasterModel objMaster);
public clsWebClubProfessionMasterModel funGetWebClubProfessionMa... |
Java | UTF-8 | 2,995 | 2.765625 | 3 | [] | no_license | package fr.charlier.puissance4game.view;
import fr.charlier.puissance4game.controller.Constante;
import javax.swing.*;
import java.awt.*;
public class JPanelAnimate extends JPanel {
private int posX = 0;
private int posY = 0;
Point points = new Point(posX, posY);
private Color color = new Color... |
Java | UTF-8 | 859 | 2.46875 | 2 | [] | no_license | package com.example.a10.guideapplication.presenter;
import com.example.a10.guideapplication.model.Token;
import com.example.a10.guideapplication.repository.TokenRepository;
import com.example.a10.guideapplication.view.TokenListener;
import java.util.Map;
public class TokenPresenter {
TokenListener listener;
... |
Java | UTF-8 | 800 | 3.21875 | 3 | [] | no_license | package project.joseph.operators;
import project.joseph.exceptions.CalculatorError;
import project.joseph.exceptions.CalculatorException;
import java.util.Stack;
/**
* Created by josephgan on 5/12/18.
*/
public class Subtraction extends Operator {
public Subtraction() {
this.operator = OperatorEnum.SUB... |
JavaScript | UTF-8 | 1,144 | 2.671875 | 3 | [] | no_license | $(document).ready(function() {
// mouseover easter egg
regularText = {
ryan: "",
alex: "",
kyle: "",
jesse: "",
shuyang: "",
zach: ""
};
$(".team-wrapper").hover(function() {
// mouse on
mouseoverText = {
ryan: "the crazy one",... |
C | UTF-8 | 525 | 4.1875 | 4 | [] | no_license | #include <stdio.h>
int sum(int* a, int* b)
{
return *a+*b; // Function should be declared first then it should be called in main.
}
int difference(int* x, int* y)
{
return (*x-(*y));// the difference is not working
}
int main()
{
int a,b;
printf("Enter the value of a and b\n");
scanf("%... |
Markdown | UTF-8 | 3,186 | 3.03125 | 3 | [] | no_license | ---
title: CS 380 Homework #8
---
<div id="header">
| **CS 380 Homework #8**
| Prof. Richard Eisenberg
| Spring 2017
|
| Due date: Wednesday, April 12, 2017
</div>
Halgebra 2.0
------------
This week's assignment is to update your computer algebra solver from
Homework #3 to use GADTs to eliminate the need for `err... |
Java | UTF-8 | 1,142 | 2.21875 | 2 | [] | no_license | package com.start.model;
import com.start.core.CoreModel;
public class FriendHistory extends CoreModel {
public static final String TABLE_NAME="ST_FRIENDHISTORY";
public static final String COLUMN_NAME_MYID="myId";
public static final String COLUMN_NAME_FRIENDID="friendId";
public static final String COLUMN_... |
Java | UTF-8 | 2,703 | 2.296875 | 2 | [] | no_license | package com.arashivision.bmgmedia.utils;
import android.opengl.GLES20;
import android.opengl.GLU;
import android.util.Log;
public class GLUtils {
public static final String TAG = "ins";
public static boolean checkGLError(String str) {
int glGetError = GLES20.glGetError();
if (glGetError == 0)... |
Java | UTF-8 | 2,962 | 2.125 | 2 | [
"Apache-2.0"
] | permissive | /*-
* ================================================================================
* DCAE DMaaP Bus Controller Models
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property
* ============================================================... |
Markdown | UTF-8 | 2,268 | 2.609375 | 3 | [
"MIT"
] | permissive | ---
name: 1.6.7
title: 1.6.7 - ERSPAN
short-title: ERSPAN
exam: both
category: Layer 2
collection: Layer2
layout: page
---
Encapsulated Remote SPAN (ERSPAN) is a variant of RSPAN in which we are encapsulating the Remote SPAN information. ERSPAN creates a GRE tunnel for all captured traffic and allows it to be extended ... |
Java | UTF-8 | 1,859 | 2.40625 | 2 | [] | no_license | package org.erp.tarak.balanceSheet;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@Repository("balanceShee... |
Java | UTF-8 | 602 | 1.953125 | 2 | [] | no_license | package com.cn.web;
import com.cn.kafka.KafkaProductor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestControl... |
PHP | UTF-8 | 5,365 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
// If the form was submitted, scrub the input (server-side validation)
// see below in the html for the client-side validation using jQuery
$name = '';
$gender = '';
$address = '';
$email = '';
$username = '';
$password = '';
$output = '';
$username = $_COOKIE["username"];
$SESID = $_COOKIE["PHPS... |
Java | UTF-8 | 7,554 | 1.765625 | 2 | [] | no_license | package com.sybase365.mobiliser.web.cst.pages.notificationmgr;
import java.util.ArrayList;
import java.util.List;
import org.apache.wicket.authorization.strategies.role.annotations.AuthorizeInstantiation;
import org.apache.wicket.extensions.markup.html.repeater.data.sort.OrderByBorder;
import org.apache.wicket.markup... |
Java | UTF-8 | 798 | 1.976563 | 2 | [] | no_license | package com.bootdo.increment.dao;
import com.bootdo.increment.domain.TbIncrementUser;
import com.bootdo.increment.domain.dto.UserDTO;
import java.util.List;
/**用户增值日报表Dao
* @Author : oysy
* @Version: 0.0.1
* @Date : 2020-04-14 18:00
**/
public interface UserDayAmountDao {
/**
* 用户增值日报表查询
* @param u... |
Java | UTF-8 | 771 | 2.0625 | 2 | [] | no_license | package com.zcbl.compent.function.sys;
import java.util.UUID;
import com.zcbl.compent.language.respertories.CmdFactory;
import com.zcbl.compent.language.respertories.Compent;
import com.zcbl.compent.language.respertories.Input;
import com.zcbl.compent.language.respertories.Output;
import com.zcbl.compent.language.res... |
Java | UTF-8 | 317 | 2.171875 | 2 | [] | no_license | package com.xgame.logic.server.core.gamelog.task;
import com.xgame.logic.server.core.gamelog.logs.BaseLog;
/**
*
*
* @author ye.yuan
*
*/
public class FileLogTask implements Runnable {
BaseLog log;
public FileLogTask(BaseLog log) {
this.log = log;
}
public void run() {
this.log.logToFile();
}
}
|
PHP | IBM852 | 446 | 2.765625 | 3 | [] | no_license | <?php
$Salario = $_POST ["salario"] ;
$Calculo = $_POST["calculo"];
if (($Calculo)== "Reajuste") {
$aumento = ($Salario/100)*38;
echo "Seu Reajuste de : R$" . $aumento ;
}
if (($Calculo)== "Gratificaao") {
$aumento = ($Salario/100)*20;
echo "Sua Gratificaao de : R$" . $aumento ;
}
if (($Calculo)== "Des... |
C++ | WINDOWS-1252 | 624 | 3.125 | 3 | [] | no_license | //1252366 賬 һ
#include <iostream>
using namespace std;
int main()
{
double str1[]={0,1.1,2.2,3.3,4.4,5.5,6.6,7.7,8.8,9.9};
double str2[11];
double a;
int i,j;
cout << "Plese enter a number,and place into the aray in the specific raw." << endl;
cin >> a;
for(i=0; i<10; i++)
{
for(j=0; j<i; j++)
str2[j]=str... |
Markdown | UTF-8 | 852 | 3.28125 | 3 | [
"MIT"
] | permissive | AngularIsomer
=============
Angular JS directives for Isomer <a href="http://jdan.github.io/isomer/">http://jdan.github.io/isomer/</a>
This directive allows you to bind a canvas to an array of isomer shapes, by passing the array into the "ng-shapes" attribute. You can use "isomer" as either an element or attribute on... |
Markdown | UTF-8 | 2,875 | 3.125 | 3 | [] | no_license | ---
title: "The Background Music of My Life"
date: 2020-08-16T14:01:19-04:00
draft: false
tags: ["reflection"]
---
The background music my life is in Hindi. The funny thing about that fact is I don't understand Hindi. Yet, I find myself here, writing my first blog post with headphones in and the soft lyrics of Arijit ... |
Python | UTF-8 | 2,165 | 3.375 | 3 | [] | no_license | #!/usr/bin/python3.4
"""
Description:
Learning Markov chain part
Usage:
phrase_generator <words> ... [--n <num>]
phrase_generator -h | --help
Options:
-h --help Show this screen.
--n=num Number of words to complement
"""
import pickle
from random import randint
from os import path
from docopt impo... |
Java | UTF-8 | 5,552 | 2.015625 | 2 | [] | no_license | package com.example.bitinsider;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Context;
import android.content.Intent;
import android.media.VolumeShaper;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Butt... |
Go | UTF-8 | 709 | 3.25 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | package experiments
import (
"fmt"
"io/ioutil"
"net/http"
)
func init() {
Experiments["write_temp"] = Experiment{
Name: "Write temp",
Description: "Writes to /home/vcap/tmp",
Handler: http.HandlerFunc(WriteTemp),
}
}
func WriteTemp(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(`<htm... |
Swift | UTF-8 | 2,328 | 2.546875 | 3 | [
"MIT"
] | permissive | //
// TransactionListCell.swift
import UIKit
class TransactionListCell: BaseTableViewCell {
// MARK: - Properties (Lazy)
private lazy var dateLabel: UILabel = {
let label = UILabel()
label.textColor = AppTheme.Color.text_light
label.font = AppTheme.Font.text_smaller
... |
SQL | UTF-8 | 71,307 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: mysql
-- Generation Time: Jan 24, 2021 at 08:17 AM
-- Server version: 8.0.21
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... |
JavaScript | UTF-8 | 630 | 2.65625 | 3 | [] | no_license | module.exports = {
name: 'gordia',
aliases: ["g", "grodiag"],
description: "I,m tri ying two lern how too spel. Lett,s C ...",
execute(message) {
const letters = ["", "a", "d", "g", "i", "r", "o"];
const l2 = letters[Math.floor(Math.random() * letters.length)];
const l3 = letters[Math.floor(Ma... |
Markdown | UTF-8 | 384 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | # Log Trimmer
Cuts out parts of log files, based on timestamp. Uses binary search to efficiently find bounds.
# Examples:
Cut log with standard timestamp format.
```log_trimmer.py -r "2012-10-09 15:45:38" "2012-10-12 14:34:43" -f bigbig.log```
Custom format (Python notation):
```log_trimmer.py -r "30-01-1999 15:55:... |
PHP | UTF-8 | 2,900 | 2.984375 | 3 | [] | no_license | <?php
/**
* This is an abstract class which will be extended
* by all other classes which will process and display model data.
* The data should be passed as an argument to these classes by a controller
* as these classes will not be able to communicate with the db.
* @author peterg
*
*/
abstract class evbase_vi... |
SQL | UTF-8 | 78,200 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 21, 2014 at 07:09 AM
-- Server version: 5.5.16
-- PHP Version: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... |
Java | UTF-8 | 1,202 | 2.984375 | 3 | [] | no_license | package ch.fhnw.ds.networking.tcp;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;
import java.net.InetAddress;
import java.net.Socket;
import java.util.Scanner;
public class Mailer {
static Scanner in;
static Writer out;
public static void main(String[] args) throws Exception {
... |
PHP | UTF-8 | 6,087 | 2.859375 | 3 | [] | no_license | <?php
/*
* 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.
*/
namespace son\fixture;
use son\cliente\ClienteAbstract;
use son\cliente\types\ClientePF;
use son\cliente\types\ClientePJ;
/**... |
C++ | UTF-8 | 1,508 | 4 | 4 | [] | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
// <X 的节点 排在 >= x的节点之前
// 题解: 建立两个链表 一个前半段 <x 一个后半段 >=x
// 跟例子顺序无关
public:
ListNode* partition(ListNode* head, int x) {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.