Posts by I Wanna Know • 907 points
32 posts
-
0
votes0
answers40
viewsQ: Why always on the sixth Imageview I put the App hangs
<ImageView android:id="@+id/lampiaoId" android:layout_width="54dp" android:layout_height="164dp" android:layout_marginStart="96dp" android:layout_marginTop="340dp"…
-
0
votes1
answer188
viewsQ: How to compare name of two images in Android Studio
Having a imagem = (ImageView) findViewById(R.id.imageViewId); How do I know if the current image has the name x or y? I tried some ways with the equals and stuff, but it didn’t work.... if…
-
4
votes1
answer1607
viewsQ: How to put into a variable only the text that was selected within a textarea?
With var texto = document.getElementById('texto').value; I get everything that’s in the tetxarea that has this id, but what if I want a partial text? For example the whole text is this: Germany…
-
2
votes1
answer1337
viewsQ: How to use beforeSave in Cakephp 3?
I’m trying to get the image array to handle In Cakephp 2, I was like this: public function beforeSave($options = array()) { if(!empty($this->data['User']['picture']['name'])... Could someone…
cakephpasked I Wanna Know 907 -
1
votes1
answer178
viewsQ: How to insert an audio/mp3 using Cakephp?
I’m trying to view this: <?php echo $this->Html->media('musica.mp3'); ?> but nothing appears
-
1
votes1
answer419
viewsQ: How to use the "Answer" of an XMLHTTPREQUEST in Cakephp (2.5)
CONCLUSION: I put it up here to get a quick look, I was using onClick to get this function, but I was leaving the request(request) out of function so it wasn’t working. I have an action in the Posts…
-
1
votes2
answers685
viewsQ: How many lines did a database query return (Cake PHP)?
$this->Post->Comment->find ('all', array('conditions' => array('Comment.post_id' => $id))); I do this query, how to know if returned 5, 7, 10... comments before displaying them in the…
-
0
votes1
answer172
viewsQ: Linking Tables to Cakephp
There are two tables in the database, posts and comments and I want to relate them. I think I have to create a foreign key in the table comments in a field that holds the title or table id posts, so…
cakephpasked I Wanna Know 907 -
0
votes1
answer301
viewsQ: How do I create an external link using cakephp?
A link of the type below serves to link to a page(view) of our own system: <?php echo $this->Html->link('Listar todas as tarefas', array('action'=>'index')); ?> And if I want to link…
-
0
votes1
answer333
viewsQ: How do I get Phpmailer to send from my own server?
I asked the question below and after trying several ways to send email via localhost I got it from Phpmailer: How to send email from localhost using the PHP mail function? However I got through the…
-
22
votes3
answers51011
viewsQ: How to send email from localhost using PHP’s mail function?
I want to send emails from localhost. <html> <head> <meta charset="utf-8"> </head> <body> <h1> Olá mundo!</h1> <?php $enviar = mail(…
-
2
votes1
answer1412
viewsQ: How to instantiate an object of this class in C#
I’m reading Caelum’s booklet about C# and object orientation, so I put it in Account.Cs the following code: namespace Banco { class Conta { public int numero; public string nome; public double…
-
4
votes2
answers3116
viewsQ: How do I keep a website page at the same point it was before updating?
I have a page in html and php and put a form at the bottom of the page. When I click on the "send" button the page refreshes and goes up. This way the user has to scroll all the time until arriving…
-
1
votes3
answers958
viewsA: Using Visual Studio and C++ how to prevent the debug screen from closing automatically?
After doing a search, I checked that I can prevent the debug screen from closing using: system("PAUSE");
-
2
votes3
answers958
viewsQ: Using Visual Studio and C++ how to prevent the debug screen from closing automatically?
Using the code below I type the two numbers, but if I give enter after typing the second number the answer appears quickly and the debug closes. int main(){ int num1, num2, answer; cout <<…
-
2
votes2
answers1100
viewsQ: Why in the debug of C++ accented words and c cedilla appearing uncompromised?
When debugging the accented words they do not match. How do I correct this? Using Visual Studio. int main(){ int apples = 50; cout << "Há"<< apples <<"maçãs."<< endl; return…
c++asked I Wanna Know 907 -
2
votes2
answers281
viewsQ: Save visitor IP in text file, but how not to save again if already there and how to read?
I used the answer to this question to save the IP in a text file: How to save the IP of those who visited my site in a text file? The thing is, I want to create a button like "enjoy" so that…
-
2
votes1
answer2690
viewsQ: How do I save the IP of the person who visited my site to a text file?
I’m using the code below, but only writes "::1" to the file. <?php $arquivo = "ips.txt"; $file = fopen($arquivo,"a"); $string = $_SERVER['REMOTE_ADDR'] . "\n"; $fp = fwrite($file,$string);…
-
8
votes2
answers27161
viewsQ: How to destroy a specific session?
Here’s the thing: I have an application/game that uses sessions to memorize the data that users have chosen. Whenever the user restarts the game I need to reset the information, so was using…
-
1
votes1
answer233
viewsQ: How do ORDER BY with information that may vary?
I’m getting a list of articles from a database and I want to have on page one tool that allows me to list them in order of date they were written or in alphabetical order. Here I have my bank…
-
2
votes1
answer3256
viewsQ: How do I use $_GET to pick up content from a link that was sent to a user’s email?
I sent this link to a user’s email: http://www.example.com/redefinir_senha.php?token=4kl_EIwmivsCg52TsBgWWgWMPsApjFTJL8oBUXPDoHE&uid=USER-ID On the page reset.php password I know how to do the…
-
3
votes3
answers326
viewsQ: How to make a function where every time a variable is called is increased by 1?
For example, amid my code I do echo $num; //me retorna 1, mas se eu ecoar novamente a variável "$num" //me retornará 2 e assim sucessivamente. I tried a lot of different ways, but I couldn’t:…
phpasked I Wanna Know 907 -
8
votes2
answers15096
viewsQ: How to count the number of characters of the word that came from the first line of a text file?
Below is an example of how to count the number of characters in a string: $palavra ="coisa"; echo strlen($palavra); //retorna o número 5 However I am taking this word from a text file and the strlen…
-
2
votes3
answers275
viewsQ: How to make a php script inserted into a page through a "require" run from time to time?
In the answers to question of the link below I posted how I managed to delete from the database the user information that not activate in up to 24h your registration through the link sent to your…
-
3
votes4
answers1111
viewsA: How to delete the database registration if the user does not activate it by email within "X" hours?
Guys I’m not a programmer, I’m in the group as an enthusiast. I ask questions to find out what I don’t know and to gain "insights". I managed to resolve the situation this way: First I did this: At…
-
5
votes4
answers1111
viewsQ: How to delete the database registration if the user does not activate it by email within "X" hours?
Well, when registering on the site the user has its ACTIVE set to 0, so with the code I posted in the answer of the question link below I can update the ACTIVE to 1: How to enable a user’s email…
-
2
votes1
answer1080
viewsQ: How to activate a user’s email registration?
Well, when registering the user has its ACTIVE set to 0, how to send an email with a link so that when clicking this link the user updates the asset to 1.
-
0
votes1
answer1220
viewsQ: Is there any way in HTML to prevent the user of a site from using the browser zoom?
In the html audio tag can I set the player size? In Explorer gets very big! My problem is this: I would like the use of zoom in and zoom out of the browsers not surtisse effect on a particular page…
htmlasked I Wanna Know 907 -
1
votes3
answers7802
viewsQ: Why did replacing all my "mysql" with "mysqli" stop my project?
What should I do? I must configure in the database? Before everything worked normally, user registration, login... <?php $host ="localhost"; $user ="root"; $pass ="senha"; $banco="usuarios";…
-
2
votes1
answer2194
viewsQ: How to show the number of views of each page of the site with PHP?
In my database in the table paginas I have the fields pagina_1, pagina_2 and pagina_3 representing the three pages of my website. In these fields I will insert the page views as below. In the code…
-
8
votes2
answers2031
viewsQ: How to take the position of an individual user in a rank, if in the database I only have your score?
With the code below I can display all users as I put DESC and the variable $num and increasing the placement with $num++;. But what if I want to take the placement/rank of the guy who’s logged in…
-
4
votes3
answers15493
viewsQ: How to add the results of an array brought from the PHP database?
I’m doing this, but what’s being added up is the number of lines and not the field values "something". <?php $searc= mysql_query ("SELECT algo FROM lugar") or die (mysql_error()); while ($rows =…