Posts by MoshMage • 1,789 points
81 posts
-
2
votes1
answer7197
viewsA: How to download a bitbucket project by git
How to git-clone a project: git clone remote-url-do-repo cd nome-do-projecto git fetch git checkout master Step One clones the project into your machine, into a folder with the project name, from…
-
3
votes2
answers2945
viewsA: Popular a table with form data in Angularjs
Okay. You have some things wrong. First of all, here’s the code working. One. you’re setting your controller twice. the first in myapp.controller('controller', function reset($scope){ and a second…
-
0
votes1
answer847
viewsA: Javafx - button-click event, inside a table, does not work
If you add this statement to your configAutocomplete() $('#tabNomes').on('click','button',function(){ var id = $(this).attr('data-id'); if (id) selecionarNome(id); else return false; }); And change…
-
0
votes1
answer91
viewsA: Javascript toggle or if/Else on Adobe Edge Animate
Unfortunately, I can’t test this code because I can’t make a jsfiddle to return the images you’re using on your server. However, this script should work: Symbol.bindElementAction(compId, symbolName,…
-
3
votes2
answers536
viewsA: Using Animate() jquery to animate the place change in a puzzle
For your code to work, yours .pecas have to be positioned in absolute from the beginning, otherwise when you change the position of the relative for absolute he ... does strange things, as you see.…
-
1
votes2
answers246
viewsA: How to add cloned events, right after cloning
you can use novoCampo = $("div.tabelasDuplicar:first").clone(true); (notice the true) clone(true) will also clone the events that this div has binded; However, you will first have to have a…
javascriptanswered MoshMage 1,789 -
1
votes3
answers272
viewsA: is_numeric does not work with decimal separator ,
Joins the number_format() with the is_numeric - you can then use the number_format with arguments to make it the format you want. example $number = '1,2'; echo is_numeric(number_format($number));…
-
5
votes1
answer650
viewsA: Javascript with ajax, function return. Why doesn’t it work?
This happens due to "racing conditions", since ajax is by default the calls of Ajax do not stop a script; that is to say: function showEditButtons() { if ( verUserPermissions(8) === true )** {…
-
0
votes2
answers57
viewsA: Wrong loop Avascript
each is an iteration to the contents of a list; in this case, an iteration to what is within form_data - that you’re talking about three things: status, amount and remove-row; well, a each what it…
javascriptanswered MoshMage 1,789 -
2
votes3
answers857
viewsA: Delete Confirmation Prompt with Javascript and ASP
function cConfirm(str, link) { if (window.confirm(str)) { window.location.href = link; } else { // código que queres executar caso sepra pessionado CANCEL } } Then instead of calling directly…
javascriptanswered MoshMage 1,789 -
0
votes1
answer75
viewsA: Problems with the login system
Your html was horrific, but according to the error that PHP is saying, something in the process of POST is not happening according to what you are waiting for. You might know if $_POST['login']…
-
2
votes2
answers241
viewsA: Why does Steam api refuse Angular calls?
To solve this problem you have to use a server as "proxy". That is: For this request to work, the same has to be done from a server and not from a browser. I give an example of PHP because it is the…
-
4
votes2
answers88
viewsA: How do I edit the width of a class using Angularjs?
one of the correct ways to do this is to give the correct width to a new class, widthClass (for example) and then make a ng-class. widthClass { width: 9000px } <div ng-class="'widthClass':…
-
6
votes1
answer737
viewsA: How to detect the internet connection via javascript?
navigator.onLine works for real; however "online" does not refer to an internet connection, but any connection. If the user is connected to a VPN, but this VPN has no internet - navigator.onLine…
javascriptanswered MoshMage 1,789 -
3
votes1
answer1005
viewsA: How to describe the database of a chat with multiple people
Or so: Table: | Channel | who | message | | #uno | [nick1, nick2, nick3] | Olá | Or: | sender | receiver | message | | nick1 | [nick2, nick3, nick 4] | Olá | Or else | id | Channel | who | | 0 |…
-
1
votes2
answers296
viewsA: Node generating Json
To read a text file and make it an object, in Nodejs, you have to use the fs (filesystem) and the JSON.parse(); var fs = require('fs'); var object; object = JSON.parse(fs.readFile('ficheiro.txt',…
-
1
votes2
answers395
viewsA: How to extract only 1 image from Json?
I would say a simple data[N] (where N is a number) will remove the part you need. Either this or data.imagens[N]. But since I don’t know how the server is responding to that query (aka we don’t see…
-
3
votes2
answers3101
viewsA: What does "region above the fold" mean?
"Above the fold" is the content that goes on display without you having to do it scroll down to the mouse; "fold" ("fold") is the name given to the content that appears when you do scroll down…
-
3
votes2
answers6293
viewsA: How to properly deploy the user after a downtime?
You’ll have to do something like this: if (empty($_SESSION)) session_start(); if (empty($_SESSION['lastAccess'])) $_SESSION['lastAccess'] = time(); else { $_SESSION['lastAccess'] -= time(); } if…
-
0
votes1
answer1025
viewsA: How to search for files by name
Looking at your code, and assuming that’s all the code, <input type="text" placeholder="Search" ng-model="search"class="ng-pristine ng-untouched ng-valid"> The ng-model of the input has the…
-
3
votes2
answers5350
viewsA: How do I send data to a form using Curl?
cURL 'http://website.dom' -X POST -H 'Content-Type: application/x-www-form-urlencoded' --data 'data=valor&data2=valor2' -v cURL the command itself. 'http://website.dom' the site to/path to where…
-
3
votes2
answers177
viewsA: How to create an algorithm that automatically tracks certain pages of a website?
This action should be done before of inserting the message into the database, that way you won’t spend resources going through an X page in X time. pseudo-code: if…
-
1
votes1
answer825
viewsA: How to save request data in sessionStorage or Cookies?
You’ll have to record in localStorage the value you receive when you open the first time, when there is another click, you will check if the localStorage of this window already exists, if yes it…
-
2
votes1
answer68
viewsA: Option value change of the select element
@Felippetadeu Javascript starts to do bit Manipulation when it finds the value 0101 (which in ascii 8bit is equal to decimal 65); When the numbers/values you want to assign to a variable nay are…
-
4
votes1
answer412
viewsA: Return number with Regular Expression
I haven’t done PHP in a while, here goes: $artigos = [ "Art. 1 lala 23", "Art. 2 lala 23", "Art. 3 lala 23", "Art. 4345 lala 23", ]; $artigos_len = count($artigos) -1; for ($i=0; $i <=…
-
2
votes1
answer1489
viewsA: How to make the menu appear in bootstrap in mobile resolution without clicking the button?
In your javascript, you will need to see if the media-query that the browser is in is or is not the one you want to open the menu, if yes then put the "open-menu" class in the element (in this case…
-
3
votes2
answers3347
viewsA: Media queries do not work
media screen serves for Desktop (and Nexus) only, here is a list of all specific media queries you can use however, if you use only @media (max-width:NNpx) it will work without big problem :)…
-
2
votes2
answers72
viewsA: Button animation does not happen
Your CSS has to have transition and a "default state", here is an example in jsFiddle.net; Plus, the ,400 on the line $('#icone-menu').toggleClass('icone-menu-animacao', 400); is not necessary since…
-
0
votes2
answers972
viewsA: How to index on google sites that use javascript?
The Google already reads Javascript and if you go to yours Google Webmaster Tool you can understand better how it works :)…
-
2
votes1
answer839
viewsA: Validation in multiple input file with JS
var arquivo = $(".input_anexo").val(); is only catching the first element it finds; you have to make a loop to see if the values of each element input_anexo are allowed or not; Follow an example:…
-
0
votes1
answer1761
viewsA: Save variable value javascript in database
According to your answers, using jQuery.post, you can try the following: function showpos(position) { lat=position.coords.latitude; lon=position.coords.longitude; var latlon =…