Posts by David Damasceno • 846 points
33 posts
-
0
votes1
answer63
viewsQ: Strange characters when executing a method to add matrices
Good morning guys, I’m a beginner in Java and I have a little problem here. Can anyone tell me what are these strange characters that appear on the console when executing a matrix sum method (I’m…
javaasked David Damasceno 846 -
0
votes0
answers55
viewsQ: Error in PHP PDO Class
Guys I’m trying to use the PDO class in one of my systems and this error is appearing, and the PDO class is already installed. Fatal error: Class 'PDO' not found in…
-
0
votes1
answer115
viewsA: Creating unique browser actions(Jquery)
You must use this code to identify the user’s browser: if (jQuery.browser.mozilla){ // Seu código aqui se for o firefox seu navegador else if (jQuery.browser.msie){ // Seu código aqui se for o…
-
1
votes1
answer62
viewsA: Align DIV dynamically like a stained glass window
I made an example on jsFddle for you to understand the operation, but I’ll also put here: Basically, you control the columns with the tags column-count and column-gap of the CSS. .geral{padding:…
-
3
votes2
answers637
viewsQ: Convert Html to Canvas
Is it possible to convert an html page to canvas? For example, I have a page built in Html5 and wanted this page to be all "minified" for just one tag ? I don’t want the html page to become an…
-
1
votes2
answers439
viewsA: How to checkbox in the corner of an image?
Before the line that returns the database image add the following html code: <div class="check"><input type="checkbox" name="imgDb" value="imgDb" /></div> being like this: echo…
-
1
votes5
answers4348
viewsQ: How to access the value of an array through the key?
I have the following array: var arr = [ {'David': '1'}, {'Camilla': '2'}, {'Sadat': '3'}, {'Vanuza': '4'}, {'Diego': '5'} ]; I wanted to access the "Camilla" value of the array I created. Ps: I want…
-
2
votes1
answer2185
viewsQ: Subtract days from current date with PHP
Hello, I would like to know how to decrease, for example like this: $datacurrent = '20/02/2016'; $dataSubtracao = '18/02/2016'; $Calc = $dataAtual - $dataSubtracao; //As a result I wanted to return…
-
2
votes1
answer214
viewsQ: How to Capture Audio with HTML5 and Javascript?
I’m doing research on audio recording with HTML5, but none of the tutorials I found worked, many of them use getUsermedia(), but it seems to me it’s deprecated, then, someone could introduce me a…
-
1
votes1
answer257
viewsQ: Click on zoom button to show the whole country (Brazil) on Google Maps
Hello I would like you to please help me with an example of how to do for when the user click a button next to the map cause the map to zoom in to show the whole country. I couldn’t make a practical…
-
1
votes2
answers239
viewsQ: Click and add id to the array. If you click again, remove this id
I have a problem, I have a list and when the user clicks it adds the id of this <li> in an array, but I want when it click again on that <li>, this id is removed from id. Here it is in…
-
4
votes1
answer2432
viewsQ: Return Purchase Status on Automatic Return of Pagseguro Notification
Does anyone know how to identify payment status in the automatic return of pay notifications? For example, if the user made the payment then, my.php notification file receives a post from pagseguro,…
phpasked David Damasceno 846 -
2
votes1
answer346
viewsQ: SQL LIMIT always returns the same last 3 records
I have a problem in a select. I have the following table id id_de id_para mensagem --- --------- ----------- ----------- 1 10 20 Oi David. 2 20 10 Oi José 3 10 20 Tudo bem? 4 20 10 Sim, e com vc? 5…
-
2
votes1
answer106
viewsQ: Problem with posting via Ajax
I’m creating a chat with websocket, when I send a message it saves the message in the database. This is the example of how it sends the message post But the problem is when I send a function…
-
-1
votes1
answer974
viewsQ: How to encrypt a POST via Ajax
How do I encrypt the posts I send via Ajax? For example in Telegram Web they do this, you can see by XHR with the requests sent and received. Example of how it is in Telegram Web (I wish my…
-
3
votes2
answers1336
viewsQ: How to transform input value into string
How do I transform the value of an input into a string, including if the user types HTML tags, with Javascript or jQuery. <div class="val-input" contenteditable="true"></div>…
-
1
votes1
answer139
viewsQ: Turn div into string
How to turn a div into a string? Follow the example of how I wish it to look: <div class="teste">oi</div> in: "<div class="teste">oi</div>"…
-
5
votes2
answers374
viewsQ: Click on Notification Desktop and go to the same window without refreshing the page
I am developing a chat with Websocket and I have a problem, when I send a message to a friend, he receives the desktop notification (from the browser he is) and when he clicks on the notification he…
-
2
votes1
answer661
viewsQ: Replace text with HTML when it contains value in DIV
I got the divs: <div class="mensagem"> <div class="texto-mensagem">:D, :( Olá Mundo!</div> </div> I want the results to print this: <div class="mensagem"> <div…
-
2
votes1
answer2014
viewsQ: How to put 2 elements concatenated with variable in a selector with jQuery?
I have 2 variables and I want to put the same concatenated in just one selector with jQuery: I know it’s possible to do it this way: $(".classe1, .classe2").append(...); But I want to concatenate…
-
4
votes1
answer1736
viewsQ: Send a message to the specific user in Websocket PHP
I have a live chat app with Websocket. But at the moment it sends messages to all users, would like to know how to send to a specific user. In case when I click on the user (from a list that appears…
-
2
votes2
answers1792
viewsQ: Generate random number with date value and current time with Javascript
I would like to know how to generate a random number, based on the current date and time value, using Javascript. I couldn’t get a real example to show here, because I really don’t know how to do…
-
5
votes1
answer818
viewsQ: Whatsapp Web uses Node.js?
I would like to know what technologies used in the development of Whatsapp Web. Ps: Question at search level.
-
0
votes1
answer825
viewsQ: How to save request data in sessionStorage or Cookies?
I am developing a chat with Websocket and in it there is the list of users, when I click on a certain user starts a conversation only with that user, my question is the following: when clicking the…
-
4
votes1
answer9724
viewsQ: How to access webcam and photo with HTML5 and Javascript?
Does anyone have an example showing how to implement this application and then save the image?
-
3
votes2
answers7541
viewsQ: If input has only blanks, do nothing
I’m making an application of chat with Websocket. I used contenteditable="true" in a <div/>, because I needed to put so to facilitate in other functions. On the part of input that sends the…
-
4
votes3
answers1678
viewsQ: How to run code just in the first click?
I have a list of buttons (<li>): <li id="1">link 1</li> <li id="2">link 2</li> <li id="3">link 3</li> <li id="4">link 4</li> <li…
-
2
votes1
answer996
viewsQ: How to send message only to a user with Websocket
I have a live chat app with Websocket, but at the moment it sends messages to the entire group, I would like to know how to send to a selected user, in case when I click the user (from a list that…
-
4
votes1
answer1895
viewsQ: How to identify which user is on my website page with Jquery
I’m making a script to identify if the user is on the site or not, but I have no idea how to do it, could someone help me? My doubt is the following, I want to know if the user is on my page, for…
-
1
votes1
answer587
viewsQ: Clear json array after Ajax from a PHP file
Does anyone know how to clear a json array via ajax from a php file? I have a setInterval that checks every 2 seconds and receives data from a php file( this data is brought as json array, I can see…
-
2
votes0
answers77
viewsQ: Windows 8 push notification with PHP
I wanted a very simple example of how notifications are made windows 8 or 7 with PHP.
-
1
votes0
answers141
viewsQ: Bring Older Results with Long Polling
I am creating a system and I want it to bring all the results already recorded in the database, but it only returns the recorded data from the moment I refresh the page, for example if I insert 10…
-
2
votes3
answers165
viewsQ: Does not display user names in Jquery Alert
Well I want to access the text content inside the div and show in an Alert(), but for this I have a list of users selected from the database, I made a small trick to add a counter in each class of…