I hereby claim:
- I am kitwalker12 on github.
- I am adi_r (https://keybase.io/adi_r) on keybase.
- I have a public key ASDNzGWok7brUk7Imh3wXz09gq6basjAZT0BcWiHzY9mLgo
To claim this, I am signing this object:
public class GameOfLife { | |
GameOfLife() { // state may be passed here | |
} | |
public void evolve { | |
} | |
public void print { | |
} | |
} |
class MyLogger < ActiveSupport::TaggedLogging | |
def initialize(logger) | |
super(logger) | |
logger.formatter = formatter | |
end | |
def formatter | |
Proc.new{|severity, time, progname, msg| | |
formatted_time = time.strftime("%Y-%m-%d %H:%M:%S") | |
{ |
I hereby claim:
To claim this, I am signing this object:
def progname; "Dis-organizer"; end | |
module DisOrganizer | |
def version; "Mark 7"; end | |
end | |
class CoffeeEnabled | |
def service_inquiry | |
"order you a coffee" | |
end |
source_files = Rake::FileList.new("**/*.md", "**/*.markdown") do |fl| | |
fl.exclude("~*") | |
fl.exclude(/^scratch\//) | |
fl.exclude do |f| | |
`git ls-files #{f}`.empty? | |
end | |
end | |
task :default => :html | |
task :html => source_files.ext(".html") |
version: 2 | |
jobs: | |
build: | |
parallelism: 3 | |
working_directory: ~/foo/bar | |
docker: | |
- image: circleci/ruby:2.3-node-browsers | |
- image: circleci/postgres:9.4 | |
- image: circleci/redis:3.2 | |
- image: circleci/rabbitmq:3.6.6 |
Your task is to create a simple product management tool that lets you create products and search products in a listing page. You are required to use Ruby on Rails (>=5) and React/Vue/Ember for development.
Your app will implement 3 models.
Product
which contains the following attributes/validations:
name
(string (0-1024 chars), unique)upc
(string (10,12 or 13 chars), unique, only numeric characters (0-9) allowed)def flatten_array(arr) | |
arr.reduce([]) do |res, item| | |
item.kind_of?(Array) ? res + flatten_array(item) : res << item | |
end | |
end | |
# flatten_array( [[1,2,[3]],4]) |
0xFCb2654F0Eaf900534C1b4E876b9ED5e00a267c9 |
<?xml version="1.0" encoding="utf-8"?> | |
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd"> | |
<Header> | |
<DocumentVersion>1.01</DocumentVersion> | |
<MerchantIdentifier>AXXXXXXXXXX</MerchantIdentifier> | |
</Header> | |
<MessageType>ProductImage</MessageType> | |
<Message> | |
<MessageID>1</MessageID> | |
<OperationType>Update</OperationType> |