Posts by Ecil • 1,534 points
24 posts
-
2
votes1
answer237
viewsA: Chat for IOS with Swift 3
I built the chat part of this app - Flips - Picture Your Words - using Pubnub. It works perfectly. On the Pubnub website there are examples of how to make a chat app (Objective-C and Swift).…
-
0
votes3
answers4206
viewsA: How to update a web page automatically right after an entry into the database? Use Nodejs?
Use the Pubnub. I used it in some projects and it is very fast. There is a Javascript SDK.…
-
1
votes2
answers78
viewsA: Why is my request blocking events?
Use some asynchronous network library, like Alembic. class ProcedAcadViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() self.makeRequest(); } func makeRequest() {…
-
0
votes2
answers223
viewsA: How to feed a tableView from a screen with information from another screen?
Do not use Delegate because you will be creating an unnecessary dependency. senhasSelecionadas is a public variable and ComprarSenhaViewController has a reference to ResumoViewController, then just…
-
1
votes5
answers2115
viewsA: How to make the keyboard disappear when click out of it? Swift
Add the following method to Viewcontroller: override func touchesBegan(touches: NSSet, withEvent event: UIEvent) { super.touchesBegan(touches, withEvent: event) view.endEditing(true) }…
-
1
votes2
answers111
viewsA: Thread in the background when the app is closed
Depending on your goal, Voce could use Silent Notifications. Of the manual Local and Remote Notification Programming Guide The aps Dictionary can also contain the content-available Property. The…
-
0
votes3
answers342
viewsA: JSON integration with Swift
Rafael, in one of our projects, which is a very complex app, we use the Swiftyjson. Its use is as simple as let json = JSON(data: dataFromNetworking) Then Voce picks up the values by subscript: let…
-
0
votes2
answers2482
viewsA: Grunt - node_modules folder outside the project
A tip that might work, but I didn’t test: $ cd <global-modules-path>/node-google-timezone # vai para o diretório global do package $ npm link # cria um link global $ cd…
-
1
votes1
answer166
viewsA: Nodejs + sqlite3: error retrieving information from Select
The COUNT group function does not return an array. If you inspect the return you will check the following JSON: { counter: 0 }. Therefore, modify the line where you print the line count to…
-
0
votes2
answers333
viewsA: Query using Mongoose in Nodejs always returns null even within asynchronous method
This here is gonna work: sessions.findOne({sessionIDtype: sessionID}, function(err, sessionDoc){ ... }); Editing after your comment: How about you do it then: var criteria; if (...) { criteria = {…
-
0
votes2
answers772
viewsA: How to search for a device on an internal network using Javascript and/or Node js
The automatic discovery of network services you experienced in Keynote is probably implemented by Bonjour (mDNS). It is an open-source Apple project and has add-ons in several languages. For Node.js…
-
6
votes1
answer866
viewsA: How to make synchronous queries with Sequelize on Node.js
The "beauty" of the Node is in its asynchronicity. Pass two callback functions to getUserSession, thus: userSession.getUserSession(token, function(err){ res.send(401, "Você deve estar logado para…
-
1
votes1
answer114
viewsA: Facebook Graph returns a different id than what is saved using Passport-facebook
Nickolas, this application of yours was created before or after the introduction of API 2.0? Remember that now the returned ID is the app-scoped ID and no longer the Facebook ID. If so, do the…
-
4
votes1
answer390
viewsA: How to create a loop to send an event in socket.io?
Maybe the setInterval() (English) help you, by using an anonymous function: var show = setInterval(function() { socket.sockets.emit('show', JSON.stringify({imagens : json})) }, 10000); The second…
-
2
votes3
answers17841
viewsA: Importing library in Android Studio
If the library is a JAR do the following: 1) Copy the JAR file to the directory <diretorio do projeto>/libs 2) In Android Studio, in the project structure, enter the folder libs, select the…
-
0
votes4
answers265
viewsA: How to set --no-ri --no-rdoc as default when using Gem install?
Go to the terminal and type: $ which gem This will tell you which directory the Gem executable is in. Open it with an editor. It will probably be something like this: #!/usr/bin/env ruby…
-
3
votes4
answers512
viewsA: Debug applications in Nodejs
I use the Jetbrains IDE’s for Java, Ruby and Node.js (I use the Node plugin in Rubymine). So I usually use the Debugger in the IDE itself.…
-
5
votes5
answers32714
viewsA: Java Library for Brazilian Electronic Invoice (Nfe)
I was interested in your question because some time ago I did an Nfe pilot project using Ruby and the information is really harder to find. Looking at the website of the Secretariat of the Farm of…
-
5
votes9
answers17662
viewsA: Error: R cannot be resolved
This happens often when you have just created a project, which seems to me to be your case, so you can see from the code. So just relax and wait a little while. It turns out that as soon as you…
-
4
votes4
answers805
viewsA: How to use Simpledateformat in concurrent environments?
According to http://www.javacodegeeks.com/2010/07/java-best-practices-dateformat-in.html, use ThreadLocal is what gives greater performance. Analyze the context and see if instantiating objects does…
-
6
votes3
answers2138
viewsA: How to perform unit tests on nodejs
I won’t be answering your question, but there are other testing alternatives for Node.js. If you’re looking for something more TDD-style: the module assert embedded in Node.js nodeunit (which makes…
-
22
votes5
answers2401
views -
50
votes5
answers22775
viewsA: What is the best way to iterate objects on a Hashmap?
I like to wear the bow for because the code gets thinner: for (Map.Entry<String,Integer> pair : myHashMap.entrySet()) { System.out.println(pair.getKey()); System.out.println(pair.getValue());…
-
20
votes10
answers34548
viewsA: What is the difference between the == and === Javascript operators?
When you use the operator == and the types are different, internally Javascript does a conversion to numbers. In this case, false when converted to number becomes 0. In the case of the operator ===,…