Posts by Thiago Yoithi • 709 points
16 posts
-
0
votes4
answers1982
viewsA: How do I validate the radio input of my code?
You need to assign the same name to the radio. As if they were part of the same field. Then you access the value using the ":checked property". Example: $('input[name=sexo]').on('click', function()…
-
1
votes1
answer222
viewsA: Multiple Keys/values in a javascript array
An array is [], an object is {}. I believe what you really want is this format: [ { "property_id": 3 }, { "property_id": 4 }, { "property_id": 5 } ] Would that be from here: pushId(propertyid){…
-
1
votes1
answer99
viewsA: Is it possible to pass text (json) via client-to-client socket with javascript?
It is not possible to pass a client-to-client text with javascript only without a server that acts as a "bridge". What you could do to not have to deal with the server, is to use services such as:…
javascriptanswered Thiago Yoithi 709 -
1
votes1
answer235
viewsA: Socket I.o does not update automatically
In your Node.js code, switch to: app.post('/EnviaTemperatura', function(req, res){ temperatura = req.body.temp; io.sockets.emit("RecebTemp", temperatura); console.log(temperatura);…
-
0
votes2
answers713
viewsA: Problem leaving active link - Angular Routes 2
By default, Angular 2 sets as active any url that at least has the url configured in the routerLinkActive. That is, the "/" URL exists in the "/application". So, Angular 2 puts active on both the…
angularanswered Thiago Yoithi 709 -
1
votes1
answer351
viewsA: Show no 401 (Unauthorized) error on console
When your API returns 401 status (Unauthorized), who handles the red error in the console is the browser and not your application itself, so there is no way not to show. Other than that, everything…
-
4
votes1
answer2455
viewsQ: Rest API and Sessions, how does Login work?
I have always worked with PHP/Mysql and Javascript/jQuery. I have always connected PHP to the direct database, and I use login sessions. I am currently working on a project where I use Angularjs for…
-
2
votes1
answer352
viewsQ: Nginx, prioritize folders instead of "Location /"
I use PHP with the Phalcon framework in my projects and this is the structure. My Nginx is like this: server { listen 80; server_name 123.123.123.123; root /var/www/meusite.com.br; location @site{…
-
12
votes1
answer6417
viewsA: What is the best practice for a "back page" link?
Answer 1: It has this method, but it’s the same as the one you used, and it doesn’t work on some browsers. <a href="javascript: history.go(-1)">Voltar</a> This can solve the…
-
8
votes2
answers184
viewsQ: Have images in the tables where they will be used or table with image repository?
It is good practice to create a table to record all images from a database, or I can create columns that save image information for each specific need? For example, let’s assume that I want to…
-
3
votes1
answer1190
viewsQ: Best practices for storing images in Amazon S3 and saving in Mysql
I’m modeling a database, but I’m in doubt how to deal with this part of saving the image on Amazon S3 and easily referencing in the database. I intend to save the image URL (hosted on Amazon S3) in…
-
4
votes2
answers5680
viewsA: How to authenticate a user in an android app that uses Facebook login
Hello, I’m setting up a database similar to what you want, the only difference is that in my application, the user will be able to log in both by Facebook, by Google or by my app’s own…
-
7
votes2
answers1014
viewsQ: Setting up a database, how do I make this relationship?
I’m assembling the EER diagram of an ERP. Almost all tables have a column called "id_company" that relates to the "Companies" table. This is because the user will be able to manage one or more…
-
1
votes4
answers819
viewsA: Show post with ajax
I built what you want quickly using HTML and jQuery. I didn’t mess with CSS. Otherwise, if you want these data to be saved in the database, you will need to mess with AJAX. In this case, within the…
-
1
votes2
answers556
viewsA: Floating login and login query
As for the first part of your question you can do with something like the one I’ve built now, click "Run code snippet" to see the code in action: (note that I did not mess with any alignments)…
-
4
votes5
answers17262
viewsA: How to use ajax and php to call a function in php?
The generating functionSenha(...) will not run unless you call it from your PHP file. As far as I know, it is not possible to directly call a PHP function by jQuery. In this case, you will make the…