This file contains hidden or 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 custom_data | |
return {} unless Prefecture.exists? | |
class_name = name.underscore | |
current_state = Prefecture.last.state | |
Customization.new(current_state, class_name).data | |
end |
This file contains hidden or 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
{ | |
"auto_complete": true, | |
"auto_complete_commit_on_tab": true, | |
"auto_indent": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/RailsCasts Colour Scheme/RailsCastsColorScheme.tmTheme", | |
"default_encoding": "UTF-8", | |
"default_line_ending": "system", | |
"detect_indentation": true, | |
"draw_white_space": "all", |
This file contains hidden or 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
class Teste | |
def metodo_instancia | |
end | |
def self.metodo_classe | |
end | |
end | |
Chamando métodos de classe ---------- | |
Teste.metodo_classe |
This file contains hidden or 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
box: wercker/ubuntu12.04-ruby2.0.0 | |
services: | |
- wercker/postgresql | |
build: | |
steps: | |
- bundle-install | |
- rails-database-yml: | |
service: postgresql | |
- script: | |
name: rake |
This file contains hidden or 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 student_media | |
if students.first.note? | |
result = StudentNoteCalculator.new(course_evaluation_criterion).calculate(students) | |
if course_evaluation_criterion.media_calculation_type == MediaCalculationType::SUM | |
result = result / students.size | |
end | |
result.round(2) | |
else |
This file contains hidden or 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
(function () { | |
function generateSelect(select, values){ | |
select.empty(); | |
var option = _.template("<option value='<%=id%>'><%=label%></option>"); | |
$.each(values, function(key, value) { | |
select.append(option({id: value.id, label: value.label})) | |
}); | |
} |
This file contains hidden or 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
Home > FusionCharts XT Data Formats > JSON > Multi-Series chart JSON | |
Multi-Series Chart JSON | |
Multi-series charts are charts where you compare multiple series of data. | |
In our previous example, we had seen how to plot a chart indicating Monthly Sales Summary for 1 year. This data belonged to one particular series, which is for the year say, 2005. Now, if you need to compare the data for two or more years, you will have to use multi-series charts. Using multi-series charts, you can compare data for two or more number of series. | |
A simple 2D multi-series chart looks as under: | |
This file contains hidden or 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
(function () { | |
function generateSelect(select, values){ | |
select.empty(); | |
var option = _.template("<option value='<%=id%>'><%=label%></option>"); | |
$.each(values, function(key, value) { | |
select.append(option({id: value.id, label: value.label})) | |
}); | |
} |
This file contains hidden or 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
(function () { | |
$("input[id$=academic_year_id], input[id$=school_id]").bind('change', generateAcademicClassroomSelect); | |
var option = _.template("<option value='<%=id%>'><%=label%></option>"); | |
function generateAcademicClassroomSelect(){ | |
$("select[id$=academic_classroom]").empty(); | |
var academic_year_id = $("input[id$=academic_year_id]").val(); | |
var school_id = $("input[id$=school_id]").val() |
This file contains hidden or 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
{"_routes"=>nil, "mock_proxy"=>#<RSpec::Mocks::Proxy:0x007fd2f07d6610 @object=#<AcademicRecordsController:0x007fd2f06233b8 @_routes=nil, @_action_has_layout=true, @_headers={"Content-Type"=>"text/html"}, @_status=200, @_request=#<ActionController::TestRequest:0x007fd2ef788df8 @env={"rack.version"=>[1, 1], "rack.input"=>#<StringIO:0x007fd2f463de08>, "rack.errors"=>#<StringIO:0x007fd2f0ea0680>, "rack.multithread"=>true, "rack.multiprocess"=>true, "rack.run_once"=>false, "REQUEST_METHOD"=>"POST", "SERVER_NAME"=>"example.org", "SERVER_PORT"=>"80", "QUERY_STRING"=>"academic_record%5Bacademic_year_id%5D=1&academic_record%5Bapproved%5D=true&academic_record%5Bcity_id%5D=1&academic_record%5Bcreated_at%5D=&academic_record%5Benrollment_id%5D=1&academic_record%5Bid%5D=&academic_record%5Bmec_stage_id%5D=&academic_record%5Bnotes%5D=Something&academic_record%5Bperson_id%5D=&academic_record%5Bschool_id%5D=39&academic_record%5Bstage_name%5D=1+Ano&academic_record%5Bupdated_at%5D=", "rack.url_scheme"=>"http", "HTTPS"=>"off", "S |