Posts by Jan Cássio • 951 points
53 posts
-
1
votes1
answer37
viewsA: The page goes back to the top to each <a> element pressed, how to prevent?
When you have an element <a> with the attribute href equal to #, means that it will play the page p/the top, whenever q that element is clicked. And why does that happen? You see, the element…
-
2
votes2
answers829
viewsA: What is Svelte JS?
Despite Gleidson Henrique’s beautiful response, I’d like to add a few more points based on your questions: What is Svelte JS? It is another framework to dispute the web component market? Svelte nay…
-
0
votes2
answers110
viewsA: Trigger two functions with separate onscroll events - JS
If you use the method addEventListener, you can add more than one method to run to each event. window.addEventListener('scroll', method1); window.addEventListener('scroll', method2); To cancel/stop…
-
1
votes1
answer987
viewsA: React Router: Use more files with routes
The problem is how the nested routes are organized. You can do what you want as follows import React from 'react'; import { Switch, Route } from 'react-router-dom'; import Estoque from './Estoque';…
-
1
votes1
answer239
viewsA: Is it possible to use your phone camera in a Web App with React?
Your doubt should actually be, it is possible to use the camera of the mobile phone in a web application? The answer is yes but only in a few browsers. Still with certain limitations. Remember that…
-
1
votes1
answer121
viewsA: Is it possible to fire two types of action at Redux at the same time?
Speaking of Redux, no matter how hard you try, you’ll only be able to fire one action at a time, because in javascript, the instructions are executed one at a time and even if you use Redux-Saga,…
-
0
votes2
answers131
viewsA: Delete element from array
I assume you already have the element index you want to remove, because of this code snippet here: if (selecionados[valor] == valor) { So you just need to give one splice in the array passing this…
-
0
votes1
answer265
viewsA: Send Object Array to Bulkcreate
I will try to translate for you quickly what arrived in the server, this here: { '{"id":0,"idusuario":1,"idprofissional":1,"ativo":1}, {"id":0,"idusuario":1,"idprofissional":2,"ativo":1}': '' } It…
-
0
votes1
answer1645
viewsA: The "npm run build" command is not working
This happens because when you run your index.html prefixed file://, it will try to load the dependencies relative to this path and as it has no application in http:// serving these Aces, you won’t…
-
0
votes2
answers59
viewsA: Set loading display time
Ideally you do not increase the loading time, this will cause a false impression that the operation that the user has just fired, is slow. Keep in mind ALWAYS, the faster the better. But if you…
-
0
votes3
answers1821
viewsA: Basic Doubt Javascript: How to change an object attribute?
You’re on the right track, the method map serves for you to access the indexes of an array and turn them into another value. In your case, the approach to do it is quite simple: const lista = […
javascriptanswered Jan Cássio 951 -
1
votes1
answer1367
viewsA: Installation of dependencies on npm start but not finish
The module babel was replaced by babel-cli, so you should install Babel using this command: npm install --save babel-cli or npm i -S babel-cli…
-
1
votes1
answer229
viewsA: How to set a value for a span with React
Just like you already use state to display the firstName, vc must use the state to return the p/ error to be displayed on the screen. How you created a property errors within its scope this, the…
-
0
votes1
answer176
viewsA: Is there any way to make a component listen to a React Native function?
You must assign a value from state of your component or a property that is updated externally, because you need the method render of your component is executed so that the change appears on the…
-
1
votes1
answer226
viewsA: Make React components available as dependency
You need to compile your lib before using it, this is the best way to reuse your components in another project. Knowing that, now the question that remains is, how to do? If you are using Webpack,…
-
2
votes1
answer2569
viewsA: Get Response from an API that returns error 500
Very simply, you’ll never make it, understand why. The reason is, errors with code 500 to 599, are usually associated with errors in the server application, which failed to operate a request. What…
-
0
votes1
answer186
viewsA: How to assemble a dictionary from two arrays, one from keys and the other from Swift values
It would be more convenient, you create a structured data first to compose this your table, because so it is easy for you to structure and edit your data when necessary. Then, whenever you go to use…
-
9
votes5
answers14272
viewsA: Add all the latest changes to the commit in git
You can add multiple files to git through the interactive prompt git add -i At the interactive prompt you have two options that are most commonly used that are: update (2 or u): for you to choose…
gitanswered Jan Cássio 951 -
2
votes2
answers194
viewsA: How to make Uitextfield track keyboard level when typing
This is very simple to do and common good too. The idea of this example that I will pass is the following, get the time that the keyboard takes to climb or descend and get the height that it will…
-
2
votes1
answer29
viewsA: Override returns secondary Viewcontroller error in Swift2
Considering that you have an instance of a UITableView in his ViewController, you need to do three things: 1. To assign a delegate UITableView: // considerando o ViewController onde tableView foi…
-
6
votes2
answers122
viewsA: Run statement only if 5 conditions are true. Javascript
The answer to your question is very simple, however it is more convenient you understand the concepts first so you can solve this and other problems with conditions in the future using Javascript…
javascriptanswered Jan Cássio 951 -
1
votes1
answer487
viewsA: Android - Asynctask and Progressdialog
The less you keep the user interface busy, the better. Honestly, I don’t see this as a problem but I agree that this is going to be aesthetically awkward. In this case, you will need to remove the…
-
0
votes1
answer109
viewsA: What would be the possible solution to this problem with Facebookappid?
You are probably using an invalid or canceled Appid. You need to go to the website of Facebook developers, check if the respective app you created within the portal, for your iOS app, has the same…
-
0
votes1
answer74
viewsA: Publish on facebook direct - iOS9
Yes it is possible, you need to use a class called FBSDKShareDialog. Reference here…
-
1
votes1
answer240
viewsA: Create class with common material-ui and React Imports
It’s possible but in a way, it’s not recommended, I’ll explain later why, but what you need is something like this: Put this in a file like components/table/index.js, so you can import it just by…
reactanswered Jan Cássio 951 -
1
votes1
answer237
viewsA: I cannot catch error using Try-Catch on Swift
Look at, try catch does not capture only pointers of NSError, they serve to capture exceptions in accordance with the protocol ErrorType. How will you know when it is possible to capture an…
-
1
votes1
answer592
viewsA: Click on a Google Map API marker and open a page
What you need to do is listen to the event click of a Marker marker.addListener('click', function() { // coloque aqui o que você quer fazer quando clicar no marker })}…
-
2
votes3
answers1005
viewsA: How to convert animation in Canvas/JS to SVG?
I’m gonna give you a little more theoretical background from experience, maybe it’ll help you, come on. From what I understand, you don’t exactly want to convert an animation that is being rendered…
-
0
votes1
answer151
viewsA: Upload photos IOS Swift
You don’t need (and nor should), convert Base64 images to send images to a remote server. Should not, because Base64 is not a compression algorithm, it does the opposite, it increases (and quite)…
-
0
votes1
answer49
viewsA: How to send messages from a client application (Dash.js) to an Openflow Switch
From what I understand, the AbrController has a method that is called by the player to determine what is the size of the band, internally it makes the calculation and returns a Promise. In this…
-
0
votes2
answers102
viewsA: Push notification via an array
I am not an expert in PHP but apparently this logic is right. For you to make the shot for several, you will have to take the value of $deviceToken which is hardcoded and assigns it through…
-
1
votes1
answer28
viewsA: Afnetworkreachabilitystatus with inconsistent values when reestablishing connection
You’re talking about Restkit or Afnetworking? Well, let’s have doubts. SCNetworkReachability serves for you to monitor your network status, it can’t tell you if a host is online or offline, but it…
-
1
votes1
answer115
viewsA: Is it possible to leave it running a Youtube embed in the background on iOS?
Is not possible. The reason is, iOS doesn’t allow you to run video, or anything else related to the interface, while your app is in the background. iOS allows you to run audio tracks in the…
-
1
votes1
answer158
viewsA: How to perform file configuration for many Targets?
To answer your question, I will use a situation that happened to me and worked very well in the end, although it seems a little laborious, then it becomes very simple. Let’s imagine the following…
-
1
votes1
answer43
viewsA: Error creating Tabbarcontroller at runtime
It is not recommended to push a UITabBarController in your app from a UINavigationViewController but yes, you can technically do it. The simplest way to do what you want is this: // Construa seu tab…
-
0
votes1
answer99
viewsA: Resizing in iOS 8
From what I understand, you are using constraints layout in your Tree view, I just found it kind of weird that you use frame for a specific view. After you popular any view (this includes…
-
0
votes1
answer117
viewsA: Identify that an App is entering the background
Actually your code for a detail is wrong. Realize that the method applicationDidEnterBackground: has an argument and just like in Objective-C, from the moment your method has arguments, you must…
-
2
votes1
answer693
viewsA: How to test Swift connection
The best solution is not to test but to wait for the error to make a decision. Testing if the user has a connection does not mean that after the test, your decision making will be correct, because…
-
2
votes2
answers1041
viewsA: App rejected because of Advertising Identifier (IDFA)
I’ve had a problem like this because of Google Analytics, if that’s your case, you need to remove Iad.framework and libAdIdAccess. your project, you must keep libGoogleAnalyticsServices. a for GA to…
iosanswered Jan Cássio 951 -
1
votes1
answer60
viewsA: Is there a Pattern design for iOS to consume data from a web-service?
Short answer: No. Long answer: You have several ways to do this, there are two frameworks that help a lot in client vs server integration on iOS. https://github.com/AFNetworking/AFNetworking…
-
1
votes1
answer63
viewsA: Restkit performance with Afnetworking
Everything indicates that it is a network problem but even for a 3G connection, it is a long time to get data. I made a very simple benchmark, the minimum time for your service to respond was 511ms…
-
1
votes2
answers51
viewsA: Optimize Nspredicate with Magicalrecord
Actually the problem is not the NSPredicate, this type of object was not made to optimize the performance of your queries, it is a convenience for you to write queries more say "readable". The…
-
1
votes2
answers171
viewsA: Make arc4random() not repeat last number
The problem with arc4random() is that it does not generate the numbers with the same probability. I imagine you must be using arc4random() this way: arc4random() % number; Beneath the cloths,…
-
1
votes1
answer82
viewsA: Designer Pattern for Objective-C
There is an excellent online reference on Objective-C design using iOS as a platform: http://www.raywenderlich.com/46988/ios-design-patterns Apple already has one initial guide as well fast to read,…
-
1
votes1
answer63
viewsA: Ping with Objective-C
The best and most sophisticated way for you to test to see if a host is accessible on iOS is by using a concept called Reachability. Reachability checks whether the device "reaches" the destination…
-
1
votes3
answers121
viewsA: Waiting for remote audio extraction in Java
You can keep communication active between two points (client and server), through sockets, in your case a simpler and cheaper solution to implement works just as well. Thinking in a simple way, you…
-
2
votes2
answers3305
viewsA: How to search images in Google with Javascript?
My suggestion is to look for a specific service for image search and the best I know is Flickr. In addition to the excellent API, there is a huge image base available. This service for example, is…
-
2
votes3
answers246
viewsA: Transporting data between Appdelegate and Viewcontroller
There is already a solution ready in iOS itself for this problem called State Preservation and Restoration And here a good tutorial on the subject:…
-
1
votes1
answer60
viewsA: How to implement Google Analytics Gaitrackedviewcontroller for iOS together with Uitableviewcontroller <Nsxmlparserdelegate>?
The GAITrackerViewController, is nothing more than a "convenience" for the developer not to waste time tracking the Screen View type. I really think it’s silly to extend the…
-
0
votes2
answers498
viewsA: View navbar only when user scrolls up on iOS
My guess is that you should not use the event touchmove, since Safari will only execute the code "after" the last step of the viewport scroll. In the video, it is quite evident that, so you can try…