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 | 496 | 2.671875 | 3 | [
"MIT"
] | permissive | # Project
Continue last week's project, feel free to add any feature that you like!
Here are some ideas if you don't have any:
- Create a server and a database and connect them to your React app.
- Add more pages related to your app.
- Use an external API.
> Quick tip: in case you actually want to build a server fo... |
TypeScript | UTF-8 | 2,857 | 2.65625 | 3 | [
"MIT"
] | permissive | import ts from 'typescript';
import minimatch from 'minimatch';
import {existsSync} from 'fs';
import {dirname, join, normalize, relative, resolve} from 'path';
import * as Lint from 'tslint';
const BUILD_BAZEL_FILE = 'BUILD.bazel';
/**
* Rule that enforces that imports or exports with relative paths do not resolve... |
Java | UTF-8 | 234 | 1.773438 | 2 | [] | no_license | package Selektions_Chp_03_Exercises;
import static Selektions_Chp_03_Exercises.Exercise_3_2_Calculations.AdditionQuiz;
public class Exercise_3_2_Main {
public static void main(String[] args) {
AdditionQuiz();
}
}
|
Python | UTF-8 | 253 | 2.796875 | 3 | [] | no_license | # vim: set fenc=utf8 ts=4 sw=4 et :
from master.drill import Drill
class LengthDrill(Drill):
"""
Mines length
@author Ente
"""
def get_headers(self):
return ["Length"]
def drill(self, line):
return [len(line)]
|
Markdown | UTF-8 | 5,379 | 2.765625 | 3 | [
"MIT"
] | permissive | # Расширение Авторазиации
Данное расширение являеться новым для фреймворка MyUCP,
и совместимо только с версией 5.7 и выше. Работает при помощи
новой системы расширений которая была введена в новой версии.
## Установка
Расширение идет предустановленым в базовой сборке фреймворка.
Если у вас его нет то, для установки р... |
Markdown | UTF-8 | 1,950 | 3.078125 | 3 | [] | no_license | ---
title: Drives - Map a Network Drive
description:
Map a network drive using Files in Pop!_OS.
keywords:
- network drive
- drive
- mount
- network
facebookImage: /_social/article
twitterImage: /_social/article
hidden: false
section: community
tableOfContents: true
---
If you have a storage location on a ... |
Markdown | UTF-8 | 2,037 | 2.65625 | 3 | [
"MIT"
] | permissive | # Fiber Sveltekit Embed App

This application is a full-stack project built using Sveltekit, Tailwind CSS, Fiber. It showcases the construction of a monolithic architecture for a full-stack application.
## Run the Project... |
Java | UTF-8 | 265 | 1.773438 | 2 | [] | no_license | package CoronaVirusTracker.CoronaVirusTracker.domain;
import lombok.Builder;
import lombok.Getter;
import lombok.ToString;
@ToString
@Builder
@Getter
public class OverseasStats {
private String country;
private String total;
private String dead;
} |
Markdown | UTF-8 | 2,602 | 2.96875 | 3 | [] | no_license | ---
title: 最近遇到的Linux文件系统只读问题
date: 2016-05-20 11:40:20
categories:
- Linux
tags:
- Linux
---
最近两次遇到Linux系统中磁盘出现问题而导致不能写入和更改磁盘数据。
## 问题的出现
- 问题一: 某天早上导师说实验室网站挂掉了,让我去看看。从YII输出的错误信息看应该是后端MySQL连接不上,只好登录服务去查看MySQL进程是否存在。
- 问题二: 今天由于实验室自己的Linux主机ubuntu出现问题,通过另外一块盘备份的时候出现不能写入,在该盘挂载的目录下执行命令都会提示Input/Output error。ubuntu forum... |
Java | UTF-8 | 1,504 | 2.40625 | 2 | [
"Apache-2.0"
] | permissive | /*
*
*/
package net.community.chest.dom.impl;
import org.w3c.dom.DOMException;
import org.w3c.dom.ProcessingInstruction;
/**
* <P>Copyright 2009 as per GPLv2</P>
*
* @author Lyor G.
* @since Aug 26, 2009 9:47:57 AM
*/
public class StandaloneProcessingInstructionImpl
extends BaseNodeImpl<StandaloneProce... |
Go | UTF-8 | 2,857 | 2.984375 | 3 | [
"LicenseRef-scancode-google-patent-license-golang",
"BSD-3-Clause",
"MIT"
] | permissive | // Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"go/build"
"log"
"os"
"path"
"path/filepath"
"strings"
)
// Dirs is a structure for scanning the directory tree.
// Its Next metho... |
C++ | GB18030 | 1,627 | 2.984375 | 3 | [] | no_license | // leetcode-462-ƽ.cpp : ̨Ӧóڵ㡣
//
#include "stdafx.h"
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string.h>
#include <math.h>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <unordered_map>
#include <stack>
#include<iomanip>
#include <ctype.h>
#include <algorithm>
using ... |
JavaScript | UTF-8 | 2,323 | 4.375 | 4 | [] | no_license | /**
* Function to find common elements in 3 arrays
* @Author me
*/
function FindCommonElements(arr, arr1,arr2){
var arr4 =[];
var arrS;
var arrSS;
var arrSSS;
//here we want to find an array with a shortest length, to give it as a first in for loop
if (arr.length <= arr1.length && arr.length ... |
JavaScript | UTF-8 | 1,355 | 2.578125 | 3 | [
"MIT"
] | permissive | // @flow
import {compose, divide} from 'ramda'
import keypress from 'keypress'
import {cursorTo, eraseScreen, cursorHide, cursorShow} from 'ansi-escapes'
import {Field, Tile, FieldLayer} from './field'
import {Player} from './creature'
import {Dungeon} from './generate-field'
keypress(process.stdin)
const divideIntege... |
Markdown | UTF-8 | 11,725 | 3.203125 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: "Handling and Raising Events"
description: Learn to handle and raise .NET events, which are based on the delegate model. This model lets subscribers register with or receive notifications from providers.
ms.date: "07/22/2022"
ms.custom: devdivchpfy22
dev_langs:
- "csharp"
- "vb"
helpviewer_keywords:
... |
Java | UTF-8 | 896 | 2.0625 | 2 | [] | no_license | package com.erx.microservice.patientmanagement.service.wardmaster.createwardmaster;
/*
* created by Brighty on 17-11-2017
* */
import com.erx.microservice.patientmanagement.service.CommonServiceResponse;
public class CreateWardMasterServiceResponse extends CommonServiceResponse {
private long wardMasterId;
... |
C | UTF-8 | 3,586 | 3.046875 | 3 | [] | no_license |
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
int sock;
struct sockaddr_in addr;
int a = 3;
int b = 4;
int sumRes,sqrtRes;
int mul... |
PHP | UTF-8 | 4,750 | 2.515625 | 3 | [] | no_license | <?php
namespace Common\Model;
use Think\Model;
//飞船信息
class AirshipModel extends Model{
/*
ALTER TABLE `airship` ADD `type` INT( 3 ) NOT NULL DEFAULT '1' COMMENT '类型 1|文字 2|图片 3|语音' AFTER `airship_content` ,
ADD `url` TEXT NOT NULL COMMENT '图片音频地址 图片使用,隔开' AFTER `type` ,
ADD `times` INT( 11 ) NOT NULL COMMEN... |
Python | UTF-8 | 2,682 | 3.484375 | 3 | [] | no_license | import numpy as np
#needed: derivee par rapport au parametres et derivee de la sortie par rapport aux entrees
#modules:
#1) module (eg lineaire) : ok
#2) module activation : pas de parametres, seulement derivee
class Loss(object):
def forward(self, y, yhat):
return
#cout
def backward(self, y, yhat):
return
... |
C# | UTF-8 | 7,702 | 2.765625 | 3 | [] | no_license | //#define LOGGING_DEBUG
#define LOGGING_INFO
using CodeJam._2014.Round2;
using CodeJam.Utils.geom;
using CodeJam.Utils.graph;
using CodeJam.Utils.math;
using CodeJamUtils;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
usi... |
Java | UTF-8 | 1,342 | 2.296875 | 2 | [] | no_license | package com.sample.kcquickstart;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.common.utils.AppInfoParser;
import org.apache.kafka.connect.connector.Task;
import org.apache.kafka.connect.sink.SinkConnector;
import org.... |
C++ | WINDOWS-1252 | 1,215 | 3.34375 | 3 | [] | no_license | /*
Question:
Write a program to print all Subsequences of String which Start with Vowel and End with Consonant
Given a string return all possible subsequences which start with vowel and end with a consonant. A String is a subsequence of a given String, that is generated by deleting some character of a given string with... |
C++ | UTF-8 | 6,182 | 3.046875 | 3 | [
"MIT"
] | permissive | // OilerMotor.h
//
// (c) 2021 Mark Naylor
//
// defines class for motors driving an oiler, extends MotorClass and adds support for an input pin that signals when units of work (i.e. oil drips) are seen from from motor
// functionally adds support to:
// only count work units that are separated by a specified debounce... |
Java | UTF-8 | 1,856 | 2.46875 | 2 | [
"BSD-3-Clause"
] | permissive | package org.firstinspires.ftc.robotcontroller.internal.Core.Utility;
import com.disnodeteam.dogecv.CameraViewDisplay;
import com.disnodeteam.dogecv.DogeCV;
import com.disnodeteam.dogecv.detectors.roverrukus.GoldAlignDetector;
import com.disnodeteam.dogecv.detectors.roverrukus.SamplingOrderDetector;
import com.qualcomm.... |
Python | UTF-8 | 17,025 | 2.71875 | 3 | [] | no_license | import hand
import math
import random
import sys
from autonomic import axon, help, Dendrite
from datastore import Drinker
# Broken after some major refactoring, despite
# Ken's hard work. Probably not too far off; the
# nitty gritty work is still solid. Needs a
# sitin/sitout functionality of some kind.
class Player... |
PHP | UTF-8 | 5,052 | 2.5625 | 3 | [] | no_license | <?php
//
// This software is intended as a prototype for the Défi Info neige Contest.
// Copyright (C) 2014 Heritage Software.
//
// This program 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 v... |
Python | UTF-8 | 909 | 3 | 3 | [
"MIT"
] | permissive | import os
from typing import Optional, Sequence
from objcache import ObjectCache
from tests.utils import ObjectCacheForTesting, delete_object_cache_for_testing, ObjectClassForTesting, GENERATED_PATH
class TestObjectCache:
cache: Optional[ObjectCache] = None
test_cache_path: Sequence[str] = ('a', 'b')
sto... |
SQL | UTF-8 | 856 | 3.5 | 4 | [] | no_license | CREATE procedure sp_acc_rpt_list_cheque_deposited(@FromDate datetime,
@ToDate datetime)
as
Select Deposits.DepositID,"Deposit ID"=Deposits.FullDocID,
"Deposit Date"= Deposits.DepositDate,
"Account Number"= Bank.Account_Number,
"Bank"=BankMaster.BankName,
"Branch"=BranchMaster.BranchName, ... |
PHP | UTF-8 | 2,876 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Controller\Backend;
use App\Entity\Genre;
use App\Form\GenreType;
use App\Repository\GenreRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\... |
C# | UTF-8 | 651 | 2.6875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Text;
namespace RockPaperScissors.GameOptions
{
public class Paper : IGameOption
{
public override string ToString() => "Paper";
public int GetSortOrder() => 0;
public int HandleOpposingOption(IGameOption opposingOption)
... |
Java | UTF-8 | 746 | 2.09375 | 2 | [] | no_license | package at.ac.tuwien.dsg.comot.model.type;
public enum ResourceType {
// tosca artifact types
SCRIPT("sh"),
WAR_FILE("war"),
CHEF("chef"),
CHEF_SOLO("chef-solo"),
APT_GET_COMMAND("apt"),
MISC("misc"),
// tosca properties types
OS("os"),
ACTION("action"),
// tosca os properties
INSTANCE_TYPE("instanceType")... |
Java | UTF-8 | 1,543 | 4.125 | 4 | [] | no_license | import java.io.*;
class Calculator {
static int add(int a, int b) {
return a + b;
}
static int subtract(int a, int b) {
return a - b;
}
static int multiply(int a, int b) {
return a * b;
}
static int divide(int a, int b) {
return a / b;
}
public s... |
C# | UTF-8 | 927 | 3.15625 | 3 | [
"MIT"
] | permissive | using System;
namespace SudokuApplication.Core.Models.PlayerDecisions
{
/// <summary>
/// Represents a player decision where the whole sudoku grid changes.
/// </summary>
public abstract class CompletelyChangeSudokuGridDecision
{
private SudokuRow[] sudokuGridBeforeDecision;
publi... |
C | UTF-8 | 2,926 | 3.296875 | 3 | [] | no_license | #include "rogue.h"
#include "utils.h"
void AddPositionYX(int **frontier, int y, int x, int count)
{
frontier[count][0] = y;
frontier[count][1] = x;
}
int CheckPosition(int y, int x)
{
char temp = mvinch(y, x);
return (temp != '.' && temp != '|' && temp != '-');
}
int AddNeighbors(int **frontier, int ***c... |
JavaScript | UTF-8 | 462 | 3.625 | 4 | [] | no_license | /*jshint multistr:true */
var text = "Hey, how are you doing? \ My name is Chetana. \ blah blah blah Chetana";
var myName = "Chetana";
var hits = [];
for (var i=0; i<text.length; i++)
{
if (text[i]==="C")
{
for(var j=i; j<(i+myName.length); j++)
{ hits.push(text[j]);
}
}}
if (hits==0)
{console.log... |
Java | UTF-8 | 1,490 | 2.59375 | 3 | [] | no_license | package application.DAO;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.LinkedList;
import java.util.List;
import application.model.DailyStockInExpenses;
import application.util.Database;
import application.util.Date;
public class DailyStockInExpensesDAOImpl implements DailyStockInExpensesDAO... |
Shell | UTF-8 | 908 | 4.125 | 4 | [] | no_license | #------------------------------------------------------
# arrayify()
#
# Break list up by a particular delimiter.
#-----------------------------------------------------#
arrayify() {
# Errors.
ERR_NO_ARG="No argument supplied.\n"
# Arguments.
if [ $# -eq 1 ]
then
__STRSRC__="$1"
else
while [ $# -gt 0 ]
... |
Markdown | UTF-8 | 148,306 | 2.671875 | 3 | [] | no_license | ---
title: "Introdução a análise de dados ambientais em R"
author: "Wilson Souza & Thiago Couto"
date: "2020-11-11"
site: "bookdown::bookdown_site"
always_allow_html: true
documentclass: book
bibliography: [book.bib, packages.bib]
biblio-style: apalike
link-citations: yes
description: "Este é o primeiro livro da série... |
Java | UTF-8 | 3,800 | 4.375 | 4 | [] | no_license | /*
* #19. Remove Nth Node From End of List
*
* Given a linked list, remove the n-th node from the end of list and return its head.
Example:
Given linked list: 1->2->3->4->5, and n = 2.
After removing the second node from the end, the linked list becomes 1->2->3->5.
Note:
Given n will always be valid.
Follow u... |
Markdown | UTF-8 | 9,130 | 2.6875 | 3 | [
"MIT"
] | permissive | # Deuteronomy 32
[[Deut-31|← Deuteronomy 31]] | [[Deuteronomy]] | [[Deut-33|Deuteronomy 33 →]]
***
###### v1
Hỡi trời, hãy nghe ta nói. Hỡi đất, hãy lắng tai nghe lời ta.
###### v2
Lời giáo huấn của ta rơi xuống như mưa; lời ta rớt xuống như sương. Chúng giống như mưa rào trên cỏ; và đổ xuống như mưa trên cây n... |
Java | UTF-8 | 5,137 | 3.296875 | 3 | [] | no_license | package webcrawler;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
import org.jsoup.*;
import org.jsoup.nodes.Eleme... |
Python | UTF-8 | 1,752 | 3.296875 | 3 | [] | no_license | # This file was used as a tool to help find a projectively primitive polynomial.
# These polynomials are useful for generating full cycle pseudo random number generators.
poly = [-1,0,2]
import math
N = 5
inv = [0,1,3,2,4]
sqrs = set([1,4])
def printp(p):
print p[0],
for i in range(1,len(p)):
if p... |
Java | UTF-8 | 2,049 | 2.375 | 2 | [
"MIT"
] | permissive | package com.zcwfeng.fastdev.ui.fragment.image.glide;
import android.content.Context;
import com.bumptech.glide.Glide;
import com.bumptech.glide.GlideBuilder;
import com.bumptech.glide.load.engine.cache.InternalCacheDiskCacheFactory;
import com.bumptech.glide.module.GlideModule;
public class CustomCachingGlideModule ... |
Swift | UTF-8 | 584 | 2.703125 | 3 | [] | no_license | //
// FullProductCell.swift
// CollectionViewApp2
//
// Created by Кирилл on 21.08.2021.
//
import UIKit
class FullProductCell: UICollectionViewCell {
@IBOutlet var productImage: UIImageView!
@IBOutlet var productName: UILabel!
@IBOutlet var productPrice: UILabel!
override func awakeFromNib() ... |
JavaScript | UTF-8 | 2,259 | 2.515625 | 3 | [] | no_license | import React from "react";
import Product from "./product";
import { connect } from "react-redux";
import * as actionCreator from "./store/action/action"
class ListItem extends React.Component {
constructor(props) {
super(props);
this.query = `query products {
products {
id... |
TypeScript | UTF-8 | 664 | 4 | 4 | [] | no_license | // // 1.
// const announcement = "Hello World!";
// // How quickly can you spot the typos?
// // announcement.toLocaleLowercase();
// // announcement.toLocalLowerCase();
// // We probably meant to write this...
// console.log(announcement.toLocaleLowerCase());
// // 2.
// function greet(person: string, date: Date) ... |
Java | UTF-8 | 1,609 | 2.28125 | 2 | [] | no_license | package com.ai.eis.common;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
/**
* <p>****************************************************************************</p>
* <p><b>Copyright © 2010-2017 soho team All Rights Reserved<b></p>
* <ul style="margin:1... |
JavaScript | UTF-8 | 1,170 | 3.734375 | 4 | [] | no_license | function Complex(real, imaginary) {
if (isNaN(real) || isNaN(imaginary)) // Ensure that both args are numbers.
throw new TypeError();
this.r = real;
this.i = imaginary;
}
Complex.prototype.add = function(that) {
return new Complex(this.r + that.r, this.i + that.i);
};
Complex.prototype.mul = ... |
Go | UTF-8 | 3,109 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | package command
import (
"encoding/json"
"errors"
"fmt"
"net/http"
"os"
"time"
"github.com/openebs/maya/pkg/util"
"github.com/openebs/maya/types/v1"
)
type Client interface {
GetVolAnnotations(string) (*Annotations, error)
}
// Annotations describes volume struct
type Annotations struct {
TargetPortal ... |
Markdown | UTF-8 | 3,805 | 2.6875 | 3 | [] | no_license | ## If a Maine Coon Could Write a Dissertation, Evidence Suggests He Would Do So in Russian
* Originally posted at http://acephalous.typepad.com/acephalous/2008/05/if-a-maine-coon.html
* Monday, May 05, 2008
From my Twain chapter:
êéèêéèęŗřśŝşşşşşşşşşşşşşşşşşš ōõôğĝĝĝĝĝĝĝĝĝĝĝĝĝĝġ ььььььььььęŗřś ğĝōõôôôôôôôôôôôôôôô... |
C# | UTF-8 | 2,231 | 2.84375 | 3 | [] | no_license | using Petrol_Pump_Point_Of_Sale_System.Core.Repositories;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Threading.Tasks;
using Petrol_Pump_Point_Of_Sale_System.Models;
namespace Petrol_Pump_Point_Of_Sale_System.Persistence.Repositories
{
public class UserRepository : ... |
Python | UTF-8 | 4,197 | 2.640625 | 3 | [] | no_license | import argparse, socket, os, select, time
from threading import Thread
def create_srv_socket(address):
listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
listener.bind(address)
listener.listen(64)
print('Listening at {}'.forma... |
C++ | UTF-8 | 979 | 3.8125 | 4 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
bool isSameStack(stack<string> stack1, stack<string> stack2)
{
bool flag = true;
if (stack1.size() != stack2.size())
{
flag = false;
return flag;
}
while (stack1.empty() == false)
{
if (stack1.top() == stack2.top())
... |
C++ | UTF-8 | 905 | 3.234375 | 3 | [] | no_license | #include "CycleSort.hh"
#include "Ultility.hh"
CycleSort::CycleSort(int arr[], int size) {
CycleSorting(arr, size);
}
void CycleSort::CycleSorting(int arr[], int size) {
for(int i = 0; i < size - 1; i++) {
int checkVal = arr[i];
int checkIdx = i;
for (int j = i + 1; j < si... |
TypeScript | UTF-8 | 605 | 2.859375 | 3 | [] | no_license | import * as app from "../app"
const command: app.Command = {
name: "turn",
botOwner: true,
description: "Turn on/off command handling",
positional: [
{
name: "mode",
description: "Power mode of bot. on/off",
default: () => (app.cache.ensure("turn", true) ? "off" : "on"),
checkValue:... |
PHP | UTF-8 | 708 | 2.65625 | 3 | [
"BSD-2-Clause"
] | permissive | <?php namespace SeatGeek\Sixpack\Response;
class Base
{
protected $response = null;
protected $meta = null;
public function __construct($jsonResponse, $meta)
{
$this->response = json_decode($jsonResponse);
$this->meta = $meta;
}
public function getSuccess()
{
retur... |
JavaScript | UTF-8 | 834 | 3.484375 | 3 | [] | no_license | let re;
re = /hello/;
re = /hello/i; // i = case insensitive
re = /hello/g; // Global search
console.log(re);
console.log(re.source);
// exec() - Return result in an array or null
const result = re.exec('hello world')
console.log(result)
console.log(result[0])
console.log(result.index)
console.log(result.input)
... |
JavaScript | UTF-8 | 3,334 | 2.8125 | 3 | [] | no_license | function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
oldonload();
func();
}
}
}
function nextAction() {
$(".nextBtn").click(function(){
alert(window.localStorage.lockNum);
... |
Java | UTF-8 | 434 | 3.46875 | 3 | [] | no_license | // Exam 100
public class SuperCalc {
protected static int multiply(int a, int b){return a * b;}
}
public class SubCalc extends SuperCalc{
public static int multiply(int a, int b){
int c = super.multiply(a, b);
// int c = SuperCalc.multiply(a, b);
return c;
}
public static void main(String[] args){
SubCalc... |
Java | UTF-8 | 988 | 3.625 | 4 | [] | no_license | package chap015;
import java.util.ArrayList;
import java.util.List;
public class FindAllOccurrences {
public static List<Integer> findAllOccurrences(String string, String substring) {
if(string == null || substring == null) {
throw new IllegalArgumentException("Provided parameters shouldn't b... |
Markdown | UTF-8 | 559 | 2.875 | 3 | [] | no_license | # 容器源码分析
## ArrayList
### 存储方式
对象数组 Object[]
### add 原理
1. 判断容量是否足够,如果不足增长容量
2. 增长容量就是用新计算出的容量创建新数组,再把旧数组的数据复制到新数组中
3. 添加新数据
### remove(Object o) 原理
1. 查找 o 对应的下标
2. 将下标后面的数据所在位置,复制到前一个下标的位置,将最后一个数据设置为null
3. 将 size - 1
## HashMap
### 存储方式
Object Node 链表
### put 原理
1. 用 Key 计算 hash 值
|
Java | UTF-8 | 1,144 | 2.734375 | 3 | [] | no_license | package com.example.springModel.model;
import javax.persistence.*;
@Entity
@Table(name = "fish")
public class Fish {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column
private Long id;
@Column
private String species;
@Column
private String color;
@Column
priva... |
C | UTF-8 | 592 | 3.171875 | 3 | [] | no_license | #include <stdio.h>
#include <conio.h>
#include <math.h>
int f(float x)
{
return x*x*x+x*x+x+7;
}
void main()
{
float x0,x1,x2;
float f1,err;
int i=0;
clrscr();
one:
printf("enter the values of x0 and x1 and acceptable error\n");
scanf("%f %f %f",&x0,&x1,&err);
if(f(x0)*f(x1)>0)
{
printf("the entered v... |
PHP | UTF-8 | 1,079 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Mail;
use App\Models\Proposal;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use App\Auth;
class InternshipProposalMail extends Mailable
{
use Queueable, SerializesModels;
private $student;
private $proposal;
/**
* Create... |
Markdown | UTF-8 | 4,794 | 2.640625 | 3 | [] | no_license | WARNING
=======
This repository is no longer actively managed.
Please migrate to [Linuxserver's GitHub repository](https://github.com/linuxserver/docker-sabnzbd), respectively use [Linuxserver's Docker(Hub) image](https://hub.docker.com/r/linuxserver/sabnzbd).
## About
This is a Docker image for [SABnzbd](http://s... |
C# | UTF-8 | 690 | 3.1875 | 3 | [] | no_license | public static ElementDefinitionImpl[] RemoveElementDefAt(
ElementDefinition[] oldList,
int removeIndex
)
{
ElementDefinitionImpl[] newElementDefList = new ElementDefinitionImpl[ oldList.Length - 1 ];
int offset = 0;
for ( int index = 0; index < oldList.Length; index++ )
{
ElementDefinitionIm... |
JavaScript | UTF-8 | 2,127 | 3.390625 | 3 | [] | no_license | let mainspr; //Declaring sprite variables
let sprtw;
let sprthr;
// var win
// var lose
// function preload (){
// win = loadSound("win.wav");
// lose = loadSound("lose.wav");
// }
function setup() {
createCanvas (500, 500);
mainspr = createSprite(windowWidth-(windowWidth-50), windowHeight/3, 40, 40); //def... |
Markdown | UTF-8 | 2,708 | 2.65625 | 3 | [] | no_license | ---
authors: ["Bill Hennessy"]
date: 2016-04-20 20:14:05+00:00
draft: false
title: Safe Sex for Alcohol and a Condom for Your Liver - Podcast
layout: blog
url: /2016/04/20/safe-sex-alcohol-condom-liver/
categories:
- Living
tags:
- Chigurupati
- NTX
type: "post"
---
Let's regress in time to the 1980s.
Remember C... |
Markdown | UTF-8 | 2,801 | 2.625 | 3 | [] | no_license | ---
title: Microsoft Translator Text API による不適切な表現のフィルター処理 | Microsoft Docs
description: Microsoft Translator Text API で不適切な表現のフィルター処理を使用します。
services: cognitive-services
author: Jann-Skotdal
manager: chriswendt1
ms.service: cognitive-services
ms.component: translator-text
ms.topic: article
ms.date: 12/14/2017
ms.autho... |
C | UTF-8 | 2,839 | 3.21875 | 3 | [] | no_license | #include "Alumno-Cursos.h"
void mostrarAlumnosConSuCurso(eAlumno listaDeAlumnos[], int sizeAlumnos, eCurso listaDeCursos[], int sizeCursos)
{
int i;//alumnos
int j;//cursos
//Tener en cuenta que hay alumnos que pueden estar dados de baja
//Tener en cuenta que hay cursos que pueden estar dados de baja
... |
Markdown | UTF-8 | 5,797 | 3 | 3 | [] | no_license | # Article 220 quinquies
I. Par dérogation aux dispositions du troisième alinéa du I de l'article 209, le déficit constaté au titre d'un exercice
ouvert à compter du 1er janvier 1984 par une entreprise soumise à l'impôt sur les sociétés peut, sur option, être considéré
comme une charge déductible du bénéfice de l'exerc... |
Markdown | UTF-8 | 1,189 | 2.765625 | 3 | [] | no_license | java 代码
```java
byte raw = (byte) 0b11101010;
System.out.println("init raw: " + raw+", binary: "+Integer.toBinaryString(raw & 0xff));
byte head = (byte) (raw >>> 4 & 0x0f);
byte tail = (byte) (raw & 0b00001111);
System.out.println("\nsplit: ");
System.out.println("head: " + head + ", " + Integer.toBinaryString(head));... |
Python | UTF-8 | 1,844 | 3.25 | 3 | [] | no_license | from menu import *
from file_work import *
from AES import AES
def str_to_ascii(symbols):
res = []
for i in symbols:
res.append(ord(i))
return res
def ascii_to_str(ascii_lst):
res = []
for i in ascii_lst:
res.append(chr(i))
return res
if __name__ == '__main__':
while True... |
PHP | UTF-8 | 1,626 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
// Use this to implement a minimal front controller to use instead
// of WordPress' index.php
//
// it works like this: rename WordPress' index.php to something
// else, e.g. wp-index.php. create a new index.php that looks about
// so:
//
// ```php
// <?php
//
// require_once __DIR__ . '/wp-content/themes/testth... |
Python | UTF-8 | 615 | 2.546875 | 3 | [] | no_license | from urllib import urlopen
from xml.dom.minidom import parseString
fp = urlopen( "http://thehubway.com/data/stations/bikeStations.xml" )
dom = parseString( fp.read() )
fpout = open( "hubway.csv", "w" )
fpout.write( "id,name,latitude,longitude\n")
for station in dom.getElementsByTagName("station"):
id = station.... |
Python | UTF-8 | 1,877 | 3.484375 | 3 | [] | no_license | import sys
def checkFileFormat(fname):
if fname == "exit" : sys.exit()
#check file is fname or not.
ret = True
if fname.split('.')[-1] != "tet":
ans = raw_input("it is not .tet file. Are you OK? (Y/N):")
if ans not in ["Y","y","Yes","yes","YES"]:
ret = False
return ret... |
Python | UTF-8 | 8,904 | 3.171875 | 3 | [
"MIT"
] | permissive | # -*- coding: utf-8 -*-
# --------------------------------------
# @Time : 2020/11/01
# @Author : Oscar Chen
# @Email : 530824679@qq.com
# @File : augmentation.py
# Description : data augmentation
# --------------------------------------
import cv2
import random
import numpy as np
def random_horizontal_flip(... |
Java | UTF-8 | 563 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | package com.erlin;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Test {
public static void main(String[] args) {
Pattern pattern = Pattern.compile(
"^\\w+(\\.\\w+)?" +//邮件登录名
"\\@\\w+" + //主机名
"\\.(\\w+){2,4}"//... |
C++ | UTF-8 | 3,813 | 2.671875 | 3 | [] | no_license | #pragma once
#include <Eigen/Eigen>
#include <memory>
#include <exception>
#ifndef DEBUG
#define DEBUG
#endif
#ifdef DEBUG
#include <iostream>
using namespace std;
using namespace Eigen;
#endif
namespace egl
{
typedef Eigen::Matrix<size_t, -1, -1> mati_t;
typedef Eigen::Matrix<double, -1, -1> matd_t;
typ... |
Python | UTF-8 | 2,382 | 3.125 | 3 | [] | no_license | import types
import numpy as np
import pandas as pd
dot = np.dot
def ijv2mat(df):
ilist = df["i"]
jlist = df["j"]
n = max(ilist)
m = max(jlist)
if("val" in df):
vlist = df["val"]
dtype = float
elif("re" in df and "im" in df):
vlist = df["re"] + 1.0j * df["im"]
... |
JavaScript | UTF-8 | 2,670 | 2.71875 | 3 | [] | no_license | const urlParams = new URLSearchParams(window.location.search);
const id = urlParams.get("color");
const q = urlParams.get("q");
//kea21-4d62.restdb.io/rest/silfenproducts??q={"colors": {"name" : {"$in": ["green"]}}}
// kea21-4d62.restdb.io/rest/silfenproducts?q={"category": "bags"}
fetch("https://kea21-4d62.restdb.i... |
JavaScript | UTF-8 | 13,093 | 2.984375 | 3 | [
"Apache-2.0"
] | permissive | Math.degrees = function(rad)
{
return rad*(180/Math.PI);
}
Math.radians = function(deg)
{
return deg * (Math.PI/180);
}
var eucl_distance = function(p1,p2) {
return Math.sqrt(Math.pow(p1[0]-p2[0],2)+Math.pow(p1[1]-p2[1],2)+Math.pow(p1[2]-p2[2],2));
}
function car_genome() {
var num_segs = 5;
var genome;
// va... |
Python | UTF-8 | 204 | 3.890625 | 4 | [] | no_license | # Problem Set 0
# Name: Austin Canada
# Time: 11:15
#
first_name = raw_input('What is your first name? ')
last_name = raw_input('What is your last name? ')
print 'Your name is ' + first_name + ' ' + last_name
|
Java | UTF-8 | 10,045 | 1.601563 | 2 | [] | no_license |
package org.tmdd._303.messages;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.b... |
Java | UTF-8 | 410 | 1.679688 | 2 | [] | no_license | package org.zywx.wbpalmstar.plugin.uexweixin.vo;
import java.io.Serializable;
public class CallbackWindowNameVO implements Serializable{
private static final long serialVersionUID = -5879823128452414511L;
private String windowName;
public String getWindowName() {
return windowName;
}
pub... |
TypeScript | UTF-8 | 2,066 | 2.8125 | 3 | [] | no_license | import { HashGenerator } from "../middleware/HashManager";
import { TokenGenerator } from "../middleware/TokenGenerator";
import { IdGenerator } from "../middleware/IdGenerator";
import { InvalidInputError } from "../Error/InvalidInputError";
import { BandDatabase } from "../data/BandDatabase";
import { Unauthorized } ... |
Shell | UTF-8 | 492 | 3.03125 | 3 | [] | no_license | #!/bin/bash
files="./incorrect_user_list_add_multiple_no_passwd.txt ./incorrect_user_list_remove_non_existing_user.txt ./incorrect_user_list_add_3_fields.txt ./correct_user_list.txt ./incorrect_user_list_add_no_passwd.txt"
for file in ${files}
do
while read LINE
do
user=$(echo "$LINE" | cut -d',' -f1)... |
Java | UTF-8 | 1,228 | 1.734375 | 2 | [] | no_license | package com.myinfosysprogram.repository;
import java.lang.System;
@kotlin.Metadata(mv = {1, 4, 2}, bv = {1, 0, 3}, k = 1, d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0016\u0018\u00002\u00020\u0001B\u0005\u00a2\u0006\u0002\u0010\u0002R\u001a\u0010\... |
Java | UTF-8 | 8,276 | 2.1875 | 2 | [] | no_license | package com.example.pixelgame.Views;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothServerSocket;
import android.bluetooth.BluetoothSocket;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import a... |
Shell | UTF-8 | 756 | 4.375 | 4 | [
"Apache-2.0"
] | permissive | #!/bin/sh
#
# Show each commit from an object.
#
# $1 - Optional name of the object to show commits from. Values can be a ref, a
# branch name, a tag, etc. Default is master.
# $2 - Optional number of lines of context to use in the diff. Default is 20.
#
# Examples
#
# git show-commits
# git show-commits maste... |
Java | UTF-8 | 2,330 | 2.28125 | 2 | [] | no_license | package clientcore.external.controller;
import java.util.List;
import org.pmw.tinylog.Logger;
import clientcore.command.CommandOutputVo;
import clientcore.command.CommandPocesser;
import clientcore.command.CommandVO;
import clientcore.constants.GlobalConstants;
import clientcore.constants.QueueNames;
impo... |
Java | UTF-8 | 2,407 | 2.375 | 2 | [] | no_license | package com.datastax.enterprise.controller;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.an... |
Java | UTF-8 | 930 | 2.140625 | 2 | [] | no_license | package ch.hsr.traildevil.util;
public class Constants {
/** The log tag in order to filter the log output */
public static final String TAG = "traildevil";
/** The location of the DB */
public static String DB_LOCATION = "/data/data/ch.hsr.traildevil/files";
/** productive URL */
public static final Strin... |
Markdown | UTF-8 | 1,525 | 2.53125 | 3 | [] | no_license | # ORGA PROYECTO 1 : PLOTTER SERIAL 📌
## Explicación de Puerto Serial 🔧
El puerto serial funciona para la comunicación entre dispositivos electrónicos.
Quién realiza esta comunicación de datos, es conocido como
**UART**
-Universal
-Asynchronous
-Receiver
-Transmitter
La comunicación se realiza por... |
Java | UTF-8 | 4,056 | 2.515625 | 3 | [] | no_license | import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
import javax.servlet.ServletException;
import ja... |
JavaScript | UTF-8 | 247 | 2.703125 | 3 | [
"MIT"
] | permissive | import Deck from './deck';
import Card from './card';
const firstCard = new Card('Ace', 'Spade');
console.log('Duy\'s first card is the ' + firstCard.rank + ' of ' + firstCard.suit + 's!');
const firstDeck = new Deck();
console.log(firstDeck);
|
JavaScript | UTF-8 | 1,293 | 3.734375 | 4 | [] | no_license | // var name = "Umar"
// alert("Thanks" + " " + name)
var userName = "Umar"
// var greeting = "Thanks"
// var shoped = "Pants"
// var finalRes = greeting + " " + userName + " " + "for Shopping" + " " + shoped
// // alert(greeting + " " + userName + " " + "for Shopping" + " " + shoped)
// alert(finalRes)
// alert("78... |
Python | UTF-8 | 1,303 | 3.015625 | 3 | [] | no_license | import time
class Tour:
""" Round class"""
def __init__(self, number):
self.nom = f"Round {number}"
self.date_debut = None
self.heure_debut = None
self.date_fin = None
self.heure_fin = None
self.matchs = []
self.matchs_id = []
self.en_cours = Fal... |
Python | UTF-8 | 2,729 | 2.625 | 3 | [] | no_license | """
** coded by shibinmak on 7/9/18 **
** I pledge to do my best **
** May all beings be Happy,Peaceful,Liberated **
"""
from config import config
from tfannotation import tfAnnotation
import os
import tensorflow as tf
from sklearn.model_selection import train_test_split
from xml_to_csv import xml2csv
def main(_):
... |
PHP | UTF-8 | 2,176 | 2.890625 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace Atelir\ReadFrontPage;
use Atelir\Utility\CanRenderPost;
use Atelir\Utility\HasPostUri;
use Atelir\Utility\Postgresql;
final
class FeaturedPost
{
use CanRenderPost;
use HasPostUri;
public string $userSlug;
public string $userName;
public string $projectSl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.