All Questions

5
answers

How to use the reduce (reduce) operation on objects?

In Javascript, when I need to do a reduction operation, I use the Array.reduce method. So: var valores = [1, 2, 3, 4, 5, 1000]; var resultado = valores.reduce(function (soma, atual) { return soma + atual; }) console.l...
asked on 13.11.2017 / 12:44
4
answers

How to split a string into specific sizes in JavaScript?

I need to split a string into a specific size in JavaScript. I know you can use Join to turn a string into a array of letters: 'hello'.split('') However, I need a way where I can determine the size at which this st...
asked on 11.08.2016 / 14:59
3
answers

Using 'break' in JavaScript

For example, if I have the following code: var i, j; for (i = 1; i <= 3; i++) { for (j = 1; j <= 3; j++) { if (j === 3) { break; } text += "The number is " + j + "<br>"; } } When using break, it breaks th...
asked on 01.02.2018 / 17:09
5
answers

Remove part of a string

I have a string, example: 32137hyb8bhbhu837218nhbuhuh&3298j19j2n39 I want to remove (clean) from the string everything that comes after & . Please, how to do this?     
asked on 26.01.2017 / 05:23
4
answers

How to get information from the client's operating system?

I need to get information from the operating system of the person who accessed the page, for example through a command to find out if it is Windows, MAC, Linux.     
asked on 07.08.2017 / 23:05
1
answer

Gruntfile does not correctly rename image paths in CSS files [closed]

My Gruntfile.js is set up as follows: // Performs rewrites based on rev and the useminPrepare configuration usemin: { html: ['<%= yeoman.dist %>/{,*/}*.html', '<%= yeoman.dist %>/views/{,*/}*.html'], css: ['<%= yeoman...
asked on 23.09.2014 / 19:35
2
answers

How to store a Listobject in a database?

I'm working on a C # project where I have the following situation. I have a class that represents a player: class Player { int ID; string Name; } and one that represents a team: class Team { int ID, string Name; List<...
asked on 27.07.2016 / 18:31
1
answer

Where do I find the specifications for DARF generation? [closed]

I need to know where to find the DARF generation specs for payment via the digitable line. The DARF data I already have, I would like to be able to create the barcode, preferably be using the recipe site. If you have some example code, it...
asked on 02.12.2014 / 17:07
2
answers

Is it possible to apply push technology?

I have a system, in which it displays database files, in list form. I query the database every 5 seconds to see if there are new files, and if it has it shown to the user, using AJAX. Why this? To avoid updating the page at all times, to s...
asked on 08.09.2014 / 20:57
1
answer

Slide item to increment TextView

Is there a component that, when sliding an item from a ListView , increments a TextView on the item itself? As in the image below: Sliding to the right increments according to the value that shows TextView on the left....
asked on 05.12.2014 / 21:49