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 | 2,917 | 3 | 3 | [] | no_license | # RR2015-FRC1410
The code is written in C++, using the Command Based Robot template. We have 4 subsystems, the DriveBase, IntakeArms, ToteLifter, and CanManipulator.
The DriveBase Subsystem has 4 CANTalons, two per side to drive the robot. It also has a Gyro, for turning. We drive the DriveBase using a two stick tank... |
Rust | UTF-8 | 776 | 2.609375 | 3 | [] | no_license | use crate::Solution;
impl Solution {
fn find(x: usize, p: &mut [usize]) -> usize {
if p[x] != x {
p[x] = Solution::find(p[x], p);
}
p[x]
}
pub fn find_circle_num(is_connected: Vec<Vec<i32>>) -> i32 {
let n = is_connected.len();
let mut p = (0..n).into_it... |
C# | UTF-8 | 672 | 2.6875 | 3 | [
"MS-PL"
] | permissive | using System;
using System.IO;
using System.Collections.Generic;
namespace Acr.MvvmCross.Plugins.SignaturePad {
public class SignatureResult {
private readonly Func<Stream> getStreamFunc;
public bool Cancelled { get; private set; }
public IEnumerable<DrawPoint> Points { get; private set; ... |
JavaScript | UTF-8 | 1,253 | 3.078125 | 3 | [] | no_license | var fs = require('fs');
var globalConfig = require('./config');
// 记录日志
var fileName = globalConfig.log_path + '/' + globalConfig.log_name;
function log(data) {
// fs.writeFile(fileName, data + '\n', { flag: 'a' }, () => { }); // flag:a表示在原来基础上写入,不直接替换之前内容
fs.appendFile(fileName, data + '\n', () => { }); ... |
Shell | UTF-8 | 1,470 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | #! /bin/sh
# Copyright 2014 TIS Inc.
#
# 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... |
SQL | UTF-8 | 6,035 | 2.984375 | 3 | [] | no_license | --INSERCIÓN DE DATOS EN LA TABLA FESTIVAL
INSERT INTO festival (id, nombre, fechaInicio, fechaFin) VALUES
(1, 'ArenalSound', '2020-07-20', '2020-07-23'),
(2, 'QuevedoFest', '2020-08-15', '2020-08-18'),
(3, 'QuevedoFest', '2021-07-10', '2021-08-13');
--INSERCIÓN DE DATOS EN LA TABLA CARTEL
INSERT INTO carte... |
Python | UTF-8 | 483 | 3.109375 | 3 | [] | no_license | print("你".encode("BIG5"))
print("你".encode("utf-8"))
#f = open("a.txt", "r", encoding="utf-8")
with open("a.txt", "r", encoding="utf-8") as f:
article = f.read()
#f.close()
result = {}
total = 0
for c in article:
total = total + 1
c = c.lower()
if not c in result: #第一次遇到, 才被設進result{}
result[c] =... |
Python | UTF-8 | 1,146 | 3.125 | 3 | [] | no_license |
LarghezzaImg=500
AltezzaImg=500
dimTessera=50
#Creo immagine vuote
img=createImage(LarghezzaImg,AltezzaImg,RGB)
#Carico pixel nell'array pixels
img.loadPixels()
def setup():
size(LarghezzaImg,AltezzaImg)
creaImg()
def creaImg():
#Apro file di input
input = createInput("Input");
content = ... |
C++ | UTF-8 | 2,429 | 4.25 | 4 | [] | no_license | // Creating binary tree (using queue)
// Preorder , Inorder , Postorder Traversals (Iterative Procedure)
#include<iostream>
#include<stdlib.h>
#include<queue>
#include<stack>
using namespace std;
struct node
{
struct node *lchild;
int data;
struct node *rchild;
};
struct node *root = NULL... |
SQL | UTF-8 | 2,358 | 3.484375 | 3 | [] | no_license | select
1 AS version
,'1900-01-01 00:00:00'::timestamp without time zone AS date_from
,'2199-12-31 23:59:59'::timestamp without time zone AS date_to
, date_trunc('day', data)::timestamp without time zone as data
,to_char(data,'YYYY')::BigInt as ano
,(to_char(data, 'mm')::integer) as mes
,(((to_char(data, 'mm')::i... |
Swift | UTF-8 | 838 | 4.15625 | 4 | [] | no_license | //
// SeqSearch.swift
// 查找算法相关
//
// Created by Tate on 2021/10/8.
//
import Foundation
//有一个数列: {1,8, 10, 89, 1000, 1234} ,判断数列中是否包含此名称【顺序查找】 要求: 如果找到了,就提 示找到,并给出下标值。
/*** 这里我们实现的线性查找是找到一个满足条件的值,就返回
* @param arr
* @param value
* @return 就返回索引i,没有找到就返回 - 1
*/
//时间复杂度 O(n) 线性级 还不错。如果你有 100 个元素,这种算法就要做 100 次工作... |
JavaScript | UTF-8 | 1,580 | 2.6875 | 3 | [
"MIT"
] | permissive | 'use strict';
var objectAssign = require('object-assign');
// based on angular style commits
// https://github.com/angular/angular.js/blob/v1.4.8/CONTRIBUTING.md#commit
module.exports = function parseCommit(commit) {
// add defaults
objectAssign(commit, {
type: '',
isRevert: false,
typeIsStandard: fal... |
Java | UTF-8 | 511 | 2.0625 | 2 | [] | no_license | package org.jrest4guice.commons.fileupload;
import javax.servlet.http.HttpServletRequest;
import com.google.inject.Inject;
/**
*
* @author <a href="mailto:zhangyouqun@gmail.com">cnoss (QQ:86895156)</a>
*
*/
public class UploadMonitor {
@Inject
private HttpServletRequest request;
public Upload... |
Java | UTF-8 | 2,794 | 2.171875 | 2 | [] | no_license | package com.example.oleksandr.browser;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebView;
import android.widg... |
Python | UTF-8 | 288 | 2.6875 | 3 | [] | no_license | import util
from my_util import util2 #my_utin is package or folder
#util, util2 is module or a file
from my_util.util2 import squre as squre_x
print(util.sum(1,2))
#3
print(util2.squre(2))
#4
print(squre_x(3))
#9
#pip install ....
#pip uninstall ...
#to install package of modules
|
C | UTF-8 | 1,518 | 3.71875 | 4 | [
"MIT"
] | permissive | /*
Given an array of strings nums containing n unique binary strings each of length n, return a binary string of length n that does not appear in nums. If there are multiple answers, you may return any of them.
Example 1:
Input: nums = ["01","10"]
Output: "11"
Explanation: "11" does not appear in nums. "00" would al... |
C++ | WINDOWS-1252 | 574 | 2.953125 | 3 | [] | no_license | #include<iostream>
using namespace std;
const int maxn=10010;
int data[maxn][maxn]={0};
bool visited[maxn]={false};
void dfs(int nowVisit,int N,int cursum, int& max){
//cursum++;
visited[nowVisit]=true;
if(cursum>max) max=cursum;
for(int v=0;v<N;v++){
if(visited[v]==false&&data[nowVisit][v]!=0){
dfs(v,N,curs... |
PHP | UTF-8 | 1,337 | 2.75 | 3 | [] | no_license | <?php
function printMsg($msg, $redirect) {
echo "<div class='msg'>" . $msg . "</div>";
echo "<script>";
echo "window.location ='" . $redirect . "'";
echo "</script>";
}
function setToken($conn, $username) {
$token = uniqid();
$sql = "DELETE FROM wanwan418_certificates WHERE username='$username'";
$conn->... |
TypeScript | UTF-8 | 529 | 2.8125 | 3 | [
"MIT"
] | permissive | import * as Yup from 'yup';
const NewPatientSchema = Yup.object().shape({
name: Yup.string().trim().required('Digite o nome !'),
gender: Yup.string().required('Informe o sexo !').oneOf(['male', 'female']),
birthdate: Yup.date().required('Informe a data de nascimento !'),
medication: Yup... |
Markdown | UTF-8 | 18,482 | 3.03125 | 3 | [
"BSD-3-Clause",
"MIT",
"CC-BY-2.0",
"CC-BY-3.0",
"CC-BY-4.0"
] | permissive | # README 之道
<!--
Notes on Chinese formatting:
* GitHub does not support inline styles, leading to appearance of oblique text which is wrong in Chinese. I have replaced some of these <em>'s with bold text.
* Do not try to use line breaks for Chinese, or you get a bunch of extra spaces. If you find the source ugly with... |
PHP | UTF-8 | 1,969 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\SessionRepository")
*/
class Session
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=2... |
PHP | UTF-8 | 3,201 | 2.671875 | 3 | [] | no_license | <?php
/*
class nmiSessCache {
public static $_instance;
public $sessInitialized = FALSE;
public static $MemchacheExtIsLoaded = FALSE;
public function __construct() {
if($this->sessInitialized === FALSE) {
$this->sessInitialized = $_SESSION[self::$_instance];
}
}
public static function Cache() {
... |
Python | UTF-8 | 1,528 | 4.5 | 4 | [] | no_license | '''
In the english dictionary the word stack means arranging objects on over another.
It is the same way memory is allocated in this data structure.
It stores the data elements in a similar fashion as a bunch of plates are stored one above another in the kitchen.
So stack data structure allows operations at one end ... |
C++ | UTF-8 | 4,327 | 2.84375 | 3 | [
"MIT"
] | permissive | /***************************************************************************
Laser Transmitter Code
This is a program using an AM2320 humidity and temperature sensor
using I2C to communicate to an Arduino.
The sensor is connected to SCL -> SCL, SCA -> SCA, VCC -> 3-5V, GND -> GND.
DON'T FORGET TO PULLUP... |
Rust | UTF-8 | 5,244 | 3.359375 | 3 | [] | no_license | use super::tokenizer::{Token, Tokenizer};
use super::types::{MalList, MalType, MalMap};
use std::iter::Peekable;
use std::collections::HashMap;
fn read_list(tokenizer: &mut Peekable<Tokenizer<'_>>) -> MalList {
let token = tokenizer.next();
if !matches!(token, Some(Token::LParen)) {
panic!(
... |
Java | UTF-8 | 608 | 2.40625 | 2 | [] | no_license | package com.alexyu.connection;
import java.sql.Connection;
/**
* 管理线程池
*
* @author Alex Yu
* @date 2019/8/3 23:32
*/
public class ConnectionPoolManager {
private static DbBean dbBean = new DbBean();
private static ConnectionPool connectionPool = new ConnectionPool(dbBean);
// 获取链接(重复利用机制)
publ... |
C | UTF-8 | 238 | 3.078125 | 3 | [] | no_license | #include "main.h"
/**
* main - argc & argv
* @argc: int
* @argv: pointer
* Return: 0
*/
int main(int argc, char *argv[])
{
int i;
int count;
for (i = 0; i < argc && argv[i]; i++)
{
count = i;
}
printf("%d\n", count);
return (0);
}
|
Markdown | UTF-8 | 5,455 | 3.046875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"CC-BY-4.0"
] | permissive | ---
layout: post
title: "读书笔记-以终为始:诱发行为改变的产品设计"
categories: 读书笔记
tags: 读书笔记
author: xueyp
description:
---
## 行为改变的基本要素
干预设计过程是为了找到现实中已有的事物的替代品,分析这种替代品的可能性,并将可能性转化为现实,确定其是否可以创造价值。
1. 可能性分析
2. 验证并找出促进因素和阻碍因素
3. 干预设计和选择
4. 预试验并使之运行
5. 对之前的定量数据和定性数据进行验证
### 可能性分析和验证
可能性分析的四个方法:
- 定量分析
- 定性分析
- 基于个人感觉分析
- 基于外部资料分析
... |
Python | UTF-8 | 1,389 | 2.640625 | 3 | [] | no_license | from functools import *
from itertools import *
from collections import defaultdict
import sys
sys.setrecursionlimit(100000)
def mint(ns):
return list(map(int,ns))
ds = [(0,1),(1,0),(0,-1),(-1,0)]
f = open("input")
l=[x for x in f]
d=defaultdict(int)
#r=list(map(int,l[0].split()))
ps=[]
p={}
n=0
v=0
for x in l:
... |
Markdown | UTF-8 | 17,788 | 3.4375 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: Final Thoughts
---
I'll be honest. From the first few lectures I didn't really expect much out of this course, but as the semester has progressed, Dr. Downing has surprised me. Even though the lectures did not focus as much on object oriented programming as much as I thought the title of the co... |
Java | UTF-8 | 1,683 | 2.5 | 2 | [
"MIT"
] | permissive | package aes.gui.widgets;
import net.minecraft.client.Minecraft;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import aes.gui.widgets.base.Slider;
/**
*
* Vanilla GuiSlider in Widget form.
*
*/
public class SliderVanilla extends Slider {
priva... |
Python | UTF-8 | 4,343 | 2.890625 | 3 | [
"MIT"
] | permissive | from psi.core.enaml.api import load_manifest
class ParadigmManager:
'''
Core class for managing experiment paradigms available to psiexperiment
'''
def __init__(self):
self.paradigms = {}
self.broken_paradigms = {}
def register(self, paradigm, exception=None):
self.paradig... |
PHP | UTF-8 | 624 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Domain\Payment\Core;
use App\Domain\Order\Core\OrderInterface;
use App\Domain\Payment\Component\PaymentInterface as ComponentPaymentInterface;
interface PaymentInterface extends ComponentPaymentInterface
{
public function getOrder(): OrderInterface;
public function setOrder(OrderInterfac... |
Ruby | UTF-8 | 816 | 3.125 | 3 | [] | no_license | require 'spec_helper'
require_relative '../robot'
RSpec.describe Robot do
before do
@utils = Class.new do
include Utils
end.new
end
it 'checks if string contains an integer positive coordinate' do
expect(@utils.integer? '-1').to eq false
expect(@utils.integer? '1').to eq true
expect(@u... |
Java | GB18030 | 2,202 | 2.734375 | 3 | [] | no_license | /**
*
*/
package com.fr.design.report.share;
import java.util.HashMap;
import com.fr.data.impl.EmbeddedTableData;
import com.fr.general.GeneralUtils;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
/**
* tabledata
*
* @author neil
*
* @date: 2015-3-10-10:45:41
*/
public class ConfuseTabl... |
Python | UTF-8 | 56 | 3.359375 | 3 | [] | no_license | x = 10
y = 5
s = 'greater' if x>y else 'less'
print(s) |
Java | UTF-8 | 6,951 | 2.328125 | 2 | [] | no_license | package model;
import controller.AppointmentForm;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.OffsetDateTime;
import java.util.StringJoiner;
import static controller.inputControls.SYSTEM_ZONE_OFFSET;
import static model.Inventory.appointmentList;
import st... |
Java | UTF-8 | 2,227 | 1.976563 | 2 | [] | no_license | package com.skypremiuminternational.app.data.network.service;
import com.skypremiuminternational.app.data.network.URL;
import com.skypremiuminternational.app.domain.models.myOrder.ExtraOrderDetail;
import com.skypremiuminternational.app.domain.models.myOrder.MyOrderResponse;
import com.skypremiuminternational.app.doma... |
Java | UTF-8 | 238 | 1.570313 | 2 | [] | no_license | package com.lunar.mgr.dao;
import com.lunar.mgr.pojo.ChargeInfoPO;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface ChargeInfoMapper extends Mapper<ChargeInfoPO> {
List<ChargeInfoPO> selectInfo();
} |
JavaScript | UTF-8 | 444 | 3.546875 | 4 | [] | no_license | function checkGoldbach(n) {
if (n % 2 == 1 || n < 4) {
console.log(null);
} else {
for (var a = 2; a <= n / 2; a++) {
var b = n - a;
if (isPrime(a) && isPrime(b)) {
console.log(String(a) + " " + String(b));
}
}
}
}
function isPrime(n) {
if (n <= 1) {
return false;
} ... |
Python | UTF-8 | 262 | 3.484375 | 3 | [] | no_license | print("R$ {:7.1f}".format(1000.12))
print("R$ {:07.2f}".format(4.11))
print("R$ {:7.1f}".format(1000.16))
dia_ini = 24
dia_fim = 28
mes = "fevereiro"
ano = 2017
print("Em {} o Carnaval acontece em {} do dia {} até o dia {}".format(ano, mes, dia_ini, dia_fim))
|
C++ | UTF-8 | 2,192 | 2.921875 | 3 | [] | no_license | // Quick, naive, thrown-together scanner for CS254 parser generator assignment.
// Recognizes a variety of useful tokens, for no particular language.
// Michael L. Scott, Sept. 2008.
#include <string>
using std::string;
namespace scanner {
enum tok_num {
undef = 0, // placeholder; value 0 not used
... |
C++ | UTF-8 | 1,193 | 2.75 | 3 | [] | no_license |
#ifndef BSTREENODE_HPP
#define BSTREENODE_HPP
#include <string>
template <typename T>
class BSTreeNode
{
private:
T data;
BSTreeNode<T> *rightChild;
BSTreeNode<T> *leftChild;
//using parent node to determine when the root has to be adjusted
BSTreeNode<T> *parent;
i... |
Java | UTF-8 | 818 | 2.234375 | 2 | [] | no_license | package com.PIK.domain;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;
@Data
@ToString(exclude = {"vehicle","service"})
@NoArgsConstructor
@Entity
@Table(name = "Reservations")
public class R... |
Python | UTF-8 | 238 | 3.40625 | 3 | [] | no_license | def min(a,b):
if(a>b):
return b
else:
return a
c = min(10,20)
print("{0}".format(c))
def printS(c):
print(c)
printS("Hello")
def divide(a,b):
return(a/b,a%b)
d,v=divide(12,3)
print(d,v)
print(type(d)) |
Python | UTF-8 | 4,115 | 2.625 | 3 | [] | no_license | import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import re
precisionRegex= re.compile(r'(?<=precision:\s\s)(\d+\.\d+)')
recallRegex= re.compile(r'(?<=recall:\s\s)(\d+\.\d+)')
f1ScoreRegex= re.compile(r'(?<=f1\sscore:\s\s)(\d+\.\d+)')
totalLossRegex= re.compile(r'(?<=total\sloss:\s)(\d+\.\d+)')
... |
Java | UTF-8 | 1,352 | 2.234375 | 2 | [
"Apache-2.0"
] | permissive | package com.mic.keisystem.network.protocol;
import com.mic.BitConverter;
import com.mic.keisystem.InvalidKSMessageException;
import com.mic.keisystem.KSMessage;
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.CumulativeProtocolDecoder;
imp... |
Java | UTF-8 | 98,919 | 2.65625 | 3 | [] | no_license | package com.earthview.world.graphic;
import global.*;
import com.earthview.world.base.*;
import com.earthview.world.util.*;
import com.earthview.world.core.*;
/**
* 粒子系统管理器
*/
public class ParticleSystemManager extends com.earthview.world.graphic.ScriptLoader {
static {
GlobalClassFactoryMap.put("EarthView::Wo... |
PHP | UTF-8 | 572 | 2.765625 | 3 | [
"CC-BY-3.0"
] | permissive | <?php
$username = $_GET["username"];
$greeting = $_GET["greeting"];
?>
<!DOCTYPE html>
<head>
</head>
<body>
<!-- TODO replace "false" below with a condition to check if either value is empty (same condition as last time) -->
<?php if(empty($username) || empty($greeting)): ?>
<p>Hey - you've got ... |
Python | UTF-8 | 552 | 4.03125 | 4 | [] | no_license | # Luan Scolfaro Amorim Carneiro
# UNIFIP - Patos
# 13 de março de 2020
# Questão 10 - Faça um Programa que pergunte em que turno você estuda. Peça para digitar M-matutino ou V-Vespertino ou N- Noturno. Imprima a mensagem "Bom Dia!", "Boa Tarde!" ou "Boa Noite!" ou "Valor Inválido!", conforme o caso.
turno_estudo = inp... |
C | SHIFT_JIS | 695 | 2.6875 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | #pragma once
#include "ev3api.h"
extern void init_buff(int size, char *buff, char val);
extern int limit_int(int value, int min, int max);
/**
* @macro
* obt@[̏sB
* obt@[̃CfbNXϐA1Ɏw肷B
* valŁAl(l)w肷B
*/
#define INIT_BUF_VAL(size, buff, val) init_buff(size, buff, val)
/**
* @macro
* obt@[̏sB
* obt@[... |
Python | UTF-8 | 4,600 | 2.65625 | 3 | [] | no_license | # -*- coding: utf-8 -*-
# Created on Tue Jun 19 11:29:28 2018
"""
这是阿里巴巴广告算法打算的一个model的baseline版本
"""
# 加载需要用到的模块
import math
import numpy as np
import pandas as pd
from scipy.optimize import minimize
from sklearn.cross_validation import train_test_split
#from sklearn.linear_model import LogisticRegressionCV
from sk... |
PHP | UTF-8 | 354 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace FightTheIce\Datatypes\Core\Contracts;
interface PseudoStringInterface extends PseudoInterface
{
public function __toString(): string;
public function is_standard_string(): BooleanInterface;
public function is_unicode_string(): BooleanInterface;
public funct... |
TypeScript | UTF-8 | 992 | 2.671875 | 3 | [] | no_license | class Loc {
lat: String;
lng: String;
}
export interface Resource {
Data: Array<Tree>;
}
export interface Tree {
nome_pop: string;
nome_cie: string;
familia: string;
categoria: string;
origem: string;
clima: string;
luminosidade: string;
altura: string;
info: string;
localidade: string;
lo... |
C | UTF-8 | 429 | 3.78125 | 4 | [] | no_license | #include <stdio.h>
void conv(int n) {
while (n != 0) {
printf("%d", n % 2);
n /= 2;
}
}
// Условия задания:
// Дано натуральное число N.
// Выведите его представление в двоичном виде в обратном порядке.
int main() {
int N;
scanf("%d", &N);
conv(N);
printf("\n");... |
Shell | UTF-8 | 1,214 | 2.546875 | 3 | [] | no_license | # $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Alexander Baldeck <alexander@archlinux.org>
pkgname=libxcb
pkgver=1.9.1
pkgrel=2
pkgdesc="X11 client-side library"
arch=('i686' 'x86_64')
url="http://xcb.freedesktop.org/"
depends=('xcb-proto>=1.8-2' 'libxdmcp' 'libxau')
makedepends=('pkgconfig' 'lib... |
Markdown | UTF-8 | 8,190 | 2.75 | 3 | [] | no_license | ---
description: "Simple Way to Prepare Homemade Rice and vegetable gravy"
title: "Simple Way to Prepare Homemade Rice and vegetable gravy"
slug: 1669-simple-way-to-prepare-homemade-rice-and-vegetable-gravy
date: 2020-12-04T17:28:22.869Z
image: https://img-global.cpcdn.com/recipes/db200fd3685d9494/751x532cq70/rice-and-... |
JavaScript | UTF-8 | 7,434 | 2.765625 | 3 | [] | no_license | const Room = require('../models/Room');
const Item = require('../models/Item');
module.exports = async() => {
const horrorRoom = await Room.create({
name: 'horror'
});
await Item.create({
name: 'entrance',
room: horrorRoom._id,
interactions: {
look: 'You suddenly find yourself in darkened... |
Markdown | UTF-8 | 3,139 | 3.203125 | 3 | [] | no_license | ## String+CodingConvention.swift
A regex powered string extension for converting strings from one coding conventions to another, or converting from coding convention to a sentance/title.
This extension is wseful for populating UIKit components with JSON keys.
For example: A UILabel reads "Recognised as an Element B... |
Markdown | UTF-8 | 1,499 | 2.734375 | 3 | [
"MIT"
] | permissive | # Smoothsort
[](http://badge.fury.io/rb/smoothsort)
[](https://gemnasium.com/toroidal-code/smoothsort-rb)
[ {
a.resize((unsigned int)len);
a[0]=0;
int ans = 0, j;
for(int i=0;i<len;) {
while(i-a[i]>0&&s[i+a[i]+1]==s[i-a[i]-1])
a[i]++;
if(ans<a[i])
... |
Markdown | UTF-8 | 1,321 | 2.671875 | 3 | [
"MIT"
] | permissive | ## Quiz 5 Study Guide
You should be able to answer questions on these topics for Quiz #5.
1. What does POMA mean? What is it used for?
2. Be able to do Lorenz-Kidd OO estimation.
3. Why did we decide to go in-depth on Lorenz-Kidd instead of COCOMO, COCOMO II, or function point estimation? Benefits/drawbacks of Lore... |
Java | UTF-8 | 8,596 | 2.140625 | 2 | [] | no_license | package com.backpackers.android.backend.api;
import com.google.api.server.spi.ServiceException;
import com.google.api.server.spi.config.Api;
import com.google.api.server.spi.config.ApiClass;
import com.google.api.server.spi.config.ApiMethod;
import com.google.api.server.spi.config.ApiNamespace;
import com.google.api.s... |
Java | UTF-8 | 3,843 | 3.703125 | 4 | [] | no_license | package AdvancedExercises.Battleships;
import java.util.Scanner;
public class CLInterface implements PlayerInterface {
private Scanner reader;
public CLInterface() {
reader = new Scanner(System.in);
setDelimiter("\n");
}
public String playerInput(String prompt) {
System.out.... |
C++ | UTF-8 | 215 | 2.578125 | 3 | [] | no_license | #ifndef PONY_HPP
# define PONY_HPP
#include <string>
class Pony {
private:
std::string _name;
public:
void setName(std::string name);
void introduce(void) const;
~Pony(void);
};
#endif
|
Markdown | UTF-8 | 6,211 | 2.84375 | 3 | [] | no_license | 一〇九
第三十九章 图穷匕现
于梵道:“陈姑娘,假如我说这是出自贵府西席李老夫子的手笔,大约你该不会否认吧!”
陈翠绫默然半晌,然后满面庄重之色:“于公子,这东西你是哪里弄来的!”
于梵又是一声冷笑道:“陈姑娘,难道你已忘记向枯木尊者换回太阳真解的那回事了?”
“没有!”
“你们是用什么向他交换的?”
“李夫子珍藏的二王法帖!”
“哼哼,好一幅珍藏的二王法帖,只可惜枯木尊者并不欣赏,你们只不过方一离开,他就将其撕得粉碎了!”
“为什么?”
“因为那根本就不是二王法帖!”
“不是二王法帖是什么?”
“是贵府西席李夫子的一封书信!”... |
Java | UTF-8 | 1,715 | 2.8125 | 3 | [] | no_license | package view.notePane;
import controllers.NoteWindowController;
import javafx.geometry.Insets;
import javafx.scene.control.*;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import model.Note;
import model.Notes;
public class NotePane extends VBox {
private Note note;
private TextField topic;
p... |
JavaScript | UTF-8 | 7,666 | 2.59375 | 3 | [] | no_license | import React, { Fragment, useState } from "react";
import moment from "moment";
import { Table, Button } from "reactstrap";
import { formatDisplay, formatDatabase, formatPrint } from "../../shared/constants";
import Animal from "./models/Animal";
import { formatRegistro } from "../../shared/utils";
const Animais = (pr... |
Python | UTF-8 | 1,076 | 2.671875 | 3 | [] | no_license | # -*- coding: utf-8 -*-
from config import *
import showing as sh
from random import randrange as rndt
class Barrier:
"""
этот класс связан со всем, что связано с преградами
"""
def __init__(self, name, race, health, force, x, y):
self.x = x
self.y = y
self.health = health
... |
Markdown | UTF-8 | 3,730 | 2.703125 | 3 | [] | no_license | # Data analysis script
This script details the commands used in order to get information about the data used for this project. The goal was to assess allele frequencies, polymorphisms...
## Download and install tools
wget http://s3.amazonaws.com/plink1-assets/plink_mac_20200121.zip
## Pipeline
### 1. ... |
Java | UTF-8 | 3,346 | 2.015625 | 2 | [] | no_license | package org.wikipathways.indexer;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import org.apache.lucene.document.Document;
import org.apache.lucene.index.Term;
import or... |
Markdown | UTF-8 | 982 | 2.859375 | 3 | [] | no_license | # CalculadoraJS
## Objetivo
O desenvolvimento de uma calculadora utilizando as tecnologias:
- <img src="https://img.shields.io/badge/html5%20-%23E34F26.svg?&style=for-the-badge&logo=html5&logoColor=white"/>
- <img src="https://img.shields.io/badge/css3%20-%231572B6.svg?&style=for-the-badge&logo=css3&logoColor=white... |
Java | UTF-8 | 833 | 2.125 | 2 | [] | no_license | package tr.com.bilkent.patientmonitoring.mapper;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import tr.com.bilkent.patientmonitoring.config.MapperConfig;
import tr.com.bilkent.patientmonitoring.dto.symptom.SymptomDat... |
C | UTF-8 | 256 | 3.5 | 4 | [] | no_license | #include "holberton.h"
/**
* factorial - Short description, single line
* @n: Description of parameter
* Return: Description of the returned value
*/
int factorial(int n)
{
if (n < 0)
return (-1);
if (n == 0)
return (1);
return (n * factorial(n - 1));
}
|
C++ | UTF-8 | 450 | 2.84375 | 3 | [] | no_license | // EulerProblems.cpp : Defines the entry point for the console application.
//
#include "EulerProblems.h"
int main()
{
problem_55 problem;
auto t0 = std::chrono::high_resolution_clock::now();
std::cout << problem.solution() << std::endl;
auto t1 = std::chrono::high_resolution_clock::now();
std::cout << "Solut... |
C++ | UTF-8 | 990 | 3.140625 | 3 | [] | no_license | /* Title: Monster.cpp
Author: Matthew Yoon
Date: 11/6/2019
Description: .cpp file for Monster.h
*/
#include "Monster.h"
using namespace std;
// Name: Monster() - Default Constructor
// Description: Would be used to create a monster but abstracted
// Preconditions: None
// Postconditions: Used to populate chi... |
JavaScript | UTF-8 | 140 | 2.703125 | 3 | [] | no_license | class Person {
constructor(name) {
this.name = name;
var stone = false;
this.stoned = stone ;
}
}
module.exports = Person;
|
SQL | UTF-8 | 276 | 2.796875 | 3 | [] | no_license | CREATE TABLE "group" (
"id" bigserial PRIMARY KEY,
"password" text NOT NULL
);
INSERT INTO "group" ("id", "password") VALUES (0, '');
ALTER TABLE "game" ADD "groupId" bigint NOT NULL DEFAULT 0 REFERENCES "group" ("id");
ALTER TABLE "game" ALTER "groupId" DROP DEFAULT;
|
Markdown | UTF-8 | 2,940 | 3 | 3 | [] | no_license | <!-- Godzilla VS Biollante (1989) -->
In the aftermath of Godzilla attack in 1984, a black market struggle ensues for control of the monster's radioactive tissues left behind in the destruction: the so-called "G-Cells." Saradia, a Middle Eastern province, acquires G-Cells for use in agriculture, under the guidance of ... |
Markdown | UTF-8 | 746 | 2.671875 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "Peggy Update: UI Tidyup"
date: 2016-01-11 10:42:00
categories: peggy
---
Hello from New Zealand!
I made use of some airport downtime to tidy up the
UI a little bit. It's still a long way from its final
incarnation, but at least represents the idea of entering a command,
then having the com... |
Python | UTF-8 | 4,551 | 3.21875 | 3 | [] | no_license | import romanconvert, sys
from PyQt5 import QtWidgets
#Корректно конвертирует числа до 3999 включительно, так как для чисел выше 3999 используется несколько другая нотация.
class romanConverter(QtWidgets.QDialog):
def __init__(self):
super(romanConverter, self).__init__()
self.ui = romanconvert.Ui... |
PHP | UTF-8 | 5,223 | 3.25 | 3 | [] | no_license | <?php
/**
* Routing class to extract and parse request parameters from the URL.
* @package Core
*/
class Route
{
/**
* Name of the route.
* @var string
* @access public
*/
public $name;
/**
* Rule for this route.
* @var mixed
* @access public
*/
public $rule;
/**
* Default parameters for t... |
Ruby | UTF-8 | 892 | 4.25 | 4 | [] | no_license | people = 10
cars = 25
trucks = 25
# if there is more cars than people then output "take cars"
if cars > people
puts "We should take the cars."
# if not, check if cars is least than people then output "don't take cars"
elsif cars < people
puts "We should not take the cars."
# else then cars = people then output "ca... |
Markdown | UTF-8 | 2,173 | 2.59375 | 3 | [] | no_license | ---
wordpress_id: 881
layout: post
title: supersize
excerpt: last night hiromi and I went to go see the movie called supersize me. It was made by some guy named Morgan Spurlock. he ate mcdonalds everyday for one month. it totally destroyed him. heh. he was broken. it scared me. are country is so broke...
date: 2004-06... |
C# | UTF-8 | 673 | 3.109375 | 3 | [] | no_license | public async Task<IActionResult> DownloadFile(string filename)
{
try
{
string file = @"c:\temp\test.csv";
var memory = new MemoryStream();
using (var stream = new FileStream(file, FileMode.Open))
... |
Go | UTF-8 | 11,968 | 2.828125 | 3 | [] | no_license | package repository
import (
"database/sql"
"github.com/go-openapi/strfmt"
"github.com/jackc/pgx"
"strings"
"time"
"github.com/IvanGorshkov/DB-TP-HW/internal/app/models"
"github.com/IvanGorshkov/DB-TP-HW/internal/app/post"
)
type PostRepository struct {
dbConn *pgx.ConnPool
}
func NewPostRepository(conn *pgx... |
C# | UTF-8 | 5,676 | 2.609375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.IdentityModel.Tokens.Jwt;
using System.IO;
using System.Security.Claims;
using System.Threading.Tasks;
using BGTBackend.Models;
using BGTBackend.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;... |
Java | UTF-8 | 736 | 1.960938 | 2 | [] | no_license | package com.bioaba.taskmanager.web.controller;
import javax.inject.Inject;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.RequestMapping;
import com.bioaba.taskmanager.core.facade.BioDatabaseFacade;
import com.bioaba.taskmanager.persistence.entity.BioD... |
Java | UTF-8 | 2,628 | 1.796875 | 2 | [
"Apache-2.0"
] | permissive | /**
* Licensed to niosmtp developers ('niosmtp') under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* niosmtp licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not us... |
JavaScript | UTF-8 | 1,408 | 3.546875 | 4 | [
"LicenseRef-scancode-public-domain"
] | permissive | // peso / altura * altura
// var tdAltura = document.getElementById('altura-2');
// var tdPeso = document.getElementById('peso-2');
// var peso2 = tdPeso.textContent;
// var Altura2 = tdAltura.textContent;
// var paciente2 = {peso : peso2, altura : Altura2 };
// var tdAltura = document.getElementById('altura-1')... |
Java | UTF-8 | 9,226 | 1.84375 | 2 | [
"Apache-2.0"
] | permissive | package org.summerb.approaches.jdbccrud.impl.relations;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.springframework.beans.factory.annotation.Required... |
Java | UTF-8 | 4,405 | 2.328125 | 2 | [] | no_license | package com.xmheart.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xmheart.mapper.XPWDeptMapper;
import com.xmheart.mapper.XPWDoctorMapper;
import com.xmheart.model.XPWArticle;
import com.xmheart.model.XPWA... |
JavaScript | UTF-8 | 510 | 2.9375 | 3 | [] | no_license | function rotateImage(a) {
let len = a.length;
for (let layer = 0; layer < len/2; layer++) {
let first = layer;
let last = len - 1 - layer;
for (let i = first; i < last; i++) {
let offset = i - first;
let temp = a[first][i];
a[first][i] = a... |
SQL | UTF-8 | 1,353 | 3.6875 | 4 | [] | no_license | select
row_number() over() as id,
'305' as sistema,
'processo-participante-proposta' as tipo_registro,
'@' as separador,
*
from (
select distinct
a.clicodigo,
a.minano as ano_processo,
a.minnro as nro_processo,
a.aprsequencia as sequencial,
concat(a.minnro, a.aprsequencia)::integer as nro_ata,
... |
C++ | UTF-8 | 1,247 | 2.890625 | 3 | [] | no_license | #pragma once
#include "Drawable.h"
#include "Basket.h"
#include "ActualBasket.h"
#include <string>
///adapter class for the basket
class CBasketAdapter :
public CDrawable
{
public:
///constructor
///\param name
///\param x
///\param y
CBasketAdapter(const std::wstring name, int x, int y);
... |
Python | UTF-8 | 578 | 3.03125 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 11 16:52:05 2019
@author: home
"""
import numpy as np
file = open("in1.txt","r")
n = int(file.readline())
print(type(n))
A = np.zeros(shape=(n,n))
B = np.zeros(shape=(n,1))
for i in range(0,n):
line = str(file.readline())
a = np.arr... |
Python | UTF-8 | 444 | 4.1875 | 4 | [] | no_license | #题目:古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少?
x=0
y=1
z=1#x,y,z分别代表上个月,本月,下个月兔子对数
n=int(input("请输入月份n:"))
for i in range(n):
if n<2:
z=1
else:
z=x+y
x=y
y=z
print("兔子总数为",2*y)
|
Shell | UTF-8 | 14,849 | 4.03125 | 4 | [
"MIT"
] | permissive | #!/usr/bin/env bash
#:title: Divine Bash utils: git
#:author: Grove Pyree
#:email: grayarea@protonmail.ch
#:revdate: 2022.07.13
#:revremark: When checking Github repo existence via git, use https
#:created_at: 2019.09.13
## Part of Divine.dotfiles <https://github.com/divine-dotfiles/divin... |
Markdown | UTF-8 | 5,307 | 3.15625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | ---
layout: post
title: "The Flower Pot Key"
date: 2020-11-01 23:50:03 +0000
permalink: the_flower_pot_key
---
*The one huge vulnerability I almost left in my accounts system.*
At the risk of contributing to the ever-growing “holiday creep,” this project truly reminded me of the value of making a list and... |
Markdown | UTF-8 | 3,630 | 3.21875 | 3 | [] | no_license | # 1. Algorithm
## 删除排序数组中的重复项
(Remove Duplicates from Sorted Array)
### 题目描述
https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array/
### 算法实现
```java
public static int removeDuplicates(int[] nums) {
// 参数合法性检查
// 边界检查
if (nums == null || nums.length <= 0) {
return 0;
}
if... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.