Posts by Anderson Pierok • 692 points
18 posts
-
1
votes1
answer206
viewsQ: Printing on Ruby on Rails
I have the following problem, I need to print data that are generated by my Ruby on Rails application, however, this impression should be made directly in the client’s USB/Serial port. The printer…
-
1
votes0
answers64
viewsQ: Nginx with Oracle
I’m having the following problem, I set up mine Nginx with the Gem Passenger, for my application ruby-on-Rails, using Oracle database (Instant client), everything is configured correctly at first,…
-
0
votes0
answers81
viewsQ: Syntax error when compiling in Windows CE
It is possible to make a Browser for windows CE using Lazarus? I made one with Gecko component but not compiled for windows CE, has some configuration to be done or it is not supported even? The…
-
0
votes1
answer84
viewsQ: Ror application in windows CE
I wonder if there is any possibility to make a Rails application for Windows CE ? We need to make an application to run on a data collector that has the Win CE. This device will not have network…
-
1
votes2
answers263
viewsA: Rails and postgres group_by data considering time zone
Your bank probably has the Timezone 'UTC', if you want to take the time zone dynamically as it is set on ruby-on-Rails, use the following: Movimento.select("date(created_at AT TIME ZONE 'UTC' AT…
-
1
votes1
answer401
viewsQ: Humanize in accented characters
I have the following problem, I have some error messages in my system, but when there are accents in the messages, humanize does not apply to these characters, I tried to use the gem…
-
3
votes1
answer302
viewsQ: How to move a chart (Highcharts) using the arrow keys?
How do I move a chart using Highcharts? Instead of moving with the mouse to the right and to the left, I would like to use the arrow keys (right arrow, left arrow, up arrow, and down arrow).…
-
3
votes1
answer173
viewsQ: Statistics in Ruby on Rails
I have the following problem, I need my system to generate some statistical data from an array, for example: vetor = [1, 5, 2, 1, 6, 30, 2, 7, 2, 80] I need to extract some data from it, like:…
-
0
votes1
answer46
viewsQ: How to test the locals on a render?
I am with the following doubt, I do my tests using Ministest, but I have a problem when testing the locals of a render... I do not know how to test, example: Controller: def salvou…
-
12
votes3
answers23020
viewsQ: How to initialize postgresql with Ubuntu?
I have the following problem, every time I turn on my machine, I go to the terminal and give sudo service postgresql status, always appears 9.3/main (port 5432): down. On other machines I have…
-
0
votes1
answer556
viewsQ: How to Test Web Service on Ruby on Rails
I’m having the following doubt, I’m making a web-service server with my application ruby-on-Rails, I’m using the gem wash-out, I understood how it works and I was able to put my web-service to run,…
-
2
votes1
answer497
viewsA: Create a search inside a select
With the bootstrap, you have the property call data-live-search="true" that allows searching in select…
-
17
votes7
answers57425
viewsA: Check/Deselect Checkbox from a button
Test like this: function marcardesmarcar(){ $(".marcar").each( function() { if ($(this).prop("checked")) { $(this).prop("checked", false); } else { $(this).prop("checked", true); } } }); }…
-
6
votes3
answers529
viewsA: How to replace the last appearance of a character?
It can be done this way: var x = 'a,b,c'; var pos = x.lastIndexOf(','); x = x.substring(0,pos)+' e '+x.substring(pos+1); Where the pos is the position in which the last , is found, he takes the…
-
1
votes2
answers1760
viewsA: How to format monetary values with C++?
There is a method called Replace(), you can work it together with the Find(). Here is a short example of how to use: I switched to answer Maniero #include <iostream> #include <string>…
-
2
votes4
answers24368
viewsA: Close Mozilla, IE, Chrome tab
Try to do it this way: function tabClose() { var tab = window.open("","_self"); tab.close(); } I don’t use IE, but in Chrome and Firefox, it solves your problem, maybe in IE too, but I couldn’t…
-
1
votes1
answer235
viewsA: link_to action and id
Check your project routes by giving the command rake routes from the console, this command will return a list with 4 columns. The 4 column is the action of your controller that should be executed…
-
0
votes2
answers1190
viewsQ: Access local printer
I have the following problem, I have an application ruby-on-Rails and I need to print labels on a printer that is installed on the client’s computer, as I do to print these labels directly through…