dimanche 1 février 2015

Not able to run ruby on rails on ubuntu


Vote count:

0




I have installed ruby on rails using the below tutorial http://ift.tt/1wFwCwc .I completed all the steps mentioned as per the tutorial and I could even create a rails app and run it using rails server .


When I used rails server , it showed me



ubuntu@ip-192-30-0-97:~/myapp$ rails server
=> Booting WEBrick
=> Rails 4.2.0 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2015-02-01 09:45:51] INFO WEBrick 1.3.1
[2015-02-01 09:45:51] INFO ruby 2.1.5 (2014-11-13) [x86_64-linux]
[2015-02-01 09:45:51] INFO WEBrick::HTTPServer#start: pid=11899 port=3000


But when I navigate to my IP (Elastic IP pointing to my instance running Ubuntu 14.04),Im just getting a page "Website not available" .I could get this working on my local computer,when I navigated to the localhost IP the rails default page opened up,however here Im not able to get this working.


I am new to RoR and ubuntu,please help on this.




asked 58 secs ago







Not able to run ruby on rails on ubuntu

Android Textview unable to display special characters?


Vote count:

0




I need to display data from sqlite with some special characters on it like for example,


myStr = "Testing123ʳ" (actual value is loaded from sqlite)


which contains a modifier letter small ʳ (U+02B3)


Refer to character info here http://ift.tt/15YEHGd


I have tried 1. myTextv.setText(Html.fromHtml(myStr)) 2. myTextv.setText("\u02B3)") 3. myTextv.setText(Html.fromHtml("ʳ"))


All doesn't work...



asked 1 min ago

Eddi

41






Android Textview unable to display special characters?

How to read barcode from PDF file and export it + page number to table


Vote count:

0




I want to make code or to run program that can read the barcode from PDF file and export them i a table showing barcode value & page number.



asked 45 secs ago







How to read barcode from PDF file and export it + page number to table

Terminal does not work in the WebStorm 9


Vote count:

0




I can not type in the terminal http://ift.tt/1uOZn9J What is the problem? Prompt please.



asked 1 min ago







Terminal does not work in the WebStorm 9

Simple Jquery Validation and sending valid DATA to other jsp


Vote count:

0







  1. I want to Validate this thing and Send this value to other JSP page ..




  2. I am new to this concept ..I need you to help by " CORRECTING this Form " and suggest me after CORRECTION .. how can i able to send value to other page ...




3.here :- only one field should Enter .. incase of two fileds or 2_fields.NULL() show a warning ..[ i did with a some thing wrong




<script>
$(document).ready(function(event) {
<!-- Real-time Validation -->

var is_name=$('#contact_name').val();

var is_number=$('#contact_number').val();

$("#contact_submit button").click(function() {
if(($('#contact_number').val().length !=0) && ($('#contact_name').val().length !=0)) {

$("#nosearch").hide();
$("#search").hide();
$("#wrong").show();
}

else if (($('#contact_number').val().length ==0) && ($('#contact_number').val().length ==0) ) {

$("#nosearch").show();
$("#search").hide();
$("#wrong").hide();
}
else {
$("#nosearch").hide();
$("#search").show();
$("#wrong").hide();

I know some action type of thing should happen here .. i don't know what it would be .. help me ...
}
});
$("#nosearch").show();
$("#search").hide();
$("#wrong").hide();
});
</script>



<form id="contact" method="post" action=" **i don't know how to send a value to other page** ">
<div>
<label for="contact_name">Number:</label>
<input type="text" id="contact_number" size="15" name="number"></input>
</div>

<div>
<label for="contact_email">Name:</label>
<input type="text" id="contact_name" size="25" name="name"></input>
</div>

<div id="contact_submit">
<button type="submit">Submit</button>
</div>
<h4 id="wrong"> Only use one coloum ...<h4>
<h4 id="nosearch"> Enter any Information <h4>
<h4 id="search"> Result about :- .... <h4>
</form>



My fiddle link :-




asked 2 mins ago

hari

18






Simple Jquery Validation and sending valid DATA to other jsp

MySQL Get score of each user in each category


Vote count:

0




basically i have the following tables:



users (id)

question_categories(id)

questions(id, category)

answers(id, user, question, score)


My problem is to get the total score of each user in each category in order to filter them based on the score in each category.


I expect a result table like (user, score_cat_1, score_cat_2, ...). I tried this option by building the table from PHP to add each category score column, but there is a join subquery I have to run on each category column I want to add. Something like



SELECT u.id, SUM(cat1.score) AS score_cat_1, ...
FROM users u
LEFT JOIN (
SELECT score, category, user
FROM answers a
JOIN questions q ON a.question=q.id AND q.category=1
) AS cat1 ON u.id=cat1.user
...


So I fear a performance issue with the size of that table and the number of categories. Is there a better approach?


Thanks



asked 52 secs ago

atoo

16






MySQL Get score of each user in each category

regex to match an exam result


Vote count:

0




here is the key structure



first part + '-' + second part


first part is from a list of indicators



'BIL|UBG|LEU|ERY|pH|KET|SG|PRO|NIT|GLU'


second part is an int + '+/-' or a 'pos/neg' here is bottom line of what I got



(BIL|UBG|LEU|ERY|pH|KET|SG|PRO|NIT)-[0-9][+,-]


like these



NIT-3+
GLU-pos
pH-neg


asked 17 secs ago







regex to match an exam result