Posts by Antony Alkmim • 1,715 points
46 posts
-
3
votes2
answers133
viewsA: Select multiple lines with PHP JSON
The second format also traverses all the lines, however, appears only the last one because in every loop you are assigning new value to the variables. Using this would already be enough to format…
-
2
votes1
answer33
viewsA: Has to erase Imagebutton
You will need to report an ID for each ImageButton. ImageButton imageButton = (ImageButton) LayoutInflater.from(this).inflate(R.layout.imagebutton, null); imageButton.setImageBitmap(bMap);…
androidanswered Antony Alkmim 1,715 -
3
votes1
answer1103
viewsA: Video startar with autoplay, but with volume in 50% or mute!
To mute the video or audio: <video muted id="myVideo"> .... </video> To control the volume javascript is used: var vid = document.getElementById("myVideo"); vid.volume = 0.2; Using…
-
5
votes1
answer1073
viewsA: Lock Media Screen CSS
The META Tags of html. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> The initial-Scale property controls the amplification level when…
-
3
votes2
answers2499
viewsA: How to take position of the Object (Indice)
As described in documentation of $.inArray(), when it finds the element it returns the position it is in, if the element does not exist it returns -1.…
-
1
votes1
answer892
viewsA: Calculate deadlines other than on weekends
This method calculates a deadline so that a deadline is not a Saturday or Sunday. function calcularPrazo($prazoPrevio){ $dataSTR = date('d-m-Y'); //hoje $data = explode('-',$dataSTR); //time do dia…
phpanswered Antony Alkmim 1,715 -
4
votes3
answers4720
viewsA: Implement HTTP POST and GET Requests on Android
The Volley on android to make these requests. Volley is a library in development by google itself to control these requests. Example using Jsonobjectrequest volley: RequestQueue queue =…
-
11
votes2
answers5742
viewsA: Use global variable in more than one js file
If redirecting you lose the information contained in the variable because the file GeraGridDados.js will charge again. An easy solution to this is to use localStorage // Armazenar…
-
1
votes4
answers1289
viewsA: Javascript URL redirect code
This way you can take the whole URL and do the necessary checks: switch(document.URL){ case 'http://www.meudominio.com/index.html': location.href='/index.html?parametros' break; case…
javascriptanswered Antony Alkmim 1,715 -
2
votes2
answers192
viewsA: Open file . txt as tooltip
Good for reading a file .txt needs a language backend(wheel on server side). Below an example would be using PHP which is the easiest and fastest way: <?php $txt =…
-
6
votes1
answer5853
viewsA: How do I open this function url in a new tab
Use target on your link. Insert target='_blank' in your code: <a target="_blank" href="'.$pattern.'">'.$pattern.'</a>'…
-
1
votes1
answer59
viewsQ: How to use Uibutton icon
How I put an icon in a UIButton through the .storyboard? Through the .storyboard has the options of UIButton between them has the option image where I can enter a path to an image for the button.…
-
1
votes1
answer1508
viewsA: Clear database table
Try this, remove where it is different from NULL. Since every record should probably have an id, then remove all. String where = "id IS NOT NULL"; public boolean deleteAll() { String where = "id IS…
-
1
votes2
answers193
viewsA: When to use Em or %?
Here explains the difference between all CSS metrics. IN Units of EM values are the most complicated to work with. It is abstract and arbitrary. Here is an example, 1em is equal to the current font…
-
1
votes2
answers88
viewsA: How do I use @media to block padding-top in smaller resolutions?
Utilize class along with @media: .minha-div { padding-top: 68px; width: 300px; float: left; } @media (max-width: 300px) { .minha-div { padding-top: 0px !important; } } <div style=""…
cssanswered Antony Alkmim 1,715 -
2
votes3
answers5507
viewsA: Comparing 2 password fields if they are equal
The mistake is this: $('#txtSenha').val() != '#txtSenhaConfirme').val() is forgetting a $( while the correct would be: $('#txtSenha').val() != $('#txtSenhaConfirme').val()…
-
3
votes2
answers1969
viewsA: Get Radio Button value in Foreach-JS
Here is the solution: document.querySelector('input[name="plano_ouro"]:checked').value;
-
0
votes1
answer403
viewsA: How to start by genymotion in eclipse
First create an emulator in Genymotion and let it run. Right click on your project > Run As > Run As Android Application: Open a window with the devices connected to your computer and also…
androidanswered Antony Alkmim 1,715 -
0
votes2
answers220
viewsA: Is there a function to reindexe a multidimensional array?
Use the function array_values: for($i=0; $i<count($array); $i++){ $array[$i] = array_values($array[$i]); } Here has a test of it working.…
-
1
votes2
answers306
viewsA: Datepicker from Bootstrap
Use the following in your CSS: .datepicker table tr td{ width:auto !important; height: auto !important; font-size: 11px !important; } To change the size of datepicker just change the font size.…
-
2
votes3
answers365
viewsA: How to use multiple $_GET in PHP through a URL
You must do the following: <?php echo isset($_GET['c']) ? "<div class='campo1'>" . $_GET['c'] . "</div>" : ""; ?> or <?php if(isset($_GET['c'])){ echo "<div…
-
2
votes1
answer421
viewsA: Save compressed file to another directory
The directory you want to save to should be passed as parameter when opening the file: Example: ./backup/arquivo.zip $diretorio = "./backup/"; $zip->open($diretorio.$data.$exten,…
phpanswered Antony Alkmim 1,715 -
4
votes3
answers432
viewsA: Conditional for verification
Use the function $.inArray() jQuery var sim = [1, 3, 5, 6, 7, 9, 10]; var nao = [2, 4, 8, 11, 12, 17]; var x = 2; if ($.inArray(x, sim) != -1) { document.write('sim'); } else if ($.inArray(x, nao)…
-
6
votes3
answers3171
viewsA: Read txt file for Select
The easiest way to do it is by using the function file(), she reads the file and returns a array containing for each position a line of the read file. This way you will be able to read each line of…
phpanswered Antony Alkmim 1,715 -
0
votes3
answers245
viewsA: Programmer of Windows Tasks
When you want to close the window you can do the following: echo "<script>window.close();</script>"; But depending on its application, the reply @lost would be better calling PHP in your…
-
0
votes1
answer1045
viewsA: Calling a Class by javascript/Jquery
A solution would be a specific address that calls a specific method you need. Example: Archives: index.php: where we will make the call ajax; ActionClass.php: Your Class Action; action.php: File…
-
2
votes5
answers611
viewsA: How to count items correctly?
<?php $contagem = explode(',', $episodios); $count = count($contagem); $mensagem = $count > 2 ? "Ultimos Episodios Postados" : "Ultimo Episodio Postado"; ?> …
phpanswered Antony Alkmim 1,715 -
0
votes2
answers1462
viewsA: Bug when using Select2 in a Bootstrap form-group
I don’t know if it’s the best answer but from what I found to solve your case, you should put the first <option> with the small text Example: <div class="container"> <form…
-
5
votes2
answers16723
viewsA: Picking values with names in JSON
You are trying to access in the wrong way, to access the data of this JSON you must do so: $.ajax({ type: "POST", dataType: "json", url:…
-
3
votes1
answer691
viewsA: Remove from binary search tree
1: In the Case 1 you are removing a knot that has no children from either the right or the left. Remove it from memory and arrow like null so that the father of root does not point to a memory site…
-
3
votes1
answer4628
viewsA: Iteration VS Recursive Methods
Iterativity It’s better than recursive when we’re analyzing performance. Readability of iterative codes requires some programmer experience, mainly in larger code, with many nested loops.…
javaanswered Antony Alkmim 1,715 -
7
votes1
answer1673
viewsA: jQuery function must be executed only on mobile
You can detect the screen size and perform the function: screen.width and screen.height respectively store the width and height of the screen. if(screen.width < 1024){ //executa a funcao para…
-
2
votes1
answer577
viewsA: Critical section problems in concurrent programming
So that there is no impasse when it comes to critical section, one must look beyond the Progresso to Exclusão mútua e Espera Limitada. Mutual exclusion - If the Pi process is running in its critical…
-
4
votes1
answer7539
viewsA: bootstrap modal does not work
For the modal to work there must be an event that in the case of this example was the button event data-toggle="addhor". <button type="button" class="btn btn-primary btn-lg" data-toggle="modal"…
-
3
votes2
answers4941
viewsA: How to capture keyboard action without pausing the C++ program?
I found in this link my answer kbhit char tecla; do{ if(kbhit()){ tecla = getch(); switch(tecla){ case 'W': //cima break; case 'S': //baixo break; } } //executo meu programa bazeado na tecla…
c++answered Antony Alkmim 1,715 -
4
votes2
answers4941
viewsQ: How to capture keyboard action without pausing the C++ program?
How do I capture a keyboard action without pausing the program? For example: char tecla; do{ scanf("%c", &tecla); printf("%c",tecla); }while(tecla != '0'); I wanted it to be on a loop, but when…
c++asked Antony Alkmim 1,715 -
4
votes2
answers503
viewsA: What is the error in this Code:
Friend, correct variable name : int logitude = -64; go_south_east(&latitude, &longitude); When this declaring is missing an 'n' in longitude.
-
2
votes1
answer336
viewsA: Change font color of a cell Table with ajax
Try to do this: if (resposta[0]) { var tabela = $('#tableUsuario tr'); $.each(tabela, function(index, tr) { var checkbox = $(tr).find("input:checkbox"); if ($(checkbox).is(':checked')) {…
-
0
votes4
answers522
viewsA: AJAX does not pass values to PHP
Change the type of your button <button type="submit" id="btnDesativar" name="btnDesativar" >Desativar conta</button> for <button type="button" id="btnDesativar" name="btnDesativar"…
-
1
votes3
answers3234
viewsA: Picking up IP LAN for sending with ajax
I don’t think you can do that, because local addressing is a way for your router to distribute 1 WAN address to various machines on the LAN through NAT. The local address is managed by the router…
-
0
votes3
answers3234
viewsA: Picking up IP LAN for sending with ajax
This function returns the IP of the machine accessing the page: function myIP() { if (window.XMLHttpRequest) xmlhttp = new XMLHttpRequest(); else xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");…
-
1
votes5
answers758
viewsA: How to embed CSS in HTML tags?
Using jquery you can do the following: <html> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script> $(function() {…
-
0
votes2
answers2961
viewsA: How to copy data from another site with PHP?
You will need to use some Webservice. Make a request on a given address passing the name of the ship as parameter and this address returns a JSON containing the data referring to this parameter in…
phpanswered Antony Alkmim 1,715 -
4
votes2
answers532
viewsA: How to use CSS style in application?
Have you tried using the Style Builder? If it doesn’t work, test this too $.ui.useOSThemes = false;…
-
1
votes1
answer96
viewsA: Switch in Application.ini ZF 1 configuration
You can modify the database settings in bootstrap. At this link has an example of how to use multiple Databases. Just tell us which database you want to use. Add connections to your file…
-
14
votes3
answers3827
viewsQ: How to publish applications done in Node.js
Well, I’m new with Node.js, I was able to build an example application, I learned a lot from Node with Express, but I can’t understand how to publish the application on the linux server. Does anyone…