Posts

ruby on rails - Failure/Error: response.should render_template(:new) expecting <"new"> but rendering with <""> -

posts_controller.rb class postscontroller < applicationcontroller respond_to :html, :xml, :json before_filter :authenticate_user!, :except => [:show, :index] before_filter :admin_only, :except => [:show, :index] def new @post = post.new end end spec_helper.rb # file copied spec/ when run 'rails generate rspec:install' env["rails_env"] ||= 'test' require file.expand_path("../../config/environment", __file__) require 'rspec/rails' require 'forgery' require 'populators' # requires supporting ruby files custom matchers , macros, etc, # in spec/support/ , subdirectories. dir[rails.root.join("spec/support/**/*.rb")].each {|f| require f} rspec.configure |config| config.mock_with :rspec # remove line if you're not using activerecord or activerecord fixtures config.fixture_path = "#{::rails.root}/test/fixtures" config.before(:suite) databasecleaner.strategy = :t...

reactjs - Karma chrome launcher starts, but crashes immediately -

the karma chrome launcher starts, crashes.. have included error log.. rookie, please me sort out ! in advance ! :) npm debug log looks this... 0 info worked if ends ok 1 verbose cli [ 'c:\\program files\\nodejs\\node.exe', 1 verbose cli 'c:\\program files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'test' ] 2 info using npm@3.8.6 3 info using node@v5.11.1 4 verbose run-script [ 'pretest', 'test', 'posttest' ] 15 silly lifecycle ~~~~~box@0.0.1~test: args: [ '/d /s /c', 'karma start' ] 16 silly lifecycle ~~~~~box@0.0.1~test: returned: code: 1 signal: null 17 info lifecycle ~~~~~box@0.0.1~test: failed exec test script 18 verbose stack error: ~~~~~box@0.0.1 test: `karma start` 18 verbose stack exit status 1 18 verbose stack @ eventemitter.<anonymous> (c:\program files\nodejs\node_modules\npm\lib\utils\lif...

c# 4.0 - notification sound in build version in c# -

i created 1 notification using kendo ,when notification araises kept system.media.systemsounds.hand.play() , it working fine while project running,when publish project , run in build version notification sounds not coming? what should do? public jsonresult demonotification() { list<demonotification> res = new list<demonotification>(); datatable dt = functions.gettbl(cmd); if (dt.rows.count > 0) { for(int i=0;i<dt.rows.count;i++){ demonotification obj = new demonotification(); obj.companyname = dt.rows[i]["companyname"].tostring(); obj.demodate =convert.todatetime(dt.rows[i]"demodate"]); res.add(obj); system.media.systemsounds.hand.play(); } } return json(res); } function load() { $.ajax({ ...

How to get Kafka Topic Name from Spark Streaming createStream API -

i using spark streaming 1.6.1 , kafka 0.9.0.1 on hdp 2.4.1, due open open bug in hdp 2.4.2 not able use createdirectstream api spark streaming,so using createstream api spark streaming. have requirement need topic name dstream on basis of topic name need processing. using below code read message kafka topic, not able retrieve topic name dstream coming null. can please me on this. val record = kafkautils.createstream[string, string, stringdecoder, stringdecoder](ssc, kafkaparams, topicmap, storagelevel.memory_only_ser_2) val keys =record.map(_._1) keys.print

sparql - Transaction in Virtuoso over HTTP -

i trying use transaction in virtuoso on http sparql/web service endpoint. in this link using isql tool not sparql query , endpoint. is there way perform transaction operations on http?

algorithm - why do we use RAM model of computation for algorithmic analysis when it corresponds to harvard architecture? -

as per wikipedia , rasp model of computation corresponds von neumann architecture while ram model of computation corresponds harvard architecture , von neumann architecture closest computers since have ram memory in our computers stores data instructions in , while ram model has different program memory , different data memory , why use ram model algorithmic analysis ? https://en.wikipedia.org/wiki/random-access_stored-program_machine unless algorithm uses self-modifying code, distinction doesn't matter, reasons margaret points out. also, far real hardware concerned, (almost?) modern cpus have cache have split instruction/data l1 caches, actual cpu core more harvard-like von neumann. instruction-fetch competes data access. wikipedia's modified harvard architecture article goes more detail, , mentions other ways mostly-harvard architectures can still programmed programs.

symfony - How use Facebook and google+ login in sylius alpha version? can anyone provide simple guide for it? -

can provide me simplest guide facebook , google+ login or connect sylius base project? thanks i've started writing guide sylius docs. using this guide now. give more feedback next week. follow sylius github :) edit : we've updated documantation @ sylius. check out here!