Posts by Gabriel Rodrigues • 15,969 points
440 posts
-
2
votes1
answer624
viewsQ: How does data-Binding work in Angularjs?
I looked for something that explains to me how the magic of data-Binding happens but I did not find. My question is how data is propagated from view to model, how it manages to keep track of changes…
-
4
votes4
answers47097
viewsA: Take select value with jquery
In this case you can pick with val() or text() just add option:Selected to your selector: var itemSelecionado = $("#QtdAdomodacaoDuplo option:selected"); document.write(itemSelecionado.text() + '…
jqueryanswered Gabriel Rodrigues 15,969 -
3
votes3
answers2208
viewsA: Aligns navbar bootstrap text vertically
With the use of Grid bootstrap to make this menu without additional css. Step by step: 1º - I added a container to center 2° - I added 1 row divided in 4|8, the 4 will have the logo of 8 the menus.…
cssanswered Gabriel Rodrigues 15,969 -
2
votes3
answers2082
viewsA: After "apt-get dist-upgrade" command, PHP 7 was installed. How to go back to 5?
Since it is Ubuntu you can download your php and do the installation of it, in case it would be like this: Removing your current php: apt-get remove --purge yourphppackage Installing the version you…
-
0
votes2
answers424
viewsA: Pass Mysql <option> values
Since you use jQuery use find to find the selected option like this: var itemSelecionado = $('select').find(":selected"); document.write(" <br> Texto do Item Selecionado :" +…
-
14
votes3
answers14607
viewsQ: How to identify which city the user is in?
On some shopping/service sites an identification or suggestion is made of the city the user is in order to show only the products/services specific to the user’s city. Detail, this will be used only…
-
2
votes1
answer330
viewsA: Javascript script adaptation 'show more'
For large amounts of content this will be a serious problem, the advisable and make pagination of your posts, that is, instead of loading the existing "200 posts" in your database and letting all…
-
3
votes6
answers1481
viewsA: Log system losing data, how to use Threads?
I have long needed a solution to something similar to your problem, not so big as but good looking! The solution however was to use several Thread to solve, as I am not Delphi developer I had to buy…
-
3
votes1
answer5083
viewsA: How to pause the execution for a time (similar to a "Wait" or "Sleep")?
As it was not specified if Voce logs the account for an ajax or an api I will leave a simple solution, but not the most advisable, Voce can use setTimeout to determine a time to run a function x,…
javascriptanswered Gabriel Rodrigues 15,969 -
4
votes3
answers524
viewsA: What is Front-end and Back-end?
Two very common terms in the web and front community that Voce may refer to client-side and back end to server-side. Some languages like css,html and js only need the client’s browser to work. while…
-
13
votes2
answers2975
viewsQ: Is it possible to create an input uppercase and keep the placeholder in lowercase only in CSS?
How can I leave my placeholder in lowercase and my text in uppercase in css? I’ve tried to: input { text-transform: uppercase; } <input type="text" placeholder="usuário">…
cssasked Gabriel Rodrigues 15,969 -
1
votes2
answers276
viewsA: How to load img in jquery
Just place inside the src of an img: var linkImagem = 'http://lorempixel.com/image_output/abstract-q-g-640-480-4.jpg'; $("body").append(" <img src=" + linkImagem + " alt='Exemplo'> ");…
-
25
votes2
answers1684
viewsQ: How does namespaces work in PHP?
The namespaces were implemented from PHP version 5.3.0 as a form of "encapsulating items". I never really understood his real concept, and I always get confused with autoload of classes. Could…
-
0
votes2
answers835
viewsA: How not to repeat random numbers?
I’m not sure how $timeout works at the angle, if it would be the pure js setinterval, but I’ll give you a solution that does not allow repeating the number of banners: var banners = ["Fernando",…
-
7
votes2
answers7016
viewsA: remove element css
Simple, use : removeClass(): $(".titulo").removeClass(); // Remove todos os css da classe $("#titulo2").removeAttr('style'); // Remove todos css inline $("#titulo3").removeAttr('id'); // Remove…
-
2
votes1
answer108
viewsQ: How do I activate my iTunnes Connect?
I have two Agent (Total Access) and another Development Administrator accounts. When I try to connect to iTunnes Connect with an agent user no My Apps option appears. In this way: Appears like this…
-
7
votes4
answers4072
viewsA: Because of user experience, should confirmation buttons be left or right?
What are the best practices in button alignment ? This various issue of layout for layout but you can notice that the modal buttons are aligned on the right, the buttons should be organized in order…
uxanswered Gabriel Rodrigues 15,969 -
1
votes1
answer85
viewsQ: How to make a Reusavel Tableview?
On 90% of my screens I will need a tableview to fill the content, how can I make this tableview reusable ? I say how I can simplify the insertion of this table in several views, my code is as…
-
0
votes6
answers710
viewsA: On Click only works once
What’s all this for? use toggle()! $('li[name=music]').click(function() { $(this).find('div').toggle(); }); #music1, #music2, #music3 { display: none; text-align: center; padding: 1%;…
-
4
votes1
answer2059
viewsQ: What is the best way to capture keyboard shortcuts?
Currently I use the keypress approach to capture the Alt pressed and the key that the user wants, however using the Pressed alt can cause compatibility problems in some browsers. For example,…
-
2
votes2
answers229
viewsA: Create javascript-mounted title attribute in <td>
What I need is to create a title attribute in this <td>. How I do? You can do it like this: $('table tbody tr td').each(function() { var td = $(this); var texto = td.text(); td.attr('title',…
-
3
votes3
answers3064
viewsA: Count of occurrences in a String
I created a function that returns the maximum number of occurrences of a character in a string and called count(), after this I declared a go through the whole string and taking the maximum of…
javascriptanswered Gabriel Rodrigues 15,969 -
0
votes1
answer1167
viewsA: Handle JSON data coming from a jQuery datepicker request with ajax
Just replace the jsonResposta for data do ajax and watch it work, it’s very simple, I just used a for to go through the object and create the table. Detail, if you use json_encode in php no need to…
-
8
votes2
answers3238
viewsA: Call Modal and Tooltip on the same data-toggle
Leave the same modal structure, include only a new data-type which will be your data-toogle, in my example, I used data-tt="tooltip" now just add the title and call no js. Example:…
-
2
votes3
answers9055
viewsA: How to change the text of a button when submitting a form?
You can change with the text method so: $("#btn").text("Carregando..."); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> <button type="btn"…
-
4
votes3
answers1311
viewsA: How to place a upload image within a Javascript function?
You can do it like this: var loader = document.getElementById('loader'); loader.style.display = "block"; // Mostra o loader, utilize quando a função começar setInterval(function() {…
-
2
votes3
answers795
viewsA: PHP database text for html
If these double quotes are not visible in your html the explanation of them appears in your inspector element is simple: Text organization. As quoted in this reply : SOEN Original This is just the…
-
1
votes1
answer568
viewsA: How to schedule an event on datepicker?
Come on, first thing, remove the semicolon causing syntax error [Line 12]. Now let’s have your doubts: How do I register a datepicker value? When you talk about registration gets a little broad, it…
-
1
votes3
answers2192
viewsA: How to work with multi tenancy architecture?
Using the same database for all customers or building a new database for each new customer? What You Should Analyze: 1 - How many potential users you expect to reach ? It’s hard to estimate the…
-
4
votes2
answers62
viewsA: Tab does not come open
It’s quite simple, what you need to do is add the active class in your li: Example: <ul id="myTabs" class="nav nav-tabs"> <li class="active"><a data-toggle="tab"…
twitter-bootstrapanswered Gabriel Rodrigues 15,969 -
1
votes2
answers2282
viewsA: How to put side menus on Ionic?
From what I could understand you are not able to put the side menu left. well if this is it even I understood your solution would be something like: <ion-side-menus> <!-- Left menu -->…
ionicanswered Gabriel Rodrigues 15,969 -
5
votes2
answers1000
viewsA: How to create templates with Javascript?
With Handlebars you can create templates in js with ease! See an example of your syntax/Usage: <div class="entry"> <h1>{{title}}</h1> <div class="body"> {{body}} </div>…
javascriptanswered Gabriel Rodrigues 15,969 -
6
votes2
answers788
viewsQ: Google Speech API compatibility
Performing some tests on Google Speech API I identified that this feature only has support in Chrome and Opera browsers as per Can I use. Detail the main function that is used by the API is Speech…
-
1
votes2
answers997
viewsQ: How to customize Uitableview?
I’m populating a UITableView with data that I pick up on a Webservice JSON. These data are texts that I need to format. It’s coming this way: My Viewcontroller: // // ViewController.swift //…
-
2
votes3
answers407
viewsA: Keyup allow it to contain only one dot between input characters
I created a function called validaPontos() that will return the amount of dots that are in the field. after this compare only if it is greater than or equal to two and remove the character. Example:…
-
0
votes2
answers1862
viewsA: How to count the time the user takes on the page?
You can show the time counter in any div and then pick up the value in the click event or when to send the data to php. Example: var startTime; function display() { var endTime = new Date(); var…
-
19
votes1
answer403
viewsQ: How does Symbol work on ES6?
In the new Javascript specification Ecmascript (ES6) a new primitive type was created called Symbol() what use it is?…
-
1
votes2
answers268
viewsA: Space Lock with REGEX
The problem is the space of your regex. should be like this : RegExp("^[0-9]+$"). Example: $('#rg').on('keypress', function() { var regex = new RegExp("^[0-9]+$"); var _this = this; // Curta pausa…
-
2
votes4
answers1837
viewsA: How to use Json in an html
You need to access each input of your json object. you can do this with a simple for. then just make an innerHTML when finished, it is recommended for performance reasons not to manipulate the DOM…
-
4
votes7
answers4205
viewsA: Count elements on the screen
Your best solution without doubt will be with the .length and how it’s such a simple thing it doesn’t even need the jquery. I would only change one question, the selector, in some tests in the…
-
2
votes2
answers147
viewsQ: Popular View with JSON
I use a library called Alamofire-Swiftyjson to make a request JSON. Call example: Alamofire.request(.GET, "http://httpbin.org/get", parameters: ["foo": "bar"]) .responseSwiftyJSON({ (request,…
-
1
votes1
answer475
viewsA: Text Overlay with Doubt Bootstrap
You can do it like this: .image { position: relative; width: 100%; } h2 { position: absolute; top: 200px; left: 0; width: 100%; } h2 span { color: white; font: bold 24px/45px Helvetica, Sans-Serif;…
-
25
votes2
answers1645
viewsQ: What are the structural and syntax differences between Sass, Less and Stylus?
Nowadays it’s hard to see people writing "old-fashioned CSS" because of pre-processors that make it easy to write by removing code repeats, and syntax simplification. I would like to understand what…
-
1
votes1
answer49
viewsA: How to make the code light where it’s in orange
You can make this effect with the hover. Example: li { width: 70px; list-style-type: none; text-align: center; } li:hover { background-color: orange; color: white; } <ul>…
cssanswered Gabriel Rodrigues 15,969 -
1
votes4
answers118
viewsA: Working with Array and selecting a specific Input
Thus: var input = $("input"); $('#opcoes').change(function() { var index = $(this)[0].selectedIndex; input.hide(); $(input[index]).show(); input[index].value = this.value; }); <script…
-
2
votes2
answers6021
viewsA: Validating Email with Jquery and Ajax
Well, if you just need to validate the email you can do so: var email = document.getElementById('email'); if (validaEmail(email.value)) { document.write('valido.'); // Chama o Ajax e realiza ações…
-
11
votes2
answers23371
viewsA: How does the BLOB field work?
What is a blob field? The blob (Binary Large Object - large binary object) is a field created for storing any type of information in binary format, within a table of a database. Mysql works with…
-
1
votes2
answers78
viewsQ: Why is my request blocking events?
I implemented a json http request that works well, but it prevents the user from clicking by being able to access the information only when it is downloaded. Example: I have a Uitableview with 3…
-
4
votes1
answer8851
viewsA: How to center a Modal Box Horizontally and Vertically with CSS3? Is it possible?
You can do it like this: .modal { text-align: center; } @media screen and (min-width: 768px) { .modal:before { display: inline-block; vertical-align: middle; content: " "; height: 100%; } }…
-
1
votes1
answer290
viewsQ: How to use an imgLoad before loading Webview
In swift I can load a webView by doing the following: 1 - Add Uiwebview to my View. 2 - I create an Outlet called webView in my viewcontroller.Swift 3 - Insert the following code into my function…