This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I want to sort the data by uid(this set only has one uid), and then be able to choose only to get answers or questions grouped by uid. | |
[#<Response id: 37, question: "Region", answer: "Other Asian country", date: "2015-02-04", count: nil, created_at: "2015-02-04 12:39:34", updated_at: "2015-02-04 12:39:34", uid: "1423053574502", quiz_id: 1>, #<Response id: 38, question: "Profession", answer: "Neurologist", date: "2015-02-04", count: nil, created_at: "2015-02-04 12:39:34", updated_at: "2015-02-04 12:39:34", uid: "1423053574502", quiz_id: 1>, #<Response id: 39, question: "Experience with increased L-dopa dose/frequency cau...", answer: "Yes", date: "2015-02-04", count: nil, created_at: "2015-02-04 12:39:34", updated_at: "2015-02-04 12:39:34", uid: "1423053574502", quiz_id: 1>, #<Response id: 40, question: "Azilect's perceived efficacy compared to entacapone...", answer: "Less efficacious", date: "2015-02-04", count: nil, created_at: "2015-02-04 12:39:34", updated_at: "2015-02-04 12:39:34", uid: "1423053574502" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@quiz.responses.group(:uid).all.each {|uid, responses| puts "hello i'm #{uid} and my first response was: "} | |
=> [#<Response id: 46, question: "Region", answer: "South Korea", date: "2015-02-04", count: nil, created_at: "2015-02-04 12:42:03", updated_at: "2015-02-04 12:42:03", uid: "1423053723649", quiz_id: 3>, #<Response id: 55, question: "Region", answer: "Other Asian country", date: "2015-02-04", count: nil, created_at: "2015-02-04 12:43:40", updated_at: "2015-02-04 12:43:40", uid: "1423053820457", quiz_id: 3>, #<Response id: 73, question: "Region", answer: "Hong Kong", date: "2015-02-16", count: nil, created_at: "2015-02-16 13:31:47", updated_at: "2015-02-16 13:31:47", uid: "1424093507276", quiz_id: 3>] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+++ genesis +++ | |
Root: 7e204dc9cfb7acdf062ff0b8052f7fcb0b7e6593754773967932ce458d134af3 | |
Hash: 32d9162f861a01bc8274e70b3cdb9d688fd7d8566f2f8c25cf1a882f244081c4 | |
2015/03/27 12:39:28 [CHAIN] Last block (#0) 32d9162f861a01bc8274e70b3cdb9d688fd7d8566f2f8c25cf1a882f244081c4 TD=0 | |
2015/03/27 12:39:28 [CLI] Main address 3eaab80d41d0710c00ff0fc8fbaea100215a34ad | |
2015/03/27 12:39:28 [CLI] Starting Ethereum(G)/v0.8.6/linux/go1.4.2 | |
2015/03/27 12:39:28 [P2P Server] Starting Server | |
2015/03/27 12:39:30 [P2P Discovery] Listening, enode://cceb34ddbfb074286828332db186f0646e1e4ecb5121f930110cd5cf7b7d7b929d6249d00b2dfd875dab11f7b198636aa17e203d7a55adda9787c025d0ee7029@[::]:30303 | |
2015/03/27 12:39:30 [Blockpool] Started | |
2015/03/27 12:39:30 [P2P NAT] mapping error: no devices discovered |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Configuring done | |
CMake Error at libethash/CMakeLists.txt:41 (add_library): | |
Cannot find source file: | |
io.c | |
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp | |
.hxx .in .txx | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>JavaScript API</title> | |
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"> | |
<script type="text/javascript" src="~/cpp-ethereum/libjsqrc/ethereumjs/dist/ethereum.js"></script> | |
<script type="text/javascript"> | |
///First web3.eth.watch code to monitor coinbase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/model/user.rb | |
attr_accessible :name, :first_name, :last_name, :email, :password, :password_confirmation, :remember_me, | |
:provider, :uid, :photos_attributes | |
has_many :photos | |
accepts_nested_attributes_for :photos | |
#/model/photo.rb | |
class Photo < ActiveRecord::Base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gen_list() do | |
gen_list([]) | |
end | |
# Empty list. Adding first element | |
defp gen_list([]) do | |
gen_list([ gen_number | [] ]) | |
end | |
# When list is non-empty and has less than 7 elements | |
defp gen_list(list) when length(list) < 7 do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
event=button.fnf1 FNF1 | |
action=/etc/acpi/actions/toggle-touchpad.sh "%e" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="#" data-dropdown="drop" class="button dropdown">Dropdown Button</a><br> | |
<ul id="drop" data-dropdown-content class="f-dropdown"> | |
<li><a href="#">This is a link</a></li> | |
<li><a href="#">This is another</a></li> | |
<li><a href="#">Yet another</a></li> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!!! 5 | |
%html{:lang => "en"} | |
%head | |
%meta{:charset => "utf-8"} | |
%meta{:name => "viewport", :content => "width=device-width, initial-scale=1.0"} | |
%title | |
=content_for?(:title) ? yield(:title) : "Analuk" | |
= stylesheet_link_tag "application" |
OlderNewer