Questions

Websocket Rails Rspec tests

I have a problem to test message triggering from Controller after dispatching an event. Here is my Rspec test: describe “product.delete” do it “should trigger any message” do event = create_event(“product.delete”, :data => “some”) expect(event.dispatch).to trigger_message :any end end Here is my Event.rb file where event routing is specified: namespace :product do subscribe :delete, :to => ProductController, :with_method => :delete_product…
Read more

Can’t find keyplane that supports type 4 for keyboard iPhone-LandscapeChoco-NumberPad; using 76885345_LandscapeChoco_iPhone-Simple-Pad_Default

“Can’t find keyplane that supports type 4 for keyboard iPhone-LandscapeChoco-NumberPad; using 76885345_LandscapeChoco_iPhone-Simple-Pad_Default” I’m getting this output in Debugger when using a UITextField with Keyboard Type as Number Pad. All searchings seem to say that the warning is benign and can be ignored. Is it possible to silence this warning by preemptively setting UITextField to the Keyboard 76885345_LandscapeChoco_iPhone-Simple-Pad_Default Source: New…
Read more

How to add pop-up window/modal to dynamically created tables

**HTML** <div class=”wrapper”> <div class=”profile”> <div id=’entrydata’></div> </div> </div> **Javascript** <script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js”></script> <script> $(function() { var dmJSON = “data.json”; $.getJSON(dmJSON, function(data) { $.each(data.records, function(i, f) { var $table = “<table border=5><tbody><tr>” + “<td>” + f.Clue + “</td></tr>” + “<tr><td>” + f.Answer + “</td></tr>” + “<tr><td>” + f.Status + “</td></tr>” + “<tr><td> ” + f.Views + “</td></tr>” + “</tbody>&nbsp;&nbsp;&nbsp;</table>” $(“#entrydata”).append($table)…
Read more

HTML5 Not Highlighting Invalid Inputs Due To box-shadow

I have a form with inputs with the following Bootstrap class – form-control. I use HTML5 form validation on this form. The problem is, the red highlight on the invalid inputs don’t appear because of inclusion of box-shadow, border-color styles. How can I make them appear even with those styles applied? Some of the styles are applied from my own…
Read more

Undefined Error in Golang

I have the following structure: /*gotime.go*/ package gotime type Now struct { dnow int ynow int mnow time.Month } And is there a function like: /*gotime.go*/ func (n Now) DayNow() int { n.dnow = time.Now().Day() return n.dnow } I’m getting the following error when I want to call this package: /*main.go*/ package main import ( “fmt” “./gotime” ) blah :=…
Read more

Displaying dropdown list depends on selected value from other list

I am working on a project in spring mvc 4 and which should display three dropdown lists where the second list depends on the selected value from the first list and the third on the selected value in the second list. I have defined enum: public enum Type{ a{ getListOfSubTypes(){…}; getListOfObjectsBySubType(ObjectList subType){…}; }, b{ getListOfSubTypes(){…}; getListOfObjectsBySubType(ObjectList subType){…}; c{ getListOfSubTypes(){…}; getListOfObjectsBySubType(ObjectList…
Read more

radio button checked javascript – no jquery

below function seems to be not working.. function myCalculator () { var operator = document.getElementsByName(“operator”); var output = document.getElementById(“output”); var firstDig = parseInt(document.getElementById(“firstDig”).value); var secondDig = parseInt(document.getElementById(“secondDig”).value); for (var i=0; i<operator.length; i++){ var currentOperator = operator[i].id; if(currentOperator.checked == “Add”){ var add = firstDig + secondDig; output = add; }; }; } somehow the “if” parameter is returning false but, i…
Read more