Skip to content

Instantly share code, notes, and snippets.

@lewang
lewang / ember-20121003.js
Created October 3, 2012 14:34
ember-20121003
// Version: v1.0.pre-160-g7d62790
// Last commit: 7d62790 (2012-09-26 15:59:36 -0700)
(function() {
/*global __fail__*/
/**
Ember Debug
ubuntu@ip-10-178-51-41:/var/www/website-staging$ RAILS_ENV=staging bundle exec rake assets:precompile --trace
Sass is in the process of being separated from Haml,
and will no longer be bundled at all in Haml 3.2.0.
Please install the 'sass' gem if you want to use Sass.
/opt/www/website-staging/vendor/bundle/ruby/1.8/gems/tire-0.5.1/lib/tire/rubyext/uri_escape.rb:14: warning: already initialized constant TBLENCWWWCOMP_
/opt/www/website-staging/vendor/bundle/ruby/1.8/gems/tire-0.5.1/lib/tire/rubyext/uri_escape.rb:15: warning: already initialized constant TBLDECWWWCOMP_
Didn't load CI Reporter ...
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/opt/www/website-staging/vendor/bundle/ruby/1.8/gems/rake-10.0.2/lib/rake/application.rb:141:in `invoke_task'
/opt/www/website-staging/vendor/bundle/ruby/1.8/gems/rake-10.0.2/lib/rake/application.rb:99:in `top_level'
/opt/www/website-staging/vendor/bundle/ruby/1.8/gems/rake-10.0.2/lib/rake/application.rb:99:in `each'
/opt/www/website-staging/vendor/bundle/ruby/1.8/gems/rake-10.0.2/lib/rake/application.rb:99:in `top_level'
mySearch = {
comparator
values
target: realTarget
field: underscore(field)
}
# // Generated by CoffeeScript 1.3.3
# (function() {
# var mySearch;
SELECT activities.id AS id,
COALESCE(activities.completed_at, activities.started_at, activities.assigned_at, activities.created_at) AS sql_dt,
author_companies.name AS author_name,
companies.name AS farm_name,
properties.region,
paddocks.cropping_method,
paddock_summaries.seeding_date,
crop_varieties.name AS variety,
tech_strings.tech AS tech_name,
COALESCE(product_categories.name_en_au, product_categories.name) AS product_category,
diff --git a/app/views/planned_seasons/_show_plan.html.erb b/app/views/planned_seasons/_show_plan.html.erb
index ccdd64d..77ff0ec 100644
--- a/app/views/planned_seasons/_show_plan.html.erb
+++ b/app/views/planned_seasons/_show_plan.html.erb
@@ -23,7 +23,7 @@ properties = property ? [ property ] : company.properties.order( :name )
<% if can?( :update, planned_season, company ) %>
<%= link_to( "Edit", edit_planned_season_path( planned_season ), :remote => true, :class => "button" ) %>
- <% if can?(:update, :paddock_plan, company) %>
+ <% if can?(:update, :paddock_plan, company) && ! planned_season.bucket? %>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Interview</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta name="title" content="Interview"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2013-01-24T10:58+0800"/>

Interview

1) Martin Leech

1.1) Questions

  • Progrmming interests
  • why learn clojure/scala
  • blogs on ruby "Destroy all Software", thoughts. Gary Bernhardt, etc

zero out values in matrix

Given a NxN matrix, with 0s and 1s, set every row that contains a 0 to all 0s and every column that contains a 0 to all 0s.

For example:

Input for N==5

Mar 05 16:52:43 le-mbr rails[29845]: Started GET "/auto_completes/site_objects?q=robins" for 127.0.0.1 at Tue Mar 05 16:52:43 +0800 2013
Mar 05 16:52:43 le-mbr rails[29845]: Processing by AutoCompletesController#site_objects as JSON
Mar 05 16:52:43 le-mbr rails[29845]: Parameters: {"q"=>"robins"}
Mar 05 16:52:43 le-mbr rails[29845]: Geokit is using the domain: website.dev
Mar 05 16:52:43 le-mbr rails[29845]: User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1844 LIMIT 1
Mar 05 16:52:43 le-mbr rails[29845]: (0.1ms) BEGIN
Mar 05 16:52:43 le-mbr rails[29845]: (0.3ms) UPDATE "users" SET "perishable_token" = 'JfCNV8j6X1vUji54ftr5', "updated_at" = '2013-03-05 08:52:43.378898', "last_request_at" = '2013-03-05 08:52:43.375443' WHERE "users"."id" = 1844
Mar 05 16:52:43 le-mbr rails[29845]: Company Load (0.5ms) SELECT "companies".* FROM "companies" WHERE "companies"."id" = 323 LIMIT 1
Mar 05 16:52:43 le-mbr rails[29845]: Component Load (1.6ms) SELECT "components".* FROM "components" INNER JOIN