Posts by Gabriel Gonçalves • 373 points
11 posts
-
2
votes2
answers2126
viewsA: Access a function’s variable/parameter within another function
There are cases where it is necessary to access the scope of internal functions within Closure. And this is a possibility that javascript allows, because it has no closed scope. But it is good to be…
-
3
votes1
answer2704
viewsA: Android - How to set a selected item from a Spinner to a string?
The class Spinner does not have the method setText. For this you can use the method setSelection(int index). For example, set selection to SP: spinner.setSelection(adapter.getPosition("SP"))…
-
1
votes1
answer567
viewsA: Placing a dynamic Youtube video in an <iframe> (Asp.net)
Is this variable server-side or client-side? In these cases you have two solutions: Example 1: use the src attribute of the iframe. // Captura elementos iframe, pode utilizar o método getElementById…
-
1
votes2
answers282
viewsA: Filter string REGEX C#
Follow an example that returns any character between double quotes or apostrophe, within the value attribute. value=['"](.*?)['"]
-
1
votes1
answer720
viewsA: Add days to a date in Edittext
Use the method get of Calendar to return the information of the desired fields. String datastr = inicio.getText().toString(); SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); Date…
androidanswered Gabriel Gonçalves 373 -
5
votes2
answers3351
viewsA: How do I create a Checkbox using the Html.Checkboxfor Helper for a Nullable field?
It is worth taking a look at Editortemplates from Asp.NET MVC. They have an implementation Coc (Convention over Configuration) standard. To configure you can create a template in: Views Shared…
-
0
votes2
answers1696
viewsA: Function Onunload Javascript
If you want to display alert before the User leaves the page, use onbeforeunload. window.onbeforeunload = close; function close(){ return "Não vá embora, inscreva-se..."; } <body> <input…
javascriptanswered Gabriel Gonçalves 373 -
2
votes3
answers2577
viewsA: jQuery, block multiple clicks on link
You need to implement a return false in his event of click $(document).ready(function(){ var count = 0; $("a").click(function (evt) { count++; if ( count > 1) { // Desabilita cursor…
jqueryanswered Gabriel Gonçalves 373 -
3
votes1
answer155
viewsA: Data formatting with Onchange Javascript
Here is an example using the plugin https://igorescobar.github.io/jQuery-Mask-Plugin/ Note: Input date is not supported by all browsers ( http://caniuse.com/#search=date )…
javascriptanswered Gabriel Gonçalves 373 -
2
votes2
answers1185
viewsA: What’s a Seeder for?
Seed is the concept of "feeding" your application with test data. In Laravel, Seeders classes are responsible for entering test data into your application.
-
4
votes3
answers113
viewsA: How to implement custom features in a model on . NET?
To do this, you can create a Viewmodels project in your application, and add a Metadata that associates to your Entity Model. Example: namespace E_Learning.ViewModels {…