Posts by LF Ziron • 2,185 points
65 posts
-
3
votes2
answers29
viewsA: (Java, Android) Button - Set Click’s limit
Yes, just use the setEnabled(false property); final Button btn = (Button) findViewById(R.id.button); btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) {…
-
0
votes1
answer215
viewsQ: React Native Drag and Drop Listview
I need to implement bizarre functionality in React Native. Here’s the thing, I need to be able to drag and drop to remove an item from one horizontal Listview and add it to another. The big issue is…
-
1
votes2
answers215
viewsA: How to pass the Syntax or Semantics written in the text field, to a Textarea
From what I could see, your mistake was not to have escaped the simple quotes inside your string. If you are using exactly this syntax in the project, you need to define the generate function…
-
1
votes2
answers615
viewsA: Error and Mysql: [ngRepeat:dupes] Duplicates in a Repeater are
It turns out that the property that the angular is using to be the key to its loop, is repeating at some point within its repetition. Try using another key, one you are sure is unique. For this use…
-
1
votes1
answer176
viewsA: Changing html hierarchy using jquery for responsive website
You can manipulate the gift in this case by using the remove() to remove the third place logo and the insertBefore to insert it again. To detect if you are accessing from a mobile screen in your…
-
1
votes1
answer356
viewsA: Anchor Html + Table
If the plugin you are using does not provide the scroll in a smooth way, you can do it manually in jquery. I edited the example you showed to give you a succinct example. For this I used the…
-
2
votes2
answers72
viewsA: How to trigger functions outside the scope of the Plugin?
Just use it as a callback. For this you must pass the function as function itself and not as string, because maybe it may not be known within the scope of your plugin. Exemplifying: $.fn.foo =…
-
3
votes1
answer1134
viewsA: How to run a javascript code from the site url
Well, you can use hashs in your url, which would be given after the # url. If your url is for example http://meusite.com.br/home#serie/test , you can take the test value to use in your function as…
-
2
votes3
answers1008
viewsA: Print variables in Ruby
Use the concatenation character + print variavel1 + " " + variavel2 or you can use this way to interpret variables within a string as well: print "Primeira variavel: #{variavel1} Segunda variavel:…
-
1
votes1
answer335
viewsA: Dynamic links in Ionic, with inAppBrowser
First of all you cannot use onClick directives in this case, otherwise the variables will not be translated by angular. And another, don’t use the window object directly in your links. Create a…
-
4
votes1
answer10433
viewsA: What is the difference between Sorted() and . Sort()?
In Sort you change the list itself, in Sorted you have a value that you can use in a new variable. a = [2,1,3]; a.sort(); b = a; //a e b possuem o valor [1,2,3] a = [2,1,3]; b = sorted(a); //a…
-
2
votes3
answers738
viewsA: Hybrid applications optimize webview?
1 - Cordova Well, it’s not just that. What happens is that the view part of the app runs on top of the webview, but Cordova provides a native integration with the device’s own features. The great…
-
2
votes1
answer286
viewsA: How to make border CSS inherit color?
Pre-processing your CSS Inheriting simply with css would not be possible, because although it is the same color, it is applied in different properties. A solution would be to use a css preprocessor,…
-
3
votes1
answer328
viewsQ: What do these mysterious double brackets mean in javascript?
Say I raise a Promise to javascript: var a = new Promise(function(success, error){ { sucess("Sucesso!"); }) My variable a receives the following properties: Promise {[[PromiseStatus]]: "resolved",…
-
0
votes2
answers263
viewsA: I’m not able to create notifications with the $cordovaLocalNotification plugin using IONIC
The Cordova object is only created when it is tested on a real or emulated device (such as AVD). The same goes for the "device is Undefined", device is a property of the global Window object, which…
-
1
votes1
answer288
viewsA: js script inside php
In onClick, you need to pass the function call and not the reference to it. That is, need to have opening and closing parentheses after the function name "confirmation". function confirmation(){…
-
6
votes3
answers1686
viewsA: Is saving the user ID in COOKIES safe?
Depedende much of the use case As long as the id is not the user’s unique access criterion on the system, there is no problem. Stack Overflow itself displays the user id in the URL, meaning it is…
-
1
votes1
answer667
viewsA: Change background color of jquery multiselect plugin
To change the background color, you can add this to your css: .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content…
-
1
votes3
answers538
viewsA: Average only in typed fields
I don’t advise using jQuery just to do this kind of simple calculation, except if you already use it for other more complex functions. function calcularMediaQLSETES() { var formMedia =…
-
3
votes1
answer1064
viewsA: Is it possible to integrate payments into my system with banking institutions?
Yes, just use a payment gateway. Do a google search, and see which one exists in the market, which most meets your need. They will offer you a library to integrate their api into your system and…
-
1
votes6
answers1578
viewsA: Is it good practice to use constructors (or magic methods) in interfaces?
I agree on some points and disagree on others in the answers above. It depends a lot on the case that was used, if for example all the classes that are implementing the interface need 2 parameters…
-
0
votes2
answers105
viewsA: How to leave the Google map like this?
The maps allow a very wide customization. I don’t necessarily know how you want to display to tell you exactly what properties to change. I’ll leave one here well explained tutorial in Portuguese,…
-
5
votes0
answers93
viewsQ: What is the difference between the keyword Let and var in Javascript?
I was studying about Redux, and I realized that in the code there were many variables being declared preceded by Let, instead of var. I was in doubt, what is the difference between the two…
javascriptasked LF Ziron 2,185 -
1
votes1
answer416
viewsA: how to insert a variable that brings an array into the database?
Well, in a relational database it is not possible to insert the array type into a table. You will have to insert as a string, what can be done is to choose a string format that covers vectors, such…
-
9
votes1
answer640
viewsA: What is the role and responsibility of HTML, CSS and Javascript technologies in creating the front end?
Briefly: HTML - Configuration of elements CSS - Style display of elements JS - Element logic and dynamics In a practical example, if I want to have a blue square that has a seconds count from 1 to…
-
1
votes1
answer151
viewsA: Sync files generated by Cordova in IOS app with cloud servers
You can do it using the Dropbox api yourself. I advise you to create your own api, because you will need to provide sensitive data to access the Dropbox, and it is unsafe to do so by the customer,…
-
1
votes2
answers726
views -
1
votes1
answer607
viewsA: Create IOS directories and files using IONIC framework
It is possible using the window.requestFileSystem method, which is native to Cordova. Don’t forget to add the read/write permission to your configuration file. In the case of Ios, edit your…
-
0
votes2
answers381
viewsA: Event button Fileupload with Submit Gmail style
You can use the event change, in javascript. Then you send the form when the file input triggers this event. Example: file = document.getElementById("file"); form = document.getElementById("form");…
-
-1
votes3
answers910
viewsA: Close the Bootstrap dropdown by clicking on another dropdown in the same menu?
As the removeClass parameter you must pass the opened string. If you remove the open class, it will get stuck. Follow the fiddle: http://jsfiddle.net/1Lgkbget/6/ (I changed our friend above)…
-
0
votes1
answer40
viewsA: Emailcomposer Cordova no Angularjs
First you have to install it, the way plugins are installed by default on Cordova: cordova plugin add https://github.com/katzer/cordova-plugin-email-composer.git Then you check in your code if…
-
1
votes2
answers1549
viewsA: Pass AJAX variable to php
Send the data using an object of type Xmlhttprequest. I made an example by passing only the username. You can take this data in php using $_POST['username']; Follow the example in javascript:…
-
0
votes1
answer72
viewsA: @media (max-width: 320px) does not work on Android
Well, it should work, in my tests I was able to use it that way. This solution is not ideal by web standards, but use this script to see if the problem really is css: var ua =…
-
0
votes2
answers3711
viewsA: How to store Credit Card data securely?
According to a example of microsoft itself (I don’t know if this is the best example for quoting rsrs). They simply don’t keep the password, but keep the other card data unencrypted, on the basis…
-
2
votes4
answers181
viewsA: Unidentified error in Jquery
Well, if it works on a Linux server and not on a Windows server, it’s likely that the problem is charset. Try deleting this part of the code and manually readjusting it in a different editor in…
-
8
votes4
answers181
viewsA: Unidentified error in Jquery
Javascript is line break sensitive, you cannot break lines in the middle of a string delimited by quotation marks, unless you finish the line with the character \, which will ignore the…
-
1
votes1
answer4068
viewsA: Creating a php CRAWLER
It is necessary php? So, first it is necessary to understand your need to see if we really need to make use of php in this case, since a Crawler works upon requests per client. There is a Crawler…
-
9
votes1
answer3054
viewsA: Bower - What is, what is its utility and how to use it?
It is a package manager, which is to install or uninstall packages. You can create a list of dependencies that will be used in your project in a file .bowerrc when installing in any environment, the…
-
1
votes1
answer42
viewsA: Upload the entire site when logging in
You may use the application cache to store the files that are commonly accessed on your pages, such as images, style files, and scripts. This will greatly decrease what you consider "dead time". I…
-
3
votes2
answers127
viewsA: Editorconfig Plugin - What’s it for?
It serves to define the editing patterns of your project. A great example of this is how your code is indentation. Let’s illustrate with a case where you use an editor that inserts 4 characters to…
-
2
votes3
answers3498
viewsA: I wish I had more than one bootstrap modal on the same page
The data-target attribute identifies the element in which you find the modal you want to open. Just change the data-target to point out the id of another modal you want. I edited your fiddle to…
-
1
votes3
answers965
viewsA: How to put a title in the angular-Chart caption
Add legend="false" in the canvas being generated Chart, inside the html file.
-
0
votes1
answer65
viewsA: I can’t make fluid layout on the menu
It is necessary that the width of the elements is static, if you use percentage, the items will decrease to adapt to the size of the window. Only the ul.menuTopo should have the width as a…
-
0
votes1
answer302
viewsA: Friends System with PHP
The form you cited is the most efficient one using a relational database. If you have problems with database scalability, hire a service to do it for you in an automated way. A much used and that I…
-
47
votes1
answer5885
views -
2
votes2
answers949
viewsA: How to change a color based on scroll position
You can use the jQuery $.scroll event and scrollTop property to find out where the bar is and use this value to calculate a color of your choice. I made that example for you:…
-
6
votes1
answer2727
viewsA: How does callback work in PHP?
A callback is nothing more than the name or reference to a function that is passed as a parameter to another function, being invoked when convenient. In php we can do this using the call_user_func…
-
1
votes2
answers1706
viewsA: Capture user name logged into machine via Web Application
It is not possible, since javascript does not have direct access to the operating system. It would only be possible if you have a server-side script running on your client, and by javascript you…
-
4
votes3
answers161
viewsA: Are objects similar to arrays?
No, but they have some similarities. Although you can access properties in the same way, the methods each has are different. Example: a = {}; b = []; console.log(a.forEach); //undefined…
-
0
votes1
answer284
views