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 |
|---|---|---|---|---|---|---|---|
C | ISO-8859-1 | 980 | 3.296875 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "definicoes_sistema.h"
#include "timer.h"
#define TEMPO 10
int tmr_situacao;
time_t horaInicio;
/*******************************
tmr_iniciar
Aciona ou desaciona o timer
entradas
controle: TRUE:liga FALSE:desliga
saidas
nen... |
JavaScript | UTF-8 | 1,515 | 2.9375 | 3 | [] | no_license | var schedule = require('node-schedule');
function scheduleCronstyle(){
//52,53,55分钟执行
// var rule = new schedule.RecurrenceRule();
// rule.minute = [52,53,55];
// schedule.scheduleJob(rule, function(){
// console.log('scheduleCronstyle:' + new Date());
// });
//每5秒
// schedule.scheduleJob('*/5 * *... |
Python | UTF-8 | 10,746 | 2.640625 | 3 | [
"ISC",
"LicenseRef-scancode-public-domain"
] | permissive | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
# Copyright (c) 2018, Ammar Qaseem <ammar.qaseem@pharmazie.uni-freiburg.de>
This script To annotate the entities(in our case entities are compound and protein).
"""
import os, sys
import datetime, time
import nltk.data
import gzip
import os.path
import cPickl... |
C++ | UTF-8 | 1,327 | 3.09375 | 3 | [] | no_license | //directed edges
#include<bits/stdc++.h>
#define fast ios_base::sync_with_stdio(0); cin.tie(0);
#define inf 0xfffffff
using namespace std;
vector<int> bellman_ford(int src, vector<pair<int,int> > G[], int n)
{
vector<int> dist(n+1, inf);
dist[src] = 0;
int v, w;
for (int i=0; i<n-1; i++)
{
for (int u=1; u... |
Markdown | UTF-8 | 14,204 | 3.03125 | 3 | [
"BSD-3-Clause",
"Unlicense",
"OFL-1.1",
"MIT",
"GPL-1.0-or-later"
] | permissive | ---
title: "Beyond 'parts' documentation: Moving towards systems thinking with developer portals"
permalink: /blog/dev-portals-and-systems-thinking/
categories:
- technical-writing
- podcasts
keywords: big picture, systems view
rebrandly: https://idbwrtng.com/
series: "Trends to follow or forget"
sidebar: sidebar_fizzl... |
C++ | UTF-8 | 399 | 2.671875 | 3 | [] | no_license | #include<stdio.h>
main() {
int t, n;
scanf("%d", &t);
while(t--) {
scanf("%d", &n);
int i, j, Ans = 0, letter, tmp;
char DNA[27];
letter = (1<<27) - 1;
for(i = 0; i < n; i++) {
scanf("%s", DNA);
for(j = 0, tmp = 0; DNA[j]; j++)
tmp |= 1<<(DNA[j]-'a');
if(tmp&letter) {
letter &= tmp;
} e... |
Markdown | UTF-8 | 874 | 3.453125 | 3 | [] | no_license | ## 课时5 Linux文件基本操作管理
### 复制文件、目录
通过cp命令复制文件或目录
> cp 源文件(文件夹) 目标文件(文件夹)
常用参数:
<pre>
-r 递归复制整个目录树
-v 显示详细信息
</pre>
### 移动、重命名文件或目录
通过mv命令移动或者重命名文件或目录,如果指定文件名,则可以重命名文件。
> mv 文件 目标目录
### 创建、删除文件
通过touch命令可以创建一个空文件或更新文件时间,通过rm命令可以删除文件或目录。
常用参数:
<pre>
-i: 交互式
-r: 递归的删除包括目录中的所有内容
-f: 强制删除,没有警告提示(使用时需十分谨慎)
</pre>
### 创建、... |
Java | UTF-8 | 4,255 | 2.375 | 2 | [] | no_license | package kesean.com.search.ui.match;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Ima... |
Shell | UTF-8 | 630 | 2.75 | 3 | [] | no_license | #!/bin/bash
apt-get update
echo "America/Los_Angeles" > /etc/timezone
dpkg-reconfigure --frontend noninteractive tzdata
# Install Apache
apt-get install -y apache2 apache2.2-common
apt-get -yf install
# Install PageSpeed
wget -nv https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd... |
JavaScript | UTF-8 | 8,620 | 2.640625 | 3 | [
"MIT"
] | permissive | function makeArray(d1, d2) {
var arr = new Array(d1), i, l;
for(i = 0, l = d1; i < l; i++) {
arr[i] = new Array(d2);
}
return arr;
}
var GAMEENGINE=function(){};
GAMEENGINE.prototype = {
canvas : null,
ctx : null,
renderEvent : null,
fps : 20,
width ... |
Java | UTF-8 | 3,044 | 3.5625 | 4 | [] | no_license | /**
* This class is a Country class. It holds the data of a country in an object such as its name, country code, capitol city, population, gdp per capita
* and happiness rank.
*
* @author Zackery Crews
* @version 09-15-2019
*/
public class Country {
private String name;
private String code;
private... |
C++ | UTF-8 | 844 | 2.71875 | 3 | [
"MIT"
] | permissive | #include <iostream>
#include "battlefield.h"
#include "enemyBattlefield.h"
int posX;
int posY;
bool hit(int x, int y) {
if(enemyBoardArr[x][y] == 1) {
enemyBoardArr[x][y] = 2;
return true;
}
return false;
}
int main() {
srand(time(NULL));
initializeArr();
shipSpawn();
en... |
Java | UTF-8 | 4,811 | 2.1875 | 2 | [] | no_license | package com.systemcfg.service.imp;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSONObject;
import com.systemcfg.dao.SnmodelDao;
import com.systemcfg.... |
PHP | UTF-8 | 9,185 | 2.765625 | 3 | [] | no_license | <?php
include 'include/config.php';
include 'include/function.php';
try {
$trainings = mysqli_query($conn, /** @lang text */ 'SELECT * FROM attendance');
} catch (Exception $ex) {
die('Error ' . $ex->getMessage());
}
function displayTable($conn){
$sql_dep = "SELECT * FROM department";
$res_d... |
PHP | UTF-8 | 3,140 | 2.671875 | 3 | [
"LGPL-3.0-only",
"MIT"
] | permissive | <?php
/**
* @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
* @copyright Aimeos (aimeos.org), 2017-2018
* @package Controller
* @subpackage Frontend
*/
namespace Aimeos\Controller\Frontend\Stock;
/**
* Default implementation of the stock frontend controller
*
* @package Controller
* @subpackage F... |
Python | UTF-8 | 7,305 | 2.765625 | 3 | [] | no_license | from __future__ import print_function
import os
import sys
from time import time
from math import *
import numpy as np
from scipy.optimize import curve_fit
try:
# Python 2.x only
import cPickle as pickle
except ImportError:
import pickle
from . import fast_template_periodogram as ftp
def LMfit(x, y, er... |
C++ | UTF-8 | 2,557 | 2.515625 | 3 | [] | no_license | #include "Body.h"
#include <math.h>
void Body::preUpdate() {
steady_clock::time_point thisMoment = steady_clock::now();
int time;
float diagonalForce;
time = duration_cast<microseconds>(thisMoment - moment).count(); // first get the timelapse
moment = steady_clock::now(); // get the time each loo... |
C++ | UTF-8 | 2,115 | 2.515625 | 3 | [] | no_license | #include "PickByColor.h"
#include "..\ApplicationManager.h"
#include "..\GUI\input.h"
#include "..\GUI\Output.h"
#include"SelectAction.h"
#include"CopyAction.h"
#include"DeleteAction.h"
#include"LoadAction.h"
void PickByColor::ReadActionParameters()
{
}
void PickByColor::Execute()
{
Action* pAct;
... |
JavaScript | UTF-8 | 7,527 | 3.03125 | 3 | [] | no_license |
var namespace = "http://www.w3.org/2000/svg"
var turn = "player1"
var buttonClicked = 0
function topLeft(){
if(buttonClicked == 0){
if(turn == "player1"){
var myCircle = document.createElementNS(namespace, "circle")
var canvas = document.getElementById("game-board")
myCircle.setAttribute("cx", 45)
... |
Java | UTF-8 | 3,742 | 2.234375 | 2 | [] | no_license | package com.zilin.springtest.ws;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.zilin.springtest.entity.PrintDto;
import com.zilin.springtest.service.IPrintService;
import com.zilin.springtest.service.PrintS2;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelFutureL... |
JavaScript | UTF-8 | 1,897 | 2.8125 | 3 | [] | no_license | import request from "superagent";
import Promise from "bluebird";
import * as _parse from "csv-parse";
import fs from "fs";
// TODO: Work out how to make csv-parse work with promisifyAll
const parse = Promise.promisify(_parse.default);
Promise.promisifyAll(fs);
function fetchLeagueResults(season) {
return new Pro... |
JavaScript | UTF-8 | 5,283 | 2.625 | 3 | [
"MIT"
] | permissive | // mkGuaguaka
module.exports = function(params, cb) {
let dft = {
id: '',
title: '',
itemClass: 'guaguayes',
eraser: 15, //橡皮擦大小
open: 25, // 开奖百分比
masker: '#ccc',
maskerTitle: '刮开此涂层',
}
let opts = Object.assign({}, dft, params)
if (!opts.title) opts.title = '好好学习'
return {
... |
Shell | UTF-8 | 142 | 3.125 | 3 | [] | no_license | #!/bin/bash
# do sort on each file separately
prefix=rat;
for i in `seq -f %02g 49 95`
do
sort -k1n -k2n $prefix$i > $prefix$i.sort
done
|
Java | UTF-8 | 707 | 2.140625 | 2 | [] | no_license | package server.step_1_decode_request;
import server.libraries.CommandListener;
public class OurCommandListener extends CommandListener {
public OurCommandListener() {
setSerializeListener(new SerializeListener() {
@Override
public String serialize(Object toSerialize) {
... |
C++ | UTF-8 | 9,411 | 2.5625 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | // Copyright 2018 Google LLC
//
// 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.0
//
// Unless required by applicable law or agreed to in w... |
Python | UTF-8 | 144 | 2.984375 | 3 | [] | no_license | S = input()
l = len(S)
ans = 0
for i in range(l):
ans += sum([int(S[i]) * (10**k) * 2**(max(0,l-i-k-2)+i) for k in range(l-i)])
print(ans)
|
Shell | UTF-8 | 1,189 | 3.59375 | 4 | [] | no_license | #!/bin/bash
###################################################################################
## ##
## This script update user profile to run $BLJ/script/blj_config. ##
## If using bash, $blj_profile=~/.bash_profile (set on ... |
PHP | UTF-8 | 685 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Common\Stream;
use stdClass;
use function Safe\json_encode;
final class Producer
{
private string $streamFilePath;
public function __construct(string $streamFilePath)
{
$this->streamFilePath = $streamFilePath;
}
/**
* @param string $messageT... |
Java | UTF-8 | 996 | 2.203125 | 2 | [] | no_license | package com.sg.surveyshrike.listener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener;
import org.springframework.data.mongodb.core.mapping.event.BeforeConvertEvent;
import org.springframework.stereotype.Component;
im... |
Python | UTF-8 | 3,131 | 2.8125 | 3 | [] | no_license | # ##################################################################################################
# Disclaimer #
# This file is a python3 translation of AutoDockTools (v.1.5.7) #
# Modifications ... |
Python | UTF-8 | 3,483 | 3.796875 | 4 | [] | no_license | #!/usr/bin/env python
"""
Author: Henry Ehlers
WUR_Number: 921013218060
A script designed to find all clusters that contain any gene of interest.
Inputs: [1] Path leading to file containing clusters and genes within.
[2] Path leading to a new-line delimited file containing the genes of inter... |
C++ | UTF-8 | 7,997 | 2.53125 | 3 | [] | no_license | #include <string>
#include <vector>
#include <iostream>
using namespace std;
struct Entry {
bool available = false;
uint8_t next_track = 0x00;
uint8_t next_sector = 0x00;
string file_type = "";
uint8_t start_track = 0x00;
uint8_t start_sector = 0x00;
string pet_name = "";
uint32_t adress_start = 0x00;
uint32_... |
JavaScript | UTF-8 | 367 | 3.109375 | 3 | [] | no_license | var testArr = [6,3,5,1,2,4]
for(var x = 0; x < testArr.length; x++) {
if (x > 0) {
sum = testArr[x] ;
var z = y + sum;
console.log("Num:",sum,',','Sum: ',z);
var y = z
}
else {
sum = testArr[x];
var y = testArr[x];
console.log("Num:", sum, ',... |
C++ | UTF-8 | 580 | 2.796875 | 3 | [] | no_license | #include <stdio.h>
int main(void)
{
int a,b,c;
scanf("%d\n%d\n%d",&a,&b,&c);
if(a==1)
{
printf("I love fruit\n");
}
else if(a==2)
{
printf("I love vegetable\n");
}
else if(a==3)
{
printf("No comment\n");
}
if(b==1)
{
printf("I love fruit\n");
}
else if(b==2)
{
printf("I ... |
JavaScript | UTF-8 | 3,370 | 2.65625 | 3 | [] | no_license | $(document).ready(function () {
var settingsRev = {
async: true,
crossDomain: true,
url: "https://cors-anywhere.herokuapp.com/api.yelp.com/v3/businesses/RQZCOKGctMfuf-MRVUdVnw/reviews",
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer dXtk362BkuUPkzj... |
SQL | UTF-8 | 654 | 3.28125 | 3 | [] | no_license | CREATE TABLE Students(
StudentID INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
LastName VARCHAR(30) NOT NULL,
FirstName VARCHAR(30) NOT NULL,
MiddleName VARCHAR(30),
StreetAddress1 VARCHAR(100) NOT NULL,
StreetAddress2 VARCHAR(100),
City VARCHAR(50) NOT NULL,
State VARCHAR(50) NOT NULL,
Country VARCHAR(50) NOT NULL,
ZipC... |
Java | UTF-8 | 485 | 3.515625 | 4 | [] | no_license | package Chapter2.Test;
public class SimpleNumbers {
public static void main(String[] args) {
int i,j;
boolean ost;
for(i = 2; i < 100; i++){
ost = true;
for(j = 2; j <= i/j; j++) {
if ((i % j) == 0) ost = false; //проверка на остаток, если нет остатка... |
Python | UTF-8 | 1,542 | 4.09375 | 4 | [] | no_license | """Modificar getFunction y printFunction"""
epsilon = 4
def main():
x0 = 0 #x0
y0 = 0.5 #Corresponde a y(x0) = y0
xf = 2 #Valor de x que buscamos para y(x)
n = 4 #Intervalos
h = round((xf-x0)/n,epsilon)
print(f"h = ({xf}-{x0})/{n}")
print(f"h = {h}")
... |
Java | UTF-8 | 1,887 | 2.015625 | 2 | [] | no_license | package xuan.wen.qin.ghw.service.test.impl;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import xuan.wen.qin.ghw.core.exception.AppException;
import xuan.wen.qin.ghw.core.service.impl.BasiceServiceImpl;
im... |
Java | UTF-8 | 1,642 | 2.5 | 2 | [] | no_license | package com.github.matek2305.betting.core.player.domain;
import com.github.matek2305.betting.core.match.domain.MatchId;
import com.github.matek2305.betting.core.match.domain.MatchScore;
import com.google.common.collect.ImmutableMap;
import io.vavr.control.Option;
import lombok.RequiredArgsConstructor;
import lombok.Va... |
PHP | UTF-8 | 1,943 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php session_start();//inicia la sesión?>
<html>
<meta charset="utf-8">
<?php
#Este programa se encarga de realizar registro de mensajes de ayuda
try{
sleep(1);//función para retardar la ejecución
if(isset($_SESSION["username"])){//valida la existencia de sesión e id de opción
if(isset($_POST["codOpcion"])){
requi... |
C++ | UTF-8 | 1,414 | 2.796875 | 3 | [] | no_license | #ifndef __NGINE_AABB_H_
#define __NGINE_AABB_H_
#include "NGineCommon.h"
#include <glm/glm.hpp>
namespace NGine
{
class AABB
{
private:
enum Properties
{
CENTER_DIRTY = (1 << 0),
EXTENTS_DIRTY = (1 << 1),
RADIUS_DIRTY = (1 << 2),
OUT_OF_DATE = CENTER_DIRTY | EXTENTS_DIRTY | RADIUS_DIRTY,
};
pub... |
Markdown | UTF-8 | 7,812 | 2.890625 | 3 | [
"MIT"
] | permissive | # Rofi Power Menu Mode
Rofi Power Menu provides a mode for offering basic power menu operations such as
shutting down, logging out, rebooting and suspending. By default, it shows all
choices and asks for confirmation for irreversible actions. The choices, their
order and whether they require confirmation, can be all ... |
C++ | UTF-8 | 3,558 | 3.453125 | 3 | [] | no_license |
#include "Ford-Bellman.h"
int* fordBellman(NeighbourList** lists, int edges, int vertices, int start) {
// result array holding distance from start to each vertex
int* dist = new int[vertices];
for (int i = 0; i < vertices; i++) dist[i] = PLUS_INF; // infinity
dist[start] = 0;
// relaxing each edge vertices ... |
Java | UTF-8 | 1,917 | 1.9375 | 2 | [] | no_license | /*
* All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved.
*/
package org.terracotta.modules.ehcache.transaction;
import net.sf.ehcache.transaction.id.TransactionID;
import org.terracotta.modules.ehcache.ToolkitInstanceFactory;
import java.io.Serializable;
public class Serialize... |
PHP | UTF-8 | 2,502 | 2.71875 | 3 | [] | no_license | <?php
include_once 'dbconfig.php';
if (isset($_POST['btn-save'])) {
$CodigoProduto = $_POST['CodigoProduto'];
$NomeProduto = $_POST['NomeProduto'];
$DescricaoProduto = $_POST['DescricaoProduto'];
$Quantidade = $_POST['Quantidade'];
$Preco = $_POST['Preco'];
if (($CodigoProduto == '' || $NomeProduto == '' || $De... |
C# | UTF-8 | 2,540 | 3.265625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
namespace Sword.LinkedList
{
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class TestNodes
{
public static void TestRemoveDublicatesHT()
{
... |
Java | UTF-8 | 678 | 3.921875 | 4 | [] | no_license | //Stack using linked list
// Methods- void push(int data), int pop() //optional print()
//Members- Node head, int size; Auxiliary ds- node
class Node{
int data;
Node next;
Node (int data){
this.data=data;
this.next=null;
}
void print(){
System.out.println(data);
}
}
class Stack{
int size;
Node head;
Stack(... |
SQL | UTF-8 | 405 | 3.640625 | 4 | [] | no_license | --Select Distinct
/*
syntax
SELECT DISTINCT columnA, columnB, ... FROM table
*/
SELECT DISTINCT name, num FROM table;
/*
using COUNT function to get number of distinct names
*/
SELECT COUNT(DISTINCT name) FROM table;
/*
syntax for Microsoft Access databases
uses aliases for the columns
http://www.1keydata.com/sql/sq... |
C++ | UTF-8 | 717 | 2.671875 | 3 | [] | no_license | #ifndef ITERATOR_CLASS_H
#define ITERATOR_CLASS_H
#include <iostream>
#include <memory>
namespace ContainerOfElif{
template<class T>
class GTUIterator{
public:
GTUIterator(T *mIter); //constructor
GTUIterator(const GTUIterator& mIter); // copy constructor
GTUIterator& operator... |
JavaScript | UTF-8 | 2,479 | 2.65625 | 3 | [
"MIT"
] | permissive | $( document ).ready(function() {
// CONSOLE
console.log('%c STOP',' color: red;font-size: 20px;font-weight:900');
console.log('%c Wszelkie próby ataku typu DDoS zostaną zgłoszone, wraz z IP sprawcy, odpowiednim organom.',' color: black;');
console.log('%c -----------------------------------------------... |
Java | UTF-8 | 3,057 | 2.203125 | 2 | [] | no_license | package com.code4bones.notummobile;
import com.code4bones.utils.NetLog;
import com.code4bones.utils.Utils;
import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.ShapeDrawabl... |
Markdown | UTF-8 | 267 | 3.40625 | 3 | [] | no_license | # Count and Say
链接:[报数](https://leetcode-cn.com/problems/count-and-say/description/)
题意:按照下列顺序,得出第 *n* 项:
```
1. 1
2. 11
3. 21
4. 1211
5. 111221
```
分析:基本思想是递归,注意边界问题。 |
Java | UTF-8 | 10,479 | 2.1875 | 2 | [] | no_license | package com.raider.book.mvp.presenter;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.raider.book.activity.MainActivity;
import com.raider.book.base.RecyclerPresenter;
import com.raider.book.adapter.BookInShelfAdapter;
import com.raider.book.mvp.contract.MainContract;
import com.... |
JavaScript | UTF-8 | 2,868 | 2.53125 | 3 | [] | no_license | const Commando = Depends.Commando
const Discord = Depends.Discord
const DevServer = Settings.DevServer
class BackdoorCommand extends Commando.Command {
constructor(client) {
super(client, {
name: 'backdoor',
group: 'utilities',
memberName: "backdoor",
... |
C | UTF-8 | 1,533 | 2.671875 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pipe.c :+: :+: :+: ... |
Java | UTF-8 | 3,781 | 1.726563 | 2 | [
"Apache-2.0"
] | permissive | /*******************************************************************************
* Copyright (c) 2018-2020 ArSysOp
*
* 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.ap... |
Python | UTF-8 | 9,947 | 2.609375 | 3 | [] | no_license | #!/usr/bin/python
""" Saga of the Red Dragon
* A blatent rip off of Seth Able Robinson's BBS Door Masterpiece.
* All attempts were made to be as close to the original as possible,
* including some original artwork, the original fight equations, and
* most especially the original spelling and punctuation mistak... |
Java | UTF-8 | 2,965 | 2.109375 | 2 | [] | no_license | /*
* Copyright (c) 2010, Ken Gilmer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of conditions and the ... |
Java | UTF-8 | 3,485 | 2.40625 | 2 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package dao;
import entity.Location;
import entity.SemanticPlace;
import java.sql.Connection;
import java.sql.PreparedStatem... |
Markdown | UTF-8 | 471 | 2.609375 | 3 | [] | no_license | ---
title: JavaScript 学习笔记 Week 4
date: 2019-02-04
tags:
- Note
- JavaScript
---
0127~0202
这周在<a href = https://www.freecodecamp.org/>FreeCodeCamp</a>上从头学习HTML+CSS部分,渐渐感觉还是把这部分的完整学完一遍后再去学习JS才是个好选择,所以决定转移重点,目标是16号前学完,所以JS部分暂且搁置。。。
另外之后会把以前的笔记合并,用更好的方式取代以周为单位分篇方式 |
Python | UTF-8 | 303 | 2.59375 | 3 | [] | no_license | # coding=utf-8
import sys
def simple_app(environ, start_response):
status = '200 OK'
response_headers = [('Content-type', 'text/plain')]
start_response(status, response_headers)
return [f'Request {environ["REQUEST_METHOD"]} {environ["PATH_INFO"]} has been processed\r\n'.encode('utf-8')] |
Python | UTF-8 | 1,355 | 3.015625 | 3 | [] | no_license | #!/usr/bin/python
# -*- coding:utf8 -*-
import pandas as pd
import gensim
import nltk
from nltk.tokenize import word_tokenize
import numpy as np
trainBody = pd.read_csv('train_bodies.csv') #length is 1683
print type(trainBody['articleBody'])
print trainBody['articleBody'].shape
#if using pre-trained word vectors, no... |
Java | UTF-8 | 4,144 | 2.6875 | 3 | [] | no_license | package by.bsuir.artemyev.service.impl;
import by.bsuir.artemyev.domain.InternalUserDto;
import by.bsuir.artemyev.domain.Order;
import by.bsuir.artemyev.service.NotificationService;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import... |
C++ | UTF-8 | 3,523 | 3.484375 | 3 | [] | no_license | #ifndef LIST
#define LIST
#include <vector>
struct list
{
// Вы можете определить этот тайпдеф по вашему усмотрению.
typedef int value_type;
// Bidirectional iterator.
struct iterator;
struct node;
// Создает пустой list.
list();
// Создает копию указанного list-а... |
Java | UTF-8 | 477 | 2.859375 | 3 | [] | no_license | package sword2offer;
import java.util.Arrays;
public class MoreThanHalfNum {
public int MoreThanHalfNum_Solution(int [] array) {
if (array==null)
return 0;
Arrays.sort(array);
int length = array.length;
int mid = length>>1;
int count = 0;
for (int i=0;i<... |
Java | UTF-8 | 2,956 | 2.265625 | 2 | [] | no_license | package com.fff.ingood.logic;
import android.graphics.Bitmap;
import com.fff.ingood.task.wrapper.IgActivityImageDownloadTaskWrapper;
import com.fff.ingood.task.wrapper.IgActivityImageGetListTaskWrapper;
import com.fff.ingood.tools.StringTool;
import java.util.ArrayList;
import java.util.List;
import static com.fff.... |
C++ | UTF-8 | 1,988 | 3.421875 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
struct SegmentTree {
int from;
int to;
int val;
SegmentTree* left;
SegmentTree* right;
SegmentTree(int from, int to, int val) : from(from), to(to), val(val) {}
};
SegmentTree* construct_segement(const vector<int>& v, int from, int to)
{
int m... |
C++ | UTF-8 | 1,573 | 3.453125 | 3 | [] | no_license | #pragma once
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <map>
using namespace std;
class ParsedLine
{
public:
// These indexes are how subexpressions will be represented inside their parent expression's string
// as well as the values to which they will be mapped.
string ... |
Java | UTF-8 | 2,124 | 2.1875 | 2 | [] | no_license | package com.ccclubs.dao;
import java.util.List;
import java.util.Map;
import com.lazy3q.web.util.Page;
import com.ccclubs.model.CsWorkRecord;
/**
* 后勤工作记录的Dao接口
* @author Joel
*/
@SuppressWarnings("unchecked")
public interface ICsWorkRecordDao
{
/**
* 获取所有后勤工作记录
* @return
*/
public List<CsWorkRecord> getC... |
Python | UTF-8 | 4,856 | 2.609375 | 3 | [] | no_license | """
This script generates the .md file for the review agenda (original version by ANE, extended instructions by EI)
Pre-requisite: up-to-date PM2 board
- Go to PM2 Board https://github.com/orgs/ITISFoundation/projects/9/views/23
- Make sure "Topic" is correctly set -> It will be used to group items in the agenda
- Sele... |
Python | UTF-8 | 1,157 | 3.8125 | 4 | [] | no_license | #!/bin/python3
import sys
sys.path.append('../')
from adt import TreeNode
"""
Recursive approach, return true iff either root1 is equivalent to root2,
or if root1 is `flip equivalent` to root2.
"""
def flipEquiv(root1, root2):
# Base cases: both empty (true, vacuously equiv) or either empty (false; not equiv)
emp... |
Java | UTF-8 | 1,701 | 2.25 | 2 | [] | no_license | package com.qcloud.component.publicdata.web.vo.admin;
import java.util.Date;
import java.math.BigDecimal;
public class AdminNeighbourhoodVO {
private long id;
//名称
private String name;
//省
private String province;
//城市
private String city;
//地区
private String district;
... |
Shell | UTF-8 | 419 | 3.421875 | 3 | [
"MIT"
] | permissive | #!/bin/bash
set -e
set -o pipefail
if hash service 2> /dev/null; then
service ows stop || echo "ows wasn't running!"
elif hash stop 2> /dev/null; then
stop "$service_name" || echo "ows wasn't running!"
elif hash systemctl 2> /dev/null; then
systemctl disable "ows.service" || echo "ows wasn't running!"
els... |
Markdown | UTF-8 | 627 | 2.71875 | 3 | [] | no_license | # BFC 的概念
Block Formatting Context(块级格式化上下文)
# BFC的渲染规则
1. BFC在页面上是一个独立的容器,最显著的效果就是建立一个隔绝的空间,外面的元素不会影响BFC里面的元素,反之,里面的元素也不会音响外面的元素,
2. BFC的区域不会与浮动元素的box重叠,
3. 垂直方向的外边距会发生边距折叠(包括父子元素,兄弟元素)
# BFC的创建条件
1. overflow的属性值,
2. float的值部位none
3. 行内块inline-block,
4. 表格单元display:table-cell/...;
5. 绝对定位(absolute,fixed)
6.... |
C | UTF-8 | 343 | 2.953125 | 3 | [] | no_license | #include <stdlib.h>
#include <stdio.h>
#include "bitmap.h"
#define XSIZE 2560 // Size of before image
#define YSIZE 2048
int main() {
uchar *image = calloc(XSIZE * YSIZE * 3, 1); // Three uchars per pixel (RGB)
readbmp("before.bmp", image);
// Alter the image here
savebmp("after.bmp", image, XSIZE, YSIZE);
fre... |
Java | UTF-8 | 3,769 | 1.828125 | 2 | [] | no_license | package com.zxm.graduatemanagesystem.dao.mapper;
import com.zxm.graduatemanagesystem.model.RecruitMeeting;
import com.zxm.graduatemanagesystem.model.RecruitMeetingCriteria;
import java.util.List;
import com.zxm.graduatemanagesystem.vo.front.RecruitMeetingVO;
import org.apache.ibatis.annotations.Param;
public interfa... |
Java | UTF-8 | 1,894 | 2.875 | 3 | [] | no_license | package serverNavigation;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;
import java.util.HashMap;
/*
* logic flow and operations handling for clients
* */
public class ClientHandle extends Thread {
public static final int BLOCK_OP... |
Java | UTF-8 | 1,589 | 2.65625 | 3 | [] | no_license | package beans;
public class SSWindowRecord {
public double windowSize;
private double speed;
private int sleepState;
private double activeTimePeriod = 0.0;
private double idleTimePeriod = 0.0;
private double windowStateTime = 0.0;
private int jobsInQueue = 0;
private int numofCompletedJobs = 0;
public dou... |
Java | UTF-8 | 1,683 | 2.46875 | 2 | [] | no_license | /**
* Copyright (C) 2007-?XYZ Steve PECHBERTI <steve.pechberti@laposte.net>
*
* 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 version 2
* of the License, or (at your option) any lat... |
Java | UTF-8 | 1,125 | 3.859375 | 4 | [] | no_license | public class Circle2D{
private double x, y;
private double radius;
double getRadius(){
return radius;
}
Circle2D(){
x = 0;
y = 0;
radius = 1.0;
}
Circle2D(double a, double b, double r){
x = a;
y = b;
radius = r;
}
double ge... |
Markdown | UTF-8 | 402 | 4.34375 | 4 | [] | no_license |
Given an array and chunk size, divide the array into many subarrays where each subarray is of length size
Examples
1. chunk([1, 2, 3, 4], 2) --> [[ 1, 2], [3, 4]]
2. chunk([1, 2, 3, 4, 5], 2) --> [[ 1, 2], [3, 4], [5]]
3. chunk([1, 2, 3, 4, 5, 6, 7, 8], 3) --> [[ 1, 2, 3], [4, 5, 6], [7, 8]]
4. chunk([1, 2, 3, 4, 5],... |
Java | UTF-8 | 4,879 | 2.8125 | 3 | [] | no_license | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Input... |
PHP | UTF-8 | 1,801 | 2.640625 | 3 | [] | no_license | <?php
/**
*
* Свойство - число с плавующей точкой
*
* @category Xcms
* @package Model
* @subpackage Model_Entity_Property
* @version $Id:
*/
class Model_Entity_Property_Float extends Model_Entity_Property {
/**
* Устанавливает значение свойства
* @param float $value
* @return M... |
Python | UTF-8 | 735 | 2.9375 | 3 | [] | no_license | """
Demo L-Systems!
"""
from rewrite import rewrite, show
from turtlegraphics_nodebox import TurtleGraphics
seq0 = 'f f f r f r f f f f r f f f f f l f f'
seq1 = 'BfBfB fr AfAfA rf BfBfBfB fr AfAfAfAfAfA fl BfBfB'
seq2 = 'BfBfB lf AfAfA fl BfBfB lf AfAfA fl'
hilbert = {'A' : 'lBfrAfArfBl',
'B' : 'rAflBf... |
PHP | UTF-8 | 978 | 2.84375 | 3 | [] | no_license | <?php
/* This script updates all classes found in a diagram
*
* $Id$
*/
require('lang.base.php');
uses(
'util.cmd.ParamString',
'org.dia.DiaUnmarshaller',
'org.dia.UpdateVisitor'
);
$P= new ParamString();
$diagram= $P->value(1);
if (!file_exists($diagram)) {
Console::writeLine("You ... |
Java | UTF-8 | 14,764 | 1.734375 | 2 | [
"Apache-2.0"
] | permissive | package nam.model.provider;
import java.io.Serializable;
import javax.enterprise.context.SessionScoped;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
import javax.inject.Named;
import org.aries.runtime.BeanContext;
import org.aries.ui.AbstractPageManager;
import org.aries.ui.AbstractWizardPage;... |
PHP | UTF-8 | 670 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Description of IMDBBiriani
* @author shiplu
*/
class IMDBBiriani extends HTMLBiriani {
public function extract(){
$data = parent::extract();
// now collect the release date
$xpath = new DOMXPath($this->dom);
$times = $xpath->query('//time[@itemprop= "datePublished"]');
$time = strtotime($times... |
SQL | UTF-8 | 2,136 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 03, 2020 at 09:52 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
Markdown | UTF-8 | 18,121 | 2.734375 | 3 | [] | no_license | ---
title: 'Is Algorithmic Specified Complexity Useless for Analyzing Evolution?'
date: '2019-12-05 12:00:00 -07:00'
author: Joe Felsenstein
---
<figure>
              <img src="{{ site.baseurl }}/uploads/2019/HouseAtPoohCorner.jpg" width="254px">&e... |
PHP | UTF-8 | 37,467 | 2.5625 | 3 | [
"MIT",
"AGPL-3.0-only",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft",
"AGPL-3.0-or-later"
] | permissive | <?php
/***********************************************************************************
* X2Engine Open Source Edition is a customer relationship management program developed by
* X2 Engine, Inc. Copyright (C) 2011-2019 X2 Engine Inc.
*
* This program is free software; you can redistribute it and/or modify it u... |
Java | UTF-8 | 24,071 | 1.601563 | 2 | [] | no_license | package com.ubtechinc.alpha.mini.ui.msg;
import android.arch.lifecycle.Observer;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewStub;
i... |
Java | UTF-8 | 498 | 3.328125 | 3 | [] | no_license |
public class CoalMine {
private int coal;
private static final int BURN_COST = 10;
public CoalMine() {
coal = 20;
}
public boolean burn() {
if (coal >= BURN_COST) {
coal -= BURN_COST;
return true;
}
return false;
}
public int getBur... |
Python | UTF-8 | 584 | 3.765625 | 4 | [] | no_license | goods = [(60, 10),(100, 20),(120, 30)] # 每个商品元组表示(价格,重量)
goods.sort(key=lambda x:x[0]/x[1], reverse=True)
#print(goods)
def fraction_backpack(goods, w):
m = [0 for i in range(len(goods))]
total_prize = 0
for ind, (money, weight) in enumerate(goods):
if w >= weight:
m[ind] = 1
... |
Markdown | UTF-8 | 2,387 | 2.765625 | 3 | [] | no_license | # Vehicle-Car-detection-and-multilabel-classification 车辆检测和多标签属性识别
## 使用YOLO_v3_tiny和B-CNN实现街头车辆的检测和车辆属性的多标签识别 (Using yolo_v3_tiny to do vehicle or car detection and attribute's multilabel classification or recognize)
## 效果如下: Vehicle detection and recognition results are as follows: </br>

: parser(_parser), currentEnvironment(_currentEnvironment)
{
}
EnvironmentController::~EnvironmentController()
{
delete currentEnvironment;
}
void EnvironmentController::SetCurrentEnv... |
C++ | UTF-8 | 3,902 | 3.390625 | 3 | [
"BSL-1.0"
] | permissive | /*
* Copyright 2014-2019 Matus Chochlik. Distributed under the Boost
* Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
//[oglplus_opt_ranges_begin
namespace ranges {
//]
//[oglplus_opt_ranges_IsRange
template <typename Range>
struct IsR... |
PHP | UTF-8 | 107 | 3.171875 | 3 | [] | no_license | <?php
for($i =0; $i < mt_rand(10, 30); $i ++)
{
echo sprintf('Hello world: %s %s',$i,PHP_EOL);
}
die(0); |
Shell | UTF-8 | 649 | 3.5625 | 4 | [] | no_license | #!/bin/bash -e
. $(dirname $0)/build-properties
. $(dirname $0)/pkgversion
PROGRAM="perl-${PERL_VER}"
TARBALL="$PROGRAM.tar.*"
cd $SOURCE_DIR
if [ "$TARBALL" != "" ]; then
DIRECTORY=`tar -tf $TARBALL | cut -d/ -f1 | uniq`
rm -rf $DIRECTORY || true
tar xf $TARBALL
cd $DIRECTORY
fi
{ time \
{
sh Configure -d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.