All Questions

1
answer

Calculate how long a car has been parked

I'm reading a parque.txt file that contains the hours a car was in a parking lot, type "9h00 10h30" , this on each line. I was trying to get these times in each char block, in which case I would have hora_i="9", min_i="00",...
asked on 15.06.2014 / 02:11
1
answer

How to get a random number in Kotlin?

How can I get a random number between two values? As ruby does with rand(0..n)     
asked on 26.01.2018 / 19:48
1
answer

Capturing actions: Scroll Down and Scroll Up

Is there any way in jQuery to capture the events of "ScrollDown" and "ScrollUp"? I tried this way: var lastScrollTop = 0; $(window).scroll(function(event){ var st = $(this).scrollTop(); if (st > lastScrollTop){ // downscroll...
asked on 13.07.2014 / 21:36
1
answer

How do I check for multiple values in a string with JavaScript?

To search only for a fixed value in a string I can use the JavaScript function indexOf() , example: var string = "Oberyn se vinga"; string.indexOf('vinga') >= 0 //retorna true ou false But how would I do to check multiple values...
asked on 05.06.2014 / 19:53
2
answers

Best / Safe way to transfer sensitive data to an android application via JSON

I am trying to develop an application for android that will work with a database in this case MySQL and I was thinking of doing communication between the database and the application via JSON the data would have to be transferred over SSL but ev...
asked on 10.07.2014 / 18:08
2
answers

How do I know the name of ActionResult that called the view?

I wonder if it's possible to get the name of ActionResult that called View . I know that View normally has the same name as ActionResult , but in my case, I have a single view for two ActionResult different, henc...
asked on 28.06.2014 / 16:21
1
answer

How should I organize my controllers using the SOLID methodology?

I am currently developing a project and have noticed that my controllers are responsible for more than one activity. Thinking about it, I remembered the Laravel Brazil Community Hangout on SOLID. The problem is that I do not know the best...
asked on 23.06.2014 / 15:15
1
answer

How to add snippets of 'dynamic code' HTML with JavaScript / jQuery

Generally when we want to list data in the front-end tags using back-end tags <%= %> or others. The deadlock I came across was, "How to do this in jQuery?". To explain it better, I'm developing a blog based on Wordpress. As I...
asked on 14.06.2014 / 05:16
1
answer

Attach a footer type element in the page footer

I'm doing a job for college where we were instructed to take advantage of the new HTML5 semantic tags (nav, section, footer, etc). I'm having trouble fixing the footer at the bottom of the page. I've tried using CSS and jQuery, but nothing came...
asked on 06.06.2014 / 07:30
2
answers

How do I not insert repeated records?

I am doing a login system in which each user creates a URL that sends to the bank, but I need to make it not repeat information, if there is already information in the database, it returns (URL indisponível) result. p> INPUT COD...
asked on 01.07.2014 / 01:55