Posts by flpms • 950 points
32 posts
-
1
votes1
answer112
viewsA: How to call a controller function in the Emberjs component
In your Component call in the template, you need to pass the optionChanged to the Component. As in the code below. Template {{#each model as |option|}} <li> <label>{{radio-button…
-
1
votes2
answers3023
viewsA: How to lock certain keys in an input using Javascript?
You can resolve this through a regular expression. function somenteNumero(value) { if (/([0-9]+\,?)/.test(value)) return true; } Right after the asterisk you have the permission of the comma. With…
-
2
votes1
answer36
viewsA: Doubts regarding the Grunt
When using the Grunt, you are generating packages for various environments. The folder you put into production is the dist the App folder serves as a development environment, it would be good for…
-
3
votes2
answers1523
viewsA: How do asymmetric signatures work in JSON Webtokens (JWT)?
The JWT he is an asymmetrical cryptographic. JWT stores a private key, which will stay on your server and when the user requests the public key, JWT uses the private key to generate the public key.…
-
0
votes1
answer33
viewsA: How to prevent Ember-data from making a request to the server
According to that reply from SOEN The problem is using the findAll instead of peekRecord or peekAll. When reading the documentation on DS.store we can find the following cases. findRecord - resume a…
-
0
votes1
answer33
viewsQ: How to prevent Ember-data from making a request to the server
I have a route where the person can select items from a list for their account. But logging into that route sends a request GET to the server. How could prevent this from happening? Here is an…
-
0
votes1
answer13
viewsA: Can I use jQuery 2 in Emberjs 2.1?
It is possible to use the new version of jQuery without fear. For this just enter the file bower.json and add the version you want. After this run the bower install again. It is also important to…
-
0
votes1
answer55
viewsA: With generating client_secret for an Oauth2 API
The solution found was to create an integer and random number and convert it to base 36. Follow an example. 'use strict'; const Client = function() { let value = Math.floor(Math.random() *…
-
2
votes1
answer55
viewsQ: With generating client_secret for an Oauth2 API
I’m using Nodejs, but I believe the question may be useful in other languages as well. The oAuth 2 specification does not determine the size of the string that should be generated, it only informs…
-
1
votes1
answer2455
viewsA: Rest API and Sessions, how does Login work?
The idea is to build a Restapi, it is stateless(does not maintain the status). Each user requests to Restapi a token, with that token it accesses the endpoints you need to query. For this you…
-
0
votes3
answers978
viewsA: What is this <Buffer> in reading files in NODEJS?
Buffer is your parsed file in hexadecimal format. You can take your answer and parse from simple form. Follow an example: fs.readFile('files/text.txt', function (err, data) {…
-
1
votes2
answers788
viewsA: Google Speech API compatibility
Answering the first, question. According to the documentation. HTML5 is a series of technologies that allows you to create powerful applications. As for the second question, as it is a draft of the…
-
4
votes2
answers1226
views -
5
votes1
answer489
viewsQ: Error installing mongodb 3.0 on Ubuntu 15.10 Linux?
I’m trying to install the MongoDB in the Ubuntu 15.10, but, I cannot install Mongo always returning the following error when starting the service. Failed to start mongod.service: Unit mongod.service…
-
1
votes1
answer416
viewsA: Security when sending and taking data from a URL
User data is exposed through the concept of API. Express queries the database, in this case the MongoDB through the Moongose and returns this via a call REST with the Express. This information can…
-
2
votes1
answer152
viewsQ: How does Angularjs databinding and Dirty-check work?
How the Angular data-Binding works underneath the scenes and how it can update the HTML so quickly an input to the declaration with {{}} and not only in Angular, but also in other cases like…
-
3
votes2
answers541
viewsA: Is there a list of all properties that need prefixes?
Prefixes are used to implement some items that are not compatible with other browsers, but exist within a specific browser. But a lot of the CSS elements don’t need prefixes and some that need…
-
2
votes1
answer24
viewsA: How to hide a Component in emberjs 2.1 equal to ng-Hide?
The Components of Emberjs has a flag isVisible that can be easily used. It also has css/jQuery and flag custom that can be used to render or not Component. To reply in the SOEN…
-
1
votes1
answer24
viewsQ: How to hide a Component in emberjs 2.1 equal to ng-Hide?
In the Angular there is the ng-hide and the ng-show to display and hide page elements. How to do the same in Emberjs 2.1? This is a translation of a question of mine on SOEN.…
-
1
votes3
answers60
viewsA: Javascript does not follow the algorithm flow
Your problem is in the asynchronous part of Javascript. When the event occurs change the function calcularJornadaDeTrabalho did not complete the execution. Then the variable valorSegundaFeira is…
-
0
votes1
answer13
viewsQ: Can I use jQuery 2 in Emberjs 2.1?
I would like to upgrade from jQuery 1.11.3 to jQuery 2.1 within Ember 2.1. I can upgrade without major problems? Link to question on SOEN…
-
0
votes1
answer72
viewsQ: How to hide blocks for a route when going to a sub-route
I am using Ember 2 and things are complicated for those who have no Ember experience. I have the following routes consultas\ consultas\reserva And on my router.js is like this…
-
1
votes1
answer62
viewsA: How to Work with Grunt
It’s actually not necessary for you to create a directory for each Grunt action. You can save the minified files inside the same directory. For identification, prevent the file from being…
-
1
votes1
answer219
viewsQ: Reserved word usage "import" in javascript
Reading the Ghost code, CMS platform based on Nodejs found a file with the following statement: import Ember from 'ember'; import Resolver from 'ember/resolver'; import loadInitializers from…
-
0
votes1
answer63
viewsQ: Handlebars Compile Function with options Parameters
I want to minify my template during the build period of the same on Nodejs Researching about I discovered that the handlebars.compile(templateLoaded); has more options than the template parameter. I…
-
1
votes5
answers1446
viewsA: Is it possible to include elements in the DOM after it is loaded and ready?
Is it possible to validate the data without sending the form? Through the evt.preventDefault()? Another way would be to take all the information and do the treatment of it in the page Load. Send the…
-
6
votes1
answer186
viewsQ: Performance in Javascript objects
By which means are obtained the best performance of Javascript objects. var Objeto = { propriedade:'valorPropriedade', init:function() { //Inicia Objetos } } var obj = Objeto.init(); or: function…
-
5
votes2
answers999
viewsQ: How to wait for the result of a Restful API in Nodejs
I work with an Amazon JSON API, in which I research products and handle information according to their results, but within Nodejs the API information is written on the console, but it is not written…
-
1
votes1
answer1289
viewsA: Phonegap app does not install on device
The above mentioned error occurs when no Apks are found for the Android project. In some cases after a clean and build using Eclipse, delete some important files from Cordova(aka Phonegap). How to…
-
11
votes3
answers8084
viewsQ: CORS on Nodejs without the use of Frameworks
I am creating an app in Phonegap and consumes an API provided through Nodejs. For that to happen, I need Nodejs to accept the CORS. How do I enable the CORS for Nodejs to accept the request?…
-
1
votes1
answer1289
viewsQ: Phonegap app does not install on device
Working with Phonegap/Ordova and finding documentation for it in Portuguese is very complicated, so asking questions about problems faced will help enrich with content. My problem is being when…
-
12
votes4
answers6231
viewsQ: How to select a text snippet in a String?
I’m creating a text file and using some delimiters (<# and #>) I need to select what’s inside the delimiter <# texto.delimitado #>. Using the function split() javascript. What would be…